aboutsummaryrefslogtreecommitdiff
path: root/all_SRE_edited.c
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-05-04 15:31:15 -0700
committerXiao Pan <xyz@flylightning.xyz>2025-05-04 15:31:15 -0700
commitdb19a82342b2e961477f5aa5bc14e542ac711f3b (patch)
tree5d2de06c4d6c41aea42ff3b3287617d21b984ae5 /all_SRE_edited.c
parenta5943c9e0710816ef47c9869bd45b8e1a736bf2c (diff)
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.
Diffstat (limited to 'all_SRE_edited.c')
-rw-r--r--all_SRE_edited.c7667
1 files changed, 6207 insertions, 1460 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,413 +169,3668 @@ 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;
+ 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_BMS_HVsens_Pack_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
+ assert(o);
+ 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 encode_can_0x600_SPIError(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+int decode_can_0x600_BMS_Sum_Pack_Voltage(const can_obj_all_sre_edited_h_t *o, double *out) {
+ assert(o);
+ assert(out);
+ 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_BMS_Sum_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_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_Balacing_End_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.Balacing_End_Fault);
- *out = rval;
+ 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_BMS_Cell_High_Temp_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ 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 encode_can_0x600_Balacing_End_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+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);
+ 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_BMS_Cell_Volt_Imbalance_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) {
assert(o);
- o->can_0x600_BMS_Safety_Checker.Balacing_End_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_Volt_Imbalance_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_Volt_Imbalance_Fault);
- *out = rval;
+ 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_BMS_Cell_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ 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 encode_can_0x600_Cell_Volt_Imbalance_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+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);
+ 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_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_Volt_Imbalance_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_Cell_High_Temp_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.Cell_High_Temp_Fault);
- *out = rval;
+ 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_BMS_Pack_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ 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 encode_can_0x600_Cell_High_Temp_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+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);
+ 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_BMS_Pack_High_Volt_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_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_High_Volt_Fault(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_High_Volt_Fault);
- *out = rval;
+ 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_BMS_Cell_High_Temp_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ 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 encode_can_0x600_Cell_High_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+int decode_can_0x600_BMS_Cell_Volt_Imbalance_Fault(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
assert(o);
- o->can_0x600_BMS_Safety_Checker.Cell_High_Volt_Fault = in;
+ assert(out);
+ 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_BMS_Cell_Volt_Imbalance_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ 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_Low_Volt_Fault(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_Low_Volt_Fault);
- *out = rval;
+ 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_BMS_Cell_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ 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 encode_can_0x600_Cell_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+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);
+ 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.Cell_Low_Volt_Fault = in;
+ 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 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_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.Pack_Low_Volt_Fault);
- *out = rval;
+ 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.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 encode_can_0x600_Pack_Low_Volt_Fault(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+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);
+ 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.Pack_Low_Volt_Fault = in;
+ 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 decode_can_0x600_Pack_High_Volt_Fault(const can_obj_all_sre_edited_h_t *o, uint8_t *out) {
+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);
assert(out);
- uint8_t rval = (uint8_t)(o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Fault);
+ 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 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);
+ uint32_t rval = (uint32_t)(o->can_0x621_BMS_State_of_Charge.BMS_Current);
*out = rval;
return 0;
}
-int encode_can_0x600_Pack_High_Volt_Fault(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_High_Volt_Fault = in;
+ o->can_0x621_BMS_State_of_Charge.BMS_Current = 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_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.Cell_Volt_Imbalance_Warning);
+ uint16_t rval = (uint16_t)(o->can_0x621_BMS_State_of_Charge.BMS_Capacity);
*out = rval;
return 0;
}
-int encode_can_0x600_Cell_Volt_Imbalance_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.Cell_Volt_Imbalance_Warning = in;
+ o->can_0x621_BMS_State_of_Charge.BMS_Capacity = 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_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.Cell_Low_Temp_Warning);
+ uint8_t rval = (uint8_t)(o->can_0x621_BMS_State_of_Charge.BMS_Percent);
*out = rval;
return 0;
}
-int encode_can_0x600_Cell_Low_Temp_Warning(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.Cell_Low_Temp_Warning = in;
+ o->can_0x621_BMS_State_of_Charge.BMS_Percent = in;
return 0;
}
-int decode_can_0x600_Cell_High_Temp_Warning(const can_obj_all_sre_edited_h_t *o, uint8_t *out) {
+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, "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;
+}
+
+static int pack_can_0x622_BMS_Cell_Summary(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_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;
+ /* 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;
+ /* 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;
+ /* 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 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) {
+ assert(o);
+ assert(dlc <= 8);
+ register uint64_t x;
+ register uint64_t i = (data);
+ if (dlc < 6)
+ return -1;
+ /* 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.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.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 6;
+}
+
+int decode_can_0x622_BMS_Highest_Cell_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.Cell_High_Temp_Warning);
- *out = rval;
+ double rval = (double)(o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage);
+ rval *= 0.0001;
+ if (rval <= 6.5535) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (double)0;
+ return -1;
+ }
+}
+
+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.BMS_Highest_Cell_Voltage = 0;
+ if (in > 6.5535)
+ return -1;
+ in *= 10000;
+ o->can_0x622_BMS_Cell_Summary.BMS_Highest_Cell_Voltage = in;
return 0;
}
-int encode_can_0x600_Cell_High_Temp_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+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.BMS_Lowest_Cell_Voltage);
+ rval *= 0.0001;
+ if (rval <= 6.5535) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (double)0;
+ return -1;
+ }
+}
+
+int encode_can_0x622_BMS_Lowest_Cell_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
- o->can_0x600_BMS_Safety_Checker.Cell_High_Temp_Warning = in;
+ 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.BMS_Lowest_Cell_Voltage = 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_0x622_BMS_Higest_Cell_Temperature(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.Cell_High_Volt_Warning);
+ uint8_t rval = (uint8_t)(o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature);
*out = rval;
return 0;
}
-int encode_can_0x600_Cell_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_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_0x600_BMS_Safety_Checker.Cell_High_Volt_Warning = in;
+ o->can_0x622_BMS_Cell_Summary.BMS_Higest_Cell_Temperature = 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_0x622_BMS_Lowest_Cell_Temperature(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.Cell_Low_Volt_Warning);
+ uint8_t rval = (uint8_t)(o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature);
*out = rval;
return 0;
}
-int encode_can_0x600_Cell_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_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_0x600_BMS_Safety_Checker.Cell_Low_Volt_Warning = in;
+ o->can_0x622_BMS_Cell_Summary.BMS_Lowest_Cell_Temperature = 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_0x622_BMS_Cell_Summary(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_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_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: 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: 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_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_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;
+ /* 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_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: 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_0x623_BMS_M1_Cell_1(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_Warning);
- *out = rval;
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_1 = in;
return 0;
}
-int encode_can_0x600_Pack_Low_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+int decode_can_0x623_BMS_M1_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) {
assert(o);
- o->can_0x600_BMS_Safety_Checker.Pack_Low_Volt_Warning = in;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_2 = 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_0x623_BMS_M1_Cell_3(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_Warning);
- *out = rval;
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_3 = in;
return 0;
}
-int encode_can_0x600_Pack_High_Volt_Warning(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+int decode_can_0x623_BMS_M1_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
assert(o);
- o->can_0x600_BMS_Safety_Checker.Pack_High_Volt_Warning = in;
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_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_M1_Cell_4 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_4 = in;
return 0;
}
-int decode_can_0x600_Balancing_State(const can_obj_all_sre_edited_h_t *o, uint8_t *out) {
+int decode_can_0x623_BMS_M1_Cell_5(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.Balancing_State);
- *out = rval;
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_5 = in;
return 0;
}
-int encode_can_0x600_Balancing_State(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+int decode_can_0x623_BMS_M1_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
assert(o);
- o->can_0x600_BMS_Safety_Checker.Balancing_State = in;
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_6 = in;
return 0;
}
-int print_can_0x600_BMS_Safety_Checker(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+int decode_can_0x623_BMS_M1_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M1_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_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_M1_Cell_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M1_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M1_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M1_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_M1_Cell_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_10 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M1_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_11 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M1_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M1_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M1_Cell_12 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_1(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_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_1 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_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_M2_Cell_2 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_2 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_3(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_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_3 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+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);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_5(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_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_6(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_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_6 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_7(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_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_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_M2_Cell_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_9(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_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+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);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_11(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_11 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_11 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M2_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M2_Cell_12(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_12 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M2_Cell_12 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_1 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_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_M3_Cell_2 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_2 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_3 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_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_M3_Cell_4 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_4 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_6(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_6 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M3_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_M3_Cell_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_9(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_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_M3_Cell_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_10 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_11(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_11 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M3_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M3_Cell_12(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M3_Cell_12 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_1(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_1(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_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_1 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_2(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+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);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_3(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_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_3 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_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_M4_Cell_4 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_4 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_5(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_5(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_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_6(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_6(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_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_6 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_7(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_7(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_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_8(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ 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;
+ }
+}
+
+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);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_9(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_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_Cell_10(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
+ assert(o);
+ assert(out);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_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_M4_Cell_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_10 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_11(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_11 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_11 = in;
+ return 0;
+}
+
+int decode_can_0x623_BMS_M4_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_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x623_BMS_M4_Cell_12(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_12 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x623_BMS_Balance_Status_M1_to_M4.BMS_M4_Cell_12 = in;
+ return 0;
+}
+
+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, "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_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_0x622_BMS_Cell_Summary(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;
- /* 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_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_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;
- /* 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_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;
- /* 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_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;
- /* 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;
+ /* 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_0x622_BMS_Cell_Summary_tx = 1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8_tx = 1;
return 8;
}
-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) {
+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;
- /* 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 */
- 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_rx = 1;
- o->can_0x622_BMS_Cell_Summary_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_0x622_Highest_Cell_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_0x622_BMS_Cell_Summary.Highest_Cell_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_0x622_Highest_Cell_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_0x622_BMS_Cell_Summary.Highest_Cell_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_0x622_BMS_Cell_Summary.Highest_Cell_Voltage = in;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_1 = in;
return 0;
}
-int decode_can_0x622_Lowest_Cell_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_0x622_BMS_Cell_Summary.Lowest_Cell_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_0x622_Lowest_Cell_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_0x622_BMS_Cell_Summary.Lowest_Cell_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_0x622_BMS_Cell_Summary.Lowest_Cell_Voltage = in;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_2 = 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_0x624_BMS_M5_Cell_3(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
assert(o);
assert(out);
- uint16_t rval = (uint16_t)(o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature);
- if (rval <= 100) {
+ 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 = (uint16_t)0;
+ *out = (int8_t)0;
return -1;
}
}
-int encode_can_0x622_Higest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+int encode_can_0x624_BMS_M5_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) {
assert(o);
- o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature = 0;
- if (in > 100)
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3 = 0;
+ if (in < 0)
return -1;
- o->can_0x622_BMS_Cell_Summary.Higest_Cell_Temperature = in;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_3 = 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_0x624_BMS_M5_Cell_4(const can_obj_all_sre_edited_h_t *o, int8_t *out) {
assert(o);
assert(out);
- uint16_t rval = (uint16_t)(o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature);
- if (rval <= 100) {
+ 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 = (uint16_t)0;
+ *out = (int8_t)0;
return -1;
}
}
-int encode_can_0x622_Lowest_Cell_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+int encode_can_0x624_BMS_M5_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) {
assert(o);
- o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature = 0;
- if (in > 100)
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4 = 0;
+ if (in < 0)
return -1;
- o->can_0x622_BMS_Cell_Summary.Lowest_Cell_Temperature = in;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_4 = in;
return 0;
}
-int print_can_0x622_BMS_Cell_Summary(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(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;
+ }
+}
+
+int encode_can_0x624_BMS_M5_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_Cell_6(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_M5_Cell_6);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_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_M5_Cell_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_6 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_Cell_7(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_M5_Cell_7);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_Cell_8(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_M5_Cell_8);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_Cell_9(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_M5_Cell_9);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_Cell_10(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_M5_Cell_10);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_10 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_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_M5_Cell_11);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_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_M5_Cell_11 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_11 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M5_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_M5_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M5_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_M5_Cell_12 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M5_Cell_12 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_1(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_M6_Cell_1);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_1(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_1 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_2(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_M6_Cell_2);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_2(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_2 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_3(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_M6_Cell_3);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_3(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_3 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_4(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_M6_Cell_4);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_4(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_4 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_5(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_M6_Cell_5);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_5(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_6(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_M6_Cell_6);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_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_M6_Cell_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_6 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_7(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_M6_Cell_7);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_7(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_8(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_M6_Cell_8);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_8(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_9(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_M6_Cell_9);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_9(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_Cell_10(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_M6_Cell_10);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_Cell_10(can_obj_all_sre_edited_h_t *o, int8_t in) {
+ assert(o);
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_10 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_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_M6_Cell_11);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_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_M6_Cell_11 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_11 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M6_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_M6_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M6_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_M6_Cell_12 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M6_Cell_12 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_1(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_M7_Cell_1);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_1(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_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_1 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_2(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_M7_Cell_2);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_2(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_2 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_2 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_3(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_M7_Cell_3);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_3(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_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_3 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_4(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_M7_Cell_4);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_4(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_4 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_4 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_5(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_M7_Cell_5);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_5(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_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_6(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_M7_Cell_6);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_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_M7_Cell_6 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_6 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_7(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_M7_Cell_7);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_7(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_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_8(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_M7_Cell_8);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_8(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_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_9(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_M7_Cell_9);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_9(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_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_Cell_10(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_M7_Cell_10);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_Cell_10(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_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M7_Cell_10 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M7_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_M7_Cell_11);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M7_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_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;
+}
+
+int decode_can_0x624_BMS_M7_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_M7_Cell_12);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+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);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_1(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_1 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_1 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_2(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_2);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_2(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_2 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_2 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_3(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_3);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_3(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_3 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_3 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_4(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_4);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_4(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_4 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_4 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_5(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_5);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_5(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_5 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_5 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_6(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_6);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+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);
+ 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 = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_7(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_7 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_7 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_8(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_8);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_8(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_8 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_8 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_9(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_9);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_9(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_9 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_9 = in;
+ return 0;
+}
+
+int decode_can_0x624_BMS_M8_Cell_10(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_10);
+ if (rval >= 0) {
+ *out = rval;
+ return 0;
+ } else {
+ *out = (int8_t)0;
+ return -1;
+ }
+}
+
+int encode_can_0x624_BMS_M8_Cell_10(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_10 = 0;
+ if (in < 0)
+ return -1;
+ o->can_0x624_BMS_Balance_Status_M5_to_M8.BMS_M8_Cell_10 = in;
+ return 0;
+}
+
+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, "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_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;
}
@@ -635,7 +3888,7 @@ int decode_can_0x630_BMS_M1_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -647,7 +3900,7 @@ int decode_can_0x630_BMS_M1_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x630_BMS_M1_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_1_Voltage = in;
@@ -659,7 +3912,7 @@ int decode_can_0x630_BMS_M1_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -671,7 +3924,7 @@ int decode_can_0x630_BMS_M1_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x630_BMS_M1_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_2_Voltage = in;
@@ -683,7 +3936,7 @@ int decode_can_0x630_BMS_M1_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -695,7 +3948,7 @@ int decode_can_0x630_BMS_M1_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x630_BMS_M1_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_3_Voltage = in;
@@ -707,7 +3960,7 @@ int decode_can_0x630_BMS_M1_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -719,7 +3972,7 @@ int decode_can_0x630_BMS_M1_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x630_BMS_M1_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x630_BMS_M1_Cell_Voltage_Data_1.BMS_M1_Cell_4_Voltage = in;
@@ -791,7 +4044,7 @@ int decode_can_0x631_BMS_M1_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -803,7 +4056,7 @@ int decode_can_0x631_BMS_M1_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x631_BMS_M1_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_5_Voltage = in;
@@ -815,7 +4068,7 @@ int decode_can_0x631_BMS_M1_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -827,7 +4080,7 @@ int decode_can_0x631_BMS_M1_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x631_BMS_M1_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_6_Voltage = in;
@@ -839,7 +4092,7 @@ int decode_can_0x631_BMS_M1_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -851,7 +4104,7 @@ int decode_can_0x631_BMS_M1_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x631_BMS_M1_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_7_Voltage = in;
@@ -863,7 +4116,7 @@ int decode_can_0x631_BMS_M1_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -875,7 +4128,7 @@ int decode_can_0x631_BMS_M1_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x631_BMS_M1_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x631_BMS_M1_Cell_Voltage_Data_2.BMS_M1_Cell_8_Voltage = in;
@@ -947,7 +4200,7 @@ int decode_can_0x632_BMS_M1_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -959,7 +4212,7 @@ int decode_can_0x632_BMS_M1_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x632_BMS_M1_Cell_9_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_9_Voltage = in;
@@ -971,7 +4224,7 @@ int decode_can_0x632_BMS_M1_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -983,7 +4236,7 @@ int decode_can_0x632_BMS_M1_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x632_BMS_M1_Cell_10_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_10_Voltage = in;
@@ -995,7 +4248,7 @@ int decode_can_0x632_BMS_M1_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1007,7 +4260,7 @@ int decode_can_0x632_BMS_M1_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x632_BMS_M1_Cell_11_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_11_Voltage = in;
@@ -1019,7 +4272,7 @@ int decode_can_0x632_BMS_M1_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1031,7 +4284,7 @@ int decode_can_0x632_BMS_M1_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x632_BMS_M1_Cell_12_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x632_BMS_M1_Cell_Voltage_Data_3.BMS_M1_Cell_12_Voltage = in;
@@ -1103,7 +4356,7 @@ int decode_can_0x633_BMS_M2_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1115,7 +4368,7 @@ int decode_can_0x633_BMS_M2_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x633_BMS_M2_Cell_1_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_1_Voltage = in;
@@ -1127,7 +4380,7 @@ int decode_can_0x633_BMS_M2_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1139,7 +4392,7 @@ int decode_can_0x633_BMS_M2_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x633_BMS_M2_Cell_2_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_2_Voltage = in;
@@ -1151,7 +4404,7 @@ int decode_can_0x633_BMS_M2_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1163,7 +4416,7 @@ int decode_can_0x633_BMS_M2_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x633_BMS_M2_Cell_3_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_3_Voltage = in;
@@ -1175,7 +4428,7 @@ int decode_can_0x633_BMS_M2_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1187,7 +4440,7 @@ int decode_can_0x633_BMS_M2_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x633_BMS_M2_Cell_4_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x633_BMS_M2_Cell_Voltage_Data_1.BMS_M2_Cell_4_Voltage = in;
@@ -1259,7 +4512,7 @@ int decode_can_0x634_BMS_M2_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1271,7 +4524,7 @@ int decode_can_0x634_BMS_M2_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x634_BMS_M2_Cell_5_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_5_Voltage = in;
@@ -1283,7 +4536,7 @@ int decode_can_0x634_BMS_M2_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1295,7 +4548,7 @@ int decode_can_0x634_BMS_M2_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x634_BMS_M2_Cell_6_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_6_Voltage = in;
@@ -1307,7 +4560,7 @@ int decode_can_0x634_BMS_M2_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1319,7 +4572,7 @@ int decode_can_0x634_BMS_M2_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x634_BMS_M2_Cell_7_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_7_Voltage = in;
@@ -1331,7 +4584,7 @@ int decode_can_0x634_BMS_M2_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1343,7 +4596,7 @@ int decode_can_0x634_BMS_M2_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x634_BMS_M2_Cell_8_Voltage(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x634_BMS_M2_Cell_Voltage_Data_2.BMS_M2_Cell_8_Voltage = in;
@@ -1415,7 +4668,7 @@ int decode_can_0x635_BMS_M2_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1427,7 +4680,7 @@ int decode_can_0x635_BMS_M2_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x635_BMS_M2_Cell_9_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_9_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_9_Voltage = in;
@@ -1439,7 +4692,7 @@ int decode_can_0x635_BMS_M2_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1451,7 +4704,7 @@ int decode_can_0x635_BMS_M2_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o,
int encode_can_0x635_BMS_M2_Cell_10_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_10_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_10_Voltage = in;
@@ -1463,7 +4716,7 @@ int decode_can_0x635_BMS_M2_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1475,7 +4728,7 @@ int decode_can_0x635_BMS_M2_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_11_Voltage = in;
@@ -1487,7 +4740,7 @@ int decode_can_0x635_BMS_M2_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1499,7 +4752,7 @@ int decode_can_0x635_BMS_M2_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x635_BMS_M2_Cell_Voltage_Data_3.BMS_M2_Cell_12_Voltage = in;
@@ -1571,7 +4824,7 @@ int decode_can_0x636_BMS_M3_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1583,7 +4836,7 @@ int decode_can_0x636_BMS_M3_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_1_Voltage = in;
@@ -1595,7 +4848,7 @@ int decode_can_0x636_BMS_M3_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1607,7 +4860,7 @@ int decode_can_0x636_BMS_M3_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_2_Voltage = in;
@@ -1619,7 +4872,7 @@ int decode_can_0x636_BMS_M3_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1631,7 +4884,7 @@ int decode_can_0x636_BMS_M3_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_3_Voltage = in;
@@ -1643,7 +4896,7 @@ int decode_can_0x636_BMS_M3_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1655,7 +4908,7 @@ int decode_can_0x636_BMS_M3_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x636_BMS_M3_Cell_Voltage_Data_1.BMS_M3_Cell_4_Voltage = in;
@@ -1727,7 +4980,7 @@ int decode_can_0x637_BMS_M3_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1739,7 +4992,7 @@ int decode_can_0x637_BMS_M3_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_5_Voltage = in;
@@ -1751,7 +5004,7 @@ int decode_can_0x637_BMS_M3_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1763,7 +5016,7 @@ int decode_can_0x637_BMS_M3_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_6_Voltage = in;
@@ -1775,7 +5028,7 @@ int decode_can_0x637_BMS_M3_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1787,7 +5040,7 @@ int decode_can_0x637_BMS_M3_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_7_Voltage = in;
@@ -1799,7 +5052,7 @@ int decode_can_0x637_BMS_M3_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1811,7 +5064,7 @@ int decode_can_0x637_BMS_M3_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x637_BMS_M3_Cell_Voltage_Data_2.BMS_M3_Cell_8_Voltage = in;
@@ -1883,7 +5136,7 @@ int decode_can_0x638_BMS_M3_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1895,7 +5148,7 @@ int decode_can_0x638_BMS_M3_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_9_Voltage = in;
@@ -1907,7 +5160,7 @@ int decode_can_0x638_BMS_M3_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1919,7 +5172,7 @@ int decode_can_0x638_BMS_M3_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_10_Voltage = in;
@@ -1931,7 +5184,7 @@ int decode_can_0x638_BMS_M3_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1943,7 +5196,7 @@ int decode_can_0x638_BMS_M3_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_11_Voltage = in;
@@ -1955,7 +5208,7 @@ int decode_can_0x638_BMS_M3_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -1967,7 +5220,7 @@ int decode_can_0x638_BMS_M3_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x638_BMS_M3_Cell_Voltage_Data_3.BMS_M3_Cell_12_Voltage = in;
@@ -2039,7 +5292,7 @@ int decode_can_0x639_BMS_M4_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2051,7 +5304,7 @@ int decode_can_0x639_BMS_M4_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_1_Voltage = in;
@@ -2063,7 +5316,7 @@ int decode_can_0x639_BMS_M4_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2075,7 +5328,7 @@ int decode_can_0x639_BMS_M4_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_2_Voltage = in;
@@ -2087,7 +5340,7 @@ int decode_can_0x639_BMS_M4_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2099,7 +5352,7 @@ int decode_can_0x639_BMS_M4_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_3_Voltage = in;
@@ -2111,7 +5364,7 @@ int decode_can_0x639_BMS_M4_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2123,7 +5376,7 @@ int decode_can_0x639_BMS_M4_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x639_BMS_M4_Cell_Voltage_Data_1.BMS_M4_Cell_4_Voltage = in;
@@ -2195,7 +5448,7 @@ int decode_can_0x63a_BMS_M4_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2207,7 +5460,7 @@ int decode_can_0x63a_BMS_M4_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_5_Voltage = in;
@@ -2219,7 +5472,7 @@ int decode_can_0x63a_BMS_M4_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2231,7 +5484,7 @@ int decode_can_0x63a_BMS_M4_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_6_Voltage = in;
@@ -2243,7 +5496,7 @@ int decode_can_0x63a_BMS_M4_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2255,7 +5508,7 @@ int decode_can_0x63a_BMS_M4_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_7_Voltage = in;
@@ -2267,7 +5520,7 @@ int decode_can_0x63a_BMS_M4_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2279,7 +5532,7 @@ int decode_can_0x63a_BMS_M4_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63a_BMS_M4_Cell_Voltage_Data_2.BMS_M4_Cell_8_Voltage = in;
@@ -2351,7 +5604,7 @@ int decode_can_0x63b_BMS_M4_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2363,7 +5616,7 @@ int decode_can_0x63b_BMS_M4_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_9_Voltage = in;
@@ -2375,7 +5628,7 @@ int decode_can_0x63b_BMS_M4_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2387,7 +5640,7 @@ int decode_can_0x63b_BMS_M4_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_10_Voltage = in;
@@ -2399,7 +5652,7 @@ int decode_can_0x63b_BMS_M4_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2411,7 +5664,7 @@ int decode_can_0x63b_BMS_M4_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_11_Voltage = in;
@@ -2423,7 +5676,7 @@ int decode_can_0x63b_BMS_M4_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2435,7 +5688,7 @@ int decode_can_0x63b_BMS_M4_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63b_BMS_M4_Cell_Voltage_Data_3.BMS_M4_Cell_12_Voltage = in;
@@ -2507,7 +5760,7 @@ int decode_can_0x63c_BMS_M5_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2519,7 +5772,7 @@ int decode_can_0x63c_BMS_M5_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_1_Voltage = in;
@@ -2531,7 +5784,7 @@ int decode_can_0x63c_BMS_M5_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2543,7 +5796,7 @@ int decode_can_0x63c_BMS_M5_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_2_Voltage = in;
@@ -2555,7 +5808,7 @@ int decode_can_0x63c_BMS_M5_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2567,7 +5820,7 @@ int decode_can_0x63c_BMS_M5_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_3_Voltage = in;
@@ -2579,7 +5832,7 @@ int decode_can_0x63c_BMS_M5_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2591,7 +5844,7 @@ int decode_can_0x63c_BMS_M5_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63c_BMS_M5_Cell_Voltage_Data_1.BMS_M5_Cell_4_Voltage = in;
@@ -2663,7 +5916,7 @@ int decode_can_0x63d_BMS_M5_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2675,7 +5928,7 @@ int decode_can_0x63d_BMS_M5_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_5_Voltage = in;
@@ -2687,7 +5940,7 @@ int decode_can_0x63d_BMS_M5_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2699,7 +5952,7 @@ int decode_can_0x63d_BMS_M5_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_6_Voltage = in;
@@ -2711,7 +5964,7 @@ int decode_can_0x63d_BMS_M5_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2723,7 +5976,7 @@ int decode_can_0x63d_BMS_M5_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_7_Voltage = in;
@@ -2735,7 +5988,7 @@ int decode_can_0x63d_BMS_M5_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2747,7 +6000,7 @@ int decode_can_0x63d_BMS_M5_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63d_BMS_M5_Cell_Voltage_Data_2.BMS_M5_Cell_8_Voltage = in;
@@ -2819,7 +6072,7 @@ int decode_can_0x63e_BMS_M5_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2831,7 +6084,7 @@ int decode_can_0x63e_BMS_M5_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_9_Voltage = in;
@@ -2843,7 +6096,7 @@ int decode_can_0x63e_BMS_M5_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2855,7 +6108,7 @@ int decode_can_0x63e_BMS_M5_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_10_Voltage = in;
@@ -2867,7 +6120,7 @@ int decode_can_0x63e_BMS_M5_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2879,7 +6132,7 @@ int decode_can_0x63e_BMS_M5_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_11_Voltage = in;
@@ -2891,7 +6144,7 @@ int decode_can_0x63e_BMS_M5_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2903,7 +6156,7 @@ int decode_can_0x63e_BMS_M5_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63e_BMS_M5_Cell_Voltage_Data_3.BMS_M5_Cell_12_Voltage = in;
@@ -2975,7 +6228,7 @@ int decode_can_0x63f_BMS_M6_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -2987,7 +6240,7 @@ int decode_can_0x63f_BMS_M6_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_1_Voltage = in;
@@ -2999,7 +6252,7 @@ int decode_can_0x63f_BMS_M6_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3011,7 +6264,7 @@ int decode_can_0x63f_BMS_M6_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_2_Voltage = in;
@@ -3023,7 +6276,7 @@ int decode_can_0x63f_BMS_M6_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3035,7 +6288,7 @@ int decode_can_0x63f_BMS_M6_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_3_Voltage = in;
@@ -3047,7 +6300,7 @@ int decode_can_0x63f_BMS_M6_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3059,7 +6312,7 @@ int decode_can_0x63f_BMS_M6_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x63f_BMS_M6_Cell_Voltage_Data_1.BMS_M6_Cell_4_Voltage = in;
@@ -3131,7 +6384,7 @@ int decode_can_0x640_BMS_M6_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3143,7 +6396,7 @@ int decode_can_0x640_BMS_M6_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_5_Voltage = in;
@@ -3155,7 +6408,7 @@ int decode_can_0x640_BMS_M6_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3167,7 +6420,7 @@ int decode_can_0x640_BMS_M6_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_6_Voltage = in;
@@ -3179,7 +6432,7 @@ int decode_can_0x640_BMS_M6_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3191,7 +6444,7 @@ int decode_can_0x640_BMS_M6_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_7_Voltage = in;
@@ -3203,7 +6456,7 @@ int decode_can_0x640_BMS_M6_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3215,7 +6468,7 @@ int decode_can_0x640_BMS_M6_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x640_BMS_M6_Cell_Voltage_Data_2.BMS_M6_Cell_8_Voltage = in;
@@ -3287,7 +6540,7 @@ int decode_can_0x641_BMS_M6_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3299,7 +6552,7 @@ int decode_can_0x641_BMS_M6_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_9_Voltage = in;
@@ -3311,7 +6564,7 @@ int decode_can_0x641_BMS_M6_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3323,7 +6576,7 @@ int decode_can_0x641_BMS_M6_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_10_Voltage = in;
@@ -3335,7 +6588,7 @@ int decode_can_0x641_BMS_M6_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3347,7 +6600,7 @@ int decode_can_0x641_BMS_M6_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_11_Voltage = in;
@@ -3359,7 +6612,7 @@ int decode_can_0x641_BMS_M6_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3371,7 +6624,7 @@ int decode_can_0x641_BMS_M6_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *o,
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 > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x641_BMS_M6_Cell_Voltage_Data_3.BMS_M6_Cell_12_Voltage = in;
@@ -3443,7 +6696,7 @@ int decode_can_0x642_BMS_M7_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3455,7 +6708,7 @@ 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) {
assert(o);
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_1_Voltage = in;
@@ -3467,7 +6720,7 @@ int decode_can_0x642_BMS_M7_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3479,7 +6732,7 @@ 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) {
assert(o);
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_2_Voltage = in;
@@ -3491,7 +6744,7 @@ int decode_can_0x642_BMS_M7_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3503,7 +6756,7 @@ 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) {
assert(o);
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_3_Voltage = in;
@@ -3515,7 +6768,7 @@ int decode_can_0x642_BMS_M7_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3527,7 +6780,7 @@ 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) {
assert(o);
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x642_BMS_M7_Cell_Voltage_Data_1.BMS_M7_Cell_4_Voltage = in;
@@ -3599,7 +6852,7 @@ int decode_can_0x643_BMS_M7_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3611,7 +6864,7 @@ 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) {
assert(o);
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_5_Voltage = in;
@@ -3623,7 +6876,7 @@ int decode_can_0x643_BMS_M7_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3635,7 +6888,7 @@ 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) {
assert(o);
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_6_Voltage = in;
@@ -3647,7 +6900,7 @@ int decode_can_0x643_BMS_M7_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3659,7 +6912,7 @@ 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) {
assert(o);
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_7_Voltage = in;
@@ -3671,7 +6924,7 @@ int decode_can_0x643_BMS_M7_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3683,7 +6936,7 @@ 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) {
assert(o);
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x643_BMS_M7_Cell_Voltage_Data_2.BMS_M7_Cell_8_Voltage = in;
@@ -3755,7 +7008,7 @@ int decode_can_0x644_BMS_M7_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3767,7 +7020,7 @@ 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) {
assert(o);
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_9_Voltage = in;
@@ -3779,7 +7032,7 @@ int decode_can_0x644_BMS_M7_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3791,7 +7044,7 @@ 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) {
assert(o);
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_10_Voltage = in;
@@ -3803,7 +7056,7 @@ int decode_can_0x644_BMS_M7_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3815,7 +7068,7 @@ 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) {
assert(o);
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_11_Voltage = in;
@@ -3827,7 +7080,7 @@ int decode_can_0x644_BMS_M7_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3839,7 +7092,7 @@ 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) {
assert(o);
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x644_BMS_M7_Cell_Voltage_Data_3.BMS_M7_Cell_12_Voltage = in;
@@ -3911,7 +7164,7 @@ int decode_can_0x645_BMS_M8_Cell_1_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3923,7 +7176,7 @@ 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) {
assert(o);
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_1_Voltage = in;
@@ -3935,7 +7188,7 @@ int decode_can_0x645_BMS_M8_Cell_2_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3947,7 +7200,7 @@ 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) {
assert(o);
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_2_Voltage = in;
@@ -3959,7 +7212,7 @@ int decode_can_0x645_BMS_M8_Cell_3_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3971,7 +7224,7 @@ 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) {
assert(o);
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_3_Voltage = in;
@@ -3983,7 +7236,7 @@ int decode_can_0x645_BMS_M8_Cell_4_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -3995,7 +7248,7 @@ 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) {
assert(o);
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x645_BMS_M8_Cell_Voltage_Data_1.BMS_M8_Cell_4_Voltage = in;
@@ -4067,7 +7320,7 @@ int decode_can_0x646_BMS_M8_Cell_5_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4079,7 +7332,7 @@ 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) {
assert(o);
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_5_Voltage = in;
@@ -4091,7 +7344,7 @@ int decode_can_0x646_BMS_M8_Cell_6_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4103,7 +7356,7 @@ 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) {
assert(o);
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_6_Voltage = in;
@@ -4115,7 +7368,7 @@ int decode_can_0x646_BMS_M8_Cell_7_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4127,7 +7380,7 @@ 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) {
assert(o);
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_7_Voltage = in;
@@ -4139,7 +7392,7 @@ int decode_can_0x646_BMS_M8_Cell_8_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4151,7 +7404,7 @@ 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) {
assert(o);
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x646_BMS_M8_Cell_Voltage_Data_2.BMS_M8_Cell_8_Voltage = in;
@@ -4223,7 +7476,7 @@ int decode_can_0x647_BMS_M8_Cell_9_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4235,7 +7488,7 @@ 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) {
assert(o);
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_9_Voltage = in;
@@ -4247,7 +7500,7 @@ int decode_can_0x647_BMS_M8_Cell_10_Voltage(const can_obj_all_sre_edited_h_t *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 <= 5) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4259,7 +7512,7 @@ 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) {
assert(o);
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_10_Voltage = in;
@@ -4271,7 +7524,7 @@ int decode_can_0x647_BMS_M8_Cell_11_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4283,7 +7536,7 @@ 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) {
assert(o);
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_11_Voltage = in;
@@ -4295,7 +7548,7 @@ int decode_can_0x647_BMS_M8_Cell_12_Voltage(const can_obj_all_sre_edited_h_t *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) {
+ if (rval <= 6.5535) {
*out = rval;
return 0;
} else {
@@ -4307,7 +7560,7 @@ 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) {
assert(o);
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = 0;
- if (in > 5)
+ if (in > 6.5535)
return -1;
in *= 10000;
o->can_0x647_BMS_M8_Cell_Voltage_Data_3.BMS_M8_Cell_12_Voltage = in;
@@ -4325,1779 +7578,3249 @@ int print_can_0x647_BMS_M8_Cell_Voltage_Data_3(const can_obj_all_sre_edited_h_t
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_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_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_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_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_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_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_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_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_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_Temperature_Data_1_tx = 1;
+ o->can_0x680_BMS_M1_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_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_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_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_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_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_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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_0x680_BMS_M1_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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_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_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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_0x680_BMS_M1_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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_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_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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_0x680_BMS_M1_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_0x680_BMS_M1_Cell_Thermistor_Data_1.BMS_M1_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_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_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_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 print_can_0x680_BMS_M1_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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_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_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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_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_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_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_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_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_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_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_Temperature_Data_2_tx = 1;
+ o->can_0x681_BMS_M1_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_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_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_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_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_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_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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_0x681_BMS_M1_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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_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_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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_0x681_BMS_M1_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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_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_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_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_Cell_8_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+int decode_can_0x681_BMS_M1_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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_0x681_BMS_M1_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_0x681_BMS_M1_Cell_Thermistor_Data_2.BMS_M1_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_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_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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_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_M1_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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_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_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_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_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_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_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_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_M1_Cell_Temperature_Data_3_tx = 1;
+ o->can_0x682_BMS_M2_Cell_Thermistor_Data_1_tx = 1;
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) {
+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_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;
+ /* 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_M1_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_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_0x682_BMS_M2_Cell_1_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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_1_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_0x682_BMS_M2_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_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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_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_0x682_BMS_M2_Cell_2_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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_2_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_0x682_BMS_M2_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_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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_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_0x682_BMS_M2_Cell_3_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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_3_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_0x682_BMS_M2_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_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_0x682_BMS_M2_Cell_Thermistor_Data_1.BMS_M2_Cell_4_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_0x682_BMS_M2_Cell_4_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_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 print_can_0x682_BMS_M1_Cell_Temperature_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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_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_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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_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_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_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_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_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_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_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_Temperature_Data_1_tx = 1;
+ o->can_0x683_BMS_M2_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_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_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_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_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_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_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_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_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_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_0x683_BMS_M2_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_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_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_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_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_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_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_0x683_BMS_M2_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_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_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_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_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_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_Cell_4_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+int decode_can_0x683_BMS_M2_Pressure(const can_obj_all_sre_edited_h_t *o, double *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) {
+ 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 = (uint16_t)0;
+ *out = (double)0;
return -1;
}
}
-int encode_can_0x683_BMS_M2_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+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_Temperature_Data_1.BMS_M2_Cell_4_Temperature = 0;
- if (in > 100)
+ o->can_0x683_BMS_M2_Cell_Thermistor_Data_2.BMS_M2_Pressure = 0;
+ if (in > 2.55)
return -1;
- o->can_0x683_BMS_M2_Cell_Temperature_Data_1.BMS_M2_Cell_4_Temperature = in;
+ 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 print_can_0x683_BMS_M2_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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)));
+ 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_M2_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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;
+ /* 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_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;
+ /* 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_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;
+ /* 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_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;
+ /* 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_M2_Cell_Temperature_Data_2_tx = 1;
+ o->can_0x684_BMS_M3_Cell_Thermistor_Data_1_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) {
+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_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;
+ /* 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_M2_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- uint16_t rval = (uint16_t)(o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature);
- if (rval <= 100) {
- *out = rval;
- return 0;
- } else {
- *out = (uint16_t)0;
- return -1;
- }
+ 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_M2_Cell_5_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+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_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature = 0;
- if (in > 100)
- return -1;
- o->can_0x684_BMS_M2_Cell_Temperature_Data_2.BMS_M2_Cell_5_Temperature = in;
+ o->can_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_1_Thermistor = 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_0x684_BMS_M3_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_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_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor);
+ *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_0x684_BMS_M3_Cell_2_Thermistor(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_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_2_Thermistor = 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_0x684_BMS_M3_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_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_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor);
+ *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_0x684_BMS_M3_Cell_3_Thermistor(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_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_3_Thermistor = 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_0x684_BMS_M3_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_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_0x684_BMS_M3_Cell_Thermistor_Data_1.BMS_M3_Cell_4_Thermistor);
+ *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_0x684_BMS_M3_Cell_4_Thermistor(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_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_M2_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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_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_M2_Cell_Temperature_Data_3(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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_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_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_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_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_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_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_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_M2_Cell_Temperature_Data_3_tx = 1;
+ o->can_0x685_BMS_M3_Cell_Thermistor_Data_2_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_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_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_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_M2_Cell_9_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_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_0x685_BMS_M3_Cell_9_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_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_9_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_0x685_BMS_M3_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_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_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_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_0x685_BMS_M3_Cell_10_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_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_10_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_0x685_BMS_M3_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_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_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_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_0x685_BMS_M3_Cell_11_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_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Cell_11_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_0x685_BMS_M3_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_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature);
- if (rval <= 100) {
+ 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 = (uint16_t)0;
+ *out = (double)0;
return -1;
}
}
-int encode_can_0x685_BMS_M2_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+int encode_can_0x685_BMS_M3_Pressure(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
- o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature = 0;
- if (in > 100)
+ o->can_0x685_BMS_M3_Cell_Thermistor_Data_2.BMS_M3_Pressure = 0;
+ if (in > 2.55)
return -1;
- o->can_0x685_BMS_M2_Cell_Temperature_Data_3.BMS_M2_Cell_12_Temperature = in;
+ 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 print_can_0x685_BMS_M2_Cell_Temperature_Data_3(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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)));
+ 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_M3_Cell_Temperature_Data_1(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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;
+ /* 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_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;
+ /* 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_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;
+ /* 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_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;
+ /* 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_M3_Cell_Temperature_Data_1_tx = 1;
+ o->can_0x686_BMS_M4_Cell_Thermistor_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) {
+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_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;
+ /* 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_M3_Cell_1_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_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_0x686_BMS_M4_Cell_1_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_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_1_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_0x686_BMS_M4_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_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_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_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_0x686_BMS_M4_Cell_2_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_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_2_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_0x686_BMS_M4_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_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_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_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_0x686_BMS_M4_Cell_3_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_0x686_BMS_M4_Cell_Thermistor_Data_1.BMS_M4_Cell_3_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_0x686_BMS_M4_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_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;
- }
+ 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_M3_Cell_4_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+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_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_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_M3_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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_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_M3_Cell_Temperature_Data_2(can_obj_all_sre_edited_h_t *o, uint64_t *data) {
+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_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_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_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_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_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_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_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_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_M3_Cell_Temperature_Data_2_tx = 1;
+ o->can_0x687_BMS_M4_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_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_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_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_M3_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_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_0x687_BMS_M4_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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_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_0x687_BMS_M4_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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_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_0x687_BMS_M4_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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_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_0x687_BMS_M4_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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_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_0x687_BMS_M4_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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_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_0x687_BMS_M4_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) {
+ 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_0x687_BMS_M4_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) {
+ assert(o);
+ assert(out);
+ 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 {
- *out = (uint16_t)0;
+ *out = (double)0;
return -1;
}
}
-int encode_can_0x687_BMS_M3_Cell_8_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+int encode_can_0x687_BMS_M4_Pressure(can_obj_all_sre_edited_h_t *o, double in) {
assert(o);
- o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature = 0;
- if (in > 100)
+ o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure = 0;
+ if (in > 2.55)
return -1;
- o->can_0x687_BMS_M3_Cell_Temperature_Data_2.BMS_M3_Cell_8_Temperature = in;
+ in *= 100;
+ o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Pressure = in;
+ return 0;
+}
+
+int decode_can_0x687_BMS_M4_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_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x687_BMS_M4_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x687_BMS_M4_Cell_Thermistor_Data_2.BMS_M4_Atmosphere_Temp = in;
+ return 0;
+}
+
+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_M3_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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)));
+ 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_0x688_BMS_M3_Cell_Temperature_Data_3(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_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;
+ /* 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_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;
+ /* 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_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_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;
+ /* 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_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;
+ /* 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_0x688_BMS_M3_Cell_Temperature_Data_3_tx = 1;
+ o->can_0x688_BMS_M5_Cell_Thermistor_Data_1_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) {
+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_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;
+ /* 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_0x688_BMS_M3_Cell_9_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_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_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_0x688_BMS_M3_Cell_9_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_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature = 0;
- if (in > 100)
- return -1;
- o->can_0x688_BMS_M3_Cell_Temperature_Data_3.BMS_M3_Cell_9_Temperature = in;
+ o->can_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_1_Thermistor = 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_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_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_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor);
+ *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_0x688_BMS_M5_Cell_2_Thermistor(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_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_2_Thermistor = 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_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_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_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor);
+ *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_0x688_BMS_M5_Cell_3_Thermistor(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_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_3_Thermistor = 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_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_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_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor);
+ *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_0x688_BMS_M5_Cell_4_Thermistor(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_0x688_BMS_M5_Cell_Thermistor_Data_1.BMS_M5_Cell_4_Thermistor = 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 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 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_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_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_0x689_BMS_M4_Cell_Temperature_Data_1(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_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_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_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_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_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_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_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_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_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_0x689_BMS_M4_Cell_Temperature_Data_1_tx = 1;
+ o->can_0x689_BMS_M5_Cell_Thermistor_Data_2_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_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_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_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_0x689_BMS_M4_Cell_1_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_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_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_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_0x689_BMS_M5_Cell_9_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_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_9_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_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_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_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_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_0x689_BMS_M5_Cell_10_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_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_10_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_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_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_0x689_BMS_M5_Cell_Thermistor_Data_2.BMS_M5_Cell_11_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_0x689_BMS_M5_Cell_11_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_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_0x689_BMS_M4_Cell_4_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_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_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_0x689_BMS_M4_Cell_4_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_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_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_0x689_BMS_M4_Cell_Temperature_Data_1.BMS_M4_Cell_4_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 print_can_0x689_BMS_M4_Cell_Temperature_Data_1(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+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_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_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)));
+ 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_0x68a_BMS_M4_Cell_Temperature_Data_2(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_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;
+ /* 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_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_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;
+ /* 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_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;
+ /* 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_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;
+ /* 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_0x68a_BMS_M4_Cell_Temperature_Data_2_tx = 1;
+ o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1_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) {
+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_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;
+ /* 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;
}
-int decode_can_0x68a_BMS_M4_Cell_5_Temperature(const can_obj_all_sre_edited_h_t *o, uint16_t *out) {
+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);
- 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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_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_0x68a_BMS_M6_Cell_1_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_1_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_0x68a_BMS_M6_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_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_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_0x68a_BMS_M6_Cell_2_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_2_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_0x68a_BMS_M6_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_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_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_0x68a_BMS_M6_Cell_3_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_3_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_0x68a_BMS_M6_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_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_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_0x68a_BMS_M6_Cell_4_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_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_4_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68a_BMS_M6_Cell_5_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_5_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68a_BMS_M6_Cell_6_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_6_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68a_BMS_M6_Cell_7_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_7_Thermistor = in;
+ return 0;
+}
+
+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);
+ uint8_t rval = (uint8_t)(o->can_0x68a_BMS_M6_Cell_Thermistor_Data_1.BMS_M6_Cell_8_Thermistor);
+ *out = rval;
return 0;
}
-int print_can_0x68a_BMS_M4_Cell_Temperature_Data_2(const can_obj_all_sre_edited_h_t *o, FILE *output) {
+int encode_can_0x68a_BMS_M6_Cell_8_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_8_Thermistor = in;
+ return 0;
+}
+
+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_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_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_0x68b_BMS_M4_Cell_Temperature_Data_3(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_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_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_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;
+ /* 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_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;
+ /* 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_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;
+ /* 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_0x68b_BMS_M4_Cell_Temperature_Data_3_tx = 1;
+ o->can_0x68b_BMS_M6_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_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_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_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_0x68b_BMS_M4_Cell_9_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);
+ 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_0x68b_BMS_M6_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_9_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68b_BMS_M6_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_10_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68b_BMS_M6_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_11_Thermistor = in;
+ return 0;
+}
+
+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);
+ uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68b_BMS_M6_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Cell_12_Thermistor = in;
+ return 0;
+}
+
+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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_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_0x68b_BMS_M4_Cell_9_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_9_Temperature = in;
+ in *= 100;
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Pressure = 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_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature);
- if (rval <= 100) {
- *out = rval;
- return 0;
- } else {
- *out = (uint16_t)0;
+ 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_0x68b_BMS_M6_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Atmosphere_Temp = in;
+ return 0;
+}
+
+int decode_can_0x68b_BMS_M6_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) {
+ assert(o);
+ assert(out);
+ uint8_t rval = (uint8_t)(o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68b_BMS_M6_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Humidity = in;
+ return 0;
+}
+
+int decode_can_0x68b_BMS_M6_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_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68b_BMS_M6_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68b_BMS_M6_Cell_Thermistor_Data_2.BMS_M6_Dew_Point = in;
+ return 0;
+}
+
+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_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_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_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_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_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_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_0x68c_BMS_M7_Cell_Thermistor_Data_1_tx = 1;
+ return 8;
+}
+
+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_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_0x68c_BMS_M7_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_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68c_BMS_M7_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_1_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68c_BMS_M7_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_2_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68b_BMS_M4_Cell_10_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature = 0;
- if (in > 100)
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_3_Thermistor = in;
+ return 0;
+}
+
+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);
+ uint8_t rval = (uint8_t)(o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68c_BMS_M7_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_4_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68c_BMS_M7_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_5_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68c_BMS_M7_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_6_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68c_BMS_M7_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_7_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68c_BMS_M7_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68c_BMS_M7_Cell_Thermistor_Data_1.BMS_M7_Cell_8_Thermistor = in;
+ return 0;
+}
+
+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_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_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_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_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_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_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_0x68d_BMS_M7_Cell_Thermistor_Data_2_tx = 1;
+ return 8;
+}
+
+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;
- o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_10_Temperature = in;
+ /* 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_0x68d_BMS_M7_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_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68d_BMS_M7_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_9_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_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature);
- if (rval <= 100) {
+ 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_0x68d_BMS_M7_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_10_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68d_BMS_M7_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_11_Thermistor = in;
+ return 0;
+}
+
+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);
+ uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68d_BMS_M7_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Cell_12_Thermistor = in;
+ return 0;
+}
+
+int decode_can_0x68d_BMS_M7_Pressure(const can_obj_all_sre_edited_h_t *o, double *out) {
+ assert(o);
+ assert(out);
+ 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_0x68b_BMS_M4_Cell_11_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_11_Temperature = in;
+ in *= 100;
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Pressure = 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_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_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature);
- if (rval <= 100) {
- *out = rval;
- return 0;
- } else {
- *out = (uint16_t)0;
+ 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_0x68d_BMS_M7_Atmosphere_Temp(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Atmosphere_Temp = in;
+ return 0;
+}
+
+int decode_can_0x68d_BMS_M7_Humidity(const can_obj_all_sre_edited_h_t *o, uint8_t *out) {
+ assert(o);
+ assert(out);
+ uint8_t rval = (uint8_t)(o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68d_BMS_M7_Humidity(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Humidity = in;
+ return 0;
+}
+
+int decode_can_0x68d_BMS_M7_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_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68d_BMS_M7_Dew_Point(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68d_BMS_M7_Cell_Thermistor_Data_2.BMS_M7_Dew_Point = in;
+ return 0;
+}
+
+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_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_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_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_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_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_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_0x68e_BMS_M8_Cell_Thermistor_Data_1_tx = 1;
+ return 8;
+}
+
+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_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 encode_can_0x68b_BMS_M4_Cell_12_Temperature(can_obj_all_sre_edited_h_t *o, uint16_t in) {
+int decode_can_0x68e_BMS_M8_Cell_1_Thermistor(const can_obj_all_sre_edited_h_t *o, uint8_t *out) {
assert(o);
- o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature = 0;
- if (in > 100)
+ assert(out);
+ 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_0x68e_BMS_M8_Cell_1_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_1_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68e_BMS_M8_Cell_2_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_2_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68e_BMS_M8_Cell_3_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_3_Thermistor = in;
+ return 0;
+}
+
+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);
+ uint8_t rval = (uint8_t)(o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68e_BMS_M8_Cell_4_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_4_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68e_BMS_M8_Cell_5_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_5_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68e_BMS_M8_Cell_6_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_6_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68e_BMS_M8_Cell_7_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_7_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68e_BMS_M8_Cell_8_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68e_BMS_M8_Cell_Thermistor_Data_1.BMS_M8_Cell_8_Thermistor = in;
+ return 0;
+}
+
+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_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_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_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_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_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_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_0x68f_BMS_M8_Cell_Thermistor_Data_2_tx = 1;
+ return 8;
+}
+
+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;
- o->can_0x68b_BMS_M4_Cell_Temperature_Data_3.BMS_M4_Cell_12_Temperature = in;
+ /* 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_0x68f_BMS_M8_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_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor);
+ *out = rval;
+ return 0;
+}
+
+int encode_can_0x68f_BMS_M8_Cell_9_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_9_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68f_BMS_M8_Cell_10_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_10_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68f_BMS_M8_Cell_11_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ o->can_0x68f_BMS_M8_Cell_Thermistor_Data_2.BMS_M8_Cell_11_Thermistor = in;
+ return 0;
+}
+
+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);
+ 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_0x68f_BMS_M8_Cell_12_Thermistor(can_obj_all_sre_edited_h_t *o, uint8_t in) {
+ assert(o);
+ 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;