From db19a82342b2e961477f5aa5bc14e542ac711f3b Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sun, 4 May 2025 15:31:15 -0700 Subject: Using new SR16-CustomBMS repo .dbc file https://github.com/spartanracingelectric/SR16-CustomBMS/blob/main/SR-16%20Custom%20BMS.dbc Edited some lines at the .dbc file head to make dbcc work, maybe wrong. --- all_SRE_edited.c | 11529 ++++++++++++++++++++++++++++++++------------- all_SRE_edited.dbc | 807 ++-- all_SRE_edited.h | 1208 +++-- decode_function_name.txt | 146 +- mycan.c | 317 +- 5 files changed, 9811 insertions(+), 4196 deletions(-) diff --git a/all_SRE_edited.c b/all_SRE_edited.c index 386961f..c45a348 100644 --- a/all_SRE_edited.c +++ b/all_SRE_edited.c @@ -21,74 +21,66 @@ static int pack_can_0x600_BMS_Safety_Checker(can_obj_all_sre_edited_h_t *o, uint assert(data); register uint64_t x; register uint64_t i = 0; - /* Pack_Voltage: start-bit 24, length 32, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint32_t)(o->can_0x600_BMS_Safety_Checker.Pack_Voltage)) & 0xffffffff; - x <<= 24; + /* BMS_Cell_Max_Min_Difference: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Max_Min_Difference)) & 0xffff; + x <<= 16; i |= x; - /* SPIError: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.SPIError)) & 0xff; - x <<= 56; + /* BMS_HVsens_Pack_Voltage: start-bit 32, length 16, endianess intel, scaling 0.01, offset 0 */ + x = ((uint16_t)(o->can_0x600_BMS_Safety_Checker.BMS_HVsens_Pack_Voltage)) & 0xffff; + x <<= 32; i |= x; - /* Balacing_End_Fault: start-bit 1, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Balacing_End_Fault)) & 0x1; - x <<= 1; + /* BMS_Sum_Pack_Voltage: start-bit 48, length 16, endianess intel, scaling 0.01, offset 0 */ + x = ((uint16_t)(o->can_0x600_BMS_Safety_Checker.BMS_Sum_Pack_Voltage)) & 0xffff; + x <<= 48; i |= x; - /* Cell_Volt_Imbalance_Fault: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Fault)) & 0x1; + /* BMS_Cell_High_Temp_Warning: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Warning)) & 0x1; x <<= 2; i |= x; - /* Cell_High_Temp_Fault: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Fault)) & 0x1; + /* BMS_Cell_Volt_Imbalance_Warning: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Warning)) & 0x1; x <<= 3; i |= x; - /* Cell_High_Volt_Fault: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Fault)) & 0x1; + /* BMS_Cell_Low_Volt_Warning: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Warning)) & 0x1; x <<= 4; i |= x; - /* Cell_Low_Volt_Fault: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Fault)) & 0x1; + /* BMS_Cell_High_Volt_Warning: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Warning)) & 0x1; x <<= 5; i |= x; - /* Pack_Low_Volt_Fault: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Fault)) & 0x1; + /* BMS_Pack_Low_Volt_Warning: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Warning)) & 0x1; x <<= 6; i |= x; - /* Pack_High_Volt_Fault: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Fault)) & 0x1; + /* BMS_Pack_High_Volt_Warning: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Warning)) & 0x1; x <<= 7; i |= x; - /* Cell_Volt_Imbalance_Warning: start-bit 9, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Warning)) & 0x1; - x <<= 9; - i |= x; - /* Cell_Low_Temp_Warning: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Temp_Warning)) & 0x1; + /* BMS_Cell_High_Temp_Fault: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Fault)) & 0x1; x <<= 10; i |= x; - /* Cell_High_Temp_Warning: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Warning)) & 0x1; + /* BMS_Cell_Volt_Imbalance_Fault: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Fault)) & 0x1; x <<= 11; i |= x; - /* Cell_High_Volt_Warning: start-bit 12, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Warning)) & 0x1; + /* BMS_Cell_Low_Volt_Fault: start-bit 12, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Fault)) & 0x1; x <<= 12; i |= x; - /* Cell_Low_Volt_Warning: start-bit 13, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Warning)) & 0x1; + /* BMS_Cell_High_Volt_Fault: start-bit 13, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Fault)) & 0x1; x <<= 13; i |= x; - /* Pack_Low_Volt_Warning: start-bit 14, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Warning)) & 0x1; + /* BMS_Pack_Low_Volt_Fault: start-bit 14, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Fault)) & 0x1; x <<= 14; i |= x; - /* Pack_High_Volt_Warning: start-bit 15, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Warning)) & 0x1; + /* BMS_Pack_High_Volt_Fault: start-bit 15, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Fault)) & 0x1; x <<= 15; i |= x; - /* Balancing_State: start-bit 23, length 1, endianess intel, scaling 1, offset 0 */ - x = ((uint8_t)(o->can_0x600_BMS_Safety_Checker.Balancing_State)) & 0x1; - x <<= 23; - i |= x; *data = (i); o->can_0x600_BMS_Safety_Checker_tx = 1; return 8; @@ -101,68 +93,74 @@ static int unpack_can_0x600_BMS_Safety_Checker(can_obj_all_sre_edited_h_t *o, ui register uint64_t i = (data); if (dlc < 8) return -1; - /* Pack_Voltage: start-bit 24, length 32, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 24) & 0xffffffff; - o->can_0x600_BMS_Safety_Checker.Pack_Voltage = x; - /* SPIError: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ - x = (i >> 56) & 0xff; - o->can_0x600_BMS_Safety_Checker.SPIError = x; - /* Balacing_End_Fault: start-bit 1, length 1, endianess intel, scaling 1, offset 0 */ - x = (i >> 1) & 0x1; - o->can_0x600_BMS_Safety_Checker.Balacing_End_Fault = x; - /* Cell_Volt_Imbalance_Fault: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ + /* BMS_Cell_Max_Min_Difference: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Max_Min_Difference = x; + /* BMS_HVsens_Pack_Voltage: start-bit 32, length 16, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x600_BMS_Safety_Checker.BMS_HVsens_Pack_Voltage = x; + /* BMS_Sum_Pack_Voltage: start-bit 48, length 16, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x600_BMS_Safety_Checker.BMS_Sum_Pack_Voltage = x; + /* BMS_Cell_High_Temp_Warning: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 2) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Fault = x; - /* Cell_High_Temp_Fault: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Warning = x; + /* BMS_Cell_Volt_Imbalance_Warning: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 3) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Fault = x; - /* Cell_High_Volt_Fault: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Warning = x; + /* BMS_Cell_Low_Volt_Warning: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 4) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Fault = x; - /* Cell_Low_Volt_Fault: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Warning = x; + /* BMS_Cell_High_Volt_Warning: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 5) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Fault = x; - /* Pack_Low_Volt_Fault: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Warning = x; + /* BMS_Pack_Low_Volt_Warning: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 6) & 0x1; - o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Fault = x; - /* Pack_High_Volt_Fault: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Warning = x; + /* BMS_Pack_High_Volt_Warning: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 7) & 0x1; - o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Fault = x; - /* Cell_Volt_Imbalance_Warning: start-bit 9, length 1, endianess intel, scaling 1, offset 0 */ - x = (i >> 9) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Warning = x; - /* Cell_Low_Temp_Warning: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Warning = x; + /* BMS_Cell_High_Temp_Fault: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 10) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_Low_Temp_Warning = x; - /* Cell_High_Temp_Warning: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Fault = x; + /* BMS_Cell_Volt_Imbalance_Fault: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 11) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Warning = x; - /* Cell_High_Volt_Warning: start-bit 12, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Fault = x; + /* BMS_Cell_Low_Volt_Fault: start-bit 12, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 12) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Warning = x; - /* Cell_Low_Volt_Warning: start-bit 13, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Fault = x; + /* BMS_Cell_High_Volt_Fault: start-bit 13, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 13) & 0x1; - o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Warning = x; - /* Pack_Low_Volt_Warning: start-bit 14, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Fault = x; + /* BMS_Pack_Low_Volt_Fault: start-bit 14, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 14) & 0x1; - o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Warning = x; - /* Pack_High_Volt_Warning: start-bit 15, length 1, endianess intel, scaling 1, offset 0 */ + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Fault = x; + /* BMS_Pack_High_Volt_Fault: start-bit 15, length 1, endianess intel, scaling 1, offset 0 */ x = (i >> 15) & 0x1; - o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Warning = x; - /* Balancing_State: start-bit 23, length 1, endianess intel, scaling 1, offset 0 */ - x = (i >> 23) & 0x1; - o->can_0x600_BMS_Safety_Checker.Balancing_State = x; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Fault = x; o->can_0x600_BMS_Safety_Checker_rx = 1; o->can_0x600_BMS_Safety_Checker_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x600_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x600_BMS_Cell_Max_Min_Difference(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x600_BMS_Safety_Checker.Pack_Voltage); + double rval = (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Max_Min_Difference); rval *= 0.0001; - if (rval <= 1000) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -171,261 +169,500 @@ int decode_can_0x600_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *o } } -int encode_can_0x600_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x600_BMS_Cell_Max_Min_Difference(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Pack_Voltage = 0; - if (in > 1000) + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Max_Min_Difference = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x600_BMS_Safety_Checker.Pack_Voltage = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Max_Min_Difference = in; return 0; } -int decode_can_0x600_SPIError(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_HVsens_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.SPIError); - *out = rval; - return 0; + double rval = (double)(o->can_0x600_BMS_Safety_Checker.BMS_HVsens_Pack_Voltage); + rval *= 0.01; + if (rval <= 655.35) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } } -int encode_can_0x600_SPIError(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_HVsens_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x600_BMS_Safety_Checker.SPIError = in; + o->can_0x600_BMS_Safety_Checker.BMS_HVsens_Pack_Voltage = 0; + if (in > 655.35) + return -1; + in *= 100; + o->can_0x600_BMS_Safety_Checker.BMS_HVsens_Pack_Voltage = in; return 0; } -int decode_can_0x600_Balacing_End_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Sum_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Balacing_End_Fault); - *out = rval; - return 0; + double rval = (double)(o->can_0x600_BMS_Safety_Checker.BMS_Sum_Pack_Voltage); + rval *= 0.01; + if (rval <= 655.35) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } } -int encode_can_0x600_Balacing_End_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Sum_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Balacing_End_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Sum_Pack_Voltage = 0; + if (in > 655.35) + return -1; + in *= 100; + o->can_0x600_BMS_Safety_Checker.BMS_Sum_Pack_Voltage = in; return 0; } -int decode_can_0x600_Cell_Volt_Imbalance_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_High_Temp_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Fault); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Warning); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_Volt_Imbalance_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_High_Temp_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Warning = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Warning = in; return 0; } -int decode_can_0x600_Cell_High_Temp_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_Volt_Imbalance_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Fault); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Warning); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_High_Temp_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_Volt_Imbalance_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Warning = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Warning = in; return 0; } -int decode_can_0x600_Cell_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Fault); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Warning); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Warning = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Warning = in; return 0; } -int decode_can_0x600_Cell_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Fault); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Warning); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Warning = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Warning = in; return 0; } -int decode_can_0x600_Pack_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Pack_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Fault); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Warning); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Pack_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Pack_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Warning = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Warning = in; return 0; } -int decode_can_0x600_Pack_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Pack_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Fault); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Warning); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Pack_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Pack_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Fault = in; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Warning = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Warning = in; return 0; } -int decode_can_0x600_Cell_Volt_Imbalance_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_High_Temp_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Warning); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Fault); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_Volt_Imbalance_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_High_Temp_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Warning = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Fault = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Fault = in; return 0; } -int decode_can_0x600_Cell_Low_Temp_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_Volt_Imbalance_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Temp_Warning); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Fault); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_Low_Temp_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_Volt_Imbalance_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_Low_Temp_Warning = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Fault = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Fault = in; return 0; } -int decode_can_0x600_Cell_High_Temp_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Warning); - *out = rval; - return 0; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Fault); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -int encode_can_0x600_Cell_High_Temp_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x600_BMS_Cell_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Warning = in; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Fault = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Fault = in; return 0; } -int decode_can_0x600_Cell_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Cell_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Warning); - *out = rval; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Fault); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } +} + +int encode_can_0x600_BMS_Cell_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Fault = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Fault = in; return 0; } -int encode_can_0x600_Cell_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int decode_can_0x600_BMS_Pack_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) { + assert(o); + assert(out); + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Fault); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } +} + +int encode_can_0x600_BMS_Pack_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Warning = in; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Fault = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Fault = in; return 0; } -int decode_can_0x600_Cell_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x600_BMS_Pack_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Warning); - *out = rval; + int8_t rval = (int8_t)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Fault); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } +} + +int encode_can_0x600_BMS_Pack_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Fault = 0; + if (in < 0) + return -1; + o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Fault = in; return 0; } -int encode_can_0x600_Cell_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int print_can_0x600_BMS_Safety_Checker(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_Cell_Max_Min_Difference = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Max_Min_Difference))); + r = print_helper(r, fprintf(output, "BMS_HVsens_Pack_Voltage = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_HVsens_Pack_Voltage))); + r = print_helper(r, fprintf(output, "BMS_Sum_Pack_Voltage = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Sum_Pack_Voltage))); + r = print_helper(r, fprintf(output, "BMS_Cell_High_Temp_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Warning))); + r = print_helper(r, fprintf(output, "BMS_Cell_Volt_Imbalance_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Warning))); + r = print_helper(r, fprintf(output, "BMS_Cell_Low_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Warning))); + r = print_helper(r, fprintf(output, "BMS_Cell_High_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Warning))); + r = print_helper(r, fprintf(output, "BMS_Pack_Low_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Warning))); + r = print_helper(r, fprintf(output, "BMS_Pack_High_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Warning))); + r = print_helper(r, fprintf(output, "BMS_Cell_High_Temp_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Temp_Fault))); + r = print_helper(r, fprintf(output, "BMS_Cell_Volt_Imbalance_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Volt_Imbalance_Fault))); + r = print_helper(r, fprintf(output, "BMS_Cell_Low_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_Low_Volt_Fault))); + r = print_helper(r, fprintf(output, "BMS_Cell_High_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Cell_High_Volt_Fault))); + r = print_helper(r, fprintf(output, "BMS_Pack_Low_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_Low_Volt_Fault))); + r = print_helper(r, fprintf(output, "BMS_Pack_High_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.BMS_Pack_High_Volt_Fault))); + return r; +} + +static int pack_can_0x604_BMS_Balance_Enable(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_Balance_Enable: start-bit 0, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x604_BMS_Balance_Enable.BMS_Balance_Enable)) & 0x1; + i |= x; + *data = (i); + o->can_0x604_BMS_Balance_Enable_tx = 1; + return 1; +} + +static int unpack_can_0x604_BMS_Balance_Enable(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 1) + return -1; + /* BMS_Balance_Enable: start-bit 0, length 1, endianess intel, scaling 1, offset 0 */ + x = i & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x604_BMS_Balance_Enable.BMS_Balance_Enable = x; + o->can_0x604_BMS_Balance_Enable_rx = 1; + o->can_0x604_BMS_Balance_Enable_time_stamp_rx = time_stamp; + return 1; +} + +int decode_can_0x604_BMS_Balance_Enable(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Warning = in; + assert(out); + int8_t rval = (int8_t)(o->can_0x604_BMS_Balance_Enable.BMS_Balance_Enable); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } +} + +int encode_can_0x604_BMS_Balance_Enable(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x604_BMS_Balance_Enable.BMS_Balance_Enable = 0; + if (in < 0) + return -1; + o->can_0x604_BMS_Balance_Enable.BMS_Balance_Enable = in; return 0; } -int decode_can_0x600_Pack_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int print_can_0x604_BMS_Balance_Enable(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_Balance_Enable = (wire: %.0f)\n", (double)(o->can_0x604_BMS_Balance_Enable.BMS_Balance_Enable))); + return r; +} + +static int pack_can_0x621_BMS_State_of_Charge(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_Current: start-bit 24, length 32, endianess intel, scaling 1, offset 0 */ + x = ((uint32_t)(o->can_0x621_BMS_State_of_Charge.BMS_Current)) & 0xffffffff; + x <<= 24; + i |= x; + /* BMS_Capacity: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ + x = ((uint16_t)(o->can_0x621_BMS_State_of_Charge.BMS_Capacity)) & 0xffff; + i |= x; + /* BMS_Percent: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x621_BMS_State_of_Charge.BMS_Percent)) & 0xff; + x <<= 16; + i |= x; + *data = (i); + o->can_0x621_BMS_State_of_Charge_tx = 1; + return 7; +} + +static int unpack_can_0x621_BMS_State_of_Charge(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 7) + return -1; + /* BMS_Current: start-bit 24, length 32, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xffffffff; + o->can_0x621_BMS_State_of_Charge.BMS_Current = x; + /* BMS_Capacity: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ + x = i & 0xffff; + o->can_0x621_BMS_State_of_Charge.BMS_Capacity = x; + /* BMS_Percent: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x621_BMS_State_of_Charge.BMS_Percent = x; + o->can_0x621_BMS_State_of_Charge_rx = 1; + o->can_0x621_BMS_State_of_Charge_time_stamp_rx = time_stamp; + return 7; +} + +int decode_can_0x621_BMS_Current(const can_obj_all_sre_edited_h_t *o, uint32_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Warning); + uint32_t rval = (uint32_t)(o->can_0x621_BMS_State_of_Charge.BMS_Current); *out = rval; return 0; } -int encode_can_0x600_Pack_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x621_BMS_Current(can_obj_all_sre_edited_h_t *o, uint32_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Warning = in; + o->can_0x621_BMS_State_of_Charge.BMS_Current = in; return 0; } -int decode_can_0x600_Pack_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x621_BMS_Capacity(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Warning); + uint16_t rval = (uint16_t)(o->can_0x621_BMS_State_of_Charge.BMS_Capacity); *out = rval; return 0; } -int encode_can_0x600_Pack_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x621_BMS_Capacity(can_obj_all_sre_edited_h_t *o, uint16_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Warning = in; + o->can_0x621_BMS_State_of_Charge.BMS_Capacity = in; return 0; } -int decode_can_0x600_Balancing_State(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { +int decode_can_0x621_BMS_Percent(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Balancing_State); + uint8_t rval = (uint8_t)(o->can_0x621_BMS_State_of_Charge.BMS_Percent); *out = rval; return 0; } -int encode_can_0x600_Balancing_State(can_obj_all_sre_edited_h_t *o, uint8_t in) { +int encode_can_0x621_BMS_Percent(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x600_BMS_Safety_Checker.Balancing_State = in; + o->can_0x621_BMS_State_of_Charge.BMS_Percent = in; return 0; } -int print_can_0x600_BMS_Safety_Checker(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x621_BMS_State_of_Charge(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "Pack_Voltage = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Pack_Voltage))); - r = print_helper(r, fprintf(output, "SPIError = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.SPIError))); - r = print_helper(r, fprintf(output, "Balacing_End_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Balacing_End_Fault))); - r = print_helper(r, fprintf(output, "Cell_Volt_Imbalance_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Fault))); - r = print_helper(r, fprintf(output, "Cell_High_Temp_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Fault))); - r = print_helper(r, fprintf(output, "Cell_High_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Fault))); - r = print_helper(r, fprintf(output, "Cell_Low_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Fault))); - r = print_helper(r, fprintf(output, "Pack_Low_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Fault))); - r = print_helper(r, fprintf(output, "Pack_High_Volt_Fault = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Fault))); - r = print_helper(r, fprintf(output, "Cell_Volt_Imbalance_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_Volt_Imbalance_Warning))); - r = print_helper(r, fprintf(output, "Cell_Low_Temp_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Temp_Warning))); - r = print_helper(r, fprintf(output, "Cell_High_Temp_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Warning))); - r = print_helper(r, fprintf(output, "Cell_High_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Warning))); - r = print_helper(r, fprintf(output, "Cell_Low_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Cell_Low_Volt_Warning))); - r = print_helper(r, fprintf(output, "Pack_Low_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Warning))); - r = print_helper(r, fprintf(output, "Pack_High_Volt_Warning = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Warning))); - r = print_helper(r, fprintf(output, "Balancing_State = (wire: %.0f)\n", (double)(o->can_0x600_BMS_Safety_Checker.Balancing_State))); + r = print_helper(r, fprintf(output, "BMS_Current = (wire: %.0f)\n", (double)(o->can_0x621_BMS_State_of_Charge.BMS_Current))); + r = print_helper(r, fprintf(output, "BMS_Capacity = (wire: %.0f)\n", (double)(o->can_0x621_BMS_State_of_Charge.BMS_Capacity))); + r = print_helper(r, fprintf(output, "BMS_Percent = (wire: %.0f)\n", (double)(o->can_0x621_BMS_State_of_Charge.BMS_Percent))); return r; } @@ -434,24 +671,24 @@ static int pack_can_0x622_BMS_Cell_Summary(can_obj_all_sre_edited_h_t *o, uint64 assert(data); register uint64_t x; register uint64_t i = 0; - /* Highest_Cell_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x622_BMS_Cell_Summary.Highest_Cell_Voltage)) & 0xffff; + /* BMS_Highest_Cell_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage)) & 0xffff; i |= x; - /* Lowest_Cell_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage)) & 0xffff; + /* BMS_Lowest_Cell_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Voltage)) & 0xffff; x <<= 16; i |= x; - /* Higest_Cell_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature)) & 0xffff; + /* BMS_Higest_Cell_Temperature: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature)) & 0xff; x <<= 32; i |= x; - /* Lowest_Cell_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature)) & 0xffff; - x <<= 48; + /* BMS_Lowest_Cell_Temperature: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature)) & 0xff; + x <<= 40; i |= x; *data = (i); o->can_0x622_BMS_Cell_Summary_tx = 1; - return 8; + return 6; } static int unpack_can_0x622_BMS_Cell_Summary(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { @@ -459,31 +696,31 @@ static int unpack_can_0x622_BMS_Cell_Summary(can_obj_all_sre_edited_h_t *o, uint assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); - if (dlc < 8) + if (dlc < 6) return -1; - /* Highest_Cell_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_Highest_Cell_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x622_BMS_Cell_Summary.Highest_Cell_Voltage = x; - /* Lowest_Cell_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage = x; + /* BMS_Lowest_Cell_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage = x; - /* Higest_Cell_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature = x; - /* Lowest_Cell_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature = x; + o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Voltage = x; + /* BMS_Higest_Cell_Temperature: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature = x; + /* BMS_Lowest_Cell_Temperature: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature = x; o->can_0x622_BMS_Cell_Summary_rx = 1; o->can_0x622_BMS_Cell_Summary_time_stamp_rx = time_stamp; - return 8; + return 6; } -int decode_can_0x622_Highest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x622_BMS_Highest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x622_BMS_Cell_Summary.Highest_Cell_Voltage); + double rval = (double)(o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -492,22 +729,22 @@ int decode_can_0x622_Highest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, d } } -int encode_can_0x622_Highest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x622_BMS_Highest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x622_BMS_Cell_Summary.Highest_Cell_Voltage = 0; - if (in > 5) + o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x622_BMS_Cell_Summary.Highest_Cell_Voltage = in; + o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage = in; return 0; } -int decode_can_0x622_Lowest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x622_BMS_Lowest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage); + double rval = (double)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -516,57 +753,41 @@ int decode_can_0x622_Lowest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, do } } -int encode_can_0x622_Lowest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x622_BMS_Lowest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage = 0; - if (in > 5) + o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage = in; + o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Voltage = in; return 0; } -int decode_can_0x622_Higest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x622_BMS_Higest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature); + *out = rval; + return 0; } -int encode_can_0x622_Higest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x622_BMS_Higest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature = 0; - if (in > 100) - return -1; - o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature = in; + o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature = in; return 0; } -int decode_can_0x622_Lowest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x622_BMS_Lowest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature); + *out = rval; + return 0; } -int encode_can_0x622_Lowest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x622_BMS_Lowest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature = 0; - if (in > 100) - return -1; - o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature = in; + o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature = in; return 0; } @@ -574,2876 +795,3100 @@ int print_can_0x622_BMS_Cell_Summary(const can_obj_all_sre_edited_h_t *o, FILE * assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "Highest_Cell_Voltage = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.Highest_Cell_Voltage))); - r = print_helper(r, fprintf(output, "Lowest_Cell_Voltage = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage))); - r = print_helper(r, fprintf(output, "Higest_Cell_Temperature = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature))); - r = print_helper(r, fprintf(output, "Lowest_Cell_Temperature = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature))); + r = print_helper(r, fprintf(output, "BMS_Highest_Cell_Voltage = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage))); + r = print_helper(r, fprintf(output, "BMS_Lowest_Cell_Voltage = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Voltage))); + r = print_helper(r, fprintf(output, "BMS_Higest_Cell_Temperature = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature))); + r = print_helper(r, fprintf(output, "BMS_Lowest_Cell_Temperature = (wire: %.0f)\n", (double)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature))); return r; } -static int pack_can_0x630_BMS_M1_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x623_BMS_Balance_Status_M1_to_M4(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M1_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage)) & 0xffff; + /* BMS_M1_Cell_1: start-bit 0, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1)) & 0x1; i |= x; - /* BMS_M1_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage)) & 0xffff; + /* BMS_M1_Cell_2: start-bit 1, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2)) & 0x1; + x <<= 1; + i |= x; + /* BMS_M1_Cell_3: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3)) & 0x1; + x <<= 2; + i |= x; + /* BMS_M1_Cell_4: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4)) & 0x1; + x <<= 3; + i |= x; + /* BMS_M1_Cell_5: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5)) & 0x1; + x <<= 4; + i |= x; + /* BMS_M1_Cell_6: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6)) & 0x1; + x <<= 5; + i |= x; + /* BMS_M1_Cell_7: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7)) & 0x1; + x <<= 6; + i |= x; + /* BMS_M1_Cell_8: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8)) & 0x1; + x <<= 7; + i |= x; + /* BMS_M1_Cell_9: start-bit 8, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9)) & 0x1; + x <<= 8; + i |= x; + /* BMS_M1_Cell_10: start-bit 9, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10)) & 0x1; + x <<= 9; + i |= x; + /* BMS_M1_Cell_11: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11)) & 0x1; + x <<= 10; + i |= x; + /* BMS_M1_Cell_12: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12)) & 0x1; + x <<= 11; + i |= x; + /* BMS_M2_Cell_1: start-bit 16, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1)) & 0x1; x <<= 16; i |= x; - /* BMS_M1_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage)) & 0xffff; - x <<= 32; + /* BMS_M2_Cell_2: start-bit 17, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2)) & 0x1; + x <<= 17; i |= x; - /* BMS_M1_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage)) & 0xffff; - x <<= 48; + /* BMS_M2_Cell_3: start-bit 18, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3)) & 0x1; + x <<= 18; i |= x; - *data = (i); - o->can_0x630_BMS_M1_Cell_Voltage_Data_1_tx = 1; - return 8; -} + /* BMS_M2_Cell_4: start-bit 19, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_4)) & 0x1; + x <<= 19; + i |= x; + /* BMS_M2_Cell_5: start-bit 20, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5)) & 0x1; + x <<= 20; + i |= x; + /* BMS_M2_Cell_6: start-bit 21, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6)) & 0x1; + x <<= 21; + i |= x; + /* BMS_M2_Cell_7: start-bit 22, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7)) & 0x1; + x <<= 22; + i |= x; + /* BMS_M2_Cell_8: start-bit 23, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8)) & 0x1; + x <<= 23; + i |= x; + /* BMS_M2_Cell_9: start-bit 24, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9)) & 0x1; + x <<= 24; + i |= x; + /* BMS_M2_Cell_10: start-bit 25, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_10)) & 0x1; + x <<= 25; + i |= x; + /* BMS_M2_Cell_11: start-bit 26, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11)) & 0x1; + x <<= 26; + i |= x; + /* BMS_M2_Cell_12: start-bit 27, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12)) & 0x1; + x <<= 27; + i |= x; + /* BMS_M3_Cell_1: start-bit 32, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1)) & 0x1; + x <<= 32; + i |= x; + /* BMS_M3_Cell_2: start-bit 33, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2)) & 0x1; + x <<= 33; + i |= x; + /* BMS_M3_Cell_3: start-bit 34, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3)) & 0x1; + x <<= 34; + i |= x; + /* BMS_M3_Cell_4: start-bit 35, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4)) & 0x1; + x <<= 35; + i |= x; + /* BMS_M3_Cell_5: start-bit 36, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5)) & 0x1; + x <<= 36; + i |= x; + /* BMS_M3_Cell_6: start-bit 37, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6)) & 0x1; + x <<= 37; + i |= x; + /* BMS_M3_Cell_7: start-bit 38, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7)) & 0x1; + x <<= 38; + i |= x; + /* BMS_M3_Cell_8: start-bit 39, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8)) & 0x1; + x <<= 39; + i |= x; + /* BMS_M3_Cell_9: start-bit 40, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9)) & 0x1; + x <<= 40; + i |= x; + /* BMS_M3_Cell_10: start-bit 41, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10)) & 0x1; + x <<= 41; + i |= x; + /* BMS_M3_Cell_11: start-bit 42, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11)) & 0x1; + x <<= 42; + i |= x; + /* BMS_M3_Cell_12: start-bit 43, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12)) & 0x1; + x <<= 43; + i |= x; + /* BMS_M4_Cell_1: start-bit 48, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1)) & 0x1; + x <<= 48; + i |= x; + /* BMS_M4_Cell_2: start-bit 49, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_2)) & 0x1; + x <<= 49; + i |= x; + /* BMS_M4_Cell_3: start-bit 50, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3)) & 0x1; + x <<= 50; + i |= x; + /* BMS_M4_Cell_4: start-bit 51, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4)) & 0x1; + x <<= 51; + i |= x; + /* BMS_M4_Cell_5: start-bit 52, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5)) & 0x1; + x <<= 52; + i |= x; + /* BMS_M4_Cell_6: start-bit 53, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6)) & 0x1; + x <<= 53; + i |= x; + /* BMS_M4_Cell_7: start-bit 54, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7)) & 0x1; + x <<= 54; + i |= x; + /* BMS_M4_Cell_8: start-bit 55, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_8)) & 0x1; + x <<= 55; + i |= x; + /* BMS_M4_Cell_9: start-bit 56, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9)) & 0x1; + x <<= 56; + i |= x; + /* BMS_M4_Cell_10: start-bit 57, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10)) & 0x1; + x <<= 57; + i |= x; + /* BMS_M4_Cell_11: start-bit 58, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11)) & 0x1; + x <<= 58; + i |= x; + /* BMS_M4_Cell_12: start-bit 59, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12)) & 0x1; + x <<= 59; + i |= x; + *data = (i); + o->can_0x623_BMS_Balance_Status_M1_to_M4_tx = 1; + return 8; +} -static int unpack_can_0x630_BMS_M1_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x623_BMS_Balance_Status_M1_to_M4(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M1_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = x; - /* BMS_M1_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = x; - /* BMS_M1_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = x; - /* BMS_M1_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = x; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1_rx = 1; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + /* BMS_M1_Cell_1: start-bit 0, length 1, endianess intel, scaling 1, offset 0 */ + x = i & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1 = x; + /* BMS_M1_Cell_2: start-bit 1, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 1) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2 = x; + /* BMS_M1_Cell_3: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 2) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3 = x; + /* BMS_M1_Cell_4: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 3) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4 = x; + /* BMS_M1_Cell_5: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 4) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5 = x; + /* BMS_M1_Cell_6: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 5) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6 = x; + /* BMS_M1_Cell_7: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 6) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7 = x; + /* BMS_M1_Cell_8: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 7) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8 = x; + /* BMS_M1_Cell_9: start-bit 8, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9 = x; + /* BMS_M1_Cell_10: start-bit 9, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 9) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10 = x; + /* BMS_M1_Cell_11: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 10) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11 = x; + /* BMS_M1_Cell_12: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 11) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12 = x; + /* BMS_M2_Cell_1: start-bit 16, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1 = x; + /* BMS_M2_Cell_2: start-bit 17, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 17) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2 = x; + /* BMS_M2_Cell_3: start-bit 18, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 18) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3 = x; + /* BMS_M2_Cell_4: start-bit 19, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 19) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_4 = x; + /* BMS_M2_Cell_5: start-bit 20, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 20) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5 = x; + /* BMS_M2_Cell_6: start-bit 21, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 21) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6 = x; + /* BMS_M2_Cell_7: start-bit 22, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 22) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7 = x; + /* BMS_M2_Cell_8: start-bit 23, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 23) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8 = x; + /* BMS_M2_Cell_9: start-bit 24, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9 = x; + /* BMS_M2_Cell_10: start-bit 25, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 25) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_10 = x; + /* BMS_M2_Cell_11: start-bit 26, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 26) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11 = x; + /* BMS_M2_Cell_12: start-bit 27, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 27) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12 = x; + /* BMS_M3_Cell_1: start-bit 32, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1 = x; + /* BMS_M3_Cell_2: start-bit 33, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 33) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2 = x; + /* BMS_M3_Cell_3: start-bit 34, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 34) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3 = x; + /* BMS_M3_Cell_4: start-bit 35, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 35) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4 = x; + /* BMS_M3_Cell_5: start-bit 36, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 36) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5 = x; + /* BMS_M3_Cell_6: start-bit 37, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 37) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6 = x; + /* BMS_M3_Cell_7: start-bit 38, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 38) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7 = x; + /* BMS_M3_Cell_8: start-bit 39, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 39) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8 = x; + /* BMS_M3_Cell_9: start-bit 40, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9 = x; + /* BMS_M3_Cell_10: start-bit 41, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 41) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10 = x; + /* BMS_M3_Cell_11: start-bit 42, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 42) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11 = x; + /* BMS_M3_Cell_12: start-bit 43, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 43) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12 = x; + /* BMS_M4_Cell_1: start-bit 48, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1 = x; + /* BMS_M4_Cell_2: start-bit 49, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 49) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_2 = x; + /* BMS_M4_Cell_3: start-bit 50, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 50) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3 = x; + /* BMS_M4_Cell_4: start-bit 51, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 51) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4 = x; + /* BMS_M4_Cell_5: start-bit 52, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 52) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5 = x; + /* BMS_M4_Cell_6: start-bit 53, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 53) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6 = x; + /* BMS_M4_Cell_7: start-bit 54, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 54) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7 = x; + /* BMS_M4_Cell_8: start-bit 55, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 55) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_8 = x; + /* BMS_M4_Cell_9: start-bit 56, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9 = x; + /* BMS_M4_Cell_10: start-bit 57, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 57) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10 = x; + /* BMS_M4_Cell_11: start-bit 58, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 58) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11 = x; + /* BMS_M4_Cell_12: start-bit 59, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 59) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12 = x; + o->can_0x623_BMS_Balance_Status_M1_to_M4_rx = 1; + o->can_0x623_BMS_Balance_Status_M1_to_M4_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x630_BMS_M1_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x630_BMS_M1_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1 = in; return 0; } -int decode_can_0x630_BMS_M1_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x630_BMS_M1_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2 = in; return 0; } -int decode_can_0x630_BMS_M1_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x630_BMS_M1_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3 = in; return 0; } -int decode_can_0x630_BMS_M1_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x630_BMS_M1_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4 = in; return 0; } -int print_can_0x630_BMS_M1_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M1_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage))); - return r; -} - -static int pack_can_0x631_BMS_M1_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x623_BMS_M1_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M1_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage)) & 0xffff; - i |= x; - /* BMS_M1_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M1_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M1_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x631_BMS_M1_Cell_Voltage_Data_2_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x631_BMS_M1_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x623_BMS_M1_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5 = 0; + if (in < 0) return -1; - /* BMS_M1_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = x; - /* BMS_M1_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = x; - /* BMS_M1_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = x; - /* BMS_M1_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = x; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2_rx = 1; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5 = in; + return 0; } -int decode_can_0x631_BMS_M1_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x631_BMS_M1_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6 = in; return 0; } -int decode_can_0x631_BMS_M1_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x631_BMS_M1_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7 = in; return 0; } -int decode_can_0x631_BMS_M1_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x631_BMS_M1_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8 = in; return 0; } -int decode_can_0x631_BMS_M1_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x631_BMS_M1_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9 = in; return 0; } -int print_can_0x631_BMS_M1_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M1_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage))); - return r; -} - -static int pack_can_0x632_BMS_M1_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x623_BMS_M1_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M1_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage)) & 0xffff; - i |= x; - /* BMS_M1_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M1_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M1_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x632_BMS_M1_Cell_Voltage_Data_3_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x632_BMS_M1_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x623_BMS_M1_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10 = 0; + if (in < 0) return -1; - /* BMS_M1_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = x; - /* BMS_M1_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = x; - /* BMS_M1_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = x; - /* BMS_M1_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = x; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3_rx = 1; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10 = in; + return 0; } -int decode_can_0x632_BMS_M1_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x632_BMS_M1_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11 = in; return 0; } -int decode_can_0x632_BMS_M1_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M1_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x632_BMS_M1_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M1_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12 = in; return 0; } -int decode_can_0x632_BMS_M1_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M2_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x632_BMS_M1_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1 = in; return 0; } -int decode_can_0x632_BMS_M1_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M2_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x632_BMS_M1_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2 = in; return 0; } -int print_can_0x632_BMS_M1_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x623_BMS_M2_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M1_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x633_BMS_M2_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x623_BMS_M2_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M2_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage)) & 0xffff; - i |= x; - /* BMS_M2_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M2_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M2_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x633_BMS_M2_Cell_Voltage_Data_1_tx = 1; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3 = in; + return 0; } -static int unpack_can_0x633_BMS_M2_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x623_BMS_M2_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_4); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; return -1; - /* BMS_M2_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = x; - /* BMS_M2_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = x; - /* BMS_M2_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = x; - /* BMS_M2_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = x; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1_rx = 1; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; - return 8; + } } -int decode_can_0x633_BMS_M2_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int encode_can_0x623_BMS_M2_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_4 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_4 = in; + return 0; +} + +int decode_can_0x623_BMS_M2_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x633_BMS_M2_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5 = in; return 0; } -int decode_can_0x633_BMS_M2_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M2_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x633_BMS_M2_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6 = in; return 0; } -int decode_can_0x633_BMS_M2_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M2_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x633_BMS_M2_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7 = in; return 0; } -int decode_can_0x633_BMS_M2_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M2_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x633_BMS_M2_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8 = in; return 0; } -int print_can_0x633_BMS_M2_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x623_BMS_M2_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M2_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x634_BMS_M2_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x623_BMS_M2_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M2_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage)) & 0xffff; - i |= x; - /* BMS_M2_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M2_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M2_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x634_BMS_M2_Cell_Voltage_Data_2_tx = 1; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9 = in; + return 0; } -static int unpack_can_0x634_BMS_M2_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x623_BMS_M2_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_10); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; return -1; - /* BMS_M2_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = x; - /* BMS_M2_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = x; - /* BMS_M2_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = x; - /* BMS_M2_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = x; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2_rx = 1; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; - return 8; + } } -int decode_can_0x634_BMS_M2_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int encode_can_0x623_BMS_M2_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_10 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_10 = in; + return 0; +} + +int decode_can_0x623_BMS_M2_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x634_BMS_M2_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11 = in; return 0; } -int decode_can_0x634_BMS_M2_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M2_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x634_BMS_M2_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M2_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12 = in; return 0; } -int decode_can_0x634_BMS_M2_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x634_BMS_M2_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1 = in; return 0; } -int decode_can_0x634_BMS_M2_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x634_BMS_M2_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2 = in; return 0; } -int print_can_0x634_BMS_M2_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x623_BMS_M3_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M2_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x635_BMS_M2_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x623_BMS_M3_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M2_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage)) & 0xffff; - i |= x; - /* BMS_M2_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M2_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M2_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x635_BMS_M2_Cell_Voltage_Data_3_tx = 1; - return 8; -} - -static int unpack_can_0x635_BMS_M2_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { - assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3 = 0; + if (in < 0) return -1; - /* BMS_M2_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = x; - /* BMS_M2_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = x; - /* BMS_M2_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = x; - /* BMS_M2_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = x; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3_rx = 1; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3 = in; + return 0; } -int decode_can_0x635_BMS_M2_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x635_BMS_M2_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4 = in; return 0; } -int decode_can_0x635_BMS_M2_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x635_BMS_M2_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5 = in; return 0; } -int decode_can_0x635_BMS_M2_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x635_BMS_M2_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6 = in; return 0; } -int decode_can_0x635_BMS_M2_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x635_BMS_M2_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7 = in; return 0; } -int print_can_0x635_BMS_M2_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M2_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage))); - return r; -} - -static int pack_can_0x636_BMS_M3_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x623_BMS_M3_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M3_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage)) & 0xffff; - i |= x; - /* BMS_M3_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M3_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M3_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x636_BMS_M3_Cell_Voltage_Data_1_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x636_BMS_M3_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x623_BMS_M3_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8 = 0; + if (in < 0) return -1; - /* BMS_M3_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = x; - /* BMS_M3_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = x; - /* BMS_M3_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = x; - /* BMS_M3_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = x; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1_rx = 1; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8 = in; + return 0; } -int decode_can_0x636_BMS_M3_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x636_BMS_M3_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9 = in; return 0; } -int decode_can_0x636_BMS_M3_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x636_BMS_M3_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10 = in; return 0; } -int decode_can_0x636_BMS_M3_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x636_BMS_M3_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11 = in; return 0; } -int decode_can_0x636_BMS_M3_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M3_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x636_BMS_M3_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M3_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12 = in; return 0; } -int print_can_0x636_BMS_M3_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x623_BMS_M4_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M3_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x637_BMS_M3_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x623_BMS_M4_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M3_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage)) & 0xffff; - i |= x; - /* BMS_M3_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M3_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M3_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x637_BMS_M3_Cell_Voltage_Data_2_tx = 1; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1 = in; + return 0; } -static int unpack_can_0x637_BMS_M3_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x623_BMS_M4_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_2); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; return -1; - /* BMS_M3_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = x; - /* BMS_M3_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = x; - /* BMS_M3_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = x; - /* BMS_M3_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = x; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2_rx = 1; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; - return 8; + } } -int decode_can_0x637_BMS_M3_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int encode_can_0x623_BMS_M4_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_2 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_2 = in; + return 0; +} + +int decode_can_0x623_BMS_M4_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x637_BMS_M3_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3 = in; return 0; } -int decode_can_0x637_BMS_M3_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M4_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x637_BMS_M3_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4 = in; return 0; } -int decode_can_0x637_BMS_M3_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M4_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x637_BMS_M3_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5 = in; return 0; } -int decode_can_0x637_BMS_M3_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M4_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x637_BMS_M3_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6 = in; return 0; } -int print_can_0x637_BMS_M3_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x623_BMS_M4_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M3_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x638_BMS_M3_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x623_BMS_M4_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M3_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage)) & 0xffff; - i |= x; - /* BMS_M3_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M3_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M3_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x638_BMS_M3_Cell_Voltage_Data_3_tx = 1; - return 8; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7 = in; + return 0; } -static int unpack_can_0x638_BMS_M3_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x623_BMS_M4_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + assert(out); + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_8); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; return -1; - /* BMS_M3_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = x; - /* BMS_M3_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = x; - /* BMS_M3_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = x; - /* BMS_M3_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = x; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3_rx = 1; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; - return 8; + } } -int decode_can_0x638_BMS_M3_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int encode_can_0x623_BMS_M4_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_8 = 0; + if (in < 0) + return -1; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_8 = in; + return 0; +} + +int decode_can_0x623_BMS_M4_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x638_BMS_M3_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9 = in; return 0; } -int decode_can_0x638_BMS_M3_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M4_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x638_BMS_M3_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10 = in; return 0; } -int decode_can_0x638_BMS_M3_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M4_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x638_BMS_M3_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11 = in; return 0; } -int decode_can_0x638_BMS_M3_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x623_BMS_M4_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x638_BMS_M3_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x623_BMS_M4_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = in; + o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12 = in; return 0; } -int print_can_0x638_BMS_M3_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x623_BMS_Balance_Status_M1_to_M4(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M3_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12))); return r; } -static int pack_can_0x639_BMS_M4_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x624_BMS_Balance_Status_M5_to_M8(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M4_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage)) & 0xffff; + /* BMS_M5_Cell_1: start-bit 0, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1)) & 0x1; i |= x; - /* BMS_M4_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage)) & 0xffff; + /* BMS_M5_Cell_2: start-bit 1, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2)) & 0x1; + x <<= 1; + i |= x; + /* BMS_M5_Cell_3: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3)) & 0x1; + x <<= 2; + i |= x; + /* BMS_M5_Cell_4: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4)) & 0x1; + x <<= 3; + i |= x; + /* BMS_M5_Cell_5: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5)) & 0x1; + x <<= 4; + i |= x; + /* BMS_M5_Cell_6: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6)) & 0x1; + x <<= 5; + i |= x; + /* BMS_M5_Cell_7: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7)) & 0x1; + x <<= 6; + i |= x; + /* BMS_M5_Cell_8: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8)) & 0x1; + x <<= 7; + i |= x; + /* BMS_M5_Cell_9: start-bit 8, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9)) & 0x1; + x <<= 8; + i |= x; + /* BMS_M5_Cell_10: start-bit 9, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10)) & 0x1; + x <<= 9; + i |= x; + /* BMS_M5_Cell_11: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11)) & 0x1; + x <<= 10; + i |= x; + /* BMS_M5_Cell_12: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12)) & 0x1; + x <<= 11; + i |= x; + /* BMS_M6_Cell_1: start-bit 16, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1)) & 0x1; x <<= 16; i |= x; - /* BMS_M4_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage)) & 0xffff; + /* BMS_M6_Cell_2: start-bit 17, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2)) & 0x1; + x <<= 17; + i |= x; + /* BMS_M6_Cell_3: start-bit 18, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3)) & 0x1; + x <<= 18; + i |= x; + /* BMS_M6_Cell_4: start-bit 19, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4)) & 0x1; + x <<= 19; + i |= x; + /* BMS_M6_Cell_5: start-bit 20, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5)) & 0x1; + x <<= 20; + i |= x; + /* BMS_M6_Cell_6: start-bit 21, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6)) & 0x1; + x <<= 21; + i |= x; + /* BMS_M6_Cell_7: start-bit 22, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7)) & 0x1; + x <<= 22; + i |= x; + /* BMS_M6_Cell_8: start-bit 23, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8)) & 0x1; + x <<= 23; + i |= x; + /* BMS_M6_Cell_9: start-bit 24, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9)) & 0x1; + x <<= 24; + i |= x; + /* BMS_M6_Cell_10: start-bit 25, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10)) & 0x1; + x <<= 25; + i |= x; + /* BMS_M6_Cell_11: start-bit 26, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11)) & 0x1; + x <<= 26; + i |= x; + /* BMS_M6_Cell_12: start-bit 27, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12)) & 0x1; + x <<= 27; + i |= x; + /* BMS_M7_Cell_1: start-bit 32, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1)) & 0x1; x <<= 32; i |= x; - /* BMS_M4_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage)) & 0xffff; + /* BMS_M7_Cell_2: start-bit 33, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2)) & 0x1; + x <<= 33; + i |= x; + /* BMS_M7_Cell_3: start-bit 34, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3)) & 0x1; + x <<= 34; + i |= x; + /* BMS_M7_Cell_4: start-bit 35, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4)) & 0x1; + x <<= 35; + i |= x; + /* BMS_M7_Cell_5: start-bit 36, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5)) & 0x1; + x <<= 36; + i |= x; + /* BMS_M7_Cell_6: start-bit 37, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6)) & 0x1; + x <<= 37; + i |= x; + /* BMS_M7_Cell_7: start-bit 38, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7)) & 0x1; + x <<= 38; + i |= x; + /* BMS_M7_Cell_8: start-bit 39, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8)) & 0x1; + x <<= 39; + i |= x; + /* BMS_M7_Cell_9: start-bit 40, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9)) & 0x1; + x <<= 40; + i |= x; + /* BMS_M7_Cell_10: start-bit 41, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10)) & 0x1; + x <<= 41; + i |= x; + /* BMS_M7_Cell_11: start-bit 42, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_11)) & 0x1; + x <<= 42; + i |= x; + /* BMS_M7_Cell_12: start-bit 43, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_12)) & 0x1; + x <<= 43; + i |= x; + /* BMS_M8_Cell_1: start-bit 48, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1)) & 0x1; x <<= 48; i |= x; + /* BMS_M8_Cell_2: start-bit 49, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2)) & 0x1; + x <<= 49; + i |= x; + /* BMS_M8_Cell_3: start-bit 50, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3)) & 0x1; + x <<= 50; + i |= x; + /* BMS_M8_Cell_4: start-bit 51, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4)) & 0x1; + x <<= 51; + i |= x; + /* BMS_M8_Cell_5: start-bit 52, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5)) & 0x1; + x <<= 52; + i |= x; + /* BMS_M8_Cell_6: start-bit 53, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_6)) & 0x1; + x <<= 53; + i |= x; + /* BMS_M8_Cell_7: start-bit 54, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7)) & 0x1; + x <<= 54; + i |= x; + /* BMS_M8_Cell_8: start-bit 55, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8)) & 0x1; + x <<= 55; + i |= x; + /* BMS_M8_Cell_9: start-bit 56, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9)) & 0x1; + x <<= 56; + i |= x; + /* BMS_M8_Cell_10: start-bit 57, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10)) & 0x1; + x <<= 57; + i |= x; + /* BMS_M8_Cell_11: start-bit 58, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_11)) & 0x1; + x <<= 58; + i |= x; + /* BMS_M8_Cell_12: start-bit 59, length 1, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_12)) & 0x1; + x <<= 59; + i |= x; *data = (i); - o->can_0x639_BMS_M4_Cell_Voltage_Data_1_tx = 1; + o->can_0x624_BMS_Balance_Status_M5_to_M8_tx = 1; return 8; } -static int unpack_can_0x639_BMS_M4_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x624_BMS_Balance_Status_M5_to_M8(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M4_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = x; - /* BMS_M4_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = x; - /* BMS_M4_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = x; - /* BMS_M4_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = x; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1_rx = 1; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + /* BMS_M5_Cell_1: start-bit 0, length 1, endianess intel, scaling 1, offset 0 */ + x = i & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1 = x; + /* BMS_M5_Cell_2: start-bit 1, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 1) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2 = x; + /* BMS_M5_Cell_3: start-bit 2, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 2) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3 = x; + /* BMS_M5_Cell_4: start-bit 3, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 3) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4 = x; + /* BMS_M5_Cell_5: start-bit 4, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 4) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5 = x; + /* BMS_M5_Cell_6: start-bit 5, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 5) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6 = x; + /* BMS_M5_Cell_7: start-bit 6, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 6) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7 = x; + /* BMS_M5_Cell_8: start-bit 7, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 7) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8 = x; + /* BMS_M5_Cell_9: start-bit 8, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9 = x; + /* BMS_M5_Cell_10: start-bit 9, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 9) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10 = x; + /* BMS_M5_Cell_11: start-bit 10, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 10) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11 = x; + /* BMS_M5_Cell_12: start-bit 11, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 11) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12 = x; + /* BMS_M6_Cell_1: start-bit 16, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1 = x; + /* BMS_M6_Cell_2: start-bit 17, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 17) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2 = x; + /* BMS_M6_Cell_3: start-bit 18, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 18) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3 = x; + /* BMS_M6_Cell_4: start-bit 19, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 19) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4 = x; + /* BMS_M6_Cell_5: start-bit 20, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 20) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5 = x; + /* BMS_M6_Cell_6: start-bit 21, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 21) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6 = x; + /* BMS_M6_Cell_7: start-bit 22, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 22) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7 = x; + /* BMS_M6_Cell_8: start-bit 23, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 23) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8 = x; + /* BMS_M6_Cell_9: start-bit 24, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9 = x; + /* BMS_M6_Cell_10: start-bit 25, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 25) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10 = x; + /* BMS_M6_Cell_11: start-bit 26, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 26) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11 = x; + /* BMS_M6_Cell_12: start-bit 27, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 27) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12 = x; + /* BMS_M7_Cell_1: start-bit 32, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1 = x; + /* BMS_M7_Cell_2: start-bit 33, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 33) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2 = x; + /* BMS_M7_Cell_3: start-bit 34, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 34) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3 = x; + /* BMS_M7_Cell_4: start-bit 35, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 35) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4 = x; + /* BMS_M7_Cell_5: start-bit 36, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 36) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5 = x; + /* BMS_M7_Cell_6: start-bit 37, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 37) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6 = x; + /* BMS_M7_Cell_7: start-bit 38, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 38) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7 = x; + /* BMS_M7_Cell_8: start-bit 39, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 39) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8 = x; + /* BMS_M7_Cell_9: start-bit 40, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9 = x; + /* BMS_M7_Cell_10: start-bit 41, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 41) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10 = x; + /* BMS_M7_Cell_11: start-bit 42, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 42) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_11 = x; + /* BMS_M7_Cell_12: start-bit 43, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 43) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_12 = x; + /* BMS_M8_Cell_1: start-bit 48, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1 = x; + /* BMS_M8_Cell_2: start-bit 49, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 49) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2 = x; + /* BMS_M8_Cell_3: start-bit 50, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 50) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3 = x; + /* BMS_M8_Cell_4: start-bit 51, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 51) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4 = x; + /* BMS_M8_Cell_5: start-bit 52, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 52) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5 = x; + /* BMS_M8_Cell_6: start-bit 53, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 53) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_6 = x; + /* BMS_M8_Cell_7: start-bit 54, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 54) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7 = x; + /* BMS_M8_Cell_8: start-bit 55, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 55) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8 = x; + /* BMS_M8_Cell_9: start-bit 56, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9 = x; + /* BMS_M8_Cell_10: start-bit 57, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 57) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10 = x; + /* BMS_M8_Cell_11: start-bit 58, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 58) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_11 = x; + /* BMS_M8_Cell_12: start-bit 59, length 1, endianess intel, scaling 1, offset 0 */ + x = (i >> 59) & 0x1; + x = (x & 0x1) ? (x | 0xfe) : x; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_12 = x; + o->can_0x624_BMS_Balance_Status_M5_to_M8_rx = 1; + o->can_0x624_BMS_Balance_Status_M5_to_M8_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x639_BMS_M4_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x639_BMS_M4_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1 = in; return 0; } -int decode_can_0x639_BMS_M4_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x639_BMS_M4_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2 = in; return 0; } -int decode_can_0x639_BMS_M4_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x639_BMS_M4_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3 = in; return 0; } -int decode_can_0x639_BMS_M4_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x639_BMS_M4_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4 = in; return 0; } -int print_can_0x639_BMS_M4_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x624_BMS_M5_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M4_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x63a_BMS_M4_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x624_BMS_M5_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M4_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage)) & 0xffff; - i |= x; - /* BMS_M4_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M4_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M4_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2_tx = 1; - return 8; -} - -static int unpack_can_0x63a_BMS_M4_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { - assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5 = 0; + if (in < 0) return -1; - /* BMS_M4_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = x; - /* BMS_M4_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = x; - /* BMS_M4_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = x; - /* BMS_M4_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = x; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2_rx = 1; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5 = in; + return 0; } -int decode_can_0x63a_BMS_M4_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63a_BMS_M4_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6 = in; return 0; } -int decode_can_0x63a_BMS_M4_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63a_BMS_M4_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7 = in; return 0; } -int decode_can_0x63a_BMS_M4_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63a_BMS_M4_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8 = in; return 0; } -int decode_can_0x63a_BMS_M4_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63a_BMS_M4_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9 = in; return 0; } -int print_can_0x63a_BMS_M4_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M4_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage))); - return r; -} - -static int pack_can_0x63b_BMS_M4_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x624_BMS_M5_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M4_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage)) & 0xffff; - i |= x; - /* BMS_M4_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M4_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M4_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x63b_BMS_M4_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x624_BMS_M5_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10 = 0; + if (in < 0) return -1; - /* BMS_M4_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = x; - /* BMS_M4_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = x; - /* BMS_M4_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = x; - /* BMS_M4_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = x; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3_rx = 1; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10 = in; + return 0; } -int decode_can_0x63b_BMS_M4_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63b_BMS_M4_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11 = in; return 0; } -int decode_can_0x63b_BMS_M4_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M5_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63b_BMS_M4_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M5_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12 = in; return 0; } -int decode_can_0x63b_BMS_M4_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63b_BMS_M4_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1 = in; return 0; } -int decode_can_0x63b_BMS_M4_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63b_BMS_M4_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2 = in; return 0; } -int print_can_0x63b_BMS_M4_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M4_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage))); - return r; -} - -static int pack_can_0x63c_BMS_M5_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x624_BMS_M6_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M5_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage)) & 0xffff; - i |= x; - /* BMS_M5_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M5_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M5_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x63c_BMS_M5_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x624_BMS_M6_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3 = 0; + if (in < 0) return -1; - /* BMS_M5_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = x; - /* BMS_M5_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = x; - /* BMS_M5_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = x; - /* BMS_M5_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = x; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1_rx = 1; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3 = in; + return 0; } -int decode_can_0x63c_BMS_M5_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63c_BMS_M5_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4 = in; return 0; } -int decode_can_0x63c_BMS_M5_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63c_BMS_M5_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5 = in; return 0; } -int decode_can_0x63c_BMS_M5_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63c_BMS_M5_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6 = in; return 0; } -int decode_can_0x63c_BMS_M5_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63c_BMS_M5_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7 = in; return 0; } -int print_can_0x63c_BMS_M5_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x624_BMS_M6_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M5_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage))); - return r; -} - -static int pack_can_0x63d_BMS_M5_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { - assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M5_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage)) & 0xffff; - i |= x; - /* BMS_M5_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M5_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M5_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x63d_BMS_M5_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x624_BMS_M6_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8 = 0; + if (in < 0) return -1; - /* BMS_M5_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = x; - /* BMS_M5_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = x; - /* BMS_M5_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = x; - /* BMS_M5_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = x; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2_rx = 1; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8 = in; + return 0; } -int decode_can_0x63d_BMS_M5_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63d_BMS_M5_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9 = in; return 0; } -int decode_can_0x63d_BMS_M5_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63d_BMS_M5_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10 = in; return 0; } -int decode_can_0x63d_BMS_M5_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63d_BMS_M5_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11 = in; return 0; } -int decode_can_0x63d_BMS_M5_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M6_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63d_BMS_M5_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M6_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12 = in; return 0; } -int print_can_0x63d_BMS_M5_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M5_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage))); - return r; -} - -static int pack_can_0x63e_BMS_M5_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x624_BMS_M7_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M5_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage)) & 0xffff; - i |= x; - /* BMS_M5_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M5_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M5_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x63e_BMS_M5_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x624_BMS_M7_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1 = 0; + if (in < 0) return -1; - /* BMS_M5_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = x; - /* BMS_M5_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = x; - /* BMS_M5_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = x; - /* BMS_M5_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = x; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3_rx = 1; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1 = in; + return 0; } -int decode_can_0x63e_BMS_M5_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63e_BMS_M5_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2 = in; return 0; } -int decode_can_0x63e_BMS_M5_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63e_BMS_M5_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3 = in; return 0; } -int decode_can_0x63e_BMS_M5_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63e_BMS_M5_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4 = in; return 0; } -int decode_can_0x63e_BMS_M5_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63e_BMS_M5_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5 = in; return 0; } -int print_can_0x63e_BMS_M5_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M5_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M5_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage))); - return r; -} - -static int pack_can_0x63f_BMS_M6_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int decode_can_0x624_BMS_M7_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M6_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage)) & 0xffff; - i |= x; - /* BMS_M6_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M6_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M6_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1_tx = 1; - return 8; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int unpack_can_0x63f_BMS_M6_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x624_BMS_M7_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6 = 0; + if (in < 0) return -1; - /* BMS_M6_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = x; - /* BMS_M6_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = x; - /* BMS_M6_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = x; - /* BMS_M6_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = x; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1_rx = 1; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6 = in; + return 0; } -int decode_can_0x63f_BMS_M6_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63f_BMS_M6_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7 = in; return 0; } -int decode_can_0x63f_BMS_M6_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63f_BMS_M6_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8 = in; return 0; } -int decode_can_0x63f_BMS_M6_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63f_BMS_M6_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9 = in; return 0; } -int decode_can_0x63f_BMS_M6_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M7_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x63f_BMS_M6_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M7_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10 = in; return 0; } -int print_can_0x63f_BMS_M6_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x624_BMS_M7_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M6_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_11); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x640_BMS_M6_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x624_BMS_M7_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M6_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage)) & 0xffff; - i |= x; - /* BMS_M6_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M6_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M6_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x640_BMS_M6_Cell_Voltage_Data_2_tx = 1; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_11 = 0; + if (in < 0) + return -1; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_11 = in; + return 0; } -static int unpack_can_0x640_BMS_M6_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x624_BMS_M7_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_12); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; return -1; - /* BMS_M6_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = x; - /* BMS_M6_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = x; - /* BMS_M6_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = x; - /* BMS_M6_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = x; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2_rx = 1; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; - return 8; + } } -int decode_can_0x640_BMS_M6_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int encode_can_0x624_BMS_M7_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_12 = 0; + if (in < 0) + return -1; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_12 = in; + return 0; +} + +int decode_can_0x624_BMS_M8_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x640_BMS_M6_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1 = in; return 0; } -int decode_can_0x640_BMS_M6_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M8_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x640_BMS_M6_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2 = in; return 0; } -int decode_can_0x640_BMS_M6_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M8_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x640_BMS_M6_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3 = in; return 0; } -int decode_can_0x640_BMS_M6_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M8_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x640_BMS_M6_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4 = in; return 0; } -int print_can_0x640_BMS_M6_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x624_BMS_M8_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M6_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage))); - return r; + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } } -static int pack_can_0x641_BMS_M6_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +int encode_can_0x624_BMS_M8_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M6_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage)) & 0xffff; - i |= x; - /* BMS_M6_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M6_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M6_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x641_BMS_M6_Cell_Voltage_Data_3_tx = 1; - return 8; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5 = 0; + if (in < 0) + return -1; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5 = in; + return 0; } -static int unpack_can_0x641_BMS_M6_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x624_BMS_M8_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_6); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; return -1; - /* BMS_M6_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = i & 0xffff; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = x; - /* BMS_M6_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = x; - /* BMS_M6_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = x; - /* BMS_M6_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = x; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3_rx = 1; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; - return 8; + } } -int decode_can_0x641_BMS_M6_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int encode_can_0x624_BMS_M8_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_6 = 0; + if (in < 0) + return -1; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_6 = in; + return 0; +} + +int decode_can_0x624_BMS_M8_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x641_BMS_M6_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7 = in; return 0; } -int decode_can_0x641_BMS_M6_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M8_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x641_BMS_M6_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8 = in; return 0; } -int decode_can_0x641_BMS_M6_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M8_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x641_BMS_M6_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9 = in; return 0; } -int decode_can_0x641_BMS_M6_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x624_BMS_M8_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10); + if (rval >= 0) { *out = rval; return 0; } else { - *out = (double)0; + *out = (int8_t)0; return -1; } } -int encode_can_0x641_BMS_M6_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x624_BMS_M8_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) { assert(o); - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10 = 0; + if (in < 0) return -1; - in *= 10000; - o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = in; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10 = in; return 0; } -int print_can_0x641_BMS_M6_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x624_BMS_M8_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out) { + assert(o); + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_11); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } +} + +int encode_can_0x624_BMS_M8_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_11 = 0; + if (in < 0) + return -1; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_11 = in; + return 0; +} + +int decode_can_0x624_BMS_M8_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out) { + assert(o); + assert(out); + int8_t rval = (int8_t)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_12); + if (rval >= 0) { + *out = rval; + return 0; + } else { + *out = (int8_t)0; + return -1; + } +} + +int encode_can_0x624_BMS_M8_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) { + assert(o); + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_12 = 0; + if (in < 0) + return -1; + o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_12 = in; + return 0; +} + +int print_can_0x624_BMS_Balance_Status_M5_to_M8(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M6_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M6_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_12))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_1 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_2 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_3 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_4 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_5 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_6 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_6))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_7 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_8 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_9 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_10 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_11 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_11))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_12 = (wire: %.0f)\n", (double)(o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_12))); return r; } -static int pack_can_0x642_BMS_M7_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x630_BMS_M1_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M7_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage)) & 0xffff; + /* BMS_M1_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage)) & 0xffff; i |= x; - /* BMS_M7_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage)) & 0xffff; + /* BMS_M1_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage)) & 0xffff; x <<= 16; i |= x; - /* BMS_M7_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage)) & 0xffff; + /* BMS_M1_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage)) & 0xffff; x <<= 32; i |= x; - /* BMS_M7_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage)) & 0xffff; + /* BMS_M1_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage)) & 0xffff; x <<= 48; i |= x; *data = (i); - o->can_0x642_BMS_M7_Cell_Voltage_Data_1_tx = 1; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1_tx = 1; return 8; } -static int unpack_can_0x642_BMS_M7_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x630_BMS_M1_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M7_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_M1_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = x; - /* BMS_M7_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = x; + /* BMS_M1_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = x; - /* BMS_M7_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = x; + /* BMS_M1_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 32) & 0xffff; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = x; - /* BMS_M7_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = x; + /* BMS_M1_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 48) & 0xffff; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = x; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1_rx = 1; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = x; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1_rx = 1; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x642_BMS_M7_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x630_BMS_M1_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage); + double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3452,22 +3897,22 @@ int decode_can_0x642_BMS_M7_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x642_BMS_M7_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x630_BMS_M1_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = in; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = in; return 0; } -int decode_can_0x642_BMS_M7_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x630_BMS_M1_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage); + double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3476,22 +3921,22 @@ int decode_can_0x642_BMS_M7_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x642_BMS_M7_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x630_BMS_M1_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = in; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = in; return 0; } -int decode_can_0x642_BMS_M7_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x630_BMS_M1_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage); + double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3500,22 +3945,22 @@ int decode_can_0x642_BMS_M7_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x642_BMS_M7_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x630_BMS_M1_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = in; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = in; return 0; } -int decode_can_0x642_BMS_M7_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x630_BMS_M1_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage); + double rval = (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3524,82 +3969,82 @@ int decode_can_0x642_BMS_M7_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x642_BMS_M7_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x630_BMS_M1_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = in; + o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = in; return 0; } -int print_can_0x642_BMS_M7_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x630_BMS_M1_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M7_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage))); return r; } -static int pack_can_0x643_BMS_M7_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x631_BMS_M1_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M7_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage)) & 0xffff; + /* BMS_M1_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage)) & 0xffff; i |= x; - /* BMS_M7_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage)) & 0xffff; + /* BMS_M1_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage)) & 0xffff; x <<= 16; i |= x; - /* BMS_M7_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage)) & 0xffff; + /* BMS_M1_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage)) & 0xffff; x <<= 32; i |= x; - /* BMS_M7_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage)) & 0xffff; + /* BMS_M1_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage)) & 0xffff; x <<= 48; i |= x; *data = (i); - o->can_0x643_BMS_M7_Cell_Voltage_Data_2_tx = 1; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2_tx = 1; return 8; } -static int unpack_can_0x643_BMS_M7_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x631_BMS_M1_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M7_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_M1_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = x; - /* BMS_M7_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = x; + /* BMS_M1_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = x; - /* BMS_M7_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = x; + /* BMS_M1_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 32) & 0xffff; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = x; - /* BMS_M7_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = x; + /* BMS_M1_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 48) & 0xffff; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = x; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2_rx = 1; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = x; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2_rx = 1; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x643_BMS_M7_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x631_BMS_M1_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage); + double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3608,22 +4053,22 @@ int decode_can_0x643_BMS_M7_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x643_BMS_M7_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x631_BMS_M1_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = in; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = in; return 0; } -int decode_can_0x643_BMS_M7_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x631_BMS_M1_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage); + double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3632,22 +4077,22 @@ int decode_can_0x643_BMS_M7_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x643_BMS_M7_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x631_BMS_M1_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = in; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = in; return 0; } -int decode_can_0x643_BMS_M7_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x631_BMS_M1_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage); + double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3656,22 +4101,22 @@ int decode_can_0x643_BMS_M7_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x643_BMS_M7_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x631_BMS_M1_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = in; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = in; return 0; } -int decode_can_0x643_BMS_M7_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x631_BMS_M1_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage); + double rval = (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3680,82 +4125,82 @@ int decode_can_0x643_BMS_M7_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x643_BMS_M7_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x631_BMS_M1_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = in; + o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = in; return 0; } -int print_can_0x643_BMS_M7_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x631_BMS_M1_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M7_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage))); return r; } -static int pack_can_0x644_BMS_M7_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x632_BMS_M1_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M7_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage)) & 0xffff; + /* BMS_M1_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage)) & 0xffff; i |= x; - /* BMS_M7_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage)) & 0xffff; + /* BMS_M1_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage)) & 0xffff; x <<= 16; i |= x; - /* BMS_M7_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage)) & 0xffff; + /* BMS_M1_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage)) & 0xffff; x <<= 32; i |= x; - /* BMS_M7_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage)) & 0xffff; + /* BMS_M1_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage)) & 0xffff; x <<= 48; i |= x; *data = (i); - o->can_0x644_BMS_M7_Cell_Voltage_Data_3_tx = 1; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3_tx = 1; return 8; } -static int unpack_can_0x644_BMS_M7_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x632_BMS_M1_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M7_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_M1_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = x; - /* BMS_M7_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = x; + /* BMS_M1_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = x; - /* BMS_M7_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = x; + /* BMS_M1_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 32) & 0xffff; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = x; - /* BMS_M7_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = x; + /* BMS_M1_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 48) & 0xffff; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = x; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3_rx = 1; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = x; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3_rx = 1; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x644_BMS_M7_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x632_BMS_M1_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage); + double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3764,22 +4209,22 @@ int decode_can_0x644_BMS_M7_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x644_BMS_M7_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x632_BMS_M1_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = in; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = in; return 0; } -int decode_can_0x644_BMS_M7_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x632_BMS_M1_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage); + double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3788,22 +4233,22 @@ int decode_can_0x644_BMS_M7_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x644_BMS_M7_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x632_BMS_M1_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = in; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = in; return 0; } -int decode_can_0x644_BMS_M7_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x632_BMS_M1_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage); + double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3812,22 +4257,22 @@ int decode_can_0x644_BMS_M7_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x644_BMS_M7_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x632_BMS_M1_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = in; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = in; return 0; } -int decode_can_0x644_BMS_M7_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x632_BMS_M1_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage); + double rval = (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3836,82 +4281,82 @@ int decode_can_0x644_BMS_M7_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x644_BMS_M7_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x632_BMS_M1_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = 0; - if (in > 5) + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = in; + o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = in; return 0; } -int print_can_0x644_BMS_M7_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x632_BMS_M1_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M7_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M7_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage))); return r; } -static int pack_can_0x645_BMS_M8_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x633_BMS_M2_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M8_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage)) & 0xffff; + /* BMS_M2_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage)) & 0xffff; i |= x; - /* BMS_M8_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage)) & 0xffff; + /* BMS_M2_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage)) & 0xffff; x <<= 16; i |= x; - /* BMS_M8_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage)) & 0xffff; + /* BMS_M2_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage)) & 0xffff; x <<= 32; i |= x; - /* BMS_M8_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage)) & 0xffff; + /* BMS_M2_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage)) & 0xffff; x <<= 48; i |= x; *data = (i); - o->can_0x645_BMS_M8_Cell_Voltage_Data_1_tx = 1; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1_tx = 1; return 8; } -static int unpack_can_0x645_BMS_M8_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x633_BMS_M2_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M8_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_M2_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = x; - /* BMS_M8_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = x; + /* BMS_M2_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = x; - /* BMS_M8_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = x; + /* BMS_M2_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 32) & 0xffff; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = x; - /* BMS_M8_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = x; + /* BMS_M2_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 48) & 0xffff; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = x; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1_rx = 1; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = x; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1_rx = 1; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x645_BMS_M8_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x633_BMS_M2_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage); + double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3920,22 +4365,22 @@ int decode_can_0x645_BMS_M8_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x645_BMS_M8_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x633_BMS_M2_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = 0; - if (in > 5) + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = in; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = in; return 0; } -int decode_can_0x645_BMS_M8_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x633_BMS_M2_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage); + double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3944,22 +4389,22 @@ int decode_can_0x645_BMS_M8_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x645_BMS_M8_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x633_BMS_M2_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = 0; - if (in > 5) + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = in; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = in; return 0; } -int decode_can_0x645_BMS_M8_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x633_BMS_M2_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage); + double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3968,22 +4413,22 @@ int decode_can_0x645_BMS_M8_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x645_BMS_M8_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x633_BMS_M2_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = 0; - if (in > 5) + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = in; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = in; return 0; } -int decode_can_0x645_BMS_M8_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x633_BMS_M2_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage); + double rval = (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -3992,82 +4437,82 @@ int decode_can_0x645_BMS_M8_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x645_BMS_M8_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x633_BMS_M2_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = 0; - if (in > 5) + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = in; + o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = in; return 0; } -int print_can_0x645_BMS_M8_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x633_BMS_M2_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M8_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage))); return r; } -static int pack_can_0x646_BMS_M8_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x634_BMS_M2_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M8_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage)) & 0xffff; + /* BMS_M2_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage)) & 0xffff; i |= x; - /* BMS_M8_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage)) & 0xffff; + /* BMS_M2_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage)) & 0xffff; x <<= 16; i |= x; - /* BMS_M8_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage)) & 0xffff; + /* BMS_M2_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage)) & 0xffff; x <<= 32; i |= x; - /* BMS_M8_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage)) & 0xffff; + /* BMS_M2_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage)) & 0xffff; x <<= 48; i |= x; *data = (i); - o->can_0x646_BMS_M8_Cell_Voltage_Data_2_tx = 1; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2_tx = 1; return 8; } -static int unpack_can_0x646_BMS_M8_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x634_BMS_M2_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M8_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_M2_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = x; - /* BMS_M8_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = x; + /* BMS_M2_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = x; - /* BMS_M8_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = x; + /* BMS_M2_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 32) & 0xffff; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = x; - /* BMS_M8_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = x; + /* BMS_M2_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 48) & 0xffff; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = x; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2_rx = 1; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = x; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2_rx = 1; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x646_BMS_M8_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x634_BMS_M2_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage); + double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -4076,22 +4521,22 @@ int decode_can_0x646_BMS_M8_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x646_BMS_M8_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x634_BMS_M2_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = 0; - if (in > 5) + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = in; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = in; return 0; } -int decode_can_0x646_BMS_M8_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x634_BMS_M2_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage); + double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -4100,22 +4545,22 @@ int decode_can_0x646_BMS_M8_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x646_BMS_M8_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x634_BMS_M2_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = 0; - if (in > 5) + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = in; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = in; return 0; } -int decode_can_0x646_BMS_M8_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x634_BMS_M2_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage); + double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -4124,22 +4569,22 @@ int decode_can_0x646_BMS_M8_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x646_BMS_M8_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x634_BMS_M2_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = 0; - if (in > 5) + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = in; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = in; return 0; } -int decode_can_0x646_BMS_M8_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x634_BMS_M2_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage); + double rval = (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -4148,82 +4593,82 @@ int decode_can_0x646_BMS_M8_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x646_BMS_M8_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x634_BMS_M2_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = 0; - if (in > 5) + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = in; + o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = in; return 0; } -int print_can_0x646_BMS_M8_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x634_BMS_M2_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M8_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage))); return r; } -static int pack_can_0x647_BMS_M8_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x635_BMS_M2_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M8_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage)) & 0xffff; + /* BMS_M2_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage)) & 0xffff; i |= x; - /* BMS_M8_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage)) & 0xffff; + /* BMS_M2_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage)) & 0xffff; x <<= 16; i |= x; - /* BMS_M8_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage)) & 0xffff; + /* BMS_M2_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage)) & 0xffff; x <<= 32; i |= x; - /* BMS_M8_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ - x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage)) & 0xffff; + /* BMS_M2_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage)) & 0xffff; x <<= 48; i |= x; *data = (i); - o->can_0x647_BMS_M8_Cell_Voltage_Data_3_tx = 1; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3_tx = 1; return 8; } -static int unpack_can_0x647_BMS_M8_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x635_BMS_M2_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M8_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + /* BMS_M2_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ x = i & 0xffff; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = x; - /* BMS_M8_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = x; + /* BMS_M2_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 16) & 0xffff; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = x; - /* BMS_M8_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = x; + /* BMS_M2_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 32) & 0xffff; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = x; - /* BMS_M8_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = x; + /* BMS_M2_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ x = (i >> 48) & 0xffff; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = x; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3_rx = 1; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = x; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3_rx = 1; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x647_BMS_M8_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x635_BMS_M2_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage); + double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -4232,22 +4677,22 @@ int decode_can_0x647_BMS_M8_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x647_BMS_M8_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x635_BMS_M2_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = 0; - if (in > 5) + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = in; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = in; return 0; } -int decode_can_0x647_BMS_M8_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x635_BMS_M2_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage); + double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage); rval *= 0.0001; - if (rval <= 5) { + if (rval <= 6.5535) { *out = rval; return 0; } else { @@ -4256,22 +4701,4480 @@ int decode_can_0x647_BMS_M8_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x647_BMS_M8_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x635_BMS_M2_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = 0; - if (in > 5) + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = 0; + if (in > 6.5535) return -1; in *= 10000; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = in; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x635_BMS_M2_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x635_BMS_M2_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x635_BMS_M2_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x635_BMS_M2_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x635_BMS_M2_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M2_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x636_BMS_M3_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M3_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage)) & 0xffff; + i |= x; + /* BMS_M3_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M3_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M3_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x636_BMS_M3_Cell_Voltage_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x636_BMS_M3_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M3_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = x; + /* BMS_M3_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = x; + /* BMS_M3_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = x; + /* BMS_M3_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = x; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1_rx = 1; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x636_BMS_M3_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x636_BMS_M3_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = in; + return 0; +} + +int decode_can_0x636_BMS_M3_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x636_BMS_M3_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = in; + return 0; +} + +int decode_can_0x636_BMS_M3_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x636_BMS_M3_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = in; + return 0; +} + +int decode_can_0x636_BMS_M3_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x636_BMS_M3_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = in; + return 0; +} + +int print_can_0x636_BMS_M3_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M3_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage))); + return r; +} + +static int pack_can_0x637_BMS_M3_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M3_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage)) & 0xffff; + i |= x; + /* BMS_M3_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M3_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M3_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x637_BMS_M3_Cell_Voltage_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x637_BMS_M3_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M3_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = x; + /* BMS_M3_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = x; + /* BMS_M3_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = x; + /* BMS_M3_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = x; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2_rx = 1; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x637_BMS_M3_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x637_BMS_M3_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = in; + return 0; +} + +int decode_can_0x637_BMS_M3_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x637_BMS_M3_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = in; + return 0; +} + +int decode_can_0x637_BMS_M3_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x637_BMS_M3_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = in; + return 0; +} + +int decode_can_0x637_BMS_M3_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x637_BMS_M3_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = in; + return 0; +} + +int print_can_0x637_BMS_M3_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M3_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage))); + return r; +} + +static int pack_can_0x638_BMS_M3_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M3_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage)) & 0xffff; + i |= x; + /* BMS_M3_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M3_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M3_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x638_BMS_M3_Cell_Voltage_Data_3_tx = 1; + return 8; +} + +static int unpack_can_0x638_BMS_M3_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M3_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = x; + /* BMS_M3_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = x; + /* BMS_M3_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = x; + /* BMS_M3_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = x; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3_rx = 1; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x638_BMS_M3_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x638_BMS_M3_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = in; + return 0; +} + +int decode_can_0x638_BMS_M3_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x638_BMS_M3_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x638_BMS_M3_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x638_BMS_M3_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x638_BMS_M3_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x638_BMS_M3_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x638_BMS_M3_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M3_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x639_BMS_M4_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M4_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage)) & 0xffff; + i |= x; + /* BMS_M4_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M4_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M4_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x639_BMS_M4_Cell_Voltage_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x639_BMS_M4_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M4_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = x; + /* BMS_M4_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = x; + /* BMS_M4_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = x; + /* BMS_M4_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = x; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1_rx = 1; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x639_BMS_M4_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x639_BMS_M4_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = in; + return 0; +} + +int decode_can_0x639_BMS_M4_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x639_BMS_M4_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = in; + return 0; +} + +int decode_can_0x639_BMS_M4_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x639_BMS_M4_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = in; + return 0; +} + +int decode_can_0x639_BMS_M4_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x639_BMS_M4_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = in; + return 0; +} + +int print_can_0x639_BMS_M4_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M4_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage))); + return r; +} + +static int pack_can_0x63a_BMS_M4_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M4_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage)) & 0xffff; + i |= x; + /* BMS_M4_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M4_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M4_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x63a_BMS_M4_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M4_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = x; + /* BMS_M4_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = x; + /* BMS_M4_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = x; + /* BMS_M4_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = x; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2_rx = 1; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x63a_BMS_M4_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63a_BMS_M4_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = in; + return 0; +} + +int decode_can_0x63a_BMS_M4_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63a_BMS_M4_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = in; + return 0; +} + +int decode_can_0x63a_BMS_M4_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63a_BMS_M4_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = in; + return 0; +} + +int decode_can_0x63a_BMS_M4_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63a_BMS_M4_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = in; + return 0; +} + +int print_can_0x63a_BMS_M4_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M4_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage))); + return r; +} + +static int pack_can_0x63b_BMS_M4_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M4_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage)) & 0xffff; + i |= x; + /* BMS_M4_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M4_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M4_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3_tx = 1; + return 8; +} + +static int unpack_can_0x63b_BMS_M4_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M4_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = x; + /* BMS_M4_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = x; + /* BMS_M4_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = x; + /* BMS_M4_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = x; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3_rx = 1; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x63b_BMS_M4_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63b_BMS_M4_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = in; + return 0; +} + +int decode_can_0x63b_BMS_M4_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63b_BMS_M4_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x63b_BMS_M4_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63b_BMS_M4_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x63b_BMS_M4_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63b_BMS_M4_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x63b_BMS_M4_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M4_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x63c_BMS_M5_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M5_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage)) & 0xffff; + i |= x; + /* BMS_M5_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M5_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M5_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x63c_BMS_M5_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M5_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = x; + /* BMS_M5_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = x; + /* BMS_M5_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = x; + /* BMS_M5_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = x; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1_rx = 1; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x63c_BMS_M5_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63c_BMS_M5_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = in; + return 0; +} + +int decode_can_0x63c_BMS_M5_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63c_BMS_M5_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = in; + return 0; +} + +int decode_can_0x63c_BMS_M5_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63c_BMS_M5_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = in; + return 0; +} + +int decode_can_0x63c_BMS_M5_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63c_BMS_M5_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = in; + return 0; +} + +int print_can_0x63c_BMS_M5_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M5_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage))); + return r; +} + +static int pack_can_0x63d_BMS_M5_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M5_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage)) & 0xffff; + i |= x; + /* BMS_M5_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M5_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M5_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x63d_BMS_M5_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M5_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = x; + /* BMS_M5_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = x; + /* BMS_M5_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = x; + /* BMS_M5_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = x; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2_rx = 1; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x63d_BMS_M5_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63d_BMS_M5_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = in; + return 0; +} + +int decode_can_0x63d_BMS_M5_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63d_BMS_M5_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = in; + return 0; +} + +int decode_can_0x63d_BMS_M5_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63d_BMS_M5_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = in; + return 0; +} + +int decode_can_0x63d_BMS_M5_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63d_BMS_M5_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = in; + return 0; +} + +int print_can_0x63d_BMS_M5_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M5_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage))); + return r; +} + +static int pack_can_0x63e_BMS_M5_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M5_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage)) & 0xffff; + i |= x; + /* BMS_M5_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M5_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M5_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3_tx = 1; + return 8; +} + +static int unpack_can_0x63e_BMS_M5_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M5_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = x; + /* BMS_M5_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = x; + /* BMS_M5_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = x; + /* BMS_M5_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = x; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3_rx = 1; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x63e_BMS_M5_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63e_BMS_M5_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = in; + return 0; +} + +int decode_can_0x63e_BMS_M5_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63e_BMS_M5_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x63e_BMS_M5_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63e_BMS_M5_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x63e_BMS_M5_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63e_BMS_M5_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x63e_BMS_M5_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M5_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x63f_BMS_M6_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M6_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage)) & 0xffff; + i |= x; + /* BMS_M6_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M6_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M6_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x63f_BMS_M6_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M6_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = x; + /* BMS_M6_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = x; + /* BMS_M6_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = x; + /* BMS_M6_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = x; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1_rx = 1; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x63f_BMS_M6_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63f_BMS_M6_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = in; + return 0; +} + +int decode_can_0x63f_BMS_M6_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63f_BMS_M6_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = in; + return 0; +} + +int decode_can_0x63f_BMS_M6_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63f_BMS_M6_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = in; + return 0; +} + +int decode_can_0x63f_BMS_M6_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x63f_BMS_M6_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = in; + return 0; +} + +int print_can_0x63f_BMS_M6_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M6_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage))); + return r; +} + +static int pack_can_0x640_BMS_M6_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M6_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage)) & 0xffff; + i |= x; + /* BMS_M6_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M6_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M6_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x640_BMS_M6_Cell_Voltage_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x640_BMS_M6_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M6_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = x; + /* BMS_M6_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = x; + /* BMS_M6_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = x; + /* BMS_M6_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = x; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2_rx = 1; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x640_BMS_M6_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x640_BMS_M6_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = in; + return 0; +} + +int decode_can_0x640_BMS_M6_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x640_BMS_M6_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = in; + return 0; +} + +int decode_can_0x640_BMS_M6_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x640_BMS_M6_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = in; + return 0; +} + +int decode_can_0x640_BMS_M6_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x640_BMS_M6_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = in; + return 0; +} + +int print_can_0x640_BMS_M6_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M6_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage))); + return r; +} + +static int pack_can_0x641_BMS_M6_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M6_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage)) & 0xffff; + i |= x; + /* BMS_M6_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M6_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M6_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x641_BMS_M6_Cell_Voltage_Data_3_tx = 1; + return 8; +} + +static int unpack_can_0x641_BMS_M6_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M6_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = x; + /* BMS_M6_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = x; + /* BMS_M6_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = x; + /* BMS_M6_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = x; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3_rx = 1; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x641_BMS_M6_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x641_BMS_M6_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = in; + return 0; +} + +int decode_can_0x641_BMS_M6_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x641_BMS_M6_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x641_BMS_M6_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x641_BMS_M6_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x641_BMS_M6_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x641_BMS_M6_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x641_BMS_M6_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M6_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x642_BMS_M7_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M7_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage)) & 0xffff; + i |= x; + /* BMS_M7_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M7_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M7_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x642_BMS_M7_Cell_Voltage_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x642_BMS_M7_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M7_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = x; + /* BMS_M7_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = x; + /* BMS_M7_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = x; + /* BMS_M7_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = x; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1_rx = 1; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x642_BMS_M7_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x642_BMS_M7_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = in; + return 0; +} + +int decode_can_0x642_BMS_M7_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x642_BMS_M7_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = in; + return 0; +} + +int decode_can_0x642_BMS_M7_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x642_BMS_M7_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = in; + return 0; +} + +int decode_can_0x642_BMS_M7_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x642_BMS_M7_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = in; + return 0; +} + +int print_can_0x642_BMS_M7_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M7_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage))); + return r; +} + +static int pack_can_0x643_BMS_M7_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M7_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage)) & 0xffff; + i |= x; + /* BMS_M7_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M7_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M7_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x643_BMS_M7_Cell_Voltage_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x643_BMS_M7_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M7_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = x; + /* BMS_M7_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = x; + /* BMS_M7_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = x; + /* BMS_M7_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = x; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2_rx = 1; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x643_BMS_M7_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x643_BMS_M7_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = in; + return 0; +} + +int decode_can_0x643_BMS_M7_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x643_BMS_M7_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = in; + return 0; +} + +int decode_can_0x643_BMS_M7_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x643_BMS_M7_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = in; + return 0; +} + +int decode_can_0x643_BMS_M7_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x643_BMS_M7_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = in; + return 0; +} + +int print_can_0x643_BMS_M7_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M7_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage))); + return r; +} + +static int pack_can_0x644_BMS_M7_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M7_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage)) & 0xffff; + i |= x; + /* BMS_M7_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M7_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M7_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x644_BMS_M7_Cell_Voltage_Data_3_tx = 1; + return 8; +} + +static int unpack_can_0x644_BMS_M7_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M7_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = x; + /* BMS_M7_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = x; + /* BMS_M7_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = x; + /* BMS_M7_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = x; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3_rx = 1; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x644_BMS_M7_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x644_BMS_M7_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = in; + return 0; +} + +int decode_can_0x644_BMS_M7_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x644_BMS_M7_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x644_BMS_M7_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x644_BMS_M7_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x644_BMS_M7_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x644_BMS_M7_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x644_BMS_M7_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M7_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x645_BMS_M8_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M8_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage)) & 0xffff; + i |= x; + /* BMS_M8_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M8_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M8_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x645_BMS_M8_Cell_Voltage_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x645_BMS_M8_Cell_Voltage_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M8_Cell_1_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = x; + /* BMS_M8_Cell_2_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = x; + /* BMS_M8_Cell_3_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = x; + /* BMS_M8_Cell_4_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = x; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1_rx = 1; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x645_BMS_M8_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x645_BMS_M8_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = in; + return 0; +} + +int decode_can_0x645_BMS_M8_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x645_BMS_M8_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = in; + return 0; +} + +int decode_can_0x645_BMS_M8_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x645_BMS_M8_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = in; + return 0; +} + +int decode_can_0x645_BMS_M8_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x645_BMS_M8_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = in; + return 0; +} + +int print_can_0x645_BMS_M8_Cell_Voltage_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M8_Cell_1_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_2_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_3_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_4_Voltage = (wire: %.0f)\n", (double)(o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage))); + return r; +} + +static int pack_can_0x646_BMS_M8_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M8_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage)) & 0xffff; + i |= x; + /* BMS_M8_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M8_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M8_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x646_BMS_M8_Cell_Voltage_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x646_BMS_M8_Cell_Voltage_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M8_Cell_5_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = x; + /* BMS_M8_Cell_6_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = x; + /* BMS_M8_Cell_7_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = x; + /* BMS_M8_Cell_8_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = x; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2_rx = 1; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x646_BMS_M8_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x646_BMS_M8_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = in; + return 0; +} + +int decode_can_0x646_BMS_M8_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x646_BMS_M8_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = in; + return 0; +} + +int decode_can_0x646_BMS_M8_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x646_BMS_M8_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = in; + return 0; +} + +int decode_can_0x646_BMS_M8_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x646_BMS_M8_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = in; + return 0; +} + +int print_can_0x646_BMS_M8_Cell_Voltage_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M8_Cell_5_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_6_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_7_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_8_Voltage = (wire: %.0f)\n", (double)(o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage))); + return r; +} + +static int pack_can_0x647_BMS_M8_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M8_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage)) & 0xffff; + i |= x; + /* BMS_M8_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage)) & 0xffff; + x <<= 16; + i |= x; + /* BMS_M8_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage)) & 0xffff; + x <<= 32; + i |= x; + /* BMS_M8_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = ((uint16_t)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage)) & 0xffff; + x <<= 48; + i |= x; + *data = (i); + o->can_0x647_BMS_M8_Cell_Voltage_Data_3_tx = 1; + return 8; +} + +static int unpack_can_0x647_BMS_M8_Cell_Voltage_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M8_Cell_9_Voltage: start-bit 0, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = i & 0xffff; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = x; + /* BMS_M8_Cell_10_Voltage: start-bit 16, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 16) & 0xffff; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = x; + /* BMS_M8_Cell_11_Voltage: start-bit 32, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 32) & 0xffff; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = x; + /* BMS_M8_Cell_12_Voltage: start-bit 48, length 16, endianess intel, scaling 0.0001, offset 0 */ + x = (i >> 48) & 0xffff; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = x; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3_rx = 1; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x647_BMS_M8_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x647_BMS_M8_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = in; + return 0; +} + +int decode_can_0x647_BMS_M8_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x647_BMS_M8_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = in; + return 0; +} + +int decode_can_0x647_BMS_M8_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x647_BMS_M8_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = in; + return 0; +} + +int decode_can_0x647_BMS_M8_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage); + rval *= 0.0001; + if (rval <= 6.5535) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x647_BMS_M8_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = 0; + if (in > 6.5535) + return -1; + in *= 10000; + o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = in; + return 0; +} + +int print_can_0x647_BMS_M8_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M8_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage))); + return r; +} + +static int pack_can_0x680_BMS_M1_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M1_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_1_Thermistor)) & 0xff; + i |= x; + /* BMS_M1_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_2_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M1_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_3_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M1_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M1_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_5_Thermistor)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M1_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M1_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_7_Thermistor)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M1_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x680_BMS_M1_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M1_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_1_Thermistor = x; + /* BMS_M1_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_2_Thermistor = x; + /* BMS_M1_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_3_Thermistor = x; + /* BMS_M1_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_4_Thermistor = x; + /* BMS_M1_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_5_Thermistor = x; + /* BMS_M1_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_6_Thermistor = x; + /* BMS_M1_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_7_Thermistor = x; + /* BMS_M1_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_8_Thermistor = x; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1_rx = 1; + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x680_BMS_M1_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_1_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_1_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_2_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_2_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_3_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_3_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_4_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_4_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_5_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_5_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_6_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_6_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_7_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_7_Thermistor = in; + return 0; +} + +int decode_can_0x680_BMS_M1_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_8_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x680_BMS_M1_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_8_Thermistor = in; + return 0; +} + +int print_can_0x680_BMS_M1_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M1_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_Cell_8_Thermistor))); + return r; +} + +static int pack_can_0x681_BMS_M1_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M1_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_9_Thermistor)) & 0xff; + i |= x; + /* BMS_M1_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_10_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M1_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_11_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M1_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M1_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Pressure)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M1_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M1_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Humidity)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M1_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Dew_Point)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x681_BMS_M1_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M1_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_9_Thermistor = x; + /* BMS_M1_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_10_Thermistor = x; + /* BMS_M1_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_11_Thermistor = x; + /* BMS_M1_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_12_Thermistor = x; + /* BMS_M1_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Pressure = x; + /* BMS_M1_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Atmosphere_Temp = x; + /* BMS_M1_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Humidity = x; + /* BMS_M1_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Dew_Point = x; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2_rx = 1; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x681_BMS_M1_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_9_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_9_Thermistor = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_10_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_10_Thermistor = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_11_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_11_Thermistor = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_12_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_12_Thermistor = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Pressure); + rval *= 0.01; + if (rval <= 2.55) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x681_BMS_M1_Pressure(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Pressure = 0; + if (in > 2.55) + return -1; + in *= 100; + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Pressure = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Atmosphere_Temp); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Atmosphere_Temp = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Humidity); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Humidity = in; + return 0; +} + +int decode_can_0x681_BMS_M1_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Dew_Point); + *out = rval; + return 0; +} + +int encode_can_0x681_BMS_M1_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Dew_Point = in; + return 0; +} + +int print_can_0x681_BMS_M1_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M1_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M1_Pressure = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M1_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M1_Humidity = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M1_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_Dew_Point))); + return r; +} + +static int pack_can_0x682_BMS_M2_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M2_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_Thermistor)) & 0xff; + i |= x; + /* BMS_M2_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M2_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M2_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M2_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_5_Thermistor)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M2_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M2_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_7_Thermistor)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M2_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x682_BMS_M2_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M2_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_Thermistor = x; + /* BMS_M2_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_Thermistor = x; + /* BMS_M2_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_Thermistor = x; + /* BMS_M2_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_4_Thermistor = x; + /* BMS_M2_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_5_Thermistor = x; + /* BMS_M2_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_6_Thermistor = x; + /* BMS_M2_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_7_Thermistor = x; + /* BMS_M2_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_8_Thermistor = x; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1_rx = 1; + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x682_BMS_M2_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_4_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_4_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_5_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_5_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_6_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_6_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_7_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_7_Thermistor = in; + return 0; +} + +int decode_can_0x682_BMS_M2_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_8_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x682_BMS_M2_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_8_Thermistor = in; + return 0; +} + +int print_can_0x682_BMS_M2_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M2_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_8_Thermistor))); + return r; +} + +static int pack_can_0x683_BMS_M2_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M2_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_9_Thermistor)) & 0xff; + i |= x; + /* BMS_M2_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_10_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M2_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_11_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M2_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M2_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M2_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M2_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Humidity)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M2_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Dew_Point)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x683_BMS_M2_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M2_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_9_Thermistor = x; + /* BMS_M2_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_10_Thermistor = x; + /* BMS_M2_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_11_Thermistor = x; + /* BMS_M2_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_12_Thermistor = x; + /* BMS_M2_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure = x; + /* BMS_M2_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Atmosphere_Temp = x; + /* BMS_M2_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Humidity = x; + /* BMS_M2_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Dew_Point = x; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2_rx = 1; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x683_BMS_M2_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_9_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_9_Thermistor = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_10_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_10_Thermistor = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_11_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_11_Thermistor = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_12_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_12_Thermistor = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure); + rval *= 0.01; + if (rval <= 2.55) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x683_BMS_M2_Pressure(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure = 0; + if (in > 2.55) + return -1; + in *= 100; + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Atmosphere_Temp); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Atmosphere_Temp = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Humidity); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Humidity = in; + return 0; +} + +int decode_can_0x683_BMS_M2_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Dew_Point); + *out = rval; + return 0; +} + +int encode_can_0x683_BMS_M2_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Dew_Point = in; + return 0; +} + +int print_can_0x683_BMS_M2_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M2_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M2_Pressure = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M2_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M2_Humidity = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M2_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Dew_Point))); + return r; +} + +static int pack_can_0x684_BMS_M3_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M3_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_1_Thermistor)) & 0xff; + i |= x; + /* BMS_M3_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M3_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M3_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M3_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_5_Thermistor)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M3_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M3_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_7_Thermistor)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M3_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x684_BMS_M3_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M3_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_1_Thermistor = x; + /* BMS_M3_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor = x; + /* BMS_M3_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor = x; + /* BMS_M3_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_4_Thermistor = x; + /* BMS_M3_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_5_Thermistor = x; + /* BMS_M3_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_6_Thermistor = x; + /* BMS_M3_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_7_Thermistor = x; + /* BMS_M3_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_8_Thermistor = x; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1_rx = 1; + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x684_BMS_M3_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_1_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_1_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_4_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_4_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_5_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_5_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_6_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_6_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_7_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_7_Thermistor = in; + return 0; +} + +int decode_can_0x684_BMS_M3_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_8_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x684_BMS_M3_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_8_Thermistor = in; + return 0; +} + +int print_can_0x684_BMS_M3_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M3_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_8_Thermistor))); + return r; +} + +static int pack_can_0x685_BMS_M3_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M3_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_Thermistor)) & 0xff; + i |= x; + /* BMS_M3_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M3_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M3_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M3_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M3_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M3_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Humidity)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M3_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Dew_Point)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x685_BMS_M3_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M3_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_Thermistor = x; + /* BMS_M3_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_Thermistor = x; + /* BMS_M3_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_Thermistor = x; + /* BMS_M3_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_12_Thermistor = x; + /* BMS_M3_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure = x; + /* BMS_M3_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Atmosphere_Temp = x; + /* BMS_M3_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Humidity = x; + /* BMS_M3_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Dew_Point = x; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2_rx = 1; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x685_BMS_M3_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_Thermistor = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_Thermistor = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_Thermistor = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_12_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_12_Thermistor = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { + assert(o); + assert(out); + double rval = (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure); + rval *= 0.01; + if (rval <= 2.55) { + *out = rval; + return 0; + } else { + *out = (double)0; + return -1; + } +} + +int encode_can_0x685_BMS_M3_Pressure(can_obj_all_sre_edited_h_t *o, double in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure = 0; + if (in > 2.55) + return -1; + in *= 100; + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Atmosphere_Temp); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Atmosphere_Temp = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Humidity); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Humidity = in; + return 0; +} + +int decode_can_0x685_BMS_M3_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Dew_Point); + *out = rval; + return 0; +} + +int encode_can_0x685_BMS_M3_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Dew_Point = in; + return 0; +} + +int print_can_0x685_BMS_M3_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M3_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M3_Pressure = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M3_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M3_Humidity = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M3_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Dew_Point))); + return r; +} + +static int pack_can_0x686_BMS_M4_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M4_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_Thermistor)) & 0xff; + i |= x; + /* BMS_M4_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M4_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M4_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M4_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_5_Thermistor)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M4_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M4_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_7_Thermistor)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M4_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x686_BMS_M4_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M4_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_Thermistor = x; + /* BMS_M4_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_Thermistor = x; + /* BMS_M4_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_Thermistor = x; + /* BMS_M4_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_4_Thermistor = x; + /* BMS_M4_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_5_Thermistor = x; + /* BMS_M4_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_6_Thermistor = x; + /* BMS_M4_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_7_Thermistor = x; + /* BMS_M4_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_8_Thermistor = x; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1_rx = 1; + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x686_BMS_M4_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_4_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_4_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_5_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_5_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_6_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_6_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_7_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_7_Thermistor = in; + return 0; +} + +int decode_can_0x686_BMS_M4_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_8_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x686_BMS_M4_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_8_Thermistor = in; + return 0; +} + +int print_can_0x686_BMS_M4_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { + assert(o); + assert(output); + int r = 0; + r = print_helper(r, fprintf(output, "BMS_M4_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_8_Thermistor))); + return r; +} + +static int pack_can_0x687_BMS_M4_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { + assert(o); + assert(data); + register uint64_t x; + register uint64_t i = 0; + /* BMS_M4_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_9_Thermistor)) & 0xff; + i |= x; + /* BMS_M4_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_10_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M4_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_11_Thermistor)) & 0xff; + x <<= 16; + i |= x; + /* BMS_M4_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M4_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure)) & 0xff; + x <<= 32; + i |= x; + /* BMS_M4_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M4_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Humidity)) & 0xff; + x <<= 48; + i |= x; + /* BMS_M4_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Dew_Point)) & 0xff; + x <<= 56; + i |= x; + *data = (i); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2_tx = 1; + return 8; +} + +static int unpack_can_0x687_BMS_M4_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M4_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_9_Thermistor = x; + /* BMS_M4_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_10_Thermistor = x; + /* BMS_M4_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_11_Thermistor = x; + /* BMS_M4_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_12_Thermistor = x; + /* BMS_M4_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure = x; + /* BMS_M4_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp = x; + /* BMS_M4_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Humidity = x; + /* BMS_M4_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Dew_Point = x; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2_rx = 1; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; + return 8; +} + +int decode_can_0x687_BMS_M4_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_9_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x687_BMS_M4_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_9_Thermistor = in; + return 0; +} + +int decode_can_0x687_BMS_M4_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_10_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x687_BMS_M4_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_10_Thermistor = in; + return 0; +} + +int decode_can_0x687_BMS_M4_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_11_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x687_BMS_M4_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_11_Thermistor = in; + return 0; +} + +int decode_can_0x687_BMS_M4_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_12_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x687_BMS_M4_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_12_Thermistor = in; return 0; } -int decode_can_0x647_BMS_M8_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x687_BMS_M4_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage); - rval *= 0.0001; - if (rval <= 5) { + double rval = (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure); + rval *= 0.01; + if (rval <= 2.55) { *out = rval; return 0; } else { @@ -4280,1824 +9183,1644 @@ int decode_can_0x647_BMS_M8_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o, } } -int encode_can_0x647_BMS_M8_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x687_BMS_M4_Pressure(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = 0; - if (in > 5) + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure = 0; + if (in > 2.55) return -1; - in *= 10000; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = in; + in *= 100; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure = in; return 0; } -int decode_can_0x647_BMS_M8_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) { +int decode_can_0x687_BMS_M4_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - double rval = (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage); - rval *= 0.0001; - if (rval <= 5) { - *out = rval; - return 0; - } else { - *out = (double)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp); + *out = rval; + return 0; } -int encode_can_0x647_BMS_M8_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) { +int encode_can_0x687_BMS_M4_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = 0; - if (in > 5) - return -1; - in *= 10000; - o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = in; + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp = in; return 0; } -int print_can_0x647_BMS_M8_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int decode_can_0x687_BMS_M4_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Humidity); + *out = rval; + return 0; +} + +int encode_can_0x687_BMS_M4_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Humidity = in; + return 0; +} + +int decode_can_0x687_BMS_M4_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Dew_Point); + *out = rval; + return 0; +} + +int encode_can_0x687_BMS_M4_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Dew_Point = in; + return 0; +} + +int print_can_0x687_BMS_M4_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M8_Cell_9_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_10_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_11_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage))); - r = print_helper(r, fprintf(output, "BMS_M8_Cell_12_Voltage = (wire: %.0f)\n", (double)(o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M4_Pressure = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M4_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M4_Humidity = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M4_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Dew_Point))); return r; } -static int pack_can_0x680_BMS_M1_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x688_BMS_M5_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M1_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_1_Temperature)) & 0xffff; + /* BMS_M5_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_1_Thermistor)) & 0xff; + i |= x; + /* BMS_M5_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor)) & 0xff; + x <<= 8; i |= x; - /* BMS_M1_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_2_Temperature)) & 0xffff; + /* BMS_M5_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M1_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_3_Temperature)) & 0xffff; + /* BMS_M5_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M5_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_5_Thermistor)) & 0xff; x <<= 32; i |= x; - /* BMS_M1_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_4_Temperature)) & 0xffff; + /* BMS_M5_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M5_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_7_Thermistor)) & 0xff; x <<= 48; i |= x; + /* BMS_M5_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x680_BMS_M1_Cell_Temperature_Data_1_tx = 1; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1_tx = 1; return 8; } -static int unpack_can_0x680_BMS_M1_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x688_BMS_M5_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M1_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_1_Temperature = x; - /* BMS_M1_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_2_Temperature = x; - /* BMS_M1_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_3_Temperature = x; - /* BMS_M1_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_4_Temperature = x; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1_rx = 1; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1_time_stamp_rx = time_stamp; + /* BMS_M5_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_1_Thermistor = x; + /* BMS_M5_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor = x; + /* BMS_M5_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor = x; + /* BMS_M5_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor = x; + /* BMS_M5_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_5_Thermistor = x; + /* BMS_M5_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_6_Thermistor = x; + /* BMS_M5_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_7_Thermistor = x; + /* BMS_M5_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_8_Thermistor = x; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1_rx = 1; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x680_BMS_M1_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x688_BMS_M5_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_1_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_1_Thermistor); + *out = rval; + return 0; } -int encode_can_0x680_BMS_M1_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x688_BMS_M5_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_1_Temperature = 0; - if (in > 100) - return -1; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_1_Temperature = in; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_1_Thermistor = in; return 0; } -int decode_can_0x680_BMS_M1_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x688_BMS_M5_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_2_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor); + *out = rval; + return 0; } -int encode_can_0x680_BMS_M1_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x688_BMS_M5_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_2_Temperature = 0; - if (in > 100) - return -1; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_2_Temperature = in; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor = in; return 0; } -int decode_can_0x680_BMS_M1_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x688_BMS_M5_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_3_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor); + *out = rval; + return 0; } -int encode_can_0x680_BMS_M1_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x688_BMS_M5_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_3_Temperature = 0; - if (in > 100) - return -1; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_3_Temperature = in; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor = in; return 0; } -int decode_can_0x680_BMS_M1_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x688_BMS_M5_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_4_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor); + *out = rval; + return 0; } -int encode_can_0x680_BMS_M1_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x688_BMS_M5_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_4_Temperature = 0; - if (in > 100) - return -1; - o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_4_Temperature = in; + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor = in; + return 0; +} + +int decode_can_0x688_BMS_M5_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_5_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x688_BMS_M5_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_5_Thermistor = in; + return 0; +} + +int decode_can_0x688_BMS_M5_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_6_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x688_BMS_M5_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_6_Thermistor = in; + return 0; +} + +int decode_can_0x688_BMS_M5_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_7_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x688_BMS_M5_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_7_Thermistor = in; + return 0; +} + +int decode_can_0x688_BMS_M5_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_8_Thermistor); + *out = rval; return 0; } -int print_can_0x680_BMS_M1_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int encode_can_0x688_BMS_M5_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_8_Thermistor = in; + return 0; +} + +int print_can_0x688_BMS_M5_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M1_Cell_1_Temperature = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_1_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_2_Temperature = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_2_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_3_Temperature = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_3_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_4_Temperature = (wire: %.0f)\n", (double)(o->can_0x680_BMS_M1_Cell_Temperature_Data_1.BMS_M1_Cell_4_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_8_Thermistor))); return r; } -static int pack_can_0x681_BMS_M1_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x689_BMS_M5_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M1_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_5_Temperature)) & 0xffff; + /* BMS_M5_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_Thermistor)) & 0xff; i |= x; - /* BMS_M1_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_6_Temperature)) & 0xffff; + /* BMS_M5_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M5_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_11_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M1_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_7_Temperature)) & 0xffff; + /* BMS_M5_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M5_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Pressure)) & 0xff; x <<= 32; i |= x; - /* BMS_M1_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_8_Temperature)) & 0xffff; + /* BMS_M5_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M5_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Humidity)) & 0xff; x <<= 48; i |= x; + /* BMS_M5_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Dew_Point)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x681_BMS_M1_Cell_Temperature_Data_2_tx = 1; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2_tx = 1; return 8; } -static int unpack_can_0x681_BMS_M1_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x689_BMS_M5_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M1_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_5_Temperature = x; - /* BMS_M1_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_6_Temperature = x; - /* BMS_M1_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_7_Temperature = x; - /* BMS_M1_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_8_Temperature = x; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2_rx = 1; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2_time_stamp_rx = time_stamp; + /* BMS_M5_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_Thermistor = x; + /* BMS_M5_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_Thermistor = x; + /* BMS_M5_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_11_Thermistor = x; + /* BMS_M5_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_12_Thermistor = x; + /* BMS_M5_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Pressure = x; + /* BMS_M5_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Atmosphere_Temp = x; + /* BMS_M5_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Humidity = x; + /* BMS_M5_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Dew_Point = x; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2_rx = 1; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x681_BMS_M1_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x689_BMS_M5_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_5_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_Thermistor); + *out = rval; + return 0; } -int encode_can_0x681_BMS_M1_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x689_BMS_M5_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_5_Temperature = 0; - if (in > 100) - return -1; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_5_Temperature = in; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_Thermistor = in; return 0; } -int decode_can_0x681_BMS_M1_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x689_BMS_M5_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_6_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_Thermistor); + *out = rval; + return 0; } -int encode_can_0x681_BMS_M1_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x689_BMS_M5_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_6_Temperature = 0; - if (in > 100) - return -1; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_6_Temperature = in; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_Thermistor = in; return 0; } -int decode_can_0x681_BMS_M1_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x689_BMS_M5_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_7_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_11_Thermistor); + *out = rval; + return 0; } -int encode_can_0x681_BMS_M1_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x689_BMS_M5_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_7_Temperature = 0; - if (in > 100) - return -1; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_7_Temperature = in; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_11_Thermistor = in; + return 0; +} + +int decode_can_0x689_BMS_M5_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_12_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x689_BMS_M5_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_12_Thermistor = in; return 0; } -int decode_can_0x681_BMS_M1_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x689_BMS_M5_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_8_Temperature); - if (rval <= 100) { + double rval = (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Pressure); + rval *= 0.01; + if (rval <= 2.55) { *out = rval; return 0; } else { - *out = (uint16_t)0; + *out = (double)0; return -1; } } -int encode_can_0x681_BMS_M1_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x689_BMS_M5_Pressure(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_8_Temperature = 0; - if (in > 100) + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Pressure = 0; + if (in > 2.55) return -1; - o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_8_Temperature = in; + in *= 100; + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Pressure = in; + return 0; +} + +int decode_can_0x689_BMS_M5_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Atmosphere_Temp); + *out = rval; + return 0; +} + +int encode_can_0x689_BMS_M5_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Atmosphere_Temp = in; + return 0; +} + +int decode_can_0x689_BMS_M5_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Humidity); + *out = rval; + return 0; +} + +int encode_can_0x689_BMS_M5_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Humidity = in; + return 0; +} + +int decode_can_0x689_BMS_M5_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Dew_Point); + *out = rval; + return 0; +} + +int encode_can_0x689_BMS_M5_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Dew_Point = in; return 0; } -int print_can_0x681_BMS_M1_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x689_BMS_M5_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M1_Cell_5_Temperature = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_5_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_6_Temperature = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_6_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_7_Temperature = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_7_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_8_Temperature = (wire: %.0f)\n", (double)(o->can_0x681_BMS_M1_Cell_Temperature_Data_2.BMS_M1_Cell_8_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M5_Pressure = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M5_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M5_Humidity = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M5_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Dew_Point))); return r; } -static int pack_can_0x682_BMS_M1_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x68a_BMS_M6_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M1_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_9_Temperature)) & 0xffff; + /* BMS_M6_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_Thermistor)) & 0xff; i |= x; - /* BMS_M1_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_10_Temperature)) & 0xffff; + /* BMS_M6_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M6_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M1_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_11_Temperature)) & 0xffff; + /* BMS_M6_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M6_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_5_Thermistor)) & 0xff; x <<= 32; i |= x; - /* BMS_M1_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_12_Temperature)) & 0xffff; + /* BMS_M6_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M6_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_7_Thermistor)) & 0xff; x <<= 48; i |= x; + /* BMS_M6_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x682_BMS_M1_Cell_Temperature_Data_3_tx = 1; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1_tx = 1; + return 8; +} + +static int unpack_can_0x68a_BMS_M6_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { + assert(o); + assert(dlc <= 8); + register uint64_t x; + register uint64_t i = (data); + if (dlc < 8) + return -1; + /* BMS_M6_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_Thermistor = x; + /* BMS_M6_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_Thermistor = x; + /* BMS_M6_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_Thermistor = x; + /* BMS_M6_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_Thermistor = x; + /* BMS_M6_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_5_Thermistor = x; + /* BMS_M6_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_6_Thermistor = x; + /* BMS_M6_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_7_Thermistor = x; + /* BMS_M6_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_8_Thermistor = x; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1_rx = 1; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; return 8; } -static int unpack_can_0x682_BMS_M1_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int decode_can_0x68a_BMS_M6_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x68a_BMS_M6_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_Thermistor = in; + return 0; +} + +int decode_can_0x68a_BMS_M6_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x68a_BMS_M6_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_Thermistor = in; + return 0; +} + +int decode_can_0x68a_BMS_M6_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x68a_BMS_M6_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { + assert(o); + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_Thermistor = in; + return 0; +} + +int decode_can_0x68a_BMS_M6_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { + assert(o); + assert(out); + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_Thermistor); + *out = rval; + return 0; +} + +int encode_can_0x68a_BMS_M6_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) - return -1; - /* BMS_M1_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_9_Temperature = x; - /* BMS_M1_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_10_Temperature = x; - /* BMS_M1_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_11_Temperature = x; - /* BMS_M1_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_12_Temperature = x; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3_rx = 1; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3_time_stamp_rx = time_stamp; - return 8; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_Thermistor = in; + return 0; } -int decode_can_0x682_BMS_M1_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68a_BMS_M6_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_9_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_5_Thermistor); + *out = rval; + return 0; } -int encode_can_0x682_BMS_M1_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68a_BMS_M6_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_9_Temperature = 0; - if (in > 100) - return -1; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_9_Temperature = in; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_5_Thermistor = in; return 0; } -int decode_can_0x682_BMS_M1_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68a_BMS_M6_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_10_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_6_Thermistor); + *out = rval; + return 0; } -int encode_can_0x682_BMS_M1_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68a_BMS_M6_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_10_Temperature = 0; - if (in > 100) - return -1; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_10_Temperature = in; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_6_Thermistor = in; return 0; } -int decode_can_0x682_BMS_M1_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68a_BMS_M6_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_11_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_7_Thermistor); + *out = rval; + return 0; } -int encode_can_0x682_BMS_M1_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68a_BMS_M6_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_11_Temperature = 0; - if (in > 100) - return -1; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_11_Temperature = in; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_7_Thermistor = in; return 0; } -int decode_can_0x682_BMS_M1_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68a_BMS_M6_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_12_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_8_Thermistor); + *out = rval; + return 0; } -int encode_can_0x682_BMS_M1_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68a_BMS_M6_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_12_Temperature = 0; - if (in > 100) - return -1; - o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_12_Temperature = in; + o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_8_Thermistor = in; return 0; } -int print_can_0x682_BMS_M1_Cell_Temperature_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x68a_BMS_M6_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M1_Cell_9_Temperature = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_9_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_10_Temperature = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_10_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_11_Temperature = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_11_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M1_Cell_12_Temperature = (wire: %.0f)\n", (double)(o->can_0x682_BMS_M1_Cell_Temperature_Data_3.BMS_M1_Cell_12_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_8_Thermistor))); return r; } -static int pack_can_0x683_BMS_M2_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x68b_BMS_M6_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M2_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_1_Temperature)) & 0xffff; + /* BMS_M6_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_9_Thermistor)) & 0xff; + i |= x; + /* BMS_M6_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_10_Thermistor)) & 0xff; + x <<= 8; i |= x; - /* BMS_M2_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_2_Temperature)) & 0xffff; + /* BMS_M6_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_11_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M2_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_3_Temperature)) & 0xffff; + /* BMS_M6_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M6_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure)) & 0xff; x <<= 32; i |= x; - /* BMS_M2_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature)) & 0xffff; + /* BMS_M6_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M6_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity)) & 0xff; x <<= 48; i |= x; + /* BMS_M6_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x683_BMS_M2_Cell_Temperature_Data_1_tx = 1; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2_tx = 1; return 8; } -static int unpack_can_0x683_BMS_M2_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x68b_BMS_M6_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M2_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_1_Temperature = x; - /* BMS_M2_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_2_Temperature = x; - /* BMS_M2_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_3_Temperature = x; - /* BMS_M2_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature = x; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1_rx = 1; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1_time_stamp_rx = time_stamp; + /* BMS_M6_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_9_Thermistor = x; + /* BMS_M6_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_10_Thermistor = x; + /* BMS_M6_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_11_Thermistor = x; + /* BMS_M6_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor = x; + /* BMS_M6_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure = x; + /* BMS_M6_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Atmosphere_Temp = x; + /* BMS_M6_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity = x; + /* BMS_M6_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point = x; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2_rx = 1; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x683_BMS_M2_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_1_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_9_Thermistor); + *out = rval; + return 0; } -int encode_can_0x683_BMS_M2_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_1_Temperature = 0; - if (in > 100) - return -1; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_1_Temperature = in; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_9_Thermistor = in; return 0; } -int decode_can_0x683_BMS_M2_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_2_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_10_Thermistor); + *out = rval; + return 0; } -int encode_can_0x683_BMS_M2_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_2_Temperature = 0; - if (in > 100) - return -1; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_2_Temperature = in; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_10_Thermistor = in; return 0; } -int decode_can_0x683_BMS_M2_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_3_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_11_Thermistor); + *out = rval; + return 0; } -int encode_can_0x683_BMS_M2_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_3_Temperature = 0; - if (in > 100) - return -1; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_3_Temperature = in; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_11_Thermistor = in; return 0; } -int decode_can_0x683_BMS_M2_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } -} - -int encode_can_0x683_BMS_M2_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { - assert(o); - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature = 0; - if (in > 100) - return -1; - o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature = in; + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor); + *out = rval; return 0; } -int print_can_0x683_BMS_M2_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M2_Cell_1_Temperature = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_1_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_2_Temperature = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_2_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_3_Temperature = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_3_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_4_Temperature = (wire: %.0f)\n", (double)(o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature))); - return r; -} - -static int pack_can_0x684_BMS_M2_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { - assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M2_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature)) & 0xffff; - i |= x; - /* BMS_M2_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_6_Temperature)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M2_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_7_Temperature)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M2_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_8_Temperature)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x684_BMS_M2_Cell_Temperature_Data_2_tx = 1; - return 8; -} - -static int unpack_can_0x684_BMS_M2_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x68b_BMS_M6_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) - return -1; - /* BMS_M2_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature = x; - /* BMS_M2_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_6_Temperature = x; - /* BMS_M2_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_7_Temperature = x; - /* BMS_M2_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_8_Temperature = x; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2_rx = 1; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2_time_stamp_rx = time_stamp; - return 8; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor = in; + return 0; } -int decode_can_0x684_BMS_M2_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature); - if (rval <= 100) { + double rval = (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure); + rval *= 0.01; + if (rval <= 2.55) { *out = rval; return 0; } else { - *out = (uint16_t)0; + *out = (double)0; return -1; } } -int encode_can_0x684_BMS_M2_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Pressure(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature = 0; - if (in > 100) + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure = 0; + if (in > 2.55) return -1; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature = in; + in *= 100; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure = in; return 0; } -int decode_can_0x684_BMS_M2_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_6_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Atmosphere_Temp); + *out = rval; + return 0; } -int encode_can_0x684_BMS_M2_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_6_Temperature = 0; - if (in > 100) - return -1; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_6_Temperature = in; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Atmosphere_Temp = in; return 0; } -int decode_can_0x684_BMS_M2_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_7_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity); + *out = rval; + return 0; } -int encode_can_0x684_BMS_M2_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_7_Temperature = 0; - if (in > 100) - return -1; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_7_Temperature = in; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity = in; return 0; } -int decode_can_0x684_BMS_M2_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68b_BMS_M6_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_8_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point); + *out = rval; + return 0; } -int encode_can_0x684_BMS_M2_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68b_BMS_M6_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_8_Temperature = 0; - if (in > 100) - return -1; - o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_8_Temperature = in; + o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point = in; return 0; } -int print_can_0x684_BMS_M2_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x68b_BMS_M6_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M2_Cell_5_Temperature = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_6_Temperature = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_6_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_7_Temperature = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_7_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_8_Temperature = (wire: %.0f)\n", (double)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_8_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M6_Pressure = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M6_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M6_Humidity = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M6_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point))); return r; } -static int pack_can_0x685_BMS_M2_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x68c_BMS_M7_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M2_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_9_Temperature)) & 0xffff; + /* BMS_M7_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor)) & 0xff; + i |= x; + /* BMS_M7_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_2_Thermistor)) & 0xff; + x <<= 8; i |= x; - /* BMS_M2_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_10_Temperature)) & 0xffff; + /* BMS_M7_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_3_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M2_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_11_Temperature)) & 0xffff; + /* BMS_M7_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M7_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_5_Thermistor)) & 0xff; x <<= 32; i |= x; - /* BMS_M2_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature)) & 0xffff; + /* BMS_M7_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M7_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_7_Thermistor)) & 0xff; x <<= 48; i |= x; + /* BMS_M7_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x685_BMS_M2_Cell_Temperature_Data_3_tx = 1; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1_tx = 1; return 8; } -static int unpack_can_0x685_BMS_M2_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x68c_BMS_M7_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M2_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_9_Temperature = x; - /* BMS_M2_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_10_Temperature = x; - /* BMS_M2_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_11_Temperature = x; - /* BMS_M2_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature = x; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3_rx = 1; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3_time_stamp_rx = time_stamp; + /* BMS_M7_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor = x; + /* BMS_M7_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_2_Thermistor = x; + /* BMS_M7_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_3_Thermistor = x; + /* BMS_M7_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor = x; + /* BMS_M7_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_5_Thermistor = x; + /* BMS_M7_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_6_Thermistor = x; + /* BMS_M7_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_7_Thermistor = x; + /* BMS_M7_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_8_Thermistor = x; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1_rx = 1; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x685_BMS_M2_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_9_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor); + *out = rval; + return 0; } -int encode_can_0x685_BMS_M2_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_9_Temperature = 0; - if (in > 100) - return -1; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_9_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor = in; return 0; } -int decode_can_0x685_BMS_M2_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_10_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_2_Thermistor); + *out = rval; + return 0; } -int encode_can_0x685_BMS_M2_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_10_Temperature = 0; - if (in > 100) - return -1; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_10_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_2_Thermistor = in; return 0; } -int decode_can_0x685_BMS_M2_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_11_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_3_Thermistor); + *out = rval; + return 0; } -int encode_can_0x685_BMS_M2_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_11_Temperature = 0; - if (in > 100) - return -1; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_11_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_3_Thermistor = in; return 0; } -int decode_can_0x685_BMS_M2_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } -} - -int encode_can_0x685_BMS_M2_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { - assert(o); - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature = 0; - if (in > 100) - return -1; - o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature = in; + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor); + *out = rval; return 0; } -int print_can_0x685_BMS_M2_Cell_Temperature_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M2_Cell_9_Temperature = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_9_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_10_Temperature = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_10_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_11_Temperature = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_11_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M2_Cell_12_Temperature = (wire: %.0f)\n", (double)(o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature))); - return r; -} - -static int pack_can_0x686_BMS_M3_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { - assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M3_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_1_Temperature)) & 0xffff; - i |= x; - /* BMS_M3_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_2_Temperature)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M3_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_3_Temperature)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M3_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_4_Temperature)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x686_BMS_M3_Cell_Temperature_Data_1_tx = 1; - return 8; -} - -static int unpack_can_0x686_BMS_M3_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x68c_BMS_M7_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) - return -1; - /* BMS_M3_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_1_Temperature = x; - /* BMS_M3_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_2_Temperature = x; - /* BMS_M3_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_3_Temperature = x; - /* BMS_M3_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_4_Temperature = x; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1_rx = 1; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1_time_stamp_rx = time_stamp; - return 8; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor = in; + return 0; } -int decode_can_0x686_BMS_M3_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_1_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_5_Thermistor); + *out = rval; + return 0; } -int encode_can_0x686_BMS_M3_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_1_Temperature = 0; - if (in > 100) - return -1; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_1_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_5_Thermistor = in; return 0; } -int decode_can_0x686_BMS_M3_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_2_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_6_Thermistor); + *out = rval; + return 0; } -int encode_can_0x686_BMS_M3_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_2_Temperature = 0; - if (in > 100) - return -1; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_2_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_6_Thermistor = in; return 0; } -int decode_can_0x686_BMS_M3_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_3_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_7_Thermistor); + *out = rval; + return 0; } -int encode_can_0x686_BMS_M3_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_3_Temperature = 0; - if (in > 100) - return -1; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_3_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_7_Thermistor = in; return 0; } -int decode_can_0x686_BMS_M3_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68c_BMS_M7_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); - assert(out); - uint16_t rval = (uint16_t)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_4_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + assert(out); + uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_8_Thermistor); + *out = rval; + return 0; } -int encode_can_0x686_BMS_M3_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68c_BMS_M7_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_4_Temperature = 0; - if (in > 100) - return -1; - o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_4_Temperature = in; + o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_8_Thermistor = in; return 0; } -int print_can_0x686_BMS_M3_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x68c_BMS_M7_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M3_Cell_1_Temperature = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_1_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_2_Temperature = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_2_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_3_Temperature = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_3_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_4_Temperature = (wire: %.0f)\n", (double)(o->can_0x686_BMS_M3_Cell_Temperature_Data_1.BMS_M3_Cell_4_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_8_Thermistor))); return r; } -static int pack_can_0x687_BMS_M3_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x68d_BMS_M7_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M3_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_5_Temperature)) & 0xffff; + /* BMS_M7_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_Thermistor)) & 0xff; i |= x; - /* BMS_M3_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_6_Temperature)) & 0xffff; + /* BMS_M7_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_10_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M7_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_11_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M3_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_7_Temperature)) & 0xffff; + /* BMS_M7_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M7_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure)) & 0xff; x <<= 32; i |= x; - /* BMS_M3_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature)) & 0xffff; + /* BMS_M7_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Atmosphere_Temp)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M7_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity)) & 0xff; x <<= 48; i |= x; + /* BMS_M7_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x687_BMS_M3_Cell_Temperature_Data_2_tx = 1; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2_tx = 1; return 8; } -static int unpack_can_0x687_BMS_M3_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x68d_BMS_M7_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M3_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_5_Temperature = x; - /* BMS_M3_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_6_Temperature = x; - /* BMS_M3_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_7_Temperature = x; - /* BMS_M3_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature = x; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2_rx = 1; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2_time_stamp_rx = time_stamp; + /* BMS_M7_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_Thermistor = x; + /* BMS_M7_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_10_Thermistor = x; + /* BMS_M7_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_11_Thermistor = x; + /* BMS_M7_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor = x; + /* BMS_M7_Pressure: start-bit 32, length 8, endianess intel, scaling 0.01, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure = x; + /* BMS_M7_Atmosphere_Temp: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Atmosphere_Temp = x; + /* BMS_M7_Humidity: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity = x; + /* BMS_M7_Dew_Point: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point = x; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2_rx = 1; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x687_BMS_M3_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_5_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_Thermistor); + *out = rval; + return 0; } -int encode_can_0x687_BMS_M3_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_5_Temperature = 0; - if (in > 100) - return -1; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_5_Temperature = in; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_Thermistor = in; return 0; } -int decode_can_0x687_BMS_M3_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_6_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_10_Thermistor); + *out = rval; + return 0; } -int encode_can_0x687_BMS_M3_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_6_Temperature = 0; - if (in > 100) - return -1; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_6_Temperature = in; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_10_Thermistor = in; return 0; } -int decode_can_0x687_BMS_M3_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_7_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_11_Thermistor); + *out = rval; + return 0; } -int encode_can_0x687_BMS_M3_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_7_Temperature = 0; - if (in > 100) - return -1; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_7_Temperature = in; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_11_Thermistor = in; return 0; } -int decode_can_0x687_BMS_M3_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } -} - -int encode_can_0x687_BMS_M3_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { - assert(o); - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature = 0; - if (in > 100) - return -1; - o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature = in; + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor); + *out = rval; return 0; } -int print_can_0x687_BMS_M3_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M3_Cell_5_Temperature = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_5_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_6_Temperature = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_6_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_7_Temperature = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_7_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_8_Temperature = (wire: %.0f)\n", (double)(o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature))); - return r; -} - -static int pack_can_0x688_BMS_M3_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { - assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M3_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature)) & 0xffff; - i |= x; - /* BMS_M3_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_10_Temperature)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M3_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_11_Temperature)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M3_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_12_Temperature)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x688_BMS_M3_Cell_Temperature_Data_3_tx = 1; - return 8; -} - -static int unpack_can_0x688_BMS_M3_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x68d_BMS_M7_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) - return -1; - /* BMS_M3_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature = x; - /* BMS_M3_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_10_Temperature = x; - /* BMS_M3_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_11_Temperature = x; - /* BMS_M3_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_12_Temperature = x; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3_rx = 1; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3_time_stamp_rx = time_stamp; - return 8; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor = in; + return 0; } -int decode_can_0x688_BMS_M3_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature); - if (rval <= 100) { + double rval = (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure); + rval *= 0.01; + if (rval <= 2.55) { *out = rval; return 0; } else { - *out = (uint16_t)0; + *out = (double)0; return -1; } } -int encode_can_0x688_BMS_M3_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Pressure(can_obj_all_sre_edited_h_t *o, double in) { assert(o); - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature = 0; - if (in > 100) + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure = 0; + if (in > 2.55) return -1; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature = in; + in *= 100; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure = in; return 0; } -int decode_can_0x688_BMS_M3_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_10_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Atmosphere_Temp); + *out = rval; + return 0; } -int encode_can_0x688_BMS_M3_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_10_Temperature = 0; - if (in > 100) - return -1; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_10_Temperature = in; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Atmosphere_Temp = in; return 0; } -int decode_can_0x688_BMS_M3_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_11_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity); + *out = rval; + return 0; } -int encode_can_0x688_BMS_M3_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_11_Temperature = 0; - if (in > 100) - return -1; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_11_Temperature = in; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity = in; return 0; } -int decode_can_0x688_BMS_M3_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68d_BMS_M7_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_12_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point); + *out = rval; + return 0; } -int encode_can_0x688_BMS_M3_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68d_BMS_M7_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_12_Temperature = 0; - if (in > 100) - return -1; - o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_12_Temperature = in; + o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point = in; return 0; } -int print_can_0x688_BMS_M3_Cell_Temperature_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x68d_BMS_M7_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M3_Cell_9_Temperature = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_10_Temperature = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_10_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_11_Temperature = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_11_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M3_Cell_12_Temperature = (wire: %.0f)\n", (double)(o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_12_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M7_Pressure = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure))); + r = print_helper(r, fprintf(output, "BMS_M7_Atmosphere_Temp = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Atmosphere_Temp))); + r = print_helper(r, fprintf(output, "BMS_M7_Humidity = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity))); + r = print_helper(r, fprintf(output, "BMS_M7_Dew_Point = (wire: %.0f)\n", (double)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point))); return r; } -static int pack_can_0x689_BMS_M4_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x68e_BMS_M8_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M4_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_1_Temperature)) & 0xffff; + /* BMS_M8_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_1_Thermistor)) & 0xff; i |= x; - /* BMS_M4_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_2_Temperature)) & 0xffff; + /* BMS_M8_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_2_Thermistor)) & 0xff; + x <<= 8; + i |= x; + /* BMS_M8_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_3_Thermistor)) & 0xff; x <<= 16; i |= x; - /* BMS_M4_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_3_Temperature)) & 0xffff; + /* BMS_M8_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor)) & 0xff; + x <<= 24; + i |= x; + /* BMS_M8_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_5_Thermistor)) & 0xff; x <<= 32; i |= x; - /* BMS_M4_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_Temperature)) & 0xffff; + /* BMS_M8_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_6_Thermistor)) & 0xff; + x <<= 40; + i |= x; + /* BMS_M8_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_7_Thermistor)) & 0xff; x <<= 48; i |= x; + /* BMS_M8_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_8_Thermistor)) & 0xff; + x <<= 56; + i |= x; *data = (i); - o->can_0x689_BMS_M4_Cell_Temperature_Data_1_tx = 1; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1_tx = 1; return 8; } -static int unpack_can_0x689_BMS_M4_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x68e_BMS_M8_Cell_Thermistor_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M4_Cell_1_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_1_Temperature = x; - /* BMS_M4_Cell_2_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_2_Temperature = x; - /* BMS_M4_Cell_3_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_3_Temperature = x; - /* BMS_M4_Cell_4_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_Temperature = x; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1_rx = 1; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1_time_stamp_rx = time_stamp; + /* BMS_M8_Cell_1_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_1_Thermistor = x; + /* BMS_M8_Cell_2_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_2_Thermistor = x; + /* BMS_M8_Cell_3_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_3_Thermistor = x; + /* BMS_M8_Cell_4_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor = x; + /* BMS_M8_Cell_5_Thermistor: start-bit 32, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 32) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_5_Thermistor = x; + /* BMS_M8_Cell_6_Thermistor: start-bit 40, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 40) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_6_Thermistor = x; + /* BMS_M8_Cell_7_Thermistor: start-bit 48, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 48) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_7_Thermistor = x; + /* BMS_M8_Cell_8_Thermistor: start-bit 56, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 56) & 0xff; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_8_Thermistor = x; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1_rx = 1; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x689_BMS_M4_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_1_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_1_Thermistor); + *out = rval; + return 0; } -int encode_can_0x689_BMS_M4_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_1_Temperature = 0; - if (in > 100) - return -1; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_1_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_1_Thermistor = in; return 0; } -int decode_can_0x689_BMS_M4_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_2_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_2_Thermistor); + *out = rval; + return 0; } -int encode_can_0x689_BMS_M4_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_2_Temperature = 0; - if (in > 100) - return -1; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_2_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_2_Thermistor = in; return 0; } -int decode_can_0x689_BMS_M4_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_3_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_3_Thermistor); + *out = rval; + return 0; } -int encode_can_0x689_BMS_M4_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_3_Temperature = 0; - if (in > 100) - return -1; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_3_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_3_Thermistor = in; return 0; } -int decode_can_0x689_BMS_M4_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } -} - -int encode_can_0x689_BMS_M4_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { - assert(o); - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_Temperature = 0; - if (in > 100) - return -1; - o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_Temperature = in; + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor); + *out = rval; return 0; } -int print_can_0x689_BMS_M4_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { - assert(o); - assert(output); - int r = 0; - r = print_helper(r, fprintf(output, "BMS_M4_Cell_1_Temperature = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_1_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_2_Temperature = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_2_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_3_Temperature = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_3_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_4_Temperature = (wire: %.0f)\n", (double)(o->can_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_Temperature))); - return r; -} - -static int pack_can_0x68a_BMS_M4_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { - assert(o); - assert(data); - register uint64_t x; - register uint64_t i = 0; - /* BMS_M4_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_5_Temperature)) & 0xffff; - i |= x; - /* BMS_M4_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_6_Temperature)) & 0xffff; - x <<= 16; - i |= x; - /* BMS_M4_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_7_Temperature)) & 0xffff; - x <<= 32; - i |= x; - /* BMS_M4_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_8_Temperature)) & 0xffff; - x <<= 48; - i |= x; - *data = (i); - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2_tx = 1; - return 8; -} - -static int unpack_can_0x68a_BMS_M4_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +int encode_can_0x68e_BMS_M8_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - assert(dlc <= 8); - register uint64_t x; - register uint64_t i = (data); - if (dlc < 8) - return -1; - /* BMS_M4_Cell_5_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_5_Temperature = x; - /* BMS_M4_Cell_6_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_6_Temperature = x; - /* BMS_M4_Cell_7_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_7_Temperature = x; - /* BMS_M4_Cell_8_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_8_Temperature = x; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2_rx = 1; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2_time_stamp_rx = time_stamp; - return 8; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor = in; + return 0; } -int decode_can_0x68a_BMS_M4_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_5_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_5_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68a_BMS_M4_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_5_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_5_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_5_Thermistor = in; return 0; } -int decode_can_0x68a_BMS_M4_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_6_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_6_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68a_BMS_M4_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_6_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_6_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_6_Thermistor = in; return 0; } -int decode_can_0x68a_BMS_M4_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_7_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_7_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68a_BMS_M4_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_7_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_7_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_7_Thermistor = in; return 0; } -int decode_can_0x68a_BMS_M4_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68e_BMS_M8_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_8_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_8_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68a_BMS_M4_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68e_BMS_M8_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_8_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_8_Temperature = in; + o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_8_Thermistor = in; return 0; } -int print_can_0x68a_BMS_M4_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x68e_BMS_M8_Cell_Thermistor_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M4_Cell_5_Temperature = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_5_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_6_Temperature = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_6_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_7_Temperature = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_7_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_8_Temperature = (wire: %.0f)\n", (double)(o->can_0x68a_BMS_M4_Cell_Temperature_Data_2.BMS_M4_Cell_8_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_1_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_1_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_2_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_2_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_3_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_3_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_4_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_5_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_5_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_6_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_6_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_7_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_7_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_8_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_8_Thermistor))); return r; } -static int pack_can_0x68b_BMS_M4_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) { +static int pack_can_0x68f_BMS_M8_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) { assert(o); assert(data); register uint64_t x; register uint64_t i = 0; - /* BMS_M4_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature)) & 0xffff; + /* BMS_M8_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor)) & 0xff; i |= x; - /* BMS_M4_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature)) & 0xffff; - x <<= 16; + /* BMS_M8_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_10_Thermistor)) & 0xff; + x <<= 8; i |= x; - /* BMS_M4_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature)) & 0xffff; - x <<= 32; + /* BMS_M8_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_11_Thermistor)) & 0xff; + x <<= 16; i |= x; - /* BMS_M4_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = ((uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature)) & 0xffff; - x <<= 48; + /* BMS_M8_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = ((uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_12_Thermistor)) & 0xff; + x <<= 24; i |= x; *data = (i); - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3_tx = 1; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2_tx = 1; return 8; } -static int unpack_can_0x68b_BMS_M4_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { +static int unpack_can_0x68f_BMS_M8_Cell_Thermistor_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp) { assert(o); assert(dlc <= 8); register uint64_t x; register uint64_t i = (data); if (dlc < 8) return -1; - /* BMS_M4_Cell_9_Temperature: start-bit 0, length 16, endianess intel, scaling 1, offset 0 */ - x = i & 0xffff; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature = x; - /* BMS_M4_Cell_10_Temperature: start-bit 16, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 16) & 0xffff; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature = x; - /* BMS_M4_Cell_11_Temperature: start-bit 32, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 32) & 0xffff; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature = x; - /* BMS_M4_Cell_12_Temperature: start-bit 48, length 16, endianess intel, scaling 1, offset 0 */ - x = (i >> 48) & 0xffff; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature = x; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3_rx = 1; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3_time_stamp_rx = time_stamp; + /* BMS_M8_Cell_9_Thermistor: start-bit 0, length 8, endianess intel, scaling 1, offset 0 */ + x = i & 0xff; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor = x; + /* BMS_M8_Cell_10_Thermistor: start-bit 8, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 8) & 0xff; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_10_Thermistor = x; + /* BMS_M8_Cell_11_Thermistor: start-bit 16, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 16) & 0xff; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_11_Thermistor = x; + /* BMS_M8_Cell_12_Thermistor: start-bit 24, length 8, endianess intel, scaling 1, offset 0 */ + x = (i >> 24) & 0xff; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_12_Thermistor = x; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2_rx = 1; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2_time_stamp_rx = time_stamp; return 8; } -int decode_can_0x68b_BMS_M4_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68f_BMS_M8_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68b_BMS_M4_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68f_BMS_M8_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature = in; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor = in; return 0; } -int decode_can_0x68b_BMS_M4_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68f_BMS_M8_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_10_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68b_BMS_M4_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68f_BMS_M8_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature = in; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_10_Thermistor = in; return 0; } -int decode_can_0x68b_BMS_M4_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68f_BMS_M8_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_11_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68b_BMS_M4_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68f_BMS_M8_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature = in; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_11_Thermistor = in; return 0; } -int decode_can_0x68b_BMS_M4_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) { +int decode_can_0x68f_BMS_M8_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) { assert(o); assert(out); - uint16_t rval = (uint16_t)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature); - if (rval <= 100) { - *out = rval; - return 0; - } else { - *out = (uint16_t)0; - return -1; - } + uint8_t rval = (uint8_t)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_12_Thermistor); + *out = rval; + return 0; } -int encode_can_0x68b_BMS_M4_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) { +int encode_can_0x68f_BMS_M8_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) { assert(o); - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature = 0; - if (in > 100) - return -1; - o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature = in; + o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_12_Thermistor = in; return 0; } -int print_can_0x68b_BMS_M4_Cell_Temperature_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) { +int print_can_0x68f_BMS_M8_Cell_Thermistor_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) { assert(o); assert(output); int r = 0; - r = print_helper(r, fprintf(output, "BMS_M4_Cell_9_Temperature = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_10_Temperature = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_11_Temperature = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature))); - r = print_helper(r, fprintf(output, "BMS_M4_Cell_12_Temperature = (wire: %.0f)\n", (double)(o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_9_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_10_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_10_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_11_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_11_Thermistor))); + r = print_helper(r, fprintf(output, "BMS_M8_Cell_12_Thermistor = (wire: %.0f)\n", (double)(o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_12_Thermistor))); return r; } @@ -6107,7 +10830,11 @@ int unpack_message(can_obj_all_sre_edited_h_t *o, const unsigned long id, uint64 assert(dlc <= 8); /* Maximum of 8 bytes in a CAN packet */ switch (id) { case 0x600: return unpack_can_0x600_BMS_Safety_Checker(o, data, dlc, time_stamp); + case 0x604: return unpack_can_0x604_BMS_Balance_Enable(o, data, dlc, time_stamp); + case 0x621: return unpack_can_0x621_BMS_State_of_Charge(o, data, dlc, time_stamp); case 0x622: return unpack_can_0x622_BMS_Cell_Summary(o, data, dlc, time_stamp); + case 0x623: return unpack_can_0x623_BMS_Balance_Status_M1_to_M4(o, data, dlc, time_stamp); + case 0x624: return unpack_can_0x624_BMS_Balance_Status_M5_to_M8(o, data, dlc, time_stamp); case 0x630: return unpack_can_0x630_BMS_M1_Cell_Voltage_Data_1(o, data, dlc, time_stamp); case 0x631: return unpack_can_0x631_BMS_M1_Cell_Voltage_Data_2(o, data, dlc, time_stamp); case 0x632: return unpack_can_0x632_BMS_M1_Cell_Voltage_Data_3(o, data, dlc, time_stamp); @@ -6132,18 +10859,22 @@ int unpack_message(can_obj_all_sre_edited_h_t *o, const unsigned long id, uint64 case 0x645: return unpack_can_0x645_BMS_M8_Cell_Voltage_Data_1(o, data, dlc, time_stamp); case 0x646: return unpack_can_0x646_BMS_M8_Cell_Voltage_Data_2(o, data, dlc, time_stamp); case 0x647: return unpack_can_0x647_BMS_M8_Cell_Voltage_Data_3(o, data, dlc, time_stamp); - case 0x680: return unpack_can_0x680_BMS_M1_Cell_Temperature_Data_1(o, data, dlc, time_stamp); - case 0x681: return unpack_can_0x681_BMS_M1_Cell_Temperature_Data_2(o, data, dlc, time_stamp); - case 0x682: return unpack_can_0x682_BMS_M1_Cell_Temperature_Data_3(o, data, dlc, time_stamp); - case 0x683: return unpack_can_0x683_BMS_M2_Cell_Temperature_Data_1(o, data, dlc, time_stamp); - case 0x684: return unpack_can_0x684_BMS_M2_Cell_Temperature_Data_2(o, data, dlc, time_stamp); - case 0x685: return unpack_can_0x685_BMS_M2_Cell_Temperature_Data_3(o, data, dlc, time_stamp); - case 0x686: return unpack_can_0x686_BMS_M3_Cell_Temperature_Data_1(o, data, dlc, time_stamp); - case 0x687: return unpack_can_0x687_BMS_M3_Cell_Temperature_Data_2(o, data, dlc, time_stamp); - case 0x688: return unpack_can_0x688_BMS_M3_Cell_Temperature_Data_3(o, data, dlc, time_stamp); - case 0x689: return unpack_can_0x689_BMS_M4_Cell_Temperature_Data_1(o, data, dlc, time_stamp); - case 0x68a: return unpack_can_0x68a_BMS_M4_Cell_Temperature_Data_2(o, data, dlc, time_stamp); - case 0x68b: return unpack_can_0x68b_BMS_M4_Cell_Temperature_Data_3(o, data, dlc, time_stamp); + case 0x680: return unpack_can_0x680_BMS_M1_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x681: return unpack_can_0x681_BMS_M1_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x682: return unpack_can_0x682_BMS_M2_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x683: return unpack_can_0x683_BMS_M2_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x684: return unpack_can_0x684_BMS_M3_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x685: return unpack_can_0x685_BMS_M3_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x686: return unpack_can_0x686_BMS_M4_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x687: return unpack_can_0x687_BMS_M4_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x688: return unpack_can_0x688_BMS_M5_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x689: return unpack_can_0x689_BMS_M5_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x68a: return unpack_can_0x68a_BMS_M6_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x68b: return unpack_can_0x68b_BMS_M6_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x68c: return unpack_can_0x68c_BMS_M7_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x68d: return unpack_can_0x68d_BMS_M7_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); + case 0x68e: return unpack_can_0x68e_BMS_M8_Cell_Thermistor_Data_1(o, data, dlc, time_stamp); + case 0x68f: return unpack_can_0x68f_BMS_M8_Cell_Thermistor_Data_2(o, data, dlc, time_stamp); default: break; } return -1; @@ -6154,7 +10885,11 @@ int pack_message(can_obj_all_sre_edited_h_t *o, const unsigned long id, uint64_t assert(id < (1ul << 29)); /* 29-bit CAN ID is largest possible */ switch (id) { case 0x600: return pack_can_0x600_BMS_Safety_Checker(o, data); + case 0x604: return pack_can_0x604_BMS_Balance_Enable(o, data); + case 0x621: return pack_can_0x621_BMS_State_of_Charge(o, data); case 0x622: return pack_can_0x622_BMS_Cell_Summary(o, data); + case 0x623: return pack_can_0x623_BMS_Balance_Status_M1_to_M4(o, data); + case 0x624: return pack_can_0x624_BMS_Balance_Status_M5_to_M8(o, data); case 0x630: return pack_can_0x630_BMS_M1_Cell_Voltage_Data_1(o, data); case 0x631: return pack_can_0x631_BMS_M1_Cell_Voltage_Data_2(o, data); case 0x632: return pack_can_0x632_BMS_M1_Cell_Voltage_Data_3(o, data); @@ -6179,18 +10914,22 @@ int pack_message(can_obj_all_sre_edited_h_t *o, const unsigned long id, uint64_t case 0x645: return pack_can_0x645_BMS_M8_Cell_Voltage_Data_1(o, data); case 0x646: return pack_can_0x646_BMS_M8_Cell_Voltage_Data_2(o, data); case 0x647: return pack_can_0x647_BMS_M8_Cell_Voltage_Data_3(o, data); - case 0x680: return pack_can_0x680_BMS_M1_Cell_Temperature_Data_1(o, data); - case 0x681: return pack_can_0x681_BMS_M1_Cell_Temperature_Data_2(o, data); - case 0x682: return pack_can_0x682_BMS_M1_Cell_Temperature_Data_3(o, data); - case 0x683: return pack_can_0x683_BMS_M2_Cell_Temperature_Data_1(o, data); - case 0x684: return pack_can_0x684_BMS_M2_Cell_Temperature_Data_2(o, data); - case 0x685: return pack_can_0x685_BMS_M2_Cell_Temperature_Data_3(o, data); - case 0x686: return pack_can_0x686_BMS_M3_Cell_Temperature_Data_1(o, data); - case 0x687: return pack_can_0x687_BMS_M3_Cell_Temperature_Data_2(o, data); - case 0x688: return pack_can_0x688_BMS_M3_Cell_Temperature_Data_3(o, data); - case 0x689: return pack_can_0x689_BMS_M4_Cell_Temperature_Data_1(o, data); - case 0x68a: return pack_can_0x68a_BMS_M4_Cell_Temperature_Data_2(o, data); - case 0x68b: return pack_can_0x68b_BMS_M4_Cell_Temperature_Data_3(o, data); + case 0x680: return pack_can_0x680_BMS_M1_Cell_Thermistor_Data_1(o, data); + case 0x681: return pack_can_0x681_BMS_M1_Cell_Thermistor_Data_2(o, data); + case 0x682: return pack_can_0x682_BMS_M2_Cell_Thermistor_Data_1(o, data); + case 0x683: return pack_can_0x683_BMS_M2_Cell_Thermistor_Data_2(o, data); + case 0x684: return pack_can_0x684_BMS_M3_Cell_Thermistor_Data_1(o, data); + case 0x685: return pack_can_0x685_BMS_M3_Cell_Thermistor_Data_2(o, data); + case 0x686: return pack_can_0x686_BMS_M4_Cell_Thermistor_Data_1(o, data); + case 0x687: return pack_can_0x687_BMS_M4_Cell_Thermistor_Data_2(o, data); + case 0x688: return pack_can_0x688_BMS_M5_Cell_Thermistor_Data_1(o, data); + case 0x689: return pack_can_0x689_BMS_M5_Cell_Thermistor_Data_2(o, data); + case 0x68a: return pack_can_0x68a_BMS_M6_Cell_Thermistor_Data_1(o, data); + case 0x68b: return pack_can_0x68b_BMS_M6_Cell_Thermistor_Data_2(o, data); + case 0x68c: return pack_can_0x68c_BMS_M7_Cell_Thermistor_Data_1(o, data); + case 0x68d: return pack_can_0x68d_BMS_M7_Cell_Thermistor_Data_2(o, data); + case 0x68e: return pack_can_0x68e_BMS_M8_Cell_Thermistor_Data_1(o, data); + case 0x68f: return pack_can_0x68f_BMS_M8_Cell_Thermistor_Data_2(o, data); default: break; } return -1; @@ -6202,7 +10941,11 @@ int print_message(const can_obj_all_sre_edited_h_t *o, const unsigned long id, F assert(output); switch (id) { case 0x600: return print_can_0x600_BMS_Safety_Checker(o, output); + case 0x604: return print_can_0x604_BMS_Balance_Enable(o, output); + case 0x621: return print_can_0x621_BMS_State_of_Charge(o, output); case 0x622: return print_can_0x622_BMS_Cell_Summary(o, output); + case 0x623: return print_can_0x623_BMS_Balance_Status_M1_to_M4(o, output); + case 0x624: return print_can_0x624_BMS_Balance_Status_M5_to_M8(o, output); case 0x630: return print_can_0x630_BMS_M1_Cell_Voltage_Data_1(o, output); case 0x631: return print_can_0x631_BMS_M1_Cell_Voltage_Data_2(o, output); case 0x632: return print_can_0x632_BMS_M1_Cell_Voltage_Data_3(o, output); @@ -6227,18 +10970,22 @@ int print_message(const can_obj_all_sre_edited_h_t *o, const unsigned long id, F case 0x645: return print_can_0x645_BMS_M8_Cell_Voltage_Data_1(o, output); case 0x646: return print_can_0x646_BMS_M8_Cell_Voltage_Data_2(o, output); case 0x647: return print_can_0x647_BMS_M8_Cell_Voltage_Data_3(o, output); - case 0x680: return print_can_0x680_BMS_M1_Cell_Temperature_Data_1(o, output); - case 0x681: return print_can_0x681_BMS_M1_Cell_Temperature_Data_2(o, output); - case 0x682: return print_can_0x682_BMS_M1_Cell_Temperature_Data_3(o, output); - case 0x683: return print_can_0x683_BMS_M2_Cell_Temperature_Data_1(o, output); - case 0x684: return print_can_0x684_BMS_M2_Cell_Temperature_Data_2(o, output); - case 0x685: return print_can_0x685_BMS_M2_Cell_Temperature_Data_3(o, output); - case 0x686: return print_can_0x686_BMS_M3_Cell_Temperature_Data_1(o, output); - case 0x687: return print_can_0x687_BMS_M3_Cell_Temperature_Data_2(o, output); - case 0x688: return print_can_0x688_BMS_M3_Cell_Temperature_Data_3(o, output); - case 0x689: return print_can_0x689_BMS_M4_Cell_Temperature_Data_1(o, output); - case 0x68a: return print_can_0x68a_BMS_M4_Cell_Temperature_Data_2(o, output); - case 0x68b: return print_can_0x68b_BMS_M4_Cell_Temperature_Data_3(o, output); + case 0x680: return print_can_0x680_BMS_M1_Cell_Thermistor_Data_1(o, output); + case 0x681: return print_can_0x681_BMS_M1_Cell_Thermistor_Data_2(o, output); + case 0x682: return print_can_0x682_BMS_M2_Cell_Thermistor_Data_1(o, output); + case 0x683: return print_can_0x683_BMS_M2_Cell_Thermistor_Data_2(o, output); + case 0x684: return print_can_0x684_BMS_M3_Cell_Thermistor_Data_1(o, output); + case 0x685: return print_can_0x685_BMS_M3_Cell_Thermistor_Data_2(o, output); + case 0x686: return print_can_0x686_BMS_M4_Cell_Thermistor_Data_1(o, output); + case 0x687: return print_can_0x687_BMS_M4_Cell_Thermistor_Data_2(o, output); + case 0x688: return print_can_0x688_BMS_M5_Cell_Thermistor_Data_1(o, output); + case 0x689: return print_can_0x689_BMS_M5_Cell_Thermistor_Data_2(o, output); + case 0x68a: return print_can_0x68a_BMS_M6_Cell_Thermistor_Data_1(o, output); + case 0x68b: return print_can_0x68b_BMS_M6_Cell_Thermistor_Data_2(o, output); + case 0x68c: return print_can_0x68c_BMS_M7_Cell_Thermistor_Data_1(o, output); + case 0x68d: return print_can_0x68d_BMS_M7_Cell_Thermistor_Data_2(o, output); + case 0x68e: return print_can_0x68e_BMS_M8_Cell_Thermistor_Data_1(o, output); + case 0x68f: return print_can_0x68f_BMS_M8_Cell_Thermistor_Data_2(o, output); default: break; } return -1; diff --git a/all_SRE_edited.dbc b/all_SRE_edited.dbc index 62d9369..1251b97 100644 --- a/all_SRE_edited.dbc +++ b/all_SRE_edited.dbc @@ -1,344 +1,463 @@ -VERSION "HIPBNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY/4/%%%/4/'%**4YYY///" - -NS_ : - NS_DESC_ - CM_ - BA_DEF_ - BA_ - VAL_ - CAT_DEF_ - CAT_ - FILTER - BA_DEF_DEF_ - EV_DATA_ - ENVVAR_DATA_ - SGTYPE_ - SGTYPE_VAL_ - BA_DEF_SGTYPE_ - BA_SGTYPE_ - SIG_TYPE_REF_ - VAL_TABLE_ - SIG_GROUP_ - SIG_VALTYPE_ - SIGTYPE_VALTYPE_ - -BS_: - -BU_: CUSTOM_BMS VCU - - -BO_ 1536 BMS_Safety_Checker: 8 CUSTOM_BMS - SG_ SPIError : 56|8@1+ (1,0) [0|256] "" Vector__XXX - SG_ Pack_Voltage : 24|32@1+ (0.0001,0) [0|1000] "" Vector__XXX - SG_ Balancing_State : 23|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Pack_High_Volt_Warning : 15|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Pack_Low_Volt_Warning : 14|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_Low_Volt_Warning : 13|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_High_Volt_Warning : 12|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_High_Temp_Warning : 11|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_Low_Temp_Warning : 10|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_Volt_Imbalance_Warning : 9|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Pack_High_Volt_Fault : 7|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Pack_Low_Volt_Fault : 6|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_Low_Volt_Fault : 5|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_High_Volt_Fault : 4|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_High_Temp_Fault : 3|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Cell_Volt_Imbalance_Fault : 2|1@1+ (1,0) [0|1] "" Vector__XXX - SG_ Balacing_End_Fault : 1|1@1+ (1,0) [0|1] "" Vector__XXX - -BO_ 1570 BMS_Cell_Summary: 8 CUSTOM_BMS - SG_ Lowest_Cell_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ Higest_Cell_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ Lowest_Cell_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ Highest_Cell_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1584 BMS_M1_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M1_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1585 BMS_M1_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M1_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1586 BMS_M1_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M1_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M1_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1587 BMS_M2_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M2_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1588 BMS_M2_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M2_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1589 BMS_M2_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M2_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M2_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1590 BMS_M3_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M3_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1591 BMS_M3_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M3_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1592 BMS_M3_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M3_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M3_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1593 BMS_M4_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M4_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1594 BMS_M4_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M4_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1595 BMS_M4_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M4_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M4_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1596 BMS_M5_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M5_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1597 BMS_M5_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M5_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1598 BMS_M5_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M5_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M5_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1599 BMS_M6_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M6_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1600 BMS_M6_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M6_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1601 BMS_M6_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M6_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M6_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1602 BMS_M7_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M7_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1603 BMS_M7_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M7_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1604 BMS_M7_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M7_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M7_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1605 BMS_M8_Cell_Voltage_Data_1: 8 CUSTOM_BMS - SG_ BMS_M8_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1606 BMS_M8_Cell_Voltage_Data_2: 8 CUSTOM_BMS - SG_ BMS_M8_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1607 BMS_M8_Cell_Voltage_Data_3: 8 CUSTOM_BMS - SG_ BMS_M8_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - SG_ BMS_M8_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|5] "V" Vector__XXX - -BO_ 1664 BMS_M1_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M1_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1665 BMS_M1_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M1_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1666 BMS_M1_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M1_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M1_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1667 BMS_M2_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M2_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1668 BMS_M2_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M2_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1669 BMS_M2_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M2_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M2_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1670 BMS_M3_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M3_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1671 BMS_M3_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M3_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1672 BMS_M3_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M3_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M3_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1673 BMS_M4_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M4_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1674 BMS_M4_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M4_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1675 BMS_M4_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M4_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M4_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1676 BMS_M5_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M5_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1677 BMS_M5_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M5_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1678 BMS_M5_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M5_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M5_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1679 BMS_M6_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M6_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1680 BMS_M6_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M6_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1681 BMS_M6_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M6_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M6_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1682 BMS_M7_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M7_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1683 BMS_M7_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M7_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1684 BMS_M7_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M7_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M7_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1685 BMS_M8_Cell_Temperature_Data_1: 8 CUSTOM_BMS - SG_ BMS_M8_Cell_4_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_3_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_2_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_1_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1686 BMS_M8_Cell_Temperature_Data_2: 8 CUSTOM_BMS - SG_ BMS_M8_Cell_8_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_7_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_6_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_5_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - -BO_ 1687 BMS_M8_Cell_Temperature_Data_3: 8 CUSTOM_BMS - SG_ BMS_M8_Cell_12_Temperature : 48|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_11_Temperature : 32|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_10_Temperature : 16|16@1+ (1,0) [0|100] "C" Vector__XXX - SG_ BMS_M8_Cell_9_Temperature : 0|16@1+ (1,0) [0|100] "C" Vector__XXX - - - +VERSION "HIPBNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY/4/%%%/4/'%**4YYY///" + +NS_ : + NS_DESC_ + CM_ + BA_DEF_ + BA_ + VAL_ + CAT_DEF_ + CAT_ + FILTER + BA_DEF_DEF_ + EV_DATA_ + ENVVAR_DATA_ + SGTYPE_ + SGTYPE_VAL_ + BA_DEF_SGTYPE_ + BA_SGTYPE_ + SIG_TYPE_REF_ + VAL_TABLE_ + SIG_GROUP_ + SIG_VALTYPE_ + SIGTYPE_VALTYPE_ + +BS_: + +BU_: CUSTOM_BMS VCU + + +BO_ 1536 BMS_Safety_Checker: 8 Custom_BMS +SG_ BMS_Cell_High_Temp_Warning : 2|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_Volt_Imbalance_Warning : 3|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_Low_Volt_Warning : 4|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_High_Volt_Warning : 5|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Pack_Low_Volt_Warning : 6|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Pack_High_Volt_Warning : 7|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_High_Temp_Fault : 10|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_Volt_Imbalance_Fault : 11|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_Low_Volt_Fault : 12|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_High_Volt_Fault : 13|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Pack_Low_Volt_Fault : 14|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Pack_High_Volt_Fault : 15|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_Cell_Max_Min_Difference : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_HVsens_Pack_Voltage : 32|16@1+ (0.01,0) [0|655.35] "V" Custom_BMS +SG_ BMS_Sum_Pack_Voltage : 48|16@1+ (0.01,0) [0|655.35] "V" Custom_BMS + +BO_ 1540 BMS_Balance_Enable: 1 Custom_BMS +SG_ BMS_Balance_Enable : 0|1@1- (1,0) [0|1] " " Custom_BMS + +BO_ 1569 BMS_State_of_Charge: 7 Custom_BMS +SG_ BMS_Capacity : 0|16@1+ (1,0) [0|65535] "mAh" Custom_BMS +SG_ BMS_Percent : 16|8@1+ (1,0) [0|255] "Percent" Custom_BMS +SG_ BMS_Current : 24|32@1+ (1,0) [0|4.29497e+009] "mA" Custom_BMS + +BO_ 1571 BMS_Balance_Status_M1_to_M4: 8 Custom_BMS +SG_ BMS_M1_Cell_1 : 0|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_2 : 1|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_3 : 2|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_4 : 3|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_5 : 4|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_6 : 5|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_7 : 6|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_8 : 7|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_9 : 8|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_10 : 9|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_11 : 10|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M1_Cell_12 : 11|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_1 : 16|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_2 : 17|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_3 : 18|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_4 : 19|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_5 : 20|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_6 : 21|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_7 : 22|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_8 : 23|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_9 : 24|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_10 : 25|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_11 : 26|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M2_Cell_12 : 27|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_1 : 32|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_2 : 33|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_3 : 34|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_4 : 35|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_5 : 36|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_6 : 37|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_7 : 38|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_8 : 39|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_9 : 40|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_10 : 41|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_11 : 42|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M3_Cell_12 : 43|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_1 : 48|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_2 : 49|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_3 : 50|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_4 : 51|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_5 : 52|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_6 : 53|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_7 : 54|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_8 : 55|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_9 : 56|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_10 : 57|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_11 : 58|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M4_Cell_12 : 59|1@1- (1,0) [0|1] " " Custom_BMS + +BO_ 1572 BMS_Balance_Status_M5_to_M8: 8 Custom_BMS +SG_ BMS_M5_Cell_1 : 0|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_2 : 1|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_3 : 2|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_4 : 3|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_5 : 4|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_6 : 5|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_7 : 6|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_8 : 7|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_9 : 8|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_10 : 9|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_11 : 10|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M5_Cell_12 : 11|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_1 : 16|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_2 : 17|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_3 : 18|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_4 : 19|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_5 : 20|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_6 : 21|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_7 : 22|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_8 : 23|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_9 : 24|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_10 : 25|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_11 : 26|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M6_Cell_12 : 27|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_1 : 32|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_2 : 33|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_3 : 34|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_4 : 35|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_5 : 36|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_6 : 37|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_7 : 38|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_8 : 39|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_9 : 40|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_10 : 41|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_11 : 42|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M7_Cell_12 : 43|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_1 : 48|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_2 : 49|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_3 : 50|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_4 : 51|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_5 : 52|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_6 : 53|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_7 : 54|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_8 : 55|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_9 : 56|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_10 : 57|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_11 : 58|1@1- (1,0) [0|1] " " Custom_BMS +SG_ BMS_M8_Cell_12 : 59|1@1- (1,0) [0|1] " " Custom_BMS + +BO_ 1570 BMS_Cell_Summary: 6 Custom_BMS +SG_ BMS_Highest_Cell_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_Lowest_Cell_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_Higest_Cell_Temperature : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_Lowest_Cell_Temperature : 40|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1584 BMS_M1_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M1_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1585 BMS_M1_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M1_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1586 BMS_M1_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M1_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M1_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1587 BMS_M2_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M2_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1588 BMS_M2_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M2_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1589 BMS_M2_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M2_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M2_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1590 BMS_M3_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M3_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1591 BMS_M3_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M3_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1592 BMS_M3_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M3_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M3_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1593 BMS_M4_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M4_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1594 BMS_M4_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M4_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1595 BMS_M4_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M4_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M4_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1596 BMS_M5_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M5_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1597 BMS_M5_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M5_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1598 BMS_M5_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M5_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M5_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1599 BMS_M6_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M6_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1600 BMS_M6_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M6_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1601 BMS_M6_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M6_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M6_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1602 BMS_M7_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M7_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1603 BMS_M7_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M7_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1604 BMS_M7_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M7_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M7_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1605 BMS_M8_Cell_Voltage_Data_1: 8 Custom_BMS +SG_ BMS_M8_Cell_1_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_2_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_3_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_4_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1606 BMS_M8_Cell_Voltage_Data_2: 8 Custom_BMS +SG_ BMS_M8_Cell_5_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_6_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_7_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_8_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1607 BMS_M8_Cell_Voltage_Data_3: 8 Custom_BMS +SG_ BMS_M8_Cell_9_Voltage : 0|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_10_Voltage : 16|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_11_Voltage : 32|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS +SG_ BMS_M8_Cell_12_Voltage : 48|16@1+ (0.0001,0) [0|6.5535] "V" Custom_BMS + +BO_ 1664 BMS_M1_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M1_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1665 BMS_M1_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M1_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M1_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M1_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M1_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1666 BMS_M2_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M2_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1667 BMS_M2_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M2_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M2_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M2_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M2_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1668 BMS_M3_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M3_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1669 BMS_M3_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M3_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M3_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M3_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M3_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1670 BMS_M4_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M4_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1671 BMS_M4_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M4_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M4_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M4_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M4_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1672 BMS_M5_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M5_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1673 BMS_M5_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M5_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M5_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M5_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M5_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1674 BMS_M6_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M6_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1675 BMS_M6_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M6_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M6_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M6_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M6_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1676 BMS_M7_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M7_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1677 BMS_M7_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M7_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Pressure : 32|8@1+ (0.01,0) [0|2.55] "PSI" Custom_BMS +SG_ BMS_M7_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M7_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M7_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1678 BMS_M8_Cell_Thermistor_Data_1: 8 Custom_BMS +SG_ BMS_M8_Cell_1_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_2_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_3_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_4_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_5_Thermistor : 32|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_6_Thermistor : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_7_Thermistor : 48|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_8_Thermistor : 56|8@1+ (1,0) [0|255] "C" Custom_BMS + +BO_ 1679 BMS_M8_Cell_Thermistor_Data_2: 8 Custom_BMS +SG_ BMS_M8_Cell_9_Thermistor : 0|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_10_Thermistor : 8|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_11_Thermistor : 16|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Cell_12_Thermistor : 24|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Pressure : 32|8@1+ (0.01,0) [0|2.55 ]"PSI" Custom_BMS +SG_ BMS_M8_Atmosphere_Temp : 40|8@1+ (1,0) [0|255] "C" Custom_BMS +SG_ BMS_M8_Humidity : 48|8@1+ (1,0) [0|255] "%" Custom_BMS +SG_ BMS_M8_Dew_Point : 56|8@1+ (1,0) [0|255] "C" Custom_BMS diff --git a/all_SRE_edited.h b/all_SRE_edited.h index 549f845..ce1a224 100644 --- a/all_SRE_edited.h +++ b/all_SRE_edited.h @@ -33,32 +33,142 @@ typedef enum { #endif typedef PREPACK struct { - uint32_t Pack_Voltage; /* scaling 0.0, offset 0.0, units none */ - uint8_t SPIError; /* scaling 1.0, offset 0.0, units none */ - uint8_t Balacing_End_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_Volt_Imbalance_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_High_Temp_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_High_Volt_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_Low_Volt_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Pack_Low_Volt_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Pack_High_Volt_Fault; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_Volt_Imbalance_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_Low_Temp_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_High_Temp_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_High_Volt_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Cell_Low_Volt_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Pack_Low_Volt_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Pack_High_Volt_Warning; /* scaling 1.0, offset 0.0, units none */ - uint8_t Balancing_State; /* scaling 1.0, offset 0.0, units none */ + uint16_t BMS_Cell_Max_Min_Difference; /* scaling 0.0, offset 0.0, units V */ + uint16_t BMS_HVsens_Pack_Voltage; /* scaling 0.0, offset 0.0, units V */ + uint16_t BMS_Sum_Pack_Voltage; /* scaling 0.0, offset 0.0, units V */ + int8_t BMS_Cell_High_Temp_Warning; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_Volt_Imbalance_Warning; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_Low_Volt_Warning; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_High_Volt_Warning; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Pack_Low_Volt_Warning; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Pack_High_Volt_Warning; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_High_Temp_Fault; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_Volt_Imbalance_Fault; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_Low_Volt_Fault; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Cell_High_Volt_Fault; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Pack_Low_Volt_Fault; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_Pack_High_Volt_Fault; /* scaling 1.0, offset 0.0, units */ } POSTPACK can_0x600_BMS_Safety_Checker_t; typedef PREPACK struct { - uint16_t Highest_Cell_Voltage; /* scaling 0.0, offset 0.0, units V */ - uint16_t Lowest_Cell_Voltage; /* scaling 0.0, offset 0.0, units V */ - uint16_t Higest_Cell_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t Lowest_Cell_Temperature; /* scaling 1.0, offset 0.0, units C */ + int8_t BMS_Balance_Enable; /* scaling 1.0, offset 0.0, units */ +} POSTPACK can_0x604_BMS_Balance_Enable_t; + +typedef PREPACK struct { + uint32_t BMS_Current; /* scaling 1.0, offset 0.0, units mA */ + uint16_t BMS_Capacity; /* scaling 1.0, offset 0.0, units mAh */ + uint8_t BMS_Percent; /* scaling 1.0, offset 0.0, units Percent */ +} POSTPACK can_0x621_BMS_State_of_Charge_t; + +typedef PREPACK struct { + uint16_t BMS_Highest_Cell_Voltage; /* scaling 0.0, offset 0.0, units V */ + uint16_t BMS_Lowest_Cell_Voltage; /* scaling 0.0, offset 0.0, units V */ + uint8_t BMS_Higest_Cell_Temperature; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_Lowest_Cell_Temperature; /* scaling 1.0, offset 0.0, units C */ } POSTPACK can_0x622_BMS_Cell_Summary_t; +typedef PREPACK struct { + int8_t BMS_M1_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M1_Cell_12; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M2_Cell_12; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M3_Cell_12; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M4_Cell_12; /* scaling 1.0, offset 0.0, units */ +} POSTPACK can_0x623_BMS_Balance_Status_M1_to_M4_t; + +typedef PREPACK struct { + int8_t BMS_M5_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M5_Cell_12; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M6_Cell_12; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M7_Cell_12; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_1; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_2; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_3; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_4; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_5; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_6; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_7; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_8; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_9; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_10; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_11; /* scaling 1.0, offset 0.0, units */ + int8_t BMS_M8_Cell_12; /* scaling 1.0, offset 0.0, units */ +} POSTPACK can_0x624_BMS_Balance_Status_M5_to_M8_t; + typedef PREPACK struct { uint16_t BMS_M1_Cell_1_Voltage; /* scaling 0.0, offset 0.0, units V */ uint16_t BMS_M1_Cell_2_Voltage; /* scaling 0.0, offset 0.0, units V */ @@ -228,92 +338,184 @@ typedef PREPACK struct { } POSTPACK can_0x647_BMS_M8_Cell_Voltage_Data_3_t; typedef PREPACK struct { - uint16_t BMS_M1_Cell_1_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_2_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_3_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_4_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x680_BMS_M1_Cell_Temperature_Data_1_t; + uint8_t BMS_M1_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x680_BMS_M1_Cell_Thermistor_Data_1_t; + +typedef PREPACK struct { + uint8_t BMS_M1_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M1_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M1_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M1_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x681_BMS_M1_Cell_Thermistor_Data_2_t; + +typedef PREPACK struct { + uint8_t BMS_M2_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x682_BMS_M2_Cell_Thermistor_Data_1_t; + +typedef PREPACK struct { + uint8_t BMS_M2_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M2_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M2_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M2_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x683_BMS_M2_Cell_Thermistor_Data_2_t; + +typedef PREPACK struct { + uint8_t BMS_M3_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x684_BMS_M3_Cell_Thermistor_Data_1_t; typedef PREPACK struct { - uint16_t BMS_M1_Cell_5_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_6_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_7_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_8_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x681_BMS_M1_Cell_Temperature_Data_2_t; + uint8_t BMS_M3_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M3_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M3_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M3_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x685_BMS_M3_Cell_Thermistor_Data_2_t; typedef PREPACK struct { - uint16_t BMS_M1_Cell_9_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_10_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_11_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M1_Cell_12_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x682_BMS_M1_Cell_Temperature_Data_3_t; + uint8_t BMS_M4_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x686_BMS_M4_Cell_Thermistor_Data_1_t; typedef PREPACK struct { - uint16_t BMS_M2_Cell_1_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_2_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_3_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_4_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x683_BMS_M2_Cell_Temperature_Data_1_t; + uint8_t BMS_M4_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M4_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M4_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M4_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x687_BMS_M4_Cell_Thermistor_Data_2_t; typedef PREPACK struct { - uint16_t BMS_M2_Cell_5_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_6_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_7_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_8_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x684_BMS_M2_Cell_Temperature_Data_2_t; + uint8_t BMS_M5_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x688_BMS_M5_Cell_Thermistor_Data_1_t; typedef PREPACK struct { - uint16_t BMS_M2_Cell_9_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_10_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_11_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M2_Cell_12_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x685_BMS_M2_Cell_Temperature_Data_3_t; + uint8_t BMS_M5_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M5_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M5_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M5_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x689_BMS_M5_Cell_Thermistor_Data_2_t; typedef PREPACK struct { - uint16_t BMS_M3_Cell_1_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_2_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_3_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_4_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x686_BMS_M3_Cell_Temperature_Data_1_t; + uint8_t BMS_M6_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x68a_BMS_M6_Cell_Thermistor_Data_1_t; typedef PREPACK struct { - uint16_t BMS_M3_Cell_5_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_6_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_7_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_8_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x687_BMS_M3_Cell_Temperature_Data_2_t; + uint8_t BMS_M6_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M6_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M6_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M6_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x68b_BMS_M6_Cell_Thermistor_Data_2_t; typedef PREPACK struct { - uint16_t BMS_M3_Cell_9_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_10_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_11_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M3_Cell_12_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x688_BMS_M3_Cell_Temperature_Data_3_t; + uint8_t BMS_M7_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x68c_BMS_M7_Cell_Thermistor_Data_1_t; typedef PREPACK struct { - uint16_t BMS_M4_Cell_1_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_2_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_3_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_4_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x689_BMS_M4_Cell_Temperature_Data_1_t; + uint8_t BMS_M7_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Pressure; /* scaling 0.0, offset 0.0, units PSI */ + uint8_t BMS_M7_Atmosphere_Temp; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M7_Humidity; /* scaling 1.0, offset 0.0, units % */ + uint8_t BMS_M7_Dew_Point; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x68d_BMS_M7_Cell_Thermistor_Data_2_t; typedef PREPACK struct { - uint16_t BMS_M4_Cell_5_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_6_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_7_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_8_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x68a_BMS_M4_Cell_Temperature_Data_2_t; + uint8_t BMS_M8_Cell_1_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_2_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_3_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_4_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_5_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_6_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_7_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_8_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x68e_BMS_M8_Cell_Thermistor_Data_1_t; typedef PREPACK struct { - uint16_t BMS_M4_Cell_9_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_10_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_11_Temperature; /* scaling 1.0, offset 0.0, units C */ - uint16_t BMS_M4_Cell_12_Temperature; /* scaling 1.0, offset 0.0, units C */ -} POSTPACK can_0x68b_BMS_M4_Cell_Temperature_Data_3_t; + uint8_t BMS_M8_Cell_9_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_10_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_11_Thermistor; /* scaling 1.0, offset 0.0, units C */ + uint8_t BMS_M8_Cell_12_Thermistor; /* scaling 1.0, offset 0.0, units C */ +} POSTPACK can_0x68f_BMS_M8_Cell_Thermistor_Data_2_t; typedef PREPACK struct { dbcc_time_stamp_t can_0x600_BMS_Safety_Checker_time_stamp_rx; + dbcc_time_stamp_t can_0x604_BMS_Balance_Enable_time_stamp_rx; + dbcc_time_stamp_t can_0x621_BMS_State_of_Charge_time_stamp_rx; dbcc_time_stamp_t can_0x622_BMS_Cell_Summary_time_stamp_rx; + dbcc_time_stamp_t can_0x623_BMS_Balance_Status_M1_to_M4_time_stamp_rx; + dbcc_time_stamp_t can_0x624_BMS_Balance_Status_M5_to_M8_time_stamp_rx; dbcc_time_stamp_t can_0x630_BMS_M1_Cell_Voltage_Data_1_time_stamp_rx; dbcc_time_stamp_t can_0x631_BMS_M1_Cell_Voltage_Data_2_time_stamp_rx; dbcc_time_stamp_t can_0x632_BMS_M1_Cell_Voltage_Data_3_time_stamp_rx; @@ -338,24 +540,40 @@ typedef PREPACK struct { dbcc_time_stamp_t can_0x645_BMS_M8_Cell_Voltage_Data_1_time_stamp_rx; dbcc_time_stamp_t can_0x646_BMS_M8_Cell_Voltage_Data_2_time_stamp_rx; dbcc_time_stamp_t can_0x647_BMS_M8_Cell_Voltage_Data_3_time_stamp_rx; - dbcc_time_stamp_t can_0x680_BMS_M1_Cell_Temperature_Data_1_time_stamp_rx; - dbcc_time_stamp_t can_0x681_BMS_M1_Cell_Temperature_Data_2_time_stamp_rx; - dbcc_time_stamp_t can_0x682_BMS_M1_Cell_Temperature_Data_3_time_stamp_rx; - dbcc_time_stamp_t can_0x683_BMS_M2_Cell_Temperature_Data_1_time_stamp_rx; - dbcc_time_stamp_t can_0x684_BMS_M2_Cell_Temperature_Data_2_time_stamp_rx; - dbcc_time_stamp_t can_0x685_BMS_M2_Cell_Temperature_Data_3_time_stamp_rx; - dbcc_time_stamp_t can_0x686_BMS_M3_Cell_Temperature_Data_1_time_stamp_rx; - dbcc_time_stamp_t can_0x687_BMS_M3_Cell_Temperature_Data_2_time_stamp_rx; - dbcc_time_stamp_t can_0x688_BMS_M3_Cell_Temperature_Data_3_time_stamp_rx; - dbcc_time_stamp_t can_0x689_BMS_M4_Cell_Temperature_Data_1_time_stamp_rx; - dbcc_time_stamp_t can_0x68a_BMS_M4_Cell_Temperature_Data_2_time_stamp_rx; - dbcc_time_stamp_t can_0x68b_BMS_M4_Cell_Temperature_Data_3_time_stamp_rx; + dbcc_time_stamp_t can_0x680_BMS_M1_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x681_BMS_M1_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x682_BMS_M2_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x683_BMS_M2_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x684_BMS_M3_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x685_BMS_M3_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x686_BMS_M4_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x687_BMS_M4_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x688_BMS_M5_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x689_BMS_M5_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x68a_BMS_M6_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x68b_BMS_M6_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x68c_BMS_M7_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x68d_BMS_M7_Cell_Thermistor_Data_2_time_stamp_rx; + dbcc_time_stamp_t can_0x68e_BMS_M8_Cell_Thermistor_Data_1_time_stamp_rx; + dbcc_time_stamp_t can_0x68f_BMS_M8_Cell_Thermistor_Data_2_time_stamp_rx; unsigned can_0x600_BMS_Safety_Checker_status : 2; unsigned can_0x600_BMS_Safety_Checker_tx : 1; unsigned can_0x600_BMS_Safety_Checker_rx : 1; + unsigned can_0x604_BMS_Balance_Enable_status : 2; + unsigned can_0x604_BMS_Balance_Enable_tx : 1; + unsigned can_0x604_BMS_Balance_Enable_rx : 1; + unsigned can_0x621_BMS_State_of_Charge_status : 2; + unsigned can_0x621_BMS_State_of_Charge_tx : 1; + unsigned can_0x621_BMS_State_of_Charge_rx : 1; unsigned can_0x622_BMS_Cell_Summary_status : 2; unsigned can_0x622_BMS_Cell_Summary_tx : 1; unsigned can_0x622_BMS_Cell_Summary_rx : 1; + unsigned can_0x623_BMS_Balance_Status_M1_to_M4_status : 2; + unsigned can_0x623_BMS_Balance_Status_M1_to_M4_tx : 1; + unsigned can_0x623_BMS_Balance_Status_M1_to_M4_rx : 1; + unsigned can_0x624_BMS_Balance_Status_M5_to_M8_status : 2; + unsigned can_0x624_BMS_Balance_Status_M5_to_M8_tx : 1; + unsigned can_0x624_BMS_Balance_Status_M5_to_M8_rx : 1; unsigned can_0x630_BMS_M1_Cell_Voltage_Data_1_status : 2; unsigned can_0x630_BMS_M1_Cell_Voltage_Data_1_tx : 1; unsigned can_0x630_BMS_M1_Cell_Voltage_Data_1_rx : 1; @@ -428,44 +646,60 @@ typedef PREPACK struct { unsigned can_0x647_BMS_M8_Cell_Voltage_Data_3_status : 2; unsigned can_0x647_BMS_M8_Cell_Voltage_Data_3_tx : 1; unsigned can_0x647_BMS_M8_Cell_Voltage_Data_3_rx : 1; - unsigned can_0x680_BMS_M1_Cell_Temperature_Data_1_status : 2; - unsigned can_0x680_BMS_M1_Cell_Temperature_Data_1_tx : 1; - unsigned can_0x680_BMS_M1_Cell_Temperature_Data_1_rx : 1; - unsigned can_0x681_BMS_M1_Cell_Temperature_Data_2_status : 2; - unsigned can_0x681_BMS_M1_Cell_Temperature_Data_2_tx : 1; - unsigned can_0x681_BMS_M1_Cell_Temperature_Data_2_rx : 1; - unsigned can_0x682_BMS_M1_Cell_Temperature_Data_3_status : 2; - unsigned can_0x682_BMS_M1_Cell_Temperature_Data_3_tx : 1; - unsigned can_0x682_BMS_M1_Cell_Temperature_Data_3_rx : 1; - unsigned can_0x683_BMS_M2_Cell_Temperature_Data_1_status : 2; - unsigned can_0x683_BMS_M2_Cell_Temperature_Data_1_tx : 1; - unsigned can_0x683_BMS_M2_Cell_Temperature_Data_1_rx : 1; - unsigned can_0x684_BMS_M2_Cell_Temperature_Data_2_status : 2; - unsigned can_0x684_BMS_M2_Cell_Temperature_Data_2_tx : 1; - unsigned can_0x684_BMS_M2_Cell_Temperature_Data_2_rx : 1; - unsigned can_0x685_BMS_M2_Cell_Temperature_Data_3_status : 2; - unsigned can_0x685_BMS_M2_Cell_Temperature_Data_3_tx : 1; - unsigned can_0x685_BMS_M2_Cell_Temperature_Data_3_rx : 1; - unsigned can_0x686_BMS_M3_Cell_Temperature_Data_1_status : 2; - unsigned can_0x686_BMS_M3_Cell_Temperature_Data_1_tx : 1; - unsigned can_0x686_BMS_M3_Cell_Temperature_Data_1_rx : 1; - unsigned can_0x687_BMS_M3_Cell_Temperature_Data_2_status : 2; - unsigned can_0x687_BMS_M3_Cell_Temperature_Data_2_tx : 1; - unsigned can_0x687_BMS_M3_Cell_Temperature_Data_2_rx : 1; - unsigned can_0x688_BMS_M3_Cell_Temperature_Data_3_status : 2; - unsigned can_0x688_BMS_M3_Cell_Temperature_Data_3_tx : 1; - unsigned can_0x688_BMS_M3_Cell_Temperature_Data_3_rx : 1; - unsigned can_0x689_BMS_M4_Cell_Temperature_Data_1_status : 2; - unsigned can_0x689_BMS_M4_Cell_Temperature_Data_1_tx : 1; - unsigned can_0x689_BMS_M4_Cell_Temperature_Data_1_rx : 1; - unsigned can_0x68a_BMS_M4_Cell_Temperature_Data_2_status : 2; - unsigned can_0x68a_BMS_M4_Cell_Temperature_Data_2_tx : 1; - unsigned can_0x68a_BMS_M4_Cell_Temperature_Data_2_rx : 1; - unsigned can_0x68b_BMS_M4_Cell_Temperature_Data_3_status : 2; - unsigned can_0x68b_BMS_M4_Cell_Temperature_Data_3_tx : 1; - unsigned can_0x68b_BMS_M4_Cell_Temperature_Data_3_rx : 1; + unsigned can_0x680_BMS_M1_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x680_BMS_M1_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x680_BMS_M1_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x681_BMS_M1_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x681_BMS_M1_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x681_BMS_M1_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x682_BMS_M2_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x682_BMS_M2_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x682_BMS_M2_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x683_BMS_M2_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x683_BMS_M2_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x683_BMS_M2_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x684_BMS_M3_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x684_BMS_M3_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x684_BMS_M3_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x685_BMS_M3_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x685_BMS_M3_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x685_BMS_M3_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x686_BMS_M4_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x686_BMS_M4_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x686_BMS_M4_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x687_BMS_M4_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x687_BMS_M4_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x687_BMS_M4_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x688_BMS_M5_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x688_BMS_M5_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x688_BMS_M5_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x689_BMS_M5_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x689_BMS_M5_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x689_BMS_M5_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x68a_BMS_M6_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x68a_BMS_M6_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x68a_BMS_M6_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x68b_BMS_M6_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x68b_BMS_M6_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x68b_BMS_M6_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x68c_BMS_M7_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x68c_BMS_M7_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x68c_BMS_M7_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x68d_BMS_M7_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x68d_BMS_M7_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x68d_BMS_M7_Cell_Thermistor_Data_2_rx : 1; + unsigned can_0x68e_BMS_M8_Cell_Thermistor_Data_1_status : 2; + unsigned can_0x68e_BMS_M8_Cell_Thermistor_Data_1_tx : 1; + unsigned can_0x68e_BMS_M8_Cell_Thermistor_Data_1_rx : 1; + unsigned can_0x68f_BMS_M8_Cell_Thermistor_Data_2_status : 2; + unsigned can_0x68f_BMS_M8_Cell_Thermistor_Data_2_tx : 1; + unsigned can_0x68f_BMS_M8_Cell_Thermistor_Data_2_rx : 1; can_0x600_BMS_Safety_Checker_t can_0x600_BMS_Safety_Checker; + can_0x604_BMS_Balance_Enable_t can_0x604_BMS_Balance_Enable; + can_0x621_BMS_State_of_Charge_t can_0x621_BMS_State_of_Charge; can_0x622_BMS_Cell_Summary_t can_0x622_BMS_Cell_Summary; + can_0x623_BMS_Balance_Status_M1_to_M4_t can_0x623_BMS_Balance_Status_M1_to_M4; + can_0x624_BMS_Balance_Status_M5_to_M8_t can_0x624_BMS_Balance_Status_M5_to_M8; can_0x630_BMS_M1_Cell_Voltage_Data_1_t can_0x630_BMS_M1_Cell_Voltage_Data_1; can_0x631_BMS_M1_Cell_Voltage_Data_2_t can_0x631_BMS_M1_Cell_Voltage_Data_2; can_0x632_BMS_M1_Cell_Voltage_Data_3_t can_0x632_BMS_M1_Cell_Voltage_Data_3; @@ -490,68 +724,276 @@ typedef PREPACK struct { can_0x645_BMS_M8_Cell_Voltage_Data_1_t can_0x645_BMS_M8_Cell_Voltage_Data_1; can_0x646_BMS_M8_Cell_Voltage_Data_2_t can_0x646_BMS_M8_Cell_Voltage_Data_2; can_0x647_BMS_M8_Cell_Voltage_Data_3_t can_0x647_BMS_M8_Cell_Voltage_Data_3; - can_0x680_BMS_M1_Cell_Temperature_Data_1_t can_0x680_BMS_M1_Cell_Temperature_Data_1; - can_0x681_BMS_M1_Cell_Temperature_Data_2_t can_0x681_BMS_M1_Cell_Temperature_Data_2; - can_0x682_BMS_M1_Cell_Temperature_Data_3_t can_0x682_BMS_M1_Cell_Temperature_Data_3; - can_0x683_BMS_M2_Cell_Temperature_Data_1_t can_0x683_BMS_M2_Cell_Temperature_Data_1; - can_0x684_BMS_M2_Cell_Temperature_Data_2_t can_0x684_BMS_M2_Cell_Temperature_Data_2; - can_0x685_BMS_M2_Cell_Temperature_Data_3_t can_0x685_BMS_M2_Cell_Temperature_Data_3; - can_0x686_BMS_M3_Cell_Temperature_Data_1_t can_0x686_BMS_M3_Cell_Temperature_Data_1; - can_0x687_BMS_M3_Cell_Temperature_Data_2_t can_0x687_BMS_M3_Cell_Temperature_Data_2; - can_0x688_BMS_M3_Cell_Temperature_Data_3_t can_0x688_BMS_M3_Cell_Temperature_Data_3; - can_0x689_BMS_M4_Cell_Temperature_Data_1_t can_0x689_BMS_M4_Cell_Temperature_Data_1; - can_0x68a_BMS_M4_Cell_Temperature_Data_2_t can_0x68a_BMS_M4_Cell_Temperature_Data_2; - can_0x68b_BMS_M4_Cell_Temperature_Data_3_t can_0x68b_BMS_M4_Cell_Temperature_Data_3; + can_0x680_BMS_M1_Cell_Thermistor_Data_1_t can_0x680_BMS_M1_Cell_Thermistor_Data_1; + can_0x681_BMS_M1_Cell_Thermistor_Data_2_t can_0x681_BMS_M1_Cell_Thermistor_Data_2; + can_0x682_BMS_M2_Cell_Thermistor_Data_1_t can_0x682_BMS_M2_Cell_Thermistor_Data_1; + can_0x683_BMS_M2_Cell_Thermistor_Data_2_t can_0x683_BMS_M2_Cell_Thermistor_Data_2; + can_0x684_BMS_M3_Cell_Thermistor_Data_1_t can_0x684_BMS_M3_Cell_Thermistor_Data_1; + can_0x685_BMS_M3_Cell_Thermistor_Data_2_t can_0x685_BMS_M3_Cell_Thermistor_Data_2; + can_0x686_BMS_M4_Cell_Thermistor_Data_1_t can_0x686_BMS_M4_Cell_Thermistor_Data_1; + can_0x687_BMS_M4_Cell_Thermistor_Data_2_t can_0x687_BMS_M4_Cell_Thermistor_Data_2; + can_0x688_BMS_M5_Cell_Thermistor_Data_1_t can_0x688_BMS_M5_Cell_Thermistor_Data_1; + can_0x689_BMS_M5_Cell_Thermistor_Data_2_t can_0x689_BMS_M5_Cell_Thermistor_Data_2; + can_0x68a_BMS_M6_Cell_Thermistor_Data_1_t can_0x68a_BMS_M6_Cell_Thermistor_Data_1; + can_0x68b_BMS_M6_Cell_Thermistor_Data_2_t can_0x68b_BMS_M6_Cell_Thermistor_Data_2; + can_0x68c_BMS_M7_Cell_Thermistor_Data_1_t can_0x68c_BMS_M7_Cell_Thermistor_Data_1; + can_0x68d_BMS_M7_Cell_Thermistor_Data_2_t can_0x68d_BMS_M7_Cell_Thermistor_Data_2; + can_0x68e_BMS_M8_Cell_Thermistor_Data_1_t can_0x68e_BMS_M8_Cell_Thermistor_Data_1; + can_0x68f_BMS_M8_Cell_Thermistor_Data_2_t can_0x68f_BMS_M8_Cell_Thermistor_Data_2; } POSTPACK can_obj_all_sre_edited_h_t; int unpack_message(can_obj_all_sre_edited_h_t *o, const unsigned long id, uint64_t data, uint8_t dlc, dbcc_time_stamp_t time_stamp); int pack_message(can_obj_all_sre_edited_h_t *o, const unsigned long id, uint64_t *data); int print_message(const can_obj_all_sre_edited_h_t *o, const unsigned long id, FILE *output); -int decode_can_0x600_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); -int encode_can_0x600_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in); -int decode_can_0x600_SPIError(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_SPIError(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Balacing_End_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Balacing_End_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_Volt_Imbalance_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_Volt_Imbalance_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_High_Temp_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_High_Temp_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Pack_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Pack_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Pack_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Pack_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_Volt_Imbalance_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_Volt_Imbalance_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_Low_Temp_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_Low_Temp_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_High_Temp_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_High_Temp_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Cell_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Cell_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Pack_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Pack_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Pack_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Pack_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in); -int decode_can_0x600_Balancing_State(const can_obj_all_sre_edited_h_t *o, uint8_t *out); -int encode_can_0x600_Balancing_State(can_obj_all_sre_edited_h_t *o, uint8_t in); - - -int decode_can_0x622_Highest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); -int encode_can_0x622_Highest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in); -int decode_can_0x622_Lowest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); -int encode_can_0x622_Lowest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in); -int decode_can_0x622_Higest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x622_Higest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x622_Lowest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x622_Lowest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); +int decode_can_0x600_BMS_Cell_Max_Min_Difference(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x600_BMS_Cell_Max_Min_Difference(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x600_BMS_HVsens_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x600_BMS_HVsens_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x600_BMS_Sum_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x600_BMS_Sum_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x600_BMS_Cell_High_Temp_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_High_Temp_Warning(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_Volt_Imbalance_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_Volt_Imbalance_Warning(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Pack_Low_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Pack_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Pack_High_Volt_Warning(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Pack_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_High_Temp_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_High_Temp_Fault(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_Volt_Imbalance_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_Volt_Imbalance_Fault(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Cell_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Cell_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Pack_Low_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Pack_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x600_BMS_Pack_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x600_BMS_Pack_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in); + + +int decode_can_0x604_BMS_Balance_Enable(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x604_BMS_Balance_Enable(can_obj_all_sre_edited_h_t *o, int8_t in); + + +int decode_can_0x621_BMS_Current(const can_obj_all_sre_edited_h_t *o, uint32_t *out); +int encode_can_0x621_BMS_Current(can_obj_all_sre_edited_h_t *o, uint32_t in); +int decode_can_0x621_BMS_Capacity(const can_obj_all_sre_edited_h_t *o, uint16_t *out); +int encode_can_0x621_BMS_Capacity(can_obj_all_sre_edited_h_t *o, uint16_t in); +int decode_can_0x621_BMS_Percent(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x621_BMS_Percent(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x622_BMS_Highest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x622_BMS_Highest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x622_BMS_Lowest_Cell_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x622_BMS_Lowest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x622_BMS_Higest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x622_BMS_Higest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x622_BMS_Lowest_Cell_Temperature(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x622_BMS_Lowest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x623_BMS_M1_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M1_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M1_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M2_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M2_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M3_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M3_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x623_BMS_M4_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x623_BMS_M4_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); + + +int decode_can_0x624_BMS_M5_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M5_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M5_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M6_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M6_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M7_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M7_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_11(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in); +int decode_can_0x624_BMS_M8_Cell_12(const can_obj_all_sre_edited_h_t *o, int8_t *out); +int encode_can_0x624_BMS_M8_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in); int decode_can_0x630_BMS_M1_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o, double *out); @@ -794,124 +1236,284 @@ int decode_can_0x647_BMS_M8_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o, int encode_can_0x647_BMS_M8_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in); -int decode_can_0x680_BMS_M1_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x680_BMS_M1_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x680_BMS_M1_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x680_BMS_M1_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x680_BMS_M1_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x680_BMS_M1_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x680_BMS_M1_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x680_BMS_M1_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x681_BMS_M1_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x681_BMS_M1_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x681_BMS_M1_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x681_BMS_M1_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x681_BMS_M1_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x681_BMS_M1_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x681_BMS_M1_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x681_BMS_M1_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x682_BMS_M1_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x682_BMS_M1_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x682_BMS_M1_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x682_BMS_M1_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x682_BMS_M1_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x682_BMS_M1_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x682_BMS_M1_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x682_BMS_M1_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x683_BMS_M2_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x683_BMS_M2_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x683_BMS_M2_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x683_BMS_M2_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x683_BMS_M2_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x683_BMS_M2_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x683_BMS_M2_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x683_BMS_M2_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x684_BMS_M2_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x684_BMS_M2_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x684_BMS_M2_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x684_BMS_M2_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x684_BMS_M2_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x684_BMS_M2_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x684_BMS_M2_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x684_BMS_M2_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x685_BMS_M2_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x685_BMS_M2_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x685_BMS_M2_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x685_BMS_M2_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x685_BMS_M2_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x685_BMS_M2_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x685_BMS_M2_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x685_BMS_M2_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x686_BMS_M3_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x686_BMS_M3_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x686_BMS_M3_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x686_BMS_M3_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x686_BMS_M3_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x686_BMS_M3_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x686_BMS_M3_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x686_BMS_M3_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x687_BMS_M3_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x687_BMS_M3_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x687_BMS_M3_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x687_BMS_M3_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x687_BMS_M3_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x687_BMS_M3_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x687_BMS_M3_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x687_BMS_M3_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x688_BMS_M3_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x688_BMS_M3_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x688_BMS_M3_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x688_BMS_M3_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x688_BMS_M3_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x688_BMS_M3_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x688_BMS_M3_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x688_BMS_M3_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x689_BMS_M4_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x689_BMS_M4_Cell_1_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x689_BMS_M4_Cell_2_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x689_BMS_M4_Cell_2_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x689_BMS_M4_Cell_3_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x689_BMS_M4_Cell_3_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x689_BMS_M4_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x689_BMS_M4_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x68a_BMS_M4_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68a_BMS_M4_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x68a_BMS_M4_Cell_6_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68a_BMS_M4_Cell_6_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x68a_BMS_M4_Cell_7_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68a_BMS_M4_Cell_7_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x68a_BMS_M4_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68a_BMS_M4_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); - - -int decode_can_0x68b_BMS_M4_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68b_BMS_M4_Cell_9_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x68b_BMS_M4_Cell_10_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68b_BMS_M4_Cell_10_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x68b_BMS_M4_Cell_11_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68b_BMS_M4_Cell_11_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); -int decode_can_0x68b_BMS_M4_Cell_12_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out); -int encode_can_0x68b_BMS_M4_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in); +int decode_can_0x680_BMS_M1_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x680_BMS_M1_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x680_BMS_M1_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x681_BMS_M1_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x681_BMS_M1_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x681_BMS_M1_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x681_BMS_M1_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x681_BMS_M1_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x681_BMS_M1_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x681_BMS_M1_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x681_BMS_M1_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x681_BMS_M1_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x681_BMS_M1_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x682_BMS_M2_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x682_BMS_M2_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x682_BMS_M2_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x683_BMS_M2_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x683_BMS_M2_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x683_BMS_M2_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x683_BMS_M2_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x683_BMS_M2_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x683_BMS_M2_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x683_BMS_M2_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x683_BMS_M2_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x683_BMS_M2_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x683_BMS_M2_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x684_BMS_M3_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x684_BMS_M3_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x684_BMS_M3_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x685_BMS_M3_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x685_BMS_M3_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x685_BMS_M3_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x685_BMS_M3_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x685_BMS_M3_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x685_BMS_M3_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x685_BMS_M3_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x685_BMS_M3_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x685_BMS_M3_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x685_BMS_M3_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x686_BMS_M4_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x686_BMS_M4_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x686_BMS_M4_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x687_BMS_M4_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x687_BMS_M4_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x687_BMS_M4_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x687_BMS_M4_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x687_BMS_M4_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x687_BMS_M4_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x687_BMS_M4_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x687_BMS_M4_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x687_BMS_M4_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x687_BMS_M4_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x688_BMS_M5_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x688_BMS_M5_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x688_BMS_M5_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x689_BMS_M5_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x689_BMS_M5_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x689_BMS_M5_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x689_BMS_M5_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x689_BMS_M5_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x689_BMS_M5_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x689_BMS_M5_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x689_BMS_M5_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x689_BMS_M5_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x689_BMS_M5_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x68a_BMS_M6_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68a_BMS_M6_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68a_BMS_M6_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x68b_BMS_M6_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68b_BMS_M6_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68b_BMS_M6_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68b_BMS_M6_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68b_BMS_M6_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x68b_BMS_M6_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x68b_BMS_M6_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68b_BMS_M6_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68b_BMS_M6_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68b_BMS_M6_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x68c_BMS_M7_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68c_BMS_M7_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68c_BMS_M7_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x68d_BMS_M7_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68d_BMS_M7_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68d_BMS_M7_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68d_BMS_M7_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68d_BMS_M7_Pressure(const can_obj_all_sre_edited_h_t *o, double *out); +int encode_can_0x68d_BMS_M7_Pressure(can_obj_all_sre_edited_h_t *o, double in); +int decode_can_0x68d_BMS_M7_Atmosphere_Temp(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68d_BMS_M7_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68d_BMS_M7_Dew_Point(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68d_BMS_M7_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x68e_BMS_M8_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_2_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_3_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_4_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_5_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_6_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_7_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68e_BMS_M8_Cell_8_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68e_BMS_M8_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); + + +int decode_can_0x68f_BMS_M8_Cell_9_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68f_BMS_M8_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68f_BMS_M8_Cell_10_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68f_BMS_M8_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68f_BMS_M8_Cell_11_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68f_BMS_M8_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); +int decode_can_0x68f_BMS_M8_Cell_12_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out); +int encode_can_0x68f_BMS_M8_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in); #ifdef __cplusplus diff --git a/decode_function_name.txt b/decode_function_name.txt index f1bb5e5..f002f7b 100644 --- a/decode_function_name.txt +++ b/decode_function_name.txt @@ -43,8 +43,8 @@ decode_can_0x63a_BMS_M4_Cell_6_Voltage decode_can_0x63a_BMS_M4_Cell_7_Voltage decode_can_0x63a_BMS_M4_Cell_8_Voltage decode_can_0x63b_BMS_M4_Cell_9_Voltage -decode_can_0x63b_BMS_M4_Cell_11_Voltage decode_can_0x63b_BMS_M4_Cell_10_Voltage +decode_can_0x63b_BMS_M4_Cell_11_Voltage decode_can_0x63b_BMS_M4_Cell_12_Voltage decode_can_0x63c_BMS_M5_Cell_1_Voltage decode_can_0x63c_BMS_M5_Cell_2_Voltage @@ -94,51 +94,99 @@ decode_can_0x647_BMS_M8_Cell_9_Voltage decode_can_0x647_BMS_M8_Cell_10_Voltage decode_can_0x647_BMS_M8_Cell_11_Voltage decode_can_0x647_BMS_M8_Cell_12_Voltage -decode_can_0x680_BMS_M1_Cell_1_Temperature -decode_can_0x680_BMS_M1_Cell_2_Temperature -decode_can_0x680_BMS_M1_Cell_3_Temperature -decode_can_0x680_BMS_M1_Cell_4_Temperature -decode_can_0x681_BMS_M1_Cell_5_Temperature -decode_can_0x681_BMS_M1_Cell_6_Temperature -decode_can_0x681_BMS_M1_Cell_7_Temperature -decode_can_0x681_BMS_M1_Cell_8_Temperature -decode_can_0x682_BMS_M1_Cell_9_Temperature -decode_can_0x682_BMS_M1_Cell_10_Temperature -decode_can_0x682_BMS_M1_Cell_11_Temperature -decode_can_0x682_BMS_M1_Cell_12_Temperature -decode_can_0x683_BMS_M2_Cell_1_Temperature -decode_can_0x683_BMS_M2_Cell_2_Temperature -decode_can_0x683_BMS_M2_Cell_3_Temperature -decode_can_0x683_BMS_M2_Cell_4_Temperature -decode_can_0x684_BMS_M2_Cell_5_Temperature -decode_can_0x684_BMS_M2_Cell_6_Temperature -decode_can_0x684_BMS_M2_Cell_7_Temperature -decode_can_0x684_BMS_M2_Cell_8_Temperature -decode_can_0x685_BMS_M2_Cell_9_Temperature -decode_can_0x685_BMS_M2_Cell_10_Temperature -decode_can_0x685_BMS_M2_Cell_11_Temperature -decode_can_0x685_BMS_M2_Cell_12_Temperature -decode_can_0x686_BMS_M3_Cell_1_Temperature -decode_can_0x686_BMS_M3_Cell_2_Temperature -decode_can_0x686_BMS_M3_Cell_3_Temperature -decode_can_0x686_BMS_M3_Cell_4_Temperature -decode_can_0x687_BMS_M3_Cell_5_Temperature -decode_can_0x687_BMS_M3_Cell_6_Temperature -decode_can_0x687_BMS_M3_Cell_7_Temperature -decode_can_0x687_BMS_M3_Cell_8_Temperature -decode_can_0x688_BMS_M3_Cell_9_Temperature -decode_can_0x688_BMS_M3_Cell_10_Temperature -decode_can_0x688_BMS_M3_Cell_11_Temperature -decode_can_0x688_BMS_M3_Cell_12_Temperature -decode_can_0x689_BMS_M4_Cell_1_Temperature -decode_can_0x689_BMS_M4_Cell_2_Temperature -decode_can_0x689_BMS_M4_Cell_3_Temperature -decode_can_0x689_BMS_M4_Cell_4_Temperature -decode_can_0x68a_BMS_M4_Cell_5_Temperature -decode_can_0x68a_BMS_M4_Cell_6_Temperature -decode_can_0x68a_BMS_M4_Cell_7_Temperature -decode_can_0x68a_BMS_M4_Cell_8_Temperature -decode_can_0x68b_BMS_M4_Cell_9_Temperature -decode_can_0x68b_BMS_M4_Cell_10_Temperature -decode_can_0x68b_BMS_M4_Cell_11_Temperature -decode_can_0x68b_BMS_M4_Cell_12_Temperature +decode_can_0x680_BMS_M1_Cell_1_Thermistor +decode_can_0x680_BMS_M1_Cell_2_Thermistor +decode_can_0x680_BMS_M1_Cell_3_Thermistor +decode_can_0x680_BMS_M1_Cell_4_Thermistor +decode_can_0x680_BMS_M1_Cell_5_Thermistor +decode_can_0x680_BMS_M1_Cell_6_Thermistor +decode_can_0x680_BMS_M1_Cell_7_Thermistor +decode_can_0x680_BMS_M1_Cell_8_Thermistor +decode_can_0x681_BMS_M1_Cell_9_Thermistor +decode_can_0x681_BMS_M1_Cell_10_Thermistor +decode_can_0x681_BMS_M1_Cell_11_Thermistor +decode_can_0x681_BMS_M1_Cell_12_Thermistor +decode_can_0x682_BMS_M2_Cell_1_Thermistor +decode_can_0x682_BMS_M2_Cell_2_Thermistor +decode_can_0x682_BMS_M2_Cell_3_Thermistor +decode_can_0x682_BMS_M2_Cell_4_Thermistor +decode_can_0x682_BMS_M2_Cell_5_Thermistor +decode_can_0x682_BMS_M2_Cell_6_Thermistor +decode_can_0x682_BMS_M2_Cell_7_Thermistor +decode_can_0x682_BMS_M2_Cell_8_Thermistor +decode_can_0x683_BMS_M2_Cell_9_Thermistor +decode_can_0x683_BMS_M2_Cell_10_Thermistor +decode_can_0x683_BMS_M2_Cell_11_Thermistor +decode_can_0x683_BMS_M2_Cell_12_Thermistor +decode_can_0x684_BMS_M3_Cell_1_Thermistor +decode_can_0x684_BMS_M3_Cell_2_Thermistor +decode_can_0x684_BMS_M3_Cell_3_Thermistor +decode_can_0x684_BMS_M3_Cell_4_Thermistor +decode_can_0x684_BMS_M3_Cell_5_Thermistor +decode_can_0x684_BMS_M3_Cell_6_Thermistor +decode_can_0x684_BMS_M3_Cell_7_Thermistor +decode_can_0x684_BMS_M3_Cell_8_Thermistor +decode_can_0x685_BMS_M3_Cell_9_Thermistor +decode_can_0x685_BMS_M3_Cell_10_Thermistor +decode_can_0x685_BMS_M3_Cell_11_Thermistor +decode_can_0x685_BMS_M3_Cell_12_Thermistor +decode_can_0x686_BMS_M4_Cell_1_Thermistor +decode_can_0x686_BMS_M4_Cell_2_Thermistor +decode_can_0x686_BMS_M4_Cell_3_Thermistor +decode_can_0x686_BMS_M4_Cell_4_Thermistor +decode_can_0x686_BMS_M4_Cell_5_Thermistor +decode_can_0x686_BMS_M4_Cell_6_Thermistor +decode_can_0x686_BMS_M4_Cell_7_Thermistor +decode_can_0x686_BMS_M4_Cell_8_Thermistor +decode_can_0x687_BMS_M4_Cell_9_Thermistor +decode_can_0x687_BMS_M4_Cell_10_Thermistor +decode_can_0x687_BMS_M4_Cell_11_Thermistor +decode_can_0x687_BMS_M4_Cell_12_Thermistor +decode_can_0x688_BMS_M5_Cell_1_Thermistor +decode_can_0x688_BMS_M5_Cell_2_Thermistor +decode_can_0x688_BMS_M5_Cell_3_Thermistor +decode_can_0x688_BMS_M5_Cell_4_Thermistor +decode_can_0x688_BMS_M5_Cell_5_Thermistor +decode_can_0x688_BMS_M5_Cell_6_Thermistor +decode_can_0x688_BMS_M5_Cell_7_Thermistor +decode_can_0x688_BMS_M5_Cell_8_Thermistor +decode_can_0x689_BMS_M5_Cell_9_Thermistor +decode_can_0x689_BMS_M5_Cell_10_Thermistor +decode_can_0x689_BMS_M5_Cell_11_Thermistor +decode_can_0x689_BMS_M5_Cell_12_Thermistor +decode_can_0x68a_BMS_M6_Cell_1_Thermistor +decode_can_0x68a_BMS_M6_Cell_2_Thermistor +decode_can_0x68a_BMS_M6_Cell_3_Thermistor +decode_can_0x68a_BMS_M6_Cell_4_Thermistor +decode_can_0x68a_BMS_M6_Cell_5_Thermistor +decode_can_0x68a_BMS_M6_Cell_6_Thermistor +decode_can_0x68a_BMS_M6_Cell_7_Thermistor +decode_can_0x68a_BMS_M6_Cell_8_Thermistor +decode_can_0x68b_BMS_M6_Cell_9_Thermistor +decode_can_0x68b_BMS_M6_Cell_10_Thermistor +decode_can_0x68b_BMS_M6_Cell_11_Thermistor +decode_can_0x68b_BMS_M6_Cell_12_Thermistor +decode_can_0x68c_BMS_M7_Cell_1_Thermistor +decode_can_0x68c_BMS_M7_Cell_2_Thermistor +decode_can_0x68c_BMS_M7_Cell_3_Thermistor +decode_can_0x68c_BMS_M7_Cell_4_Thermistor +decode_can_0x68c_BMS_M7_Cell_5_Thermistor +decode_can_0x68c_BMS_M7_Cell_6_Thermistor +decode_can_0x68c_BMS_M7_Cell_7_Thermistor +decode_can_0x68c_BMS_M7_Cell_8_Thermistor +decode_can_0x68d_BMS_M7_Cell_9_Thermistor +decode_can_0x68d_BMS_M7_Cell_10_Thermistor +decode_can_0x68d_BMS_M7_Cell_11_Thermistor +decode_can_0x68d_BMS_M7_Cell_12_Thermistor +decode_can_0x68e_BMS_M8_Cell_1_Thermistor +decode_can_0x68e_BMS_M8_Cell_2_Thermistor +decode_can_0x68e_BMS_M8_Cell_3_Thermistor +decode_can_0x68e_BMS_M8_Cell_4_Thermistor +decode_can_0x68e_BMS_M8_Cell_5_Thermistor +decode_can_0x68e_BMS_M8_Cell_6_Thermistor +decode_can_0x68e_BMS_M8_Cell_7_Thermistor +decode_can_0x68e_BMS_M8_Cell_8_Thermistor +decode_can_0x68f_BMS_M8_Cell_9_Thermistor +decode_can_0x68f_BMS_M8_Cell_10_Thermistor +decode_can_0x68f_BMS_M8_Cell_11_Thermistor +decode_can_0x68f_BMS_M8_Cell_12_Thermistor diff --git a/mycan.c b/mycan.c index 99063f7..3747efb 100644 --- a/mycan.c +++ b/mycan.c @@ -34,6 +34,9 @@ cansend vcan0 680#00.FF.02.00.02.00.02.00 #include "all_SRE_edited.h" +#define CAN_VOLT_LEN 24 +#define CAN_TEMP_LEN 16 + // https://github.com/howerj/dbcc MIT static uint64_t u64_from_can_msg(const uint8_t m[8]) { return ((uint64_t)m[7] << 56) | ((uint64_t)m[6] << 48) | ((uint64_t)m[5] << 40) | ((uint64_t)m[4] << 32) @@ -103,18 +106,18 @@ int main(int argc, char **argv) } //4.Define receive rules - // 24 (voltage) + 12 (temp) - struct can_filter rfilter[36]; + // 24 (voltage) + 16 (temp) + struct can_filter rfilter[CAN_VOLT_LEN+CAN_TEMP_LEN]; rfilter[0].can_id = 0x630; rfilter[0].can_mask = CAN_SFF_MASK; - rfilter[24].can_id = 0x680; - rfilter[24].can_mask = CAN_SFF_MASK; - for(int i=1;i<24;i++) + rfilter[CAN_VOLT_LEN].can_id = 0x680; + rfilter[CAN_VOLT_LEN].can_mask = CAN_SFF_MASK; + for(int i=1;i 0) { double out; - uint16_t iout; + uint8_t iout; FILE * fp; // try FIFO, socket and other file types maybe better, not sure @@ -137,15 +140,15 @@ int main(int argc, char **argv) exit(1); } - //printf("can_id = 0x%X\r\ncan_dlc = %d \r\n", frame.can_id, frame.can_dlc); - //for(int i = 0; i < 8; i++) - // printf("data[%d] = %d\r\n", i, frame.data[i]); + printf("can_id = 0x%X\r\ncan_dlc = %d \r\n", frame.can_id, frame.can_dlc); + for(int i = 0; i < 8; i++) + printf("data[%d] = %d\r\n", i, frame.data[i]); can_message_u64 = u64_from_can_msg(frame.data); t=time(NULL); unpack_message(&obj,frame.can_id,can_message_u64,frame.can_dlc,t); - //printf("my prints:\n"); - //print_message(&obj, frame.can_id, stdout); - //printf("my timestamp: %u\n", t); + printf("my prints:\n"); + print_message(&obj, frame.can_id, stdout); + printf("my timestamp: %u\n", t); if(t>t_before) { t_before=t; @@ -343,102 +346,198 @@ int main(int argc, char **argv) fprintf(fp,",%6.4f",out); decode_can_0x647_BMS_M8_Cell_12_Voltage(&obj,&out); fprintf(fp,",%6.4f",out); - decode_can_0x680_BMS_M1_Cell_1_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x680_BMS_M1_Cell_2_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x680_BMS_M1_Cell_3_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x680_BMS_M1_Cell_4_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x681_BMS_M1_Cell_5_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x681_BMS_M1_Cell_6_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x681_BMS_M1_Cell_7_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x681_BMS_M1_Cell_8_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x682_BMS_M1_Cell_9_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x682_BMS_M1_Cell_10_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x682_BMS_M1_Cell_11_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x682_BMS_M1_Cell_12_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x683_BMS_M2_Cell_1_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x683_BMS_M2_Cell_2_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x683_BMS_M2_Cell_3_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x683_BMS_M2_Cell_4_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x684_BMS_M2_Cell_5_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x684_BMS_M2_Cell_6_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x684_BMS_M2_Cell_7_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x684_BMS_M2_Cell_8_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x685_BMS_M2_Cell_9_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x685_BMS_M2_Cell_10_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x685_BMS_M2_Cell_11_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x685_BMS_M2_Cell_12_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x686_BMS_M3_Cell_1_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x686_BMS_M3_Cell_2_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x686_BMS_M3_Cell_3_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x686_BMS_M3_Cell_4_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x687_BMS_M3_Cell_5_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x687_BMS_M3_Cell_6_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x687_BMS_M3_Cell_7_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x687_BMS_M3_Cell_8_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x688_BMS_M3_Cell_9_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x688_BMS_M3_Cell_10_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x688_BMS_M3_Cell_11_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x688_BMS_M3_Cell_12_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x689_BMS_M4_Cell_1_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x689_BMS_M4_Cell_2_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x689_BMS_M4_Cell_3_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x689_BMS_M4_Cell_4_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68a_BMS_M4_Cell_5_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68a_BMS_M4_Cell_6_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68a_BMS_M4_Cell_7_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68a_BMS_M4_Cell_8_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68b_BMS_M4_Cell_9_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68b_BMS_M4_Cell_10_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68b_BMS_M4_Cell_11_Temperature(&obj,&iout); - fprintf(fp,",%3hu",iout); - decode_can_0x68b_BMS_M4_Cell_12_Temperature(&obj,&iout); - fprintf(fp,",%3hu\n",iout); + decode_can_0x680_BMS_M1_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x680_BMS_M1_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x681_BMS_M1_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x681_BMS_M1_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x681_BMS_M1_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x681_BMS_M1_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x682_BMS_M2_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x683_BMS_M2_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x683_BMS_M2_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x683_BMS_M2_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x683_BMS_M2_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x684_BMS_M3_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x685_BMS_M3_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x685_BMS_M3_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x685_BMS_M3_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x685_BMS_M3_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x686_BMS_M4_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x687_BMS_M4_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x687_BMS_M4_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x687_BMS_M4_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x687_BMS_M4_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x688_BMS_M5_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x689_BMS_M5_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x689_BMS_M5_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x689_BMS_M5_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x689_BMS_M5_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68a_BMS_M6_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68b_BMS_M6_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68b_BMS_M6_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68b_BMS_M6_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68b_BMS_M6_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68c_BMS_M7_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68d_BMS_M7_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68d_BMS_M7_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68d_BMS_M7_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68d_BMS_M7_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_1_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_2_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_3_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_4_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_5_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_6_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_7_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68e_BMS_M8_Cell_8_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68f_BMS_M8_Cell_9_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68f_BMS_M8_Cell_10_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68f_BMS_M8_Cell_11_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu",iout); + decode_can_0x68f_BMS_M8_Cell_12_Thermistor(&obj,&iout); + fprintf(fp,",%3hhu\n",iout); } fclose(fp); -- cgit v1.2.3-70-g09d2