IMPLEMENTAZIONE ONVIF SU TELECAMERE MUNDUS SECURUS 1. Ambiente di sviluppo Sono stati analizzati diversi linguaggi e framework differenti utilizzabili per implementare i WebServices ONVIF. Il risultato migliore in termini di prestazioni e consumo di memoria è risultato C/C++ su framework gsoap. 1. gsoap Il framework gsoap permette: L implementazione di client in grado di invocare servizi web esposti anche attraverso differenti piattaforme. L implementazione di servizi web utilizzando il linguaggio C/C++ A partire dai file WSDL e XSD che definiscono WebService e formato dei dati scambiati, questo framework è in grado di generare automaticamente: I prototipi delle funzioni che il WebService fornisce. Le strutture dati che definiscono input e output dei metodi esposti. Serializzazione e deserializzazione dei messaggi XML che sono scambiati nella comunicazione nel protocollo SOAP. L infrastruttura di base necessaria a gestire errori, sicurezza, parsing dei messaggi. GSoap supporta inoltre specifiche quali WS-Addressing, WS-Security e WS-Discovery richieste dal protocollo Onvif. 2. Funzioni implementate Viene di seguito tabulato l insieme dei metodi sui vari Web Service e lo stato di implementazione su telecamera: AddScopes GetDiscoveryMode GetScopes GetServices RemoveScopes SetDiscoveryMode SetScopes GetCapabilities GetDNS GetHostname GetNetworkDefaultGateway ONVIF Core Web Service Device discovery Device Management Capabilities Network
GetNetworkInterfaces GetNetworkProtocols GetNTP SetDNS SetHostname SetNetworkDefaultGateway SetNetworkInterfaces SetNetworkProtocols GetDeviceInformation GetSystemDateAndTime SetSystemDateAndTime SetSystemFactoryDefault SystemReboot CreateUsers DeleteUsers GetUsers SetUser CreatePullPointSubscription GetEventProperties System Security Event Handling 3. Conclusioni Viene di seguito descritto lo stato di completamento dei singoli WebService che compongono il protocollo Onvif. 1. Service Discovery Il modulo per il service discovery risulta completo in tutte le sue parti. La telecamera è in grado di: GOAL.1: Mandare il messaggio di Hello sulla sottorete all avvio del software. GOAL.2: Mandare il messaggio di Bye sulla sottorete alla chiusura del software. GOAL.3: Rispondere ai messaggi di Probe inviati sulla sottorete da dispositivi Onvif client. GOAL.4: Gestire i messaggi del protocollo WS-Discovery anche in caso di interfacce di rete multiple o indirizzi IP multipli.
2. Interfaccia DeviceMgmt Sono state implementate le seguenti funzionalità: GOAL.5: Configurazione delle interfacce di rete ethernet. È possibile configurare le interfacce di rete usando la configurazione manuale dei parametri oppure la configurazione automatica tramite DHCP. GOAL.6: Configurazione del nome host. GOAL.7: Configurazione dei DNS in manuale. GOAL.8: Configurazione di data, ora e fuso orario. GOAL.9: Riavvio del sistema. GOAL.10: Configurazione dei parametri relativi al service discovery. GOAL.11: Gestione degli account utente. GOAL.12: Ripristino delle impostazioni di fabbrica. GOAL.13: Verifica dei privilegi utente sulle singole operazioni. 3. Interfaccia Events Il modulo Events è stato implementato nella modalità PUSH. Risulta implementata la funzionalità di accodamento e memorizzazione dei messaggi necessario nella modalità PullPoint. In particolare sono state implementate le seguenti funzionalità: GOAL.14: Gestione delle Subscription e delle Unsubscribe da parte dei client. GOAL.15: Gestione delle funzionalità EventCapabilities e EventProperties necessarie per indicare ai client quali sono le funzionalità implementate dal modulo Events. GOAL.16: Invio delle notifiche in modalità PUSH. GOAL.17: Gestione di una coda di messaggi da inviare in modalità PullPoint.
ONVIF IMPLEMENTATION ON MUNDUS SECURUS CAMERAS 1.Environment of Development Were analyzed several different languages and different framework that can be use to implement the WEbServices ONVIF. The best result in terms of performance and memory consumption was C/C++ on framework gsoap. 1.gSoap The framework gsoap allows : The implementation of client that can invoke web services exposed also though different platforms. The implementation of web services using the language C/C++ Starting from the files WSDL and XSD that define the WebService and form the exchange data, this framework is able to automatically generate: The prototypes of the functions that the WebService provides. The data structure that define input and output of the exposed methods. Serialization and deserialization of the XLM message that are exchanged in the communication in the SOAP protocol. The basic infrastructure necessary to handle errors, security and parsing of message. GSoap also supports specifications as WS-Addressing, WS-Security and WS-Discovery request by Onvif protocol. 2. Functions The following printout is the set of the methods on the Web Service and the state of implementation on the camera: AddScopes GetDiscoveryMode GetScopes GetServices RemoveScopes SetDiscoveryMode SetScopes ONVIF Core Web Service Device discovery Device Management Capabilities
GetCapabilities GetDNS GetHostname GetNetworkDefaultGateway GetNetworkInterfaces GetNetworkProtocols GetNTP SetDNS SetHostname SetNetworkDefaultGateway SetNetworkInterfaces SetNetworkProtocols GetDeviceInformation GetSystemDateAndTime SetSystemDateAndTime SetSystemFactoryDefault SystemReboot CreateUsers DeleteUsers GetUsers SetUser CreatePullPointSubscription GetEventProperties Network System Security Event Handling 3.Conclusions Below is described the completion status of the single Web Service that composed the Onvif protocol. 1.Service Discovery The module for the service discovery is complete in all parts. The camera in able to : GOAL.1: Send the message Hello on the subnet after starting the software. GOAL.2: Send the message Bye on the subnet after closing the software. GOAL.3: Replaying to the messages of Probe sent on the subnet from devices Onvif client. GOAL.4: Manage messages of the WS-Discovery protocol also in case of multiple network interfaces or multiple IP addresses.
2.Interface DeviceMgmt We have implemented the following functionalities: GOAL.5:Configuration of the Ethernet interfaces. You can configure the network interfaces using the manual configuration of the parameters or the automatic configuration though DHCP. GOAL.6: Configuration of the name host. GOAL.7: Configuration of DNS manually GOAL.8: Configuration of date, time and timezone. GOAL.9: Reboot of the system. GOAL.10: Configuration of the parameters related to the service discovery. GOAL.11: Manage of the user accounts. GOAL.12: Restore of the factory settings. GOAL.13: Check of the user privilege on individual transactions. 3.Interface Events The Events module has been implemented in PUSH mode. It appears implemented the functionality of queuing and message storage required in the PullPoint. In particular we have implemented the following features: GOAL.14: Managing Subscription and Unsubscribe by clients GOAL.15: Managing the EventCapabilities and EventProperties necessary to indicate to clients what are the features implemented by the module "Events". GOAL.16: Sending notifications in PUSH mode. GOAL.17: Manage a queue of messages to be sent in "PullPoint."