Commit 982cde9b authored by Trishna Saeharaseelan's avatar Trishna Saeharaseelan
Browse files

refactor(autonomy): add pause enum and rename message type

3 merge requests!59Release v2.0.0,!57Add new Autonomy message type,!36Resolve "Create temporary mas-dt branch for initial schema refactor"
Pipeline #261980 failed with stages
in 1 minute and 28 seconds
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
"payload":{ "payload":{
"message_type": "autonomy", "message_type": "autonomy",
"planning_config_ID": 1, "planning_config_ID": "b127003c-0000-11aa-a1eb-b1cdf2342fdd",
"state": "start" "state": "start"
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
configurations and default instructions configurations and default instructions
""" """
autonomy_schema = { autonomy_engine_control_schema = {
"type": "object", "type": "object",
"properties": { "properties": {
"message_type": { "message_type": {
...@@ -35,7 +35,7 @@ autonomy_schema = { ...@@ -35,7 +35,7 @@ autonomy_schema = {
], ],
"state": { "state": {
"type": "string", "type": "string",
"enum": ["start", "stop"], "enum": ["start", "pause", "stop"],
"description": "Autonomy engine instruction to start or stop model", "description": "Autonomy engine instruction to start or stop model",
"example": "stop", "example": "stop",
}, },
......
from formats.header import message_header from formats.header import message_header
from formats.message import message_schema from formats.message import message_schema
from formats.autonomy import autonomy_schema from formats.autonomy_engine_control import autonomy_engine_control_schema
from formats.mission_plan import mission_plan_schema from formats.mission_plan import mission_plan_schema
from formats.mission_plan_encoded import mission_plan_encoded_schema from formats.mission_plan_encoded import mission_plan_encoded_schema
from formats.observation import observation_schema from formats.observation import observation_schema
...@@ -67,7 +67,7 @@ def get_swagger_config(reload=False): ...@@ -67,7 +67,7 @@ def get_swagger_config(reload=False):
"MESSAGE": message_schema, "MESSAGE": message_schema,
"header": message_header, "header": message_header,
"payload": payload_schema, "payload": payload_schema,
"autonomy": autonomy_schema, "autonomy": autonomy_engine_control_schema,
"mission_plan": mission_plan_schema, "mission_plan": mission_plan_schema,
"mission_plan_encoded": mission_plan_encoded_schema, "mission_plan_encoded": mission_plan_encoded_schema,
"observation": observation_schema, "observation": observation_schema,
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
"description": "Autonomy engine instruction to start or stop model", "description": "Autonomy engine instruction to start or stop model",
"enum": [ "enum": [
"start", "start",
"pause",
"stop" "stop"
], ],
"example": "stop", "example": "stop",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment