OSH Tutorial Part 5
Tasking
Tasking in Sensor Drivers
- Sensor/actuator drivers can provide one or more tasking input by implementing ISensorControlInterface
- In general, drivers should not handle scheduling and priorities
Sensor Planning Service
- Allows tasking of sensors, actuators or more complex assets or systems
- Service provides operations for
- Evaluating task feasibility
- Submitting tasks
- Canceling tasks
- Getting status of tasks
- Reserving assets for a task
- Uses SWE Common for tasking message description and encoding
-
Synchronous or Asynchronous operation and support for Notifications of task state changes (via OASIS WS-N)
XML Examples
<sps:DescribeTaskingResponse>
<sps:taskingParameters name="CameraTask">
<swe:DataRecord>
<swe:field name="pan">
<swe:Quantity definition="http://.../RelativePan">
<swe:label>Pan Angle</swe:label>
<swe:uom code="deg"/>
<swe:constraint>
<swe:AllowedValues>
<swe:interval>-180 180</swe:interval>
</swe:AllowedValues>
</swe:constraint>
</swe:Quantity>
</swe:field>
<swe:field name="tilt">
<swe:Quantity definition="http://.../RelativeTilt">
<swe:label>Tilt Angle</swe:label>
<swe:uom code="deg"/>
<swe:constraint>
<swe:AllowedValues>
<swe:interval>-90 90</swe:interval>
</swe:AllowedValues>
</swe:constraint>
</swe:Quantity>
</swe:field>
<swe:field name="focalLength">
<swe:Quantity definition="http://.../FocalLength">
<swe:label>Focal length</swe:label>
<swe:uom code="mm"/>
<swe:constraint>
<swe:AllowedValues>
<swe:interval>3.5 10</swe:interval>
</swe:AllowedValues>
</swe:constraint>
</swe:Quantity>
</swe:field>
</swe:DataRecord>
</sps:taskingParameters>
</sps:DescribeTaskingResponse>
XML Examples
<sps:Submit service="SPS" version="2.0.0">
<sps:procedure>http://www.ogc.org/procedure/camera/1</sps:procedure>
<sps:taskingParameters>
<sps:ParameterData>
<sps:encoding>
<swe:TextEncoding tokenSeparator="," blockSeparator=" " />
</sps:encoding>
<sps:values>180,-30,10</sps:values>
</sps:ParameterData>
</sps:taskingParameters>
</sps:Submit>
<sps:SubmitResponse>
<sps:result>
<sps:StatusReport>
<sps:task>http://www.ogc.org/procedure/camera/1/tasks/6</sps:task>
<sps:event>TaskSubmitted</sps:event>
<sps:percentCompletion>0</sps:percentCompletion>
<sps:procedure>http://www.ogc.org/procedure/camera/1</sps:procedure>
<sps:requestStatus>Accepted</sps:requestStatus>
<sps:taskStatus>InExecution</sps:taskStatus>
<sps:updateTime>2010-08-20T11:12:04+02:00</sps:updateTime>
</sps:StatusReport>
</sps:result>
</sps:SubmitResponse>
<sps:GetStatus service="SPS" version="2.0.0">
<sps:task>http://www.ogc.org/procedure/camera/1/tasks/6</sps:task>
</sps:GetStatus>
<sps:GetStatusResponse>
<sps:status>
<sps:StatusReport>
<sps:task>http://www.ogc.org/procedure/camera/1/tasks/6</sps:task>
<sps:event>TaskFailed</sps:event>
<sps:procedure>http://www.ogc.org/procedure/camera/1</sps:procedure>
<sps:requestStatus>Accepted</sps:requestStatus>
<sps:statusMessage xml:lang="en">
Your reservation failed because an emergency tasking action required
use of the resources that were reserved for your task.
</sps:statusMessage>
<sps:taskStatus>Failed</sps:taskStatus>
<sps:updateTime>2010-08-20T11:28:30+02:00</sps:updateTime>
</sps:StatusReport>
</sps:status>
</sps:GetStatusResponse>
Tasking Methods
Direct Tasking
Service forwards command message to sensor driver as soon as it is received
Scheduled
Tasks is scheduled and executed asynchronously at a later time
OSH Tutorial - Part 5: Tasking
By Alex Robin
OSH Tutorial - Part 5: Tasking
Principles of sensor and actuator tasking
- 482