修复了UDP通信的BUG并优化了相关代码,增加了json报告功能

This commit is contained in:
zjk
2024-11-23 17:28:51 +08:00
parent abd91d0e88
commit 6374e60b91
14 changed files with 881 additions and 464 deletions
+10 -103
View File
@@ -1,105 +1,12 @@
{
"workCondition_unit8" : "idel",
"currentMod_uint8" : "test",
"powerState_uint8" : 1,
"faultLevel_uint8" : 0,
"faultCode_uint16" : [0,1,2],
"soc_uint16" : 10000,
"sustainableTime_uint64" : 10000,
"fcs_obj":
{
"state_uint8" : 1,
"faultLevel_uint8" : 0,
"faultCode_uint16" : 0,
"soc" : 1000,
"output": 20000,
"powerGen" : 30000,
"outputLimit" : 30000,
"ch4o":1000,
"o2":1000,
"temp":1000
},
"InsBat_obj":
{
"state" : 1,
"faultLevel" : 0,
"faultCode" : 0,
"soc" : 1000,
"threshold1": 70,
"threshold2": 80,
"threshold3": 90
},
"powBat_obj":
{
"state" : 1,
"faultLevel" : 0,
"faultCode" : 0,
"soc" : 1000,
"threshold1": 70,
"threshold2": 80,
"threshold3": 90
},
"powDisSys_obj":
{
"state" : 1,
"faultLevel" : 0,
"faultCode" : [0,1,2],
"currentHigVolBusState" :
{
"powerBusVoltage" : 10000,
"dc5ModuleCurrent" : 10000,
"powerBusCurrent" : 10000,
"aBusVoltage" : 10000,
"propMotorCurrent" : 10000,
"aBusCurrent" : 10000,
"batteryGroupCurrent" : 10000,
"bowHigVolDisCurrent" : 10000,
"ftDev45Current" : 10000,
"tyzCurrent" : 10000,
"sternRudder1Current" : 10000,
"reservedCurrent1" : 10000,
"sternRudder2Current" : 10000,
"reservedCurrent2" : 10000,
"fbCurrent" : 10000,
"reservedCurrent3" : 10000
},
"currentHigVolBusAState" :
{
"busBVoltage":10000,
"busBCurrent":10000,
"ftDev123Current":10000,
"closureMechCurrent":10000,
"mastSteerCurrent":10000,
"xczCurrent":10000,
"bowRudderCurrent":10000,
"coverActorCurrent":10000
},
"currentHigVolBusBState" :
{
"insBusVoltage" : 10000,
"bowLowVoltageDisCurrent" : 10000,
"dcc1Current" : 10000,
"reservedCurrent1" : 10000,
"emerBatGroup2Current" : 10000,
"batGroupInsCurrent" : 10000,
"unit4Current" : 10000,
"reservedCurrent2" : 10000,
"emer2BusVoltage" : 10000,
"ccuEmerCurrent" : 10000,
"fcsSecurityCurrent" : 10000,
"plcCurrent" : 10000
},
"currentLowVolBusBState" :
{
"insBusVoltage":10000,
"insBusCurrent":10000,
"unit1Current":10000,
"unit2Current":10000,
"unit3Current":10000,
"unit5Current":10000,
"bowPzDeviceCurrent":10000,
"emerBatGroup1Current":10000,
"emer1BusVoltage":10000
}
}
"currentMod_uint8": 0,
"falutLevel_uint8": 0,
"faultCode_array":
[
0
],
"powerState_uint8": 0,
"soc_uint32": 0,
"sustainableTime_obj": 0,
"workCondition_uint8": 0
}