使用tinyfsm

This commit is contained in:
zjk
2025-04-06 20:16:37 +08:00
parent 811fbf2924
commit c51eb7073a
18 changed files with 1720 additions and 322 deletions
@@ -0,0 +1,184 @@
{
"protocol_name": "高压母线状态反馈",
"message_id": "0x0005",
"length": 38,
"checksum": {
"start_offset": 0,
"end_offset": 37,
"algorithm": "sum_low_byte"
},
"fields": [
{
"name": "start1",
"offset": 0,
"type": "uint8",
"value": "0x20",
"description": "起始字节1"
},
{
"name": "start2",
"offset": 1,
"type": "uint8",
"value": "0x20",
"description": "起始字节2"
},
{
"name": "id",
"offset": 2,
"type": "uint16",
"value": "0x0005",
"description": "消息ID"
},
{
"name": "length",
"offset": 4,
"type": "uint16",
"value": 38,
"description": "消息长度"
},
{
"name": "DCB1",
"offset": 6,
"type": "uint8",
"description": "直流断路器1状态"
},
{
"name": "DCB2",
"offset": 7,
"type": "uint8",
"description": "直流断路器2状态"
},
{
"name": "ZK1",
"offset": 8,
"type": "uint8",
"description": "真空接触器1状态"
},
{
"name": "ZK2",
"offset": 9,
"type": "uint8",
"description": "真空接触器2状态"
},
{
"name": "ZK3",
"offset": 10,
"type": "uint8",
"description": "真空接触器3状态"
},
{
"name": "ZK4",
"offset": 11,
"type": "uint8",
"description": "真空接触器4状态"
},
{
"name": "ZK5",
"offset": 12,
"type": "uint8",
"description": "真空接触器5状态"
},
{
"name": "ZK6",
"offset": 13,
"type": "uint8",
"description": "真空接触器6状态"
},
{
"name": "ZK7",
"offset": 14,
"type": "uint8",
"description": "真空接触器7状态"
},
{
"name": "ZK8",
"offset": 15,
"type": "uint8",
"description": "真空接触器8状态"
},
{
"name": "ZK9",
"offset": 16,
"type": "uint8",
"description": "真空接触器9状态"
},
{
"name": "ZK10",
"offset": 17,
"type": "uint8",
"description": "真空接触器10状态"
},
{
"name": "busInsulationLow",
"offset": 18,
"type": "uint8",
"description": "母线绝缘低报警"
},
{
"name": "busAInsulationHigh",
"offset": 19,
"type": "uint8",
"description": "A母线绝缘高报警"
},
{
"name": "lostPower",
"offset": 20,
"type": "uint8",
"description": "失电信号"
},
{
"name": "lostEmerPower",
"offset": 21,
"type": "uint8",
"description": "应急失电信号"
},
{
"name": "powerBusVoltage",
"offset": 22,
"type": "uint16",
"description": "动力母线电压(V)"
},
{
"name": "dcDc5ModuleCurrent",
"offset": 24,
"type": "uint16",
"description": "DC/DC5模块电流(A)"
},
{
"name": "powerBusCurrent",
"offset": 26,
"type": "uint16",
"description": "动力母线电流(A)"
},
{
"name": "busbarAVoltage",
"offset": 28,
"type": "uint16",
"description": "A排电压(V)"
},
{
"name": "propulsionMotorControlBoxCurrent",
"offset": 30,
"type": "uint16",
"description": "推进电机控制箱电流(A)"
},
{
"name": "busbarACurrent",
"offset": 32,
"type": "uint16",
"description": "A排电流(A)"
},
{
"name": "lithiumBatteryGroupMeterCurrent",
"offset": 34,
"type": "uint16",
"description": "锂电池组表计电流(A)"
},
{
"name": "bowHighVoltageDistributionBoxCurrent",
"offset": 36,
"type": "uint16",
"description": "艏部高压配电箱电流(A)"
}
]
}