ONVIF: wsdl files from website vs from device - wsdl

I am trying to write an ONVIF client to manage an ONVIF compliant device. For a specific service, I can get the wsdl file from the device, or get it from onvif.org. What is the difference between these two methods?

With the adoption of profiles, even if they are different nothing changes. ONVIF specifications for the services and their WSDL files may change, but the set of features and functions mandatory for a profile conformant device is immutable.
Therefore there is no change in practice.

Related

How to write a library for multiple devices with similar versions of an API

I am trying to develop a library of shared code for my company.
We are developing on a technology by SICK called AppSpace, which is designed for machine vision. AppSpace is a stand alone eco-system, beneath which there comes a variety of SICK programmable devices (e.g. programmable cameras, LiDAR sensors), and an IDE with which these can be programmed. Programs are written in Lua, using HTML/CSS for the front end.
AppSpace provides a Lua API for these devices.
In my company, a few of us write applications and it is therefore important that we create a library of shared code to avoid redundancy / rewritten code.
However, each firmware version of each device has a corresponding API version. That is to say, that on a given device the API can change between firmware versions, and also that API versions differ across devices. Two devices will have two different sets of API functions available to them. Functions they share in common may also have slightly different implementations.
I am at a loss as to how such a situation can be properly managed.
I suppose the most "manual" route would be for each device to have its own partial copy of the library, and to manually update each device's library to have the same behavior each time a change is made, ensuring that each device conforms to its API. This seems like bad practice as it is very error prone - the libraries would inevitably become out of sync.
Another option might be to have a master library, and to scrape the API documentation for each device. Then build a library manager which parses the Lua code from the library and identifies missing functions for each device. This seems completely impractical and also error prone, probably.
What would be the best way to develop and maintain a library of shared code which can be run on multiple devices, if it is even possible?
I would like to answer this and review some of the topics discussed.
First and foremost; functions that are shared in common between devices will be implemented differently by means of the compiled code on the respective device (i.e. PC, 2d camera, 3d camera, LIDAR, etc) while the functionality maintains the same between them all. This way the code can be readily ported from one device to another. That is the principle of the SICK AppEngine that is running on all SICK AppSpace devices as well as 3rd party hardware with AppEngine installed.
The APIs embedded into the devices are called a CROWN (Common Reusable Objects Wired by Name) component and can be tested against nil to determine if they are exposed APIs. Here's an example of an CROWN called 'IMAGE'. If it exists than you could run this code when it does.
if IMAGE then
--do code
end
SICK also has a AppPool that you can upload your source code to and it will test all the required CROWNs and return a list of all SICK devices that can run properly.

Blocking all connections to a specific domain only

I've been struggling to find how I could potentially implement a simple (iOS) app that would be able to block all connections to a specific domain (to prevent the user from accessing a specific social media platform for example, even from another app).
The information that I have found so far is that I should probably create a Packet Tunnel Provider within a Network Extension and ask the user to add VPN configurations, but I haven't found any example code that would show exactly how to implement this.
Do you have any idea how I could do that in a simple way (block all connections to a specific domain)? Is there a framework/library that I could use to do it easily?
Thank you!
Well, it would not be easy, but you can do it.
Sample code from Apple could be found here and here. This project is for iOS, but it may be on deprecated Swift version, so you will need to do some work to launch it now.
The part you are interested in the SimpleTunnel sample is FilterDataProvider and FilterControlProvider, other things you can omit, because the purpose of this sample is to demonstrate a lot of abilities.
There is also a sample for macOS that is more focused on your needs, and macOS SDK is alike to iOS, but less powerful.
You may want to see this video to sort things up in mind.
There are a lot of firewalls solutions for ios and mac, and some of them are opensource
The part you are interested in the SimpleTunnel sample is FilterDataProvider and FilterControlProvider, other things you can omit, because the purpose of this sample is to demonstrate a lot of abilities.
You will need a developer account, a network extension capability assigned to an application identity, and proper network extension entitlement file a to run things up.
There is a way to sign it manually for development without account&capability, but to distribute you will need it anyway.
For some restrictions you may be needed to install MDM profile on the device.

Getting Core Bluetooth Service and Characteristic Strings

I'm in the process of writing a CoreBluetooth driver in Swift, and I'm discovering services and characteristics.
One thing that I've noticed, is that the Apple operating system always returns standard Bluetooth characteristics and services as strings instead of raw UUIDs, identifying them.
For example, instead of saying "180A", the log will say "Device Information," or somesuch.
I see these in English. I have no idea if they are localized.
I'd like to be able to access these values for my own purposes (logging and debugging), but I can't find them listed anywhere.
Is there a known, standard place that publishes a glossary that I could use? The best, of course, would be if I could access the Apple pages, but I don't see anything in CoreBluetooth that describes this.
Otherwise, I need to set up my own glossary.

Possible to create a zeroconf service with Delphi XE5?

Working on an appliance and would like to support zero configuration feature. That way users can look for the device on the network and simply double click an icon to access the web interface without having to configure it or know its ip address.
Tried to use UPNPLib_TLB but functions seem to be read-only; am I right? I can create a device using CoUPnPDevice.Create but can't set a FriendlyName or a URL.
Tried to use Deltics Bonjour service but it crashes on create (ACCESS_VIOLATION). The demo code uses a custom test unit which complicates experimentation.
After much research it does not look like there is a component available for this and would appreciate some pointers. Has anyone successfully created a zeroconf broadcast either via UPnP or Bonjour with Delphi XE2/5.. I can go back to Delphi 7 if required. Target = Windows 7.
NOTE: To be clear, I can find existing devices on the network and don't want to enumerate existing devices but what I want is to broadcast my service so that my box behaves like a network printer for example. The only service I need to expose is the URL so that users can access an embedded web server.
Appreciate the help!
EDIT
With the tips provided I did some research and getting this done the RAD way is not possible.
Using MS APIs directly is time consuming and requires a level of understanding of C that I don't have. Porting the Delphi 5/Indy 7 component to XE2/5 will require a good amount of work and debugging.
I discovered UPnP developer tools from Intel now open source here: Developer Tools for UPnP. This tools makes it really simply to create a server in 10-15 lines of code. Intel provides a DLL that I can call from VS Express as follows and it works great:
device = UPnPDevice.CreateRootDevice();
device.FriendlyName = 'My name';
device.PresentationURL = 'URLToEmbeddedServer";
..
I tried to use headconv7 tool to convert the .h file Intel's UPNP.DLL to a pascal file and call the external functions within the DLL directly from Delphi but there were too many problems with the conversion.
It's too bad because the Intel library makes it really simple to create UPnP stacks and the approach would apply itself very well to a component but for now its quicker to use .NET and VS Express to get the job done.
When using UPNPLib_TLB, you are not supposed to create a UPnPDevice object directly. UPnpDevice describes a known device on the network, which is why its properties are read-only.
Read the documentation:
Control Point API
Finding Devices
You are supposed to create an instance of the UPnPDeviceFinder class instead. Its search methods will give you a UPnDevice object for each device that is found.

Blackberry reflection for BBM Integration

I'm currently trying to use the BBM SDK 1.0 (net_rim_bb_qm_platform.jar).
The integration works no problem, except when the device has a BBM version lower than 6, as per the library's requirements.
I'm wondering if there's some sort of "reflection" type of system I could use to test at startup whether to include the library, which I highly doubt. Or a way to restrict downloads on App World, i.e. if the device has BBM 5, download a version without BBM integration, else download the other.
First, you need to decide whether your app must have BBM, or if it can still run without BBM, in some degraded mode (fewer features). It sounds like your app can run without BBM, so I'll address that scenario:
Take a look a this documentation and sample code from R. Masroor on BlackBerry.com.
From the description (bold is mine):
The RIM supplied BBM dependency checker samples, provide two
approaches to integrating with BBM.
a) The proxy method which is appropriate when the application will not
run without BBM – it directs the user to download BBM.
b) By contrast,
the interface method provides a way for an application to isolate
itself from the BBM, so that the application can still run even if BBM
is not installed.
Why is this isolation needed? Because if a cod (project) references
any BBM methods, then BBM must on the device and at a suitable level
before that cod can be loaded. So if an application directly
references BBM and there is no BBM (or no suitable level of BBM) on
the device, the application will not run.
Of the two approaches, the interface approach is probably the most
useful, as most applications have functionality without BBM. But this
approach has two disadvantages:
• It requires a start up process to
register the RuntimeStore Object
• The layered approach and the use of
call-backs makes this quite complicated for me.
The attached project demonstrates a variation on the interface method,
that creates the interface object at Application start-up, using
class.forName(). Aside from this change, the sample provided is
similar to the interface method, and is explained below. After the
explanation of the attached project, this document explains how to
create a different structure which you may find easier to work with.
Also, for reference, you can take a look at the BBMSDKDemoProxy sample project that comes with the BBM SDK download.

Resources