Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
04128aa8
Commit
04128aa8
authored
2 years ago
by
Trishna Saeharaseelan
Browse files
Options
Download
Email Patches
Plain Diff
feat: support binary payload
parent
fc7b4cf3
Pipeline
#112275
passed with stages
in 1 minute and 11 seconds
Changes
7
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
956 additions
and
691 deletions
+956
-691
examples/autonomy_engine_adapter/mission_plan_encoded.json
examples/autonomy_engine_adapter/mission_plan_encoded.json
+17
-0
examples/autonomy_engine_adapter/observation_encoded.json
examples/autonomy_engine_adapter/observation_encoded.json
+17
-0
examples/autonomy_engine_adapter/platform_status_encoded.json
...ples/autonomy_engine_adapter/platform_status_encoded.json
+17
-0
examples/ecosub_adapter/observation_encoded.json
examples/ecosub_adapter/observation_encoded.json
+17
-0
formats/encoded.py
formats/encoded.py
+45
-0
generate_schema_config.py
generate_schema_config.py
+13
-0
project/soar/swagger.json
project/soar/swagger.json
+830
-691
No files found.
examples/autonomy_engine_adapter/mission_plan_encoded.json
0 → 100644
View file @
04128aa8
{
"header"
:
{
"message_ID"
:
"t1237003c-0000-11aa-a1eb-bvcdfghjgfdd"
,
"timestamp"
:
"2023-03-16T00:00:00Z"
,
"version"
:
2
,
"source"
:
"autonomy_engine"
,
"destination"
:
"soar.hermes.autosub.alr-52.send.mission_plan_encoded"
,
"delivery_type"
:
"publish"
,
"encoded"
:
true
},
"payload"
:
{
"message_type"
:
"mission_plan_encoded"
,
"data"
:
"SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBlB/tRYQW3nez5HWYFBAAD+zwBySUAAAADVek72v1N2lUQAAAABAQAAAAAAAAAAAAAAAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
,
"file_name"
:
"ah1_03837434286438.sbd"
,
"is_binary"
:
true
}
}
This diff is collapsed.
Click to expand it.
examples/autonomy_engine_adapter/observation_encoded.json
0 → 100644
View file @
04128aa8
{
"header"
:
{
"message_ID"
:
"e1237003c-0000-11aa-a1eb-bvcdfghjgfdd"
,
"timestamp"
:
"2023-03-16T00:00:00Z"
,
"version"
:
2
,
"source"
:
"hermes.ecosub2"
,
"destination"
:
"soar.planet-ocean.ecosub.ecosub-2.receive.observation_encoded"
,
"delivery_type"
:
"publish"
,
"encoded"
:
true
},
"payload"
:
{
"message_type"
:
"observation_encoded"
,
"data"
:
"T1N2lUQAAAABAQAAAAAAAAAAAAAAAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
,
"file_name"
:
"ecosub1_200002114.txt"
,
"is_binary"
:
true
}
}
This diff is collapsed.
Click to expand it.
examples/autonomy_engine_adapter/platform_status_encoded.json
0 → 100644
View file @
04128aa8
{
"header"
:
{
"message_ID"
:
"t1237003c-0000-11aa-a1eb-bvcdfghjgfdd"
,
"timestamp"
:
"2023-03-16T00:00:00Z"
,
"version"
:
2
,
"source"
:
"hermes.ah1"
,
"destination"
:
"soar.noc.autosub.alr-52.receive.platform_status_encoded"
,
"delivery_type"
:
"publish"
,
"encoded"
:
true
},
"payload"
:
{
"message_type"
:
"platform_status_encoded"
,
"data"
:
"SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcBlB/tRYQW3nez5HWYFBAAD+zwBySUAAAADVek72v1N2lUQAAAABAQAAAAAAAAAAAAAAAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
,
"file_name"
:
"ah1_03837434286438.sbd"
,
"is_binary"
:
true
}
}
This diff is collapsed.
Click to expand it.
examples/ecosub_adapter/observation_encoded.json
0 → 100644
View file @
04128aa8
{
"header"
:
{
"message_ID"
:
"e1237003c-0000-11aa-a1eb-bvcdfghjgfdd"
,
"timestamp"
:
"2023-03-16T00:00:00Z"
,
"version"
:
2
,
"source"
:
"hermes.ecosub2"
,
"destination"
:
"soar.planet-ocean.ecosub.ecosub-2.receive.observation_encoded"
,
"delivery_type"
:
"publish"
,
"encoded"
:
true
},
"payload"
:
{
"message_type"
:
"observation_encoded"
,
"data"
:
"T1N2lUQAAAABAQAAAAAAAAAAAAAAAAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
,
"file_name"
:
"ecosub1_200002114.txt"
,
"is_binary"
:
true
}
}
This diff is collapsed.
Click to expand it.
formats/encoded.py
0 → 100644
View file @
04128aa8
"""
schemas: Encoded (compiled) type messages that are applicable to compiled
platform statuses and observations (from the platform), and compiled
mission plans (to the platform). This encoded schema is applicable to the
different message types: mission_plan_encoded, observation_encoded, and
platform_status_encoded.
"""
encoded_schema
=
{
"type"
:
"object"
,
"properties"
:
{
"message_type"
:
{
"type"
:
"string"
,
"description"
:
"Type of message"
,
"example"
:
"mission_plan"
,
"enum"
:
[
"mission_plan_encoded"
,
"observation_encoded"
,
"platform_status_encoded"
,
],
},
"data"
:
{
"type"
:
"string"
,
"description"
:
"Base64 encoded string"
,
"example"
:
"SDQke4uwyP/YQQAgAhA2AND/nu8nvQAAAAAAAAAACtejPa5HHUGkcB"
+
"AAAAIAAAAQAAAAAAAAAA9P2cP166ab+9cg=="
,
},
"file_name"
:
{
"type"
:
"string"
,
"description"
:
"Name of file"
,
"example"
:
"ah1-0238126349247372.bin"
,
},
"mime_type"
:
{
"type"
:
"string"
,
"description"
:
"MIME type"
,
"example"
:
""
,
# TODO: Add example
},
"is_binary"
:
{
"type"
:
"boolean"
,
"description"
:
"Base64 encrypted binary data"
,
"example"
:
True
,
},
},
"required"
:
[
"data"
,
"is_binary"
],
}
This diff is collapsed.
Click to expand it.
generate_schema_config.py
View file @
04128aa8
from
formats
import
message_header
from
formats.encoded
import
encoded_schema
from
formats.mission_plan
import
mission_plan_schema
from
formats.observation
import
observation_schema
from
formats.planning_configuration
import
planning_configuration_schema
...
...
@@ -51,26 +52,38 @@ swagger_config = {
"propertyName"
:
"message_type"
,
"mapping"
:
{
"mission_plan"
:
"#/components/schemas/mission_plan"
,
"mission_plan_encoded"
:
"#/components/schemas/"
+
"mission_plan_encoded"
,
"observation"
:
"#/components/schemas/observation"
,
"observation_encoded"
:
"#/components/schemas/"
+
"observation_encoded"
,
"planning_configuration"
:
"#/components/schemas/"
+
"planning_configuration"
,
"platform_status"
:
"#/components/schemas/platform_status"
,
"platform_status_encoded"
:
"#/components/schemas/"
+
"platform_status_encoded"
,
"acknowledgement"
:
"#/components/schemas/acknowledgement"
,
},
},
"oneOf"
:
[
{
"$ref"
:
"#/components/schemas/acknowledgement"
},
{
"$ref"
:
"#/components/schemas/mission_plan"
},
{
"$ref"
:
"#/components/schemas/mission_plan_encoded"
},
{
"$ref"
:
"#/components/schemas/observation"
},
{
"$ref"
:
"#/components/schemas/observation_encoded"
},
{
"$ref"
:
"#/components/schemas/planning_configuration"
},
{
"$ref"
:
"#/components/schemas/platform_status"
},
{
"$ref"
:
"#/components/schemas/platform_status_encoded"
},
],
},
"header"
:
message_header
,
"mission_plan"
:
mission_plan_schema
,
"mission_plan_encoded"
:
encoded_schema
,
"observation"
:
observation_schema
,
"observation_encoded"
:
encoded_schema
,
"planning_configuration"
:
planning_configuration_schema
,
"platform_status"
:
platform_status_schema
,
"platform_status_encoded"
:
encoded_schema
,
"acknowledgement"
:
acknowledgement_schema
,
}
},
...
...
This diff is collapsed.
Click to expand it.
project/soar/swagger.json
View file @
04128aa8
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment