acknowledgement.py 1.65 KB
Newer Older
1 2 3 4
"""
    schemas: Acknowledgement status sent by the surface platform to report
    receipt of message.
"""
5
acknowledgement_schema = {
6 7
    "allOf": [{"$ref": "#/components/schemas/Message"}],
    "type": "object",
8
    "properties": {
9
        "acknowledged_message_ID": {
10 11
            "type": "string",
            "description": "Identifier of message received and executed with "
12
            + "success for mission plans sent by the Autonomy Engine.",
13
            "example": "02125022255-7bc8-11ed-a1eb-0242ac999999",
14 15 16 17
        },
        "status": {
            "type": "string",
            "description": "Highest level of acknowledgement. I.e. `c2_received`:"
18 19
            + " Received by C2, `c2_sent`: Sent from C2->Platform, `executed`:"
            + " Executed by platform",
20 21
            "example": "executed by platform",
        },
22
    },
23
    "required": ["acknowledged_message_ID", "status"],
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
}

# acknowledgement_schema = api.model(
#     "Acknowledgement",
#     {
#         "message": fields.Nested(
#             full_message_schema,
#             required=True,
#             description="Message header",
#         ),
#         "message_ID": fields.Integer(
#             required=True,
#             description="Identifier of message received and executed with "
#             + "success for mission plans sent by the Autonomy Engine.",
#             example=202,
#         ),
#         "status": fields.String(
#             required=True,
#             description="Highest level of acknowledgement. I.e. `c2_received`:"
#             + " Received by C2, `c2_sent`: Sent from C2->Platform, `executed`:"
#             + " Executed by platform",
#         ),
#     },
# )