The following tables describe the binary encodings of the data model using the ACN Encoding Rules.

Module BMS

Defined in: bms.asn1.

BMSADCValue (INTEGER) ASN.1 Min: 2 bytes Max: 2 bytes
Convert to voltage with ((float)val * 3.3) / (1 << 12)
Constraints Min Length (bits) Max Length (bits) Unit
(0 .. 65535) 16 16
 
BMSSystemStatusRequest (SEQUENCE) ASN.1 Min: 0 bytes Max: 0 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 placeholder Empty struct placeholder always BMSSystemStatusRequest-placeholder (0) 0 0
 
 
BMSSystemStatusResponse (SEQUENCE) ASN.1 Min: 5 bytes Max: 5 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 version Version of the firmware running on BMS. always BMSSystemStatusResponse-version (0 .. 255) 8 8
2 uptime Number of seconds since processor start-up. always BMSSystemStatusResponse-uptime (0 .. 4294967295) 32 32
     
BMSCellStatus (SEQUENCE) ASN.1 Min: 3 bytes Max: 3 bytes
Status of an individual cell
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 overvoltage Cell Over Voltage always BOOLEAN 1 1
2 undervoltage Cell Under Voltage always BOOLEAN 1 1
3 overcurrent Cell Over Current always BOOLEAN 1 1
4 undercurrent Cell Under Current always BOOLEAN 1 1
5 voltage Direct Reading Voltage always BMSADCValue (0 .. 65535) 16 16
 
BMSBatteryPackStatus (SEQUENCE) ASN.1 Min: 11 bytes Max: 11 bytes
Status of a battery pack
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 cellA Status of cell A always BMSCellStatus 20 20
2 cellB Status of cell B always BMSCellStatus 20 20
3 currentDraw Direct Reading of Current Sensor VUR always BMSADCValue (0 .. 65535) 16 16
4 currentCharge Direct Reading of Current Current Sensor CHR always BMSADCValue (0 .. 65535) 16 16
5 voltage Direct Reading of Combined Voltage always BMSADCValue (0 .. 65535) 16 16
 
BMSPowerStatusRequest (SEQUENCE) ASN.1 Min: 0 bytes Max: 0 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 placeholder Empty struct placeholder always BMSPowerStatusRequest-placeholder (0) 0 0
   
BMSPowerStatusResponse (SEQUENCE) ASN.1 Min: 22 bytes Max: 22 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 batteryPack1 Status of battery pack 1 always BMSBatteryPackStatus 88 88
2 batteryPack2 Status of battery pack 2 always BMSBatteryPackStatus 88 88
 
BMSSetHeaterDutyRequest (SEQUENCE) ASN.1 Min: 1 bytes Max: 4 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 Preamble Special field used by ACN to indicate the presence/absence of optional fields that do not have the present when property.
  • bit1 == 1 ⇒ heater1 is present
  • bit2 == 1 ⇒ heater2 is present
  • bit3 == 1 ⇒ heater3 is present
  • bit4 == 1 ⇒ heater4 is present
always Bit mask N.A. 4 4
2 heater1 Duty Cycle of PWM Wave for Heater 1 when the 1st bit of the bit mask is set BMSSetHeaterDutyRequest-heater1 (0 .. 99) 7 7
3 heater2 Duty Cycle of PWM Wave for Heater 2 when the 2nd bit of the bit mask is set BMSSetHeaterDutyRequest-heater2 (0 .. 99) 7 7
4 heater3 Duty Cycle of PWM Wave for Heater 3 when the 3rd bit of the bit mask is set BMSSetHeaterDutyRequest-heater3 (0 .. 99) 7 7
5 heater4 Duty Cycle of PWM Wave for Heater 4 when the 4th bit of the bit mask is set BMSSetHeaterDutyRequest-heater4 (0 .. 99) 7 7
         
BMSSetHeaterDutyResponse (SEQUENCE) ASN.1 Min: 0 bytes Max: 0 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 placeholder Empty struct placeholder always BMSSetHeaterDutyResponse-placeholder (0) 0 0
   
BMSTemperatureStatusRequest (SEQUENCE) ASN.1 Min: 0 bytes Max: 0 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 placeholder Empty struct placeholder always BMSTemperatureStatusRequest-placeholder (0) 0 0
   
BMSTemperatureStatusResponse (SEQUENCE) ASN.1 Min: 16 bytes Max: 16 bytes
No Field Comment Present Type Constraint Min Bits Max Bits Unit
1 thermistors Direct Reading of Thermistors always BMS-BMSTemperatureStatusResponse-thermistors (8) 128 128
 
BMS-BMSTemperatureStatusResponse-thermistors (SEQUENCE-OF) ASN.1 Min: 16 bytes Max: 16 bytes
Acn inline encoding in the context of BMSTemperatureStatusResponse type and thermistors component
Length is fixed to 8 elements (no length determinant is needed).
No Field Comment Present Type Constraint Min Length (bits) Max Length (bits)
1 Item #1 always BMSADCValue (0 .. 65535) 16 16

. . .

8 Item #8 always BMSADCValue (0 .. 65535) 16 16
 
BMSTemperatureStatusResponse-thermistors (SEQUENCE-OF) ASN.1 Min: 16 bytes Max: 16 bytes
Length is fixed to 8 elements (no length determinant is needed).
No Field Comment Present Type Constraint Min Length (bits) Max Length (bits)
1 Item #1 always BMSADCValue (0 .. 65535) 16 16

. . .

8 Item #8 always BMSADCValue (0 .. 65535) 16 16
 

ACN Parameters
In the standard ASN.1 encodings such as uPER, BER etc, the encoding and decoding of any type has no external dependencies. For example, the encoded data for a SEQUENCE OF depends on the number of items in the SEQUENCE OF (the length determinant) and the type of item contained in the SEQUENCE. On the other hand, ACN allows types to be parameterized. For instance, the length of a SEQUENCE OF may be determined by the value of an external field. In this case, the SEQUENCE OF is parameterized and the input parameter is the field providing the length.

File : bms.asn1

BMS DEFINITIONS AUTOMATIC TAGS ::= BEGIN -- Convert to voltage with ((float)val * 3.3) / (1 << 12) BMSADCValue ::= INTEGER(0..65535) lfpIdBMSSystemStatusRequest INTEGER ::= 0 BMSSystemStatusRequest ::= SEQUENCE { placeholder INTEGER(0) -- Empty struct placeholder } lfpIdBMSSystemStatusResponse INTEGER ::= 1 BMSSystemStatusResponse ::= SEQUENCE { -- Version of the firmware running on BMS. version INTEGER(0..255), -- Number of seconds since processor start-up. uptime INTEGER(0..4294967295) } -- Status of an individual cell BMSCellStatus ::= SEQUENCE { -- Cell Over Voltage overvoltage BOOLEAN, -- Cell Under Voltage undervoltage BOOLEAN, -- Cell Over Current overcurrent BOOLEAN, -- Cell Under Current undercurrent BOOLEAN, -- Direct Reading Voltage voltage BMSADCValue } -- Status of a battery pack BMSBatteryPackStatus ::= SEQUENCE { -- Status of cell A cellA BMSCellStatus, -- Status of cell B cellB BMSCellStatus, -- Direct Reading of Current Sensor VUR currentDraw BMSADCValue, -- Direct Reading of Current Current Sensor CHR currentCharge BMSADCValue, -- Direct Reading of Combined Voltage voltage BMSADCValue } lfpIdBMSPowerStatusRequest INTEGER ::= 2 BMSPowerStatusRequest ::= SEQUENCE { placeholder INTEGER(0) -- Empty struct placeholder } lfpIdBMSPowerStatusResponse INTEGER ::= 3 BMSPowerStatusResponse ::= SEQUENCE { -- Status of battery pack 1 batteryPack1 BMSBatteryPackStatus, -- Status of battery pack 2 batteryPack2 BMSBatteryPackStatus } lfpIdBMSSetHeaterDutyRequest INTEGER ::= 4 BMSSetHeaterDutyRequest ::= SEQUENCE { -- Duty Cycle of PWM Wave for Heater 1 heater1 INTEGER(0..99) OPTIONAL, -- Duty Cycle of PWM Wave for Heater 2 heater2 INTEGER(0..99) OPTIONAL, -- Duty Cycle of PWM Wave for Heater 3 heater3 INTEGER(0..99) OPTIONAL, -- Duty Cycle of PWM Wave for Heater 4 heater4 INTEGER(0..99) OPTIONAL } lfpIdBMSSetHeaterDutyResponse INTEGER ::= 5 BMSSetHeaterDutyResponse ::= SEQUENCE { placeholder INTEGER(0) -- Empty struct placeholder } lfpIdBMSTemperatureStatusRequest INTEGER ::= 6 BMSTemperatureStatusRequest ::= SEQUENCE { placeholder INTEGER(0) -- Empty struct placeholder } lfpIdBMSTemperatureStatusResponse INTEGER ::= 7 BMSTemperatureStatusResponse ::= SEQUENCE { -- Direct Reading of Thermistors thermistors SEQUENCE SIZE(8) OF BMSADCValue } END