Task Creation

2022-06-23
No Rating

Server send task creation

Topic:

thing/product/{pid}/services

Parameter Explanation:

ParameterRequiredTypeIllustration
tidYstring
bidYstring
methodYstringmessage Type
timestampYint13-bit timestamp
dataYobject
» flight_idYstringFlight plan ID
» typeYstringTask type
» fileYobjectWaypoint file struct
»» urlYstringWaypoint file url
»» signYstringFile signature(md5), device will verify this value.

Example:

// topic thing/product/{pid}/services
{
  "method":"flighttask_create",
  "timestamp": "1234567890123",
  "tid":"123",
  "bid":"456",
  "data":{
    "flight_id": "xxxxxxx",
    "type": "wayline",
    "file": {
      "url": "https://xxx.com/xxxx",
      "sign": "xxxx"
    }
  }
}

Device reply: Server send task creation

Topic:

thing/product/{pid}/services_reply

Parameter Explanation:

ParameterRequiredTypeIllustration
tidYstring
bidYstring
methodYstringmessage Type
timestampYint13-bit timestamp
dataYobject
» resultYintThe response result of 0 means normal

Example:

// topic  thing/product/{pid}/services_reply
{
  "method":"flighttask_create",
  "tid":"123",
  "bid":"456",
  "timestamp": "1234567890123",
  "data": {
    "result": 0
  }
}