Personal tools
You are here: Home gvSIG Projects gvSIG Mobile Documentation Documentación de desarrollo org.gvsig.sensors.mobile SOS-T analysis Detailed View org.gvsig.mobile.sensor.lib.spi
gvSIG Mobile
gvSIG Mobile

Cached time 11/21/13 07:46:11 Clear cache and reload

 

This component provides the API necessary to manage the sensor data providers. It has a SensorProviderLocator that is the entry point to the library and it is used to get the instance of the SensorProviderManager. This object is a singleton that can be used for:

  • Register all the implementations of sensor data providers in loading time. These implementations are registered using the standard Library mechanism. The registered object is a Factory called SensorProviderFactory that is able to create a concrete SensorProvider.
  • Retrieve a list of all the provider names that ara registered in the system.
  • Create a SensorProvider using a name.
  • Return the list of variables that the provider is able to create (they are used to replace the wildcards in the template)

The SensorProviderFactory is the responsible to create a SensorProvider. It knows the sensor name and it provides a basic template for both RegisterSensor and InsertObservation that are used if the templates are not find in the file system.

There are different implementation of SensorProvider's. Every implementation is the responsible to get data from a physical sensor (or from other mechanism like a web server, other library...) and return a list ok key-value pairs with the retrieved values. This list of key-value pairs is used by the consumer (the SensorDataUploadService in this case) to replace the values in the template that is sent to the server.

Next sequence diagram shows how the system works:

images/SequenceDiagramSPI.png

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: