{
    "version": 1,
    "structs": {
        "HeartBeatTelemetry": {
            "port": 57045,
            "kind": "struct",
            "type": "HeartBeatTelemetry",
            "fields": [
                {
                    "name": "message",
                    "kind": "array",
                    "type": "char[16]",
                    "element": {
                        "kind": "primitive",
                        "type": "char",
                        "format_string": "<c"
                    },
                    "count": 16,
                    "format_string": "<cccccccccccccccc"
                },
                {
                    "name": "status_flags",
                    "kind": "primitive",
                    "type": "unsigned char",
                    "format_string": "<B"
                }
            ],
            "format_string": "<ccccccccccccccccB"
        },
        "FsmStatusPacket": {
            "port": 5041,
            "kind": "struct",
            "type": "FsmStatusPacket",
            "fields": [
                {
                    "name": "status",
                    "kind": "struct",
                    "type": "fsm::FsmStatus",
                    "fields": [
                        {
                            "name": "state_entry_time_ms",
                            "kind": "primitive",
                            "type": "unsigned long long",
                            "format_string": "<Q"
                        },
                        {
                            "name": "state_time_ms",
                            "kind": "primitive",
                            "type": "unsigned long long",
                            "format_string": "<Q"
                        },
                        {
                            "name": "current_state",
                            "kind": "enum",
                            "type": "StateId",
                            "format_string": "<B"
                        },
                        {
                            "name": "previous_state",
                            "kind": "enum",
                            "type": "StateId",
                            "format_string": "<B"
                        },
                        {
                            "name": "last_event",
                            "kind": "enum",
                            "type": "Event",
                            "format_string": "<B"
                        },
                        {
                            "name": "last_abort_reason",
                            "kind": "enum",
                            "type": "fsm::AbortReason",
                            "format_string": "<B"
                        }
                    ],
                    "format_string": "<QQBBBB"
                },
                {
                    "name": "timestamp_ms",
                    "kind": "primitive",
                    "type": "unsigned int",
                    "format_string": "<I"
                }
            ],
            "format_string": "<QQBBBBI"
        },
        "PressureSensorPacket": {
            "port": 5042,
            "fragment": "sensor_id",
            "packed": null,
            "kind": "struct",
            "type": "PressureSensorPacket",
            "fields": [
                {
                    "name": "sensor_id",
                    "kind": "enum",
                    "type": "sensors::pressure::Id",
                    "format_string": "<B"
                },
                {
                    "name": "pressure_batch",
                    "packed": null,
                    "kind": "struct",
                    "type": "sensors::pressure::PressureBatch",
                    "fields": [
                        {
                            "name": "t0_us",
                            "kind": "primitive",
                            "type": "unsigned long long",
                            "format_string": "<Q"
                        },
                        {
                            "name": "dt_us",
                            "kind": "primitive",
                            "type": "unsigned int",
                            "format_string": "<I"
                        },
                        {
                            "name": "count",
                            "kind": "primitive",
                            "type": "unsigned char",
                            "format_string": "<B"
                        },
                        {
                            "name": "seq",
                            "kind": "primitive",
                            "type": "unsigned char",
                            "format_string": "<B"
                        },
                        {
                            "name": "samples",
                            "kind": "array",
                            "type": "short[20]",
                            "element": {
                                "kind": "primitive",
                                "type": "short",
                                "format_string": "<h"
                            },
                            "count": 20,
                            "format_string": "<hhhhhhhhhhhhhhhhhhhh"
                        }
                    ],
                    "format_string": "<QIBBhhhhhhhhhhhhhhhhhhhh"
                }
            ],
            "format_string": "<BQIBBhhhhhhhhhhhhhhhhhhhh"
        },
        "ServoStatusPacket": {
            "port": 5043,
            "fragment": "servo_id",
            "kind": "struct",
            "type": "ServoStatusPacket",
            "fields": [
                {
                    "name": "servo_id",
                    "kind": "enum",
                    "type": "actuators::servo::Id",
                    "format_string": "<B"
                },
                {
                    "name": "timestamp_ms",
                    "kind": "primitive",
                    "type": "unsigned int",
                    "format_string": "<I"
                },
                {
                    "name": "status",
                    "kind": "struct",
                    "type": "actuators::servo::ServoStatus",
                    "fields": [
                        {
                            "name": "commanded_angle_deg",
                            "kind": "primitive",
                            "type": "float",
                            "format_string": "<f"
                        },
                        {
                            "name": "target_angle_deg",
                            "kind": "primitive",
                            "type": "float",
                            "format_string": "<f"
                        },
                        {
                            "name": "measured_angle_deg",
                            "kind": "primitive",
                            "type": "float",
                            "format_string": "<f"
                        },
                        {
                            "name": "current_ma",
                            "kind": "primitive",
                            "type": "float",
                            "format_string": "<f"
                        },
                        {
                            "name": "power_state",
                            "kind": "enum",
                            "type": "actuators::servo::PowerState",
                            "format_string": "<B"
                        }
                    ],
                    "format_string": "<ffffB"
                }
            ],
            "format_string": "<BIffffB"
        },
        "SolenoidStatusPacket": {
            "port": 5044,
            "fragment": "solenoid_id",
            "kind": "struct",
            "type": "SolenoidStatusPacket",
            "fields": [
                {
                    "name": "solenoid_id",
                    "kind": "enum",
                    "type": "actuators::solenoid::Id",
                    "format_string": "<B"
                },
                {
                    "name": "timestamp_ms",
                    "kind": "primitive",
                    "type": "unsigned int",
                    "format_string": "<I"
                },
                {
                    "name": "status",
                    "kind": "struct",
                    "type": "actuators::solenoid::SolenoidStatus",
                    "fields": [
                        {
                            "name": "power_state",
                            "kind": "enum",
                            "type": "actuators::solenoid::PowerState",
                            "format_string": "<B"
                        },
                        {
                            "name": "opening",
                            "kind": "enum",
                            "type": "actuators::solenoid::Opening",
                            "format_string": "<B"
                        },
                        {
                            "name": "current_ma",
                            "kind": "primitive",
                            "type": "float",
                            "format_string": "<f"
                        }
                    ],
                    "format_string": "<BBf"
                }
            ],
            "format_string": "<BIBBf"
        },
        "LoadCellPacket": {
            "port": 5047,
            "fragment": "load_cell_id",
            "kind": "struct",
            "type": "LoadCellPacket",
            "fields": [
                {
                    "name": "load_cell_id",
                    "kind": "enum",
                    "type": "sensors::load_cell::Id",
                    "format_string": "<B"
                },
                {
                    "name": "data",
                    "kind": "struct",
                    "type": "sensors::load_cell::LoadCellBatch",
                    "fields": [
                        {
                            "name": "t0_us",
                            "kind": "primitive",
                            "type": "unsigned long long",
                            "format_string": "<Q"
                        },
                        {
                            "name": "dt_us",
                            "kind": "primitive",
                            "type": "unsigned int",
                            "format_string": "<I"
                        },
                        {
                            "name": "count",
                            "kind": "primitive",
                            "type": "unsigned char",
                            "format_string": "<B"
                        },
                        {
                            "name": "seq",
                            "kind": "primitive",
                            "type": "unsigned char",
                            "format_string": "<B"
                        },
                        {
                            "name": "samples",
                            "kind": "array",
                            "type": "short[20]",
                            "element": {
                                "kind": "primitive",
                                "type": "short",
                                "format_string": "<h"
                            },
                            "count": 20,
                            "format_string": "<hhhhhhhhhhhhhhhhhhhh"
                        }
                    ],
                    "format_string": "<QIBBhhhhhhhhhhhhhhhhhhhh"
                }
            ],
            "format_string": "<BQIBBhhhhhhhhhhhhhhhhhhhh"
        },
        "PropellantMassPacket": {
            "port": 5048,
            "kind": "struct",
            "type": "PropellantMassPacket",
            "fields": [
                {
                    "name": "timestamp_ms",
                    "kind": "primitive",
                    "type": "unsigned int",
                    "format_string": "<I"
                },
                {
                    "name": "fsm_state",
                    "kind": "enum",
                    "type": "StateId",
                    "format_string": "<B"
                },
                {
                    "name": "active_propellant",
                    "kind": "enum",
                    "type": "PropellantMassIndex",
                    "format_string": "<B"
                },
                {
                    "name": "load_cell_fault_mask",
                    "kind": "primitive",
                    "type": "unsigned short",
                    "format_string": "<H"
                },
                {
                    "name": "total_vehicle_kg",
                    "kind": "primitive",
                    "type": "float",
                    "format_string": "<f"
                },
                {
                    "name": "total_filled_kg",
                    "kind": "primitive",
                    "type": "float",
                    "format_string": "<f"
                },
                {
                    "name": "active_fill_delta_kg",
                    "kind": "primitive",
                    "type": "float",
                    "format_string": "<f"
                },
                {
                    "name": "propellant_filled_kg",
                    "kind": "array",
                    "type": "float[4]",
                    "element": {
                        "kind": "primitive",
                        "type": "float",
                        "format_string": "<f"
                    },
                    "count": 4,
                    "format_string": "<ffff"
                },
                {
                    "name": "raw_load_cell_kg",
                    "kind": "array",
                    "type": "float[3]",
                    "element": {
                        "kind": "primitive",
                        "type": "float",
                        "format_string": "<f"
                    },
                    "count": 3,
                    "format_string": "<fff"
                },
                {
                    "name": "raw_load_cell_faults",
                    "kind": "array",
                    "type": "unsigned short[3]",
                    "element": {
                        "kind": "primitive",
                        "type": "unsigned short",
                        "format_string": "<H"
                    },
                    "count": 3,
                    "format_string": "<HHH"
                }
            ],
            "format_string": "<IBBHffffffffffHHH"
        }
    },
    "enums": {
        "StateId": {
            "Safe": 0,
            "FuelFill": 1,
            "PostFuelFill": 2,
            "RecoveryFill": 3,
            "PostRecoveryFill": 4,
            "N2Fill": 5,
            "PostN2Fill": 6,
            "OxFill": 7,
            "PostOxFill": 8,
            "QDDisconnect": 9,
            "Hold": 10
        },
        "Event": {
            "Boot": 0,
            "NextState": 1,
            "PreviousState": 2,
            "Timeout": 3,
            "Abort": 4,
            "None": 5,
            "Count": 6
        },
        "fsm::AbortReason": {
            "None": 0,
            "Manual": 1,
            "ConnectionLost": 2
        },
        "sensors::pressure::Id": {
            "OxSupply": 0,
            "N2_200": 1,
            "N2_300": 2,
            "Count": 3
        },
        "actuators::servo::Id": {
            "OxSupply": 0,
            "Count": 1
        },
        "actuators::servo::PowerState": {
            "Unknown": 0,
            "Off": 1,
            "Booting": 2,
            "On": 3
        },
        "actuators::solenoid::Id": {
            "OxBleed": 0,
            "N2_200_Supply": 1,
            "N2_200_Bleed": 2,
            "N2_300_Supply": 3,
            "N2_300_Bleed": 4,
            "QD_1": 5,
            "QD_2": 6,
            "Count": 7
        },
        "actuators::solenoid::PowerState": {
            "Unknown": 0,
            "Off": 1,
            "On": 2
        },
        "actuators::solenoid::Opening": {
            "Unknown": 0,
            "Closed": 1,
            "Open": 2
        },
        "sensors::load_cell::Id": {
            "LoadCell0": 0,
            "LoadCell1": 1,
            "LoadCell2": 2,
            "Count": 3
        },
        "PropellantMassIndex": {
            "Fuel": 0,
            "N2Recovery": 1,
            "N2Propulsion": 2,
            "Ox": 3,
            "Count": 4,
            "None": -1
        }
    }
}
