Task Submission Scheduling a Task Submit Reserve

Copyright © 2011 Open Geospatial Consortium 155 Listing 18 - Submit request example sps:Submit service = SPS version = 2.0.0 xmlns:sps = http:www.opengis.netsps2.0 xmlns:swe = http:www.opengis.netswe2.0 xmlns:xsi = http:www.w3.org2001XMLSchema- instance sps:procedure http:www.ogc.orgprocedurecamera1 sps:procedure sps:taskingParameters sps:ParameterData sps:encoding swe:TextEncoding tokenSeparator = , blockSeparator = sps:encoding sps:values 2010-08-20T12:37:00+02:00,2010-08- 20T14:30:00+02:00,Y,pointToLookAt,51.902112,8.192728,0,Y,3.5 sps:values sps:ParameterData sps:taskingParameters sps:Submit 2010-08-20T11:12:04+02:00 – The service sends a response indicating that the task was accepted and is now in execution, so will be performed as planned. Listing 19 - Submit response example sps:SubmitResponse xmlns:sps = http:www.opengis.netsps2.0 xmlns:xsi = http:www.w3.org2001XMLSchema-instance xmlns:swe = http:www.opengis.netswe2.0 sps:result sps:StatusReport sps:task http:www.ogc.orgprocedurecamera1tasks6 sps:task sps:event TaskSubmitted sps:event sps:percentCompletion sps:percentCompletion sps:procedure http:www.ogc.orgprocedurecamera1 sps:procedure sps:requestStatus Accepted sps:requestStatus sps:taskStatus InExecution sps:taskStatus sps:updateTime 2010-08-20T11:12:04+02:00 sps:updateTime sps:taskingParameters sps:ParameterData sps:encoding swe:TextEncoding tokenSeparator = , blockSeparator = sps:encoding sps:values 2010-08-20T12:37:00+02:00,2010-08- 20T14:30:00+02:00,Y,pointToLookAt,51.902112,8.192728,0,Y,3.5 sps:values sps:ParameterData sps:taskingParameters sps:StatusReport sps:result sps:SubmitResponse

9.6.5.2 Reserving a Task

2010-08-20T11:12:00+02:00 – The client sends a Reserve request to the service. The latest response time is set to 2010-08-20T11:20:00+02:00. The expiration time of the requested reservation is set to 2010-08-20T11:30:00+02:00. 156 Copyright © 2011 Open Geospatial Consortium Listing 20 - Reserve request example sps:Reserve service = SPS version = 2.0.0 xmlns:sps = http:www.opengis.netsps2.0 xmlns:swe = http:www.opengis.netswe2.0 xmlns:xsi = http:www.w3.org2001XMLSchema- instance sps:procedure http:www.ogc.orgprocedurecamera1 sps:procedure sps:taskingParameters sps:ParameterData sps:encoding swe:TextEncoding tokenSeparator = , blockSeparator = sps:encoding sps:values 2010-08-20T12:37:00+02:00,2010-08- 20T14:30:00+02:00,Y,pointToLookAt,51.902112,8.192728,0,Y,3.5 sps:values sps:ParameterData sps:taskingParameters sps:latestResponseTime 2010-08-20T11:20:00+02:00 sps:latestResponseTime sps:reservationExpiration 2010-08-20T11:30:00+02:00 sps:reservationExpiration sps:Reserve 2010-08-20T11:12:01+02:00 – The service sends a response indicating that the reservation was successful. It will expire at 2010-08-20T11:30:00+02:00. Listing 21 - Reserve response example sps:ReserveResponse xmlns:sps = http:www.opengis.netsps2.0 xmlns:xsi = http:www.w3.org2001XMLSchema-instance sps:result sps:ReservationReport sps:task http:www.ogc.orgprocedurecamera1tasks6 sps:task sps:estimatedToC 2010-08-20T14:30:00+02:00 sps:estimatedToC sps:event TaskReserved sps:event sps:procedure http:www.ogc.orgprocedurecamera1 sps:procedure sps:requestStatus Accepted sps:requestStatus sps:taskStatus Reserved sps:taskStatus sps:updateTime 2010-08-20T11:12:01+02:00 sps:updateTime sps:reservationExpiration 2010-08-20T11:30:00+02:00 sps:reservationExpiration sps:ReservationReport sps:result sps:ReserveResponse Now there are several options: the task automatically expires at 2010-08- 20T11:30:00+02:00, the client confirms, updates or cancels the task beforehand or the task fails for some reason. The option that the reservation was updated is not considere here.

9.6.5.3 Automatic Reservation Expiration

2010-08-20T12:00:00+02:00 – The client sends a GetStatus request to the service. The since parameter, although supported by the service, is not used in the request. Thus the current status of the task is requested. Listing 22 - GetStatus request example sps:GetStatus service = SPS version = 2.0.0 xmlns:sps = http:www.opengis.netsps2.0 xmlns:swe = http:www.opengis.netswe2.0 xmlns:xsi = http:www.w3.org2001XMLSchema- instance sps:task http:www.ogc.orgprocedurecamera1tasks6 sps:task sps:GetStatus 2010-08-20T12:00:01+02:00 – The service sends a response with information about the current status of the task, indicating that the reservation expired at 2010-08- 20T11:30:00+02:00.