使用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,154 @@
{
"protocol_name": "高压B母线状态反馈",
"message_id": "0x0007",
"length": 36,
"checksum": {
"start_offset": 0,
"end_offset": 34,
"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": "0x0007",
"description": "消息ID"
},
{
"name": "length",
"offset": 4,
"type": "uint16",
"value": 36,
"description": "消息长度(包含校验码)"
},
{
"name": "lithiumBatteryGroupInstrumentCircuitBreaker",
"offset": 6,
"type": "uint8",
"description": "锂电池组仪表断路器"
},
{
"name": "bowLowVoltageDistributionBoxCircuitBreaker",
"offset": 7,
"type": "uint8",
"description": "艏部低压配电箱断路器"
},
{
"name": "unit4InstrumentDC48VCircuitBreaker",
"offset": 8,
"type": "uint8",
"description": "单元4仪表DC48V断路器"
},
{
"name": "dcC1DCDistributionPanelCircuitBreaker",
"offset": 9,
"type": "uint8",
"description": "DC C1直流配电板断路器"
},
{
"name": "reservedCircuitBreaker1",
"offset": 10,
"type": "uint8",
"description": "备用断路器1"
},
{
"name": "reservedCircuitBreaker2",
"offset": 11,
"type": "uint8",
"description": "备用断路器2"
},
{
"name": "emergencyLithiumBatteryGroup2CircuitBreaker",
"offset": 12,
"type": "uint8",
"description": "应急锂电池组2断路器"
},
{
"name": "instrumentPowerFailureSignal",
"offset": 13,
"type": "uint8",
"description": "仪表电源故障信号"
},
{
"name": "emergencyPowerFailureSignal",
"offset": 14,
"type": "uint8",
"description": "应急电源故障信号"
},
{
"name": "instrumentBusbarVoltage",
"offset": 15,
"type": "uint16",
"description": "仪表母线电压(V)"
},
{
"name": "bowLowVoltageDistributionBoxCurrent",
"offset": 17,
"type": "uint16",
"description": "艏部低压配电箱电流(A)"
},
{
"name": "dcC1InstrumentDC48VCurrent",
"offset": 19,
"type": "uint16",
"description": "DC C1仪表DC48V电流(A)"
},
{
"name": "reservedCurrent1",
"offset": 21,
"type": "uint16",
"description": "备用电流1(A)"
},
{
"name": "emergencyLithiumBatteryGroup2Current",
"offset": 23,
"type": "uint16",
"description": "应急锂电池组2电流(A)"
},
{
"name": "lithiumBatteryGroupInstrumentCurrent",
"offset": 25,
"type": "uint16",
"description": "锂电池组仪表电流(A)"
},
{
"name": "unit4InstrumentDC48VCurrent",
"offset": 27,
"type": "uint16",
"description": "单元4仪表DC48V电流(A)"
},
{
"name": "reservedCurrent2",
"offset": 29,
"type": "uint16",
"description": "备用电流2(A)"
},
{
"name": "emergency2BusbarVoltage",
"offset": 31,
"type": "uint16",
"description": "应急2母线电压(V)"
},
{
"name": "compositeEnergyManagementSystemEmergencyDC48VCurrent",
"offset": 33,
"type": "uint16",
"description": "综合能源管理系统应急DC48V电流(A)"
}
]
}