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.api
gvSIG Mobile
gvSIG Mobile

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

 

This component has to provide an API to the library consumer for upload sensor data. This API includes a Locator that is the entry point to the library that is used to get the Manager instance, following the project structure defined in gvSIG 2.0. In this case we have the SensorLocator, that can be used to register or get the instance of the SensorManager that is used by the library consumer to manage the library.

The SensorManager offers to the library consumer the possibility to retrieve all the sensor data providers that has been previously registered using the SPI interface. It offers the functionality to retrieve the list of servers that can be used for a concrete provider. And it also can be used to create an instance of a service that can be used to upload sensor data that is called SensorDataUploadService.

This service needs a sensor data provider, a server URL and a time period. When this service starts, it sends a RegisterSensor request to the server using a template (optional, because it could be previously registered) and if the reply is ok it gets the measurements for the provider and creates a InsertObservation request using this measurement and the template. This last request is send every time that the time period finish.

Next sequence diagram shows how the system works:

images/SequenceDiagram.png

In order to manage the different templates defined for the SOS operations configured for every sensor defined in every server. This task it’s resolved building new XML files to relate the different wildcards with their values and the container SOS server. Then the gvSIG Mobile SOS-T plug-in can get persist the sensors configured values.

Next XML is an approximation to these files. This is just an example to understand the object model. The final XML could be different and it could be created using the standard gvSIG persistence.

<SensorLibrary>
 <SensorProvider name="GPS">
  <Templates>
   <RegisterSensor>RegisterSensorGPSGenericTemplate.xml</RegisterSensor>
   <InsertObservationTemplate>InsertObservationGPSGenericTemplate.xml</InsertObservationTemplate>
  </Templates>
  <Servers>  
   <Server url="http://www.myserver1.com/sos" id="GPS Server1" registered="true">
    <Templates>
     <RegisterSensor>RegisterSernsorGPSForServer1Template.xml</RegisterSensor>
     <InsertObservationTemplate>InsertObservationGPSForServer1Template.xml</InsertObservationTemplate>
    </Templates>
   </Server>
   <Server url="http://www.myserver1.com/sos" id="Temperature Server1" registered="true">
    <Templates>
     <RegisterSensor>RegisterSernsorTemperatureForServer1Template.xml</RegisterSensor>
     <InsertObservationTemplate>InsertObservationTemperatureForServer1Template.xml</InsertObservationTemplate>
    </Templates>
   </Server>
   <Server url="http://www.myserver2.com/sos" id="GPS Server 2" registered="false">
    <Templates>
     <RegisterSensor>RegisterSernsorGPSForServer2Template.xml</RegisterSensor>
     <InsertObservationTemplate>InsertObservationGPSForServer2Template.xml</InsertObservationTemplate>
    </Templates>
   </Server>
  </Servers>
 </SensorProvider>
</SensorLibrary>

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: