|
@@ -1,166 +1,212 @@
|
|
|
-
|
|
|
-
|
|
|
--- frame formate is not clearly give ,code needs some changes
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
--- Define the dissector function
|
|
|
-function dissect_power_system_data(buffer, pinfo, tree,HM_TM_dissector, offset, len,data3)
|
|
|
-
|
|
|
--- Define ProtoFields for each field in the structure
|
|
|
-local f_tim = ProtoField.uint32("PowerSystemData.tim", "Time", base.DES)
|
|
|
-local f_pv_cnt = ProtoField.uint8("PowerSystemData.pv_cnt", "PV Count", base.DES)
|
|
|
-local f_mppt_cnt = ProtoField.uint8("PowerSystemData.mppt_cnt", "MPPT Count", base.DES)
|
|
|
-local f_op_conv_cnt = ProtoField.uint8("PowerSystemData.op_conv_cnt", "Operating Converter Count", base.DES)
|
|
|
-local f_btry_cnt = ProtoField.uint8("PowerSystemData.btry_cnt", "Battery Count", base.DES)
|
|
|
-local f_btry_temp_sns_cnt = ProtoField.uint8("PowerSystemData.btry_temp_sns_cnt", "Battery Temperature Sensor Count", base.DES)
|
|
|
-local f_chnl_cnt = ProtoField.uint8("PowerSystemData.chnl_cnt", "Channel Count", base.DES)
|
|
|
-local f_volt_rail_cnt = ProtoField.uint8("PowerSystemData.volt_rail_cnt", "Voltage Rail Count", base.DES)
|
|
|
-local f_tot_btry_volt_rd = ProtoField.uint16("PowerSystemData.tot_btry_volt_rd", "Total Battery Voltage", base.DES)
|
|
|
-local f_tot_btry_cur_rd = ProtoField.uint16("PowerSystemData.tot_btry_cur_rd", "Total Battery Current", base.DES)
|
|
|
-local f_hrm_btry_mode_info = ProtoField.uint8("PowerSystemData.hrm_btry_mode_info", "Harmonic Battery Mode Info", base.DES)
|
|
|
-
|
|
|
--- Fields for arrays (treated as ProtoFields with array index)
|
|
|
-local f_pv_volt_rd = ProtoField.uint16("PowerSystemData.pv_volt_rd", "PV Voltage Reading", base.DES)
|
|
|
-local f_pv_cur_rd = ProtoField.uint16("PowerSystemData.pv_cur_rd", "PV Current Reading", base.DES)
|
|
|
-local f_mppt_volt_rd = ProtoField.uint16("PowerSystemData.mppt_volt_rd", "MPPT Voltage Reading", base.DES)
|
|
|
-local f_mppt_cur_rd = ProtoField.uint16("PowerSystemData.mppt_cur_rd", "MPPT Current Reading", base.DES)
|
|
|
-local f_op_conv_volt_rd = ProtoField.uint16("PowerSystemData.op_conv_volt_rd", "Operating Converter Voltage", base.DES)
|
|
|
-local f_btry_temp_sns_rd = ProtoField.uint8("PowerSystemData.btry_temp_sns_rd", "Battery Temperature Sensor Readings", base.DES)
|
|
|
-local f_chnl_state = ProtoField.uint8("PowerSystemData.chnl_state", "Channel State", base.DES)
|
|
|
-local f_volt_rail_cur_value = ProtoField.uint8("PowerSystemData.volt_rail_cur_value", "Voltage Rail Current Value", base.DES)
|
|
|
-local f_chnl_ovr_cur_flg = ProtoField.uint8("PowerSystemData.chnl_ovr_cur_flg", "Channel Over Current Flag", base.DES)
|
|
|
-local eps_hardware_data = ProtoField.uint8("PowerSystemData.eps", "eps_hardware_data", base.DES)
|
|
|
--- Add the fields to the protocol
|
|
|
-HM_TM_dissector.fields = { f_tim ,f_pv_cnt, f_mppt_cnt, f_op_conv_cnt, f_btry_cnt, f_btry_temp_sns_cnt, f_chnl_cnt,
|
|
|
- f_volt_rail_cnt, f_tot_btry_volt_rd, f_tot_btry_cur_rd, f_hrm_btry_mode_info,
|
|
|
- f_pv_volt_rd, f_pv_cur_rd, f_mppt_volt_rd, f_mppt_cur_rd, f_op_conv_volt_rd,
|
|
|
- f_btry_temp_sns_rd, f_chnl_state, f_volt_rail_cur_value, f_chnl_ovr_cur_flg,eps_hardware_data
|
|
|
+function eps_dissector(buffer, pinfo, tree, TC_TM_PROTOCOL, offset, instance)
|
|
|
+
|
|
|
+ local f_timestamp = ProtoField.uint8("TC_TM_PROTOCOL.timestamp_eps", "Timestamp", base.DEC)
|
|
|
+ local f_pv_cnt = ProtoField.uint8("TC_TM_PROTOCOL.pv_cnt", "PV Count", base.DEC)
|
|
|
+ local f_mppt_cnt = ProtoField.uint8("TC_TM_PROTOCOL.mppt_cnt", "MPPT Count", base.DEC)
|
|
|
+ local f_op_conv_cnt = ProtoField.uint8("TC_TM_PROTOCOL.op_conv_cnt", "OP Converter Count", base.DEC)
|
|
|
+ local f_btry_cnt = ProtoField.uint8("TC_TM_PROTOCOL.btry_cnt", "Battery Count", base.DEC)
|
|
|
+ local f_btry_temp_sns_cnt = ProtoField.uint8("TC_TM_PROTOCOL.btry_temp_sns_cnt", "Battery Temp Sensor Count", base.DEC)
|
|
|
+ local f_chnl_cnt = ProtoField.uint8("TC_TM_PROTOCOL.chnl_cnt", "Channel Count", base.DEC)
|
|
|
+ local f_volt_rail_cnt = ProtoField.uint8("TC_TM_PROTOCOL.volt_rail_cnt", "Voltage Rail Count", base.DEC)
|
|
|
+ local f_pv_volt_rd = ProtoField.float("TC_TM_PROTOCOL.pv_volt_rd", "PV Voltage Readings", base.DEC)
|
|
|
+ local f_pv_cur_rd = ProtoField.float("TC_TM_PROTOCOL.pv_cur_rd", "PV Current Readings", base.DEC)
|
|
|
+ local f_mppt_volt_rd = ProtoField.float("TC_TM_PROTOCOL.mppt_volt_rd", "MPPT Voltage Readings", base.DEC)
|
|
|
+ local f_mppt_cur_rd = ProtoField.float("TC_TM_PROTOCOL.mppt_cur_rd", "MPPT Current Readings", base.DEC)
|
|
|
+ local f_op_conv_volt_rd = ProtoField.bytes("TC_TM_PROTOCOL.op_conv_volt_rd", "OP Converter Voltage Readings")
|
|
|
+ local f_tot_btry_volt_rd = ProtoField.float("TC_TM_PROTOCOL.tot_btry_volt_rd", "Total Battery Voltage Read", base.DEC)
|
|
|
+ local f_tot_btry_cur_rd = ProtoField.float("TC_TM_PROTOCOL.tot_btry_cur_rd", "Total Battery Current Read", base.DEC)
|
|
|
+ local f_btry_temp_sns_rd = ProtoField.uint8("TC_TM_PROTOCOL.btry_temp_sns_rd", "Battery Temp Sensor Readings", base.DEC)
|
|
|
+ local f_chnl_state = ProtoField.uint16("TC_TM_PROTOCOL.chnl_state", "Channel States", base.DEC)
|
|
|
+ local f_volt_rail_cur_value = ProtoField.bytes("TC_TM_PROTOCOL.volt_rail_cur_value", "Voltage Rail Current Values")
|
|
|
+ local f_chnl_ovr_cur_flg = ProtoField.bytes("TC_TM_PROTOCOL.chnl_ovr_cur_flg", "Channel Overcurrent Flags")
|
|
|
+ local f_hrm_btry_mode_info = ProtoField.uint8("TC_TM_PROTOCOL.hrm_btry_mode_info", "HRM Battery Mode Info", base.DEC)
|
|
|
+ local f_eps_chnl_hw_sts = ProtoField.bytes("TC_TM_PROTOCOL.eps_chnl_hw_sts", "EPS CNTRL Channel HW status")
|
|
|
+ local f_reserved_byte_size = ProtoField.uint8("TC_TM_PROTOCOL.f_reserved_byte_size", "Reserved Byte Size", base.DEC)
|
|
|
+ local f_reserved_byte_array = ProtoField.uint8("TC_TM_PROTOCOL.f_reserved_byte_size", "Reserved Byte Array", base.DEC)
|
|
|
+
|
|
|
+
|
|
|
+TC_TM_PROTOCOL.fields = {
|
|
|
+ f_timestamp, f_pv_cnt, f_mppt_cnt, f_op_conv_cnt, f_btry_cnt, f_btry_temp_sns_cnt,
|
|
|
+ f_chnl_cnt, f_volt_rail_cnt, f_pv_volt_rd, f_pv_cur_rd, f_mppt_volt_rd,
|
|
|
+ f_mppt_cur_rd, f_op_conv_volt_rd, f_tot_btry_volt_rd, f_tot_btry_cur_rd,
|
|
|
+ f_btry_temp_sns_rd, f_chnl_state, f_volt_rail_cur_value,
|
|
|
+ f_chnl_ovr_cur_flg, f_hrm_btry_mode_info, f_eps_chnl_hw_sts
|
|
|
}
|
|
|
|
|
|
-local subtree = tree:add(TC_TM_PROTOCOL, buffer(), "EPS")
|
|
|
-
|
|
|
-for i = 0,data3 - 1 do
|
|
|
-
|
|
|
- --offset = offset+8
|
|
|
+local subtree = tree:add(TC_TM_PROTOCOL, buffer(), "EPS GET LIVE PARAM")
|
|
|
+ for i = 0, instance - 1 do
|
|
|
local subtree1 = subtree:add(TC_TM_PROTOCOL, buffer(), "Instance "..i)
|
|
|
-
|
|
|
- subtree1:add(f_tim,buffer(offset,4):le_uint())
|
|
|
- offset = offset+8
|
|
|
- -- dissect pv_cnt
|
|
|
+
|
|
|
+ subtree1:add(f_timestamp, buffer(offset, 4):le_uint())
|
|
|
+ offset = offset + 8
|
|
|
local pv_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_pv_cnt, pv_cnt)
|
|
|
+ subtree1:add(f_pv_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-
|
|
|
- -- dissect mppt_cnt
|
|
|
+
|
|
|
local mppt_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_mppt_cnt, mppt_cnt)
|
|
|
+ subtree1:add(f_mppt_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-
|
|
|
- -- dissect op_conv_cnt
|
|
|
+
|
|
|
local op_conv_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_op_conv_cnt, op_conv_cnt)
|
|
|
+ subtree1:add(f_op_conv_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-
|
|
|
- -- dissect btry_cnt
|
|
|
+
|
|
|
local btry_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_btry_cnt, btry_cnt)
|
|
|
+ subtree1:add(f_btry_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-
|
|
|
- -- dissect btry_temp_sns_cnt
|
|
|
+
|
|
|
local btry_temp_sns_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_btry_temp_sns_cnt, btry_temp_sns_cnt)
|
|
|
+ subtree1:add(f_btry_temp_sns_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-
|
|
|
- -- dissect chnl_cnt
|
|
|
+
|
|
|
local chnl_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_chnl_cnt, chnl_cnt)
|
|
|
+ subtree1:add(f_chnl_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-
|
|
|
- -- dissect volt_rail_cnt
|
|
|
+
|
|
|
local volt_rail_cnt = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_volt_rail_cnt, volt_rail_cnt)
|
|
|
+ subtree1:add(f_volt_rail_cnt, buffer(offset, 1):le_uint())
|
|
|
offset = offset + 1
|
|
|
-------------------------------------------------------------------------------------------------------------
|
|
|
-for i=1, pv_cnt do
|
|
|
--- dissect pv_volt_rd
|
|
|
- --local pv_volt = string.unpack("<d", buffer(offset, 2):le_uint())
|
|
|
- local pv_volt = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_pv_volt_rd, pv_volt)
|
|
|
- offset = offset + 2
|
|
|
-end
|
|
|
-for i=1, pv_cnt do
|
|
|
--- dissect pv_cur_rd
|
|
|
- local pv_cur = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_pv_cur_rd, pv_cur)
|
|
|
- offset = offset + 2
|
|
|
-end
|
|
|
-
|
|
|
---for i=1, mppt_cnt do
|
|
|
- -- dissect mppt_volt_rd
|
|
|
- local mppt_volt = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_mppt_volt_rd, mppt_volt)
|
|
|
- offset = offset + 2
|
|
|
---end
|
|
|
---for i=1, mppt_cnt do
|
|
|
--- dissect mppt_cur_rd
|
|
|
- local mppt_cur = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_mppt_cur_rd, mppt_cur)
|
|
|
- offset = offset + 2
|
|
|
---end
|
|
|
-
|
|
|
-for i=1 ,op_conv_cnt do
|
|
|
--- dissect op_conv_volt_rd (array of uint16, loop through based on op_conv_cnt)
|
|
|
- local op_conv_volt = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_op_conv_volt_rd, op_conv_volt)
|
|
|
- offset = offset + 2
|
|
|
-end
|
|
|
- -- dissect tot_btry_volt_rd
|
|
|
- local tot_btry_volt_rd = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_tot_btry_volt_rd, tot_btry_volt_rd)
|
|
|
- offset = offset + 2
|
|
|
--- dissect tot_btry_cur_rd
|
|
|
- local tot_btry_cur_rd = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_tot_btry_cur_rd, tot_btry_cur_rd)
|
|
|
- offset = offset + 2
|
|
|
-for i=1, btry_temp_sns_cnt do
|
|
|
--- dissect btry_temp_sns_rd (array of uint8, loop through based on btry_temp_sns_cnt)
|
|
|
- local btry_temp = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_btry_temp_sns_rd, btry_temp)
|
|
|
- offset = offset + 1
|
|
|
-end
|
|
|
-
|
|
|
-for i=1, chnl_cnt do
|
|
|
--- dissect chnl_state (array of uint8, loop through based on chnl_cnt)
|
|
|
- local chnl_state_value = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_chnl_state, chnl_state_value)
|
|
|
- offset = offset + 1
|
|
|
-end
|
|
|
-for i=1, volt_rail_cnt do
|
|
|
--- volt_rail_cur_value
|
|
|
- local volt_rail_value = buffer(offset, 2):le_uint()
|
|
|
- subtree1:add(f_volt_rail_cur_value, volt_rail_value)
|
|
|
- offset = offset + 1
|
|
|
-end
|
|
|
-for i=1,volt_rail_cnt do
|
|
|
--- dissect chnl_ovr_cur_flg (array of uint8, loop through based on chnl_cnt)
|
|
|
- local chnl_ovr_cur_flg_value = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_chnl_ovr_cur_flg, chnl_ovr_cur_flg_value)
|
|
|
- offset = offset + 1
|
|
|
-end
|
|
|
-
|
|
|
- -- dissect hrm_btry_mode_info
|
|
|
- local hrm_btry_mode_info = buffer(offset, 1):le_uint()
|
|
|
- subtree1:add(f_hrm_btry_mode_info, hrm_btry_mode_info)
|
|
|
- offset = offset + 1
|
|
|
-
|
|
|
- for i=1 ,36 do
|
|
|
- subtree1:add(eps_hardware_data,buffer(offset,1):le_uint())
|
|
|
- offset=offset+1
|
|
|
+
|
|
|
+ local count = 0 -- Initialize the sum to 0
|
|
|
+ local value
|
|
|
+
|
|
|
+ for i = 0, pv_cnt - 1 do
|
|
|
+ value = buffer(offset, 2):le_uint() -- Parse as little-endian uint16
|
|
|
+ value = value/10;
|
|
|
+ subtree1:add(f_pv_volt_rd, value):set_text(string.format("PV Volt %d ----> %0.1f V", i, value))
|
|
|
+ offset = offset + 2 -- Move the offset forward by 2 bytes
|
|
|
end
|
|
|
-
|
|
|
-
|
|
|
-end
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ for i = 0, pv_cnt - 1 do
|
|
|
+ value = buffer(offset, 2):le_uint()
|
|
|
+ value = value / 100
|
|
|
+ subtree1:add(f_pv_cur_rd, value):set_text(string.format("PV Current %d ----> %0.2f A", i, value))
|
|
|
+ offset = offset + 2
|
|
|
+ end
|
|
|
+
|
|
|
+ for i = 0, mppt_cnt - 1 do
|
|
|
+ value = buffer(offset, 2):le_uint()
|
|
|
+ value = value / 10
|
|
|
+ subtree1:add(f_mppt_volt_rd, value):set_text(string.format("MPPT Volt %d ----> %0.1f V", i, value))
|
|
|
+ offset = offset + 2
|
|
|
+ end
|
|
|
+
|
|
|
+ for i = 0, mppt_cnt - 1 do
|
|
|
+ value = buffer(offset, 2):le_uint()
|
|
|
+ value = value / 100
|
|
|
+ subtree1:add(f_mppt_cur_rd, value):set_text(string.format("MPPT Current %d ----> %0.2f A", i, value))
|
|
|
+ offset = offset + 2
|
|
|
+ end
|
|
|
+
|
|
|
+ for i = 0, op_conv_cnt - 1 do
|
|
|
+ value = buffer(offset, 2):le_uint()
|
|
|
+ value = value / 10
|
|
|
+ subtree1:add(f_op_conv_volt_rd, value):set_text(string.format("OP Convertor Volt %d ----> %0.1f V", i, value))
|
|
|
+ offset = offset + 2
|
|
|
+ end
|
|
|
+
|
|
|
+ local tot_btry_volt = buffer(offset, 2):le_uint()
|
|
|
+ tot_btry_volt = tot_btry_volt / 10
|
|
|
+ subtree1:add(f_tot_btry_volt_rd, tot_btry_volt):set_text(string.format("Total Battery Voltage Read ---- %0.1f V", tot_btry_volt))
|
|
|
+ offset = offset + 2
|
|
|
+
|
|
|
+ local tot_btry_curr = buffer(offset, 2):le_uint()
|
|
|
+ tot_btry_curr = tot_btry_curr / 100
|
|
|
+ subtree1:add(f_tot_btry_cur_rd, tot_btry_curr):set_text(string.format("Total Battery Curr Read ---- %0.2f A", tot_btry_curr))
|
|
|
+ offset = offset + 2
|
|
|
+
|
|
|
+ for i = 0, btry_temp_sns_cnt - 1 do
|
|
|
+ value = buffer(offset, 1):le_uint()
|
|
|
+ subtree1:add(f_btry_temp_sns_rd, value):set_text(string.format("Battery Temp Sensor %d ----> %d degC", i, value))
|
|
|
+ offset = offset + 1
|
|
|
+ end
|
|
|
+
|
|
|
+ count = math.ceil(chnl_cnt / 8)
|
|
|
+ local chnl_state = buffer(offset, count):le_uint()
|
|
|
+ for i = 0, chnl_cnt - 1 do
|
|
|
+ data = (chnl_state >> i) & 1
|
|
|
+ if data == 1 then
|
|
|
+ subtree1:add(f_chnl_state, data):set_text(string.format("Channel %d ----> ON", i)) -- Adjust size as needed
|
|
|
+ else
|
|
|
+ subtree1:add(f_chnl_state, data):set_text(string.format("Channel %d ----> OFF", i))
|
|
|
+ end
|
|
|
+ end
|
|
|
+ offset = offset + count
|
|
|
+
|
|
|
+
|
|
|
+ for i = 0, volt_rail_cnt - 1 do
|
|
|
+ value = buffer(offset, 2):le_uint()
|
|
|
+ value = value / 100
|
|
|
+ subtree1:add(f_volt_rail_cur_value, value):set_text(string.format("Volt Rail current Values %d ----> %0.2f A", i, value))
|
|
|
+ offset = offset + 2
|
|
|
+ end
|
|
|
+
|
|
|
+ count = math.ceil(volt_rail_cnt / 8)
|
|
|
+ local over_flow = buffer(offset, count):le_uint()
|
|
|
+ for i = 0, volt_rail_cnt - 1 do
|
|
|
+ data = (over_flow >> i) & 1
|
|
|
+ if data == 1 then
|
|
|
+ subtree1:add(f_chnl_ovr_cur_flg, data):set_text(string.format("Over Current Flag %d ----> SET", i)) -- Adjust size as needed
|
|
|
+ else
|
|
|
+ subtree1:add(f_chnl_ovr_cur_flg, data):set_text(string.format("Over Current Flag %d ----> CLR", i))
|
|
|
+ end
|
|
|
+ end
|
|
|
+ offset = offset + count
|
|
|
+
|
|
|
+ local btry_mode = buffer(offset, 1):le_uint()
|
|
|
+ local data = btry_mode & 0x0f
|
|
|
+
|
|
|
+ if data == 0 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info,data):set_text(string.format("EPS MODE ----> OFF"))
|
|
|
+ elseif data == 1 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("EPS MODE ----> CRITICAL"))
|
|
|
+ elseif data == 2 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("EPS MODE ----> SAFE"))
|
|
|
+ elseif data == 3 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("EPS MODE ----> NORMAL"))
|
|
|
+ elseif data == 4 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("EPS MODE ----> FULL"))
|
|
|
+ end
|
|
|
+
|
|
|
+ data = (btry_mode >> 4) & 1
|
|
|
+
|
|
|
+ if data == 1 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("Bttery Charge Status ----> Charging"))
|
|
|
+ else
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("Bttery Charge Status ----> Not Charging"))
|
|
|
+ end
|
|
|
+
|
|
|
+ data = (btry_mode >> 5) & 3
|
|
|
+
|
|
|
+ if data == 3 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("HRM Release Status ----> Both Left and Right opened"))
|
|
|
+ elseif data == 2 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("HRM Release Status ----> Left opened and Right Not opened"))
|
|
|
+ elseif data == 1 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("HRM Release Status ----> Right opened and Left Not opened"))
|
|
|
+ elseif data == 0 then
|
|
|
+ subtree1:add(f_hrm_btry_mode_info, data):set_text(string.format("HRM Release Status ----> Both Left and Right Not opened"))
|
|
|
+ end
|
|
|
+
|
|
|
+ offset = offset + 1
|
|
|
+ offset = offset + 24
|
|
|
+ local temp
|
|
|
+ --local data = buffer(offset, 2):le_uint()
|
|
|
+ subtree1:add("EPS Cntrl channel HW status ------>")
|
|
|
+ for i = 0,13 - 1 do
|
|
|
+ data = buffer(offset, 1):le_uint()
|
|
|
+ if data == 0 then
|
|
|
+ subtree1:add(f_eps_chnl_hw_sts, data):set_text(string.format("Channel %d ----> %d",i, data))
|
|
|
+ elseif data == 1 then
|
|
|
+ subtree1:add(f_eps_chnl_hw_sts, data):set_text(string.format("Channel %d ----> %d",i, data))
|
|
|
+ end
|
|
|
+ offset = offset + 1
|
|
|
+ end
|
|
|
+
|
|
|
+ --subtree:add(f_reserved_byte_size, buffer(offset, 1):le_uint())
|
|
|
+ --offset = offset + 1
|
|
|
+
|
|
|
+ --subtree:add(reserved_byte_array, buffer(offset, 1):le_uint())
|
|
|
+ --offset = offset + 1
|
|
|
+ end
|
|
|
end
|