Skip to content

Commit 39ddea1

Browse files
Added Power and BMS data messages.
1 parent addc044 commit 39ddea1

1 file changed

Lines changed: 297 additions & 1 deletion

File tree

IMC.xml

Lines changed: 297 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="IMC.xsd"
1111
name="IMC"
1212
long-name="Inter Module Communication"
13-
version="5.4.30">
13+
version="5.4.31">
1414

1515
<description>
1616
This document describes the communications protocol associated
@@ -198,7 +198,10 @@
198198
<unit abbrev="m/s" name="Meter per second"/>
199199
<unit abbrev="m/s/s" name="Meter per square second"/>
200200
<unit abbrev="Mbps" name="Megabits per second"/>
201+
<unit abbrev="mAh" name="Milliampere hour"/>
201202
<unit abbrev="ms" name="Millisecond"/>
203+
<unit abbrev="mV" name="Millivolt"/>
204+
<unit abbrev="min" name="Minute"/>
202205
<unit abbrev="µs" name="Microsecond"/>
203206
<unit abbrev="ns" name="Nanosecond"/>
204207
<unit abbrev="S/m" name="Siemens per meter"/>
@@ -222,6 +225,7 @@
222225
<unit abbrev="rpm/s" name="Revolutions per minute per second"/>
223226
<unit abbrev="s" name="Second"/>
224227
<unit abbrev="V" name="Volt"/>
228+
<unit abbrev="W" name="Watt"/>
225229
<unit abbrev="Enumerated" name="Enumeration of integer values"/>
226230
<unit abbrev="List" name="Comma separated list of values"/>
227231
<unit abbrev="Bitfield" name="Bit field"/>
@@ -4762,6 +4766,18 @@
47624766
</field>
47634767
</message>
47644768

4769+
<message id="364" name="Power" abbrev="Power" source="vehicle" flags="periodic" category="Sensors">
4770+
<description>
4771+
Report of electrical power.
4772+
</description>
4773+
<field name="Measured Power Value" abbrev="value" type="fp32_t" unit="W">
4774+
<description>
4775+
The value of the internal electrical power as measured by
4776+
the sensor.
4777+
</description>
4778+
</field>
4779+
</message>
4780+
47654781
<!-- Guidance -->
47664782
<message id="400" name="Desired Heading" abbrev="DesiredHeading" source="vehicle" category="Guidance">
47674783
<description>
@@ -11815,6 +11831,13 @@
1181511831
</field>
1181611832
</message>
1181711833

11834+
<message id="2035" name="Battery Detailed Info" abbrev="BDI" source="vehicle" flags="periodic,deprecated" category="Sensors">
11835+
<description>Deprecated: use QueryBmsData/BmsData instead. Used to debug the state of a BMS.</description>
11836+
<field name="State of Health" abbrev="soh" type="int16_t" unit="%">
11837+
<description>State of health as a percentage (0-100%)</description>
11838+
</field>
11839+
</message>
11840+
1181811841
<message id="2036" name="Typed Entity Parameter Editor" abbrev="TypedEntityParameterEditor" source="ccu,vehicle" category="CCU">
1181911842
<description>This message is used to describe the ValuesIf content of a TypedEntityParameter.</description>
1182011843
<field name="Value" abbrev="value" type="plaintext">
@@ -11826,4 +11849,277 @@
1182611849
</field>
1182711850
</message>
1182811851

11852+
<!-- BMS (Battery Management System) query/reply messages -->
11853+
11854+
<message id="2041" name="Query BMS Data" abbrev="QueryBmsData" source="ccu,vehicle" category="Sensors">
11855+
<description>
11856+
Request detailed battery management system data from a vehicle.
11857+
The vehicle replies with one or more BmsData messages depending
11858+
on the requested operation and pack index. If pack_idx is 0xFF
11859+
the vehicle returns data for every detected battery pack.
11860+
The operation field selects which class of data is returned,
11861+
allowing future extension without protocol changes.
11862+
</description>
11863+
<field name="Operation" abbrev="op" type="uint8_t" unit="Enumerated" prefix="BOP">
11864+
<description>Type of BMS data requested.</description>
11865+
<value id="0" name="Read Telemetry" abbrev="READ_TELEMETRY">
11866+
<description>Voltage, current, temperature, SOC, time to empty.</description>
11867+
</value>
11868+
<value id="1" name="Read Cell Voltages" abbrev="READ_CELL_VOLTAGES">
11869+
<description>Individual cell voltages.</description>
11870+
</value>
11871+
<value id="2" name="Read Status" abbrev="READ_STATUS">
11872+
<description>SOH, battery status, cycle count, capacity, serial, FET status.</description>
11873+
</value>
11874+
<value id="3" name="Read All" abbrev="READ_ALL">
11875+
<description>Combination of telemetry, cell voltages and status.</description>
11876+
</value>
11877+
<value id="4" name="Raw Register Read" abbrev="READ_RAW">
11878+
<description>Read an arbitrary SBS register (address in sbs_register).</description>
11879+
</value>
11880+
<value id="5" name="Raw Register Write" abbrev="WRITE_RAW">
11881+
<description>Write to an arbitrary SBS register (address in sbs_register, payload in data).</description>
11882+
</value>
11883+
<value id="6" name="Set FET" abbrev="SET_FET">
11884+
<description>Control charge/discharge/pre-charge FETs. Desired FET bit-mask in data[0-1] LE.</description>
11885+
</value>
11886+
</field>
11887+
<field name="Pack Index" abbrev="pack_idx" type="uint8_t" value="0xFF">
11888+
<description>
11889+
Battery pack index (0-based). Use 0xFF to address all detected packs.
11890+
</description>
11891+
</field>
11892+
<field name="SBS Register" abbrev="sbs_register" type="uint8_t">
11893+
<description>
11894+
SBS register address for READ_RAW / WRITE_RAW operations. Ignored for other operations.
11895+
</description>
11896+
</field>
11897+
<field name="Data" abbrev="data" type="rawdata">
11898+
<description>
11899+
Payload for write operations (WRITE_RAW, SET_FET). For READ_RAW,
11900+
data[0] specifies the expected response length in bytes (defaults to 2
11901+
if empty). Unused for other read operations.
11902+
</description>
11903+
</field>
11904+
</message>
11905+
11906+
<message id="2042" name="BMS Data" abbrev="BmsData" source="vehicle" category="Sensors">
11907+
<description>
11908+
Battery management system data returned in response to a
11909+
QueryBmsData request. One message is sent per battery pack.
11910+
Fields that are not applicable to the requested operation are
11911+
set to zero.
11912+
</description>
11913+
<field name="Original Message" abbrev="original" type="message">
11914+
<description>The message that originated the request.</description>
11915+
</field>
11916+
<field name="Request Status" abbrev="req_status" type="uint8_t" unit="Enumerated" prefix="BST">
11917+
<description>Outcome of the request.</description>
11918+
<value id="0" name="Success" abbrev="SUCCESS"/>
11919+
<value id="1" name="Failure" abbrev="FAILURE"/>
11920+
<value id="2" name="Not Supported" abbrev="NOT_SUPPORTED"/>
11921+
<value id="3" name="Invalid Pack" abbrev="INVALID_PACK"/>
11922+
</field>
11923+
<field name="Pack Index" abbrev="pack_idx" type="uint8_t">
11924+
<description>Battery pack index (0-based).</description>
11925+
</field>
11926+
<field name="Temperature" abbrev="temperature" type="fp32_t" unit="°C">
11927+
<description>Pack temperature in degrees Celsius.</description>
11928+
</field>
11929+
<field name="Voltage" abbrev="voltage" type="fp32_t" unit="V">
11930+
<description>Pack voltage.</description>
11931+
</field>
11932+
<field name="Current" abbrev="current" type="fp32_t" unit="A">
11933+
<description>Pack current (positive = charging).</description>
11934+
</field>
11935+
<field name="Relative State of Charge" abbrev="rsoc" type="uint8_t" unit="%">
11936+
<description>Relative state of charge.</description>
11937+
</field>
11938+
<field name="Absolute State of Charge" abbrev="asoc" type="uint8_t" unit="%">
11939+
<description>Absolute state of charge.</description>
11940+
</field>
11941+
<field name="State of Health" abbrev="soh" type="uint8_t" unit="%">
11942+
<description>State of health.</description>
11943+
</field>
11944+
<field name="Remaining Capacity" abbrev="remaining_capacity" type="uint16_t" unit="mAh">
11945+
<description>Remaining battery capacity.</description>
11946+
</field>
11947+
<field name="Full Charge Capacity" abbrev="full_charge_capacity" type="uint16_t" unit="mAh">
11948+
<description>Full charge capacity at current conditions.</description>
11949+
</field>
11950+
<field name="Cycle Count" abbrev="cycle_count" type="uint16_t">
11951+
<description>Number of charge/discharge cycles.</description>
11952+
</field>
11953+
<field name="Time to Empty" abbrev="time_to_empty" type="uint16_t" unit="min">
11954+
<description>Estimated time to empty.</description>
11955+
</field>
11956+
<field name="Time to Full" abbrev="time_to_full" type="uint16_t" unit="min">
11957+
<description>Estimated time to full charge.</description>
11958+
</field>
11959+
<field name="Battery Status" abbrev="battery_status" type="uint16_t" unit="Bitfield" prefix="BST">
11960+
<description>Raw SBS battery status register.</description>
11961+
<value id="0x8000" name="Overcharged Alarm" abbrev="OCA"/>
11962+
<value id="0x4000" name="Terminate Charge Alarm" abbrev="TCA"/>
11963+
<value id="0x1000" name="Overtemperature Alarm" abbrev="OTA"/>
11964+
<value id="0x0800" name="Terminate Discharge Alarm" abbrev="TDA"/>
11965+
<value id="0x0200" name="Remaining Capacity Alarm" abbrev="RCA"/>
11966+
<value id="0x0100" name="Remaining Time Alarm" abbrev="RTA"/>
11967+
<value id="0x0080" name="Initialization" abbrev="INIT"/>
11968+
<value id="0x0040" name="Discharging or Rest" abbrev="DSG"/>
11969+
<value id="0x0020" name="Fully Charged" abbrev="FC"/>
11970+
<value id="0x0010" name="Fully Discharged" abbrev="FD"/>
11971+
<value id="0x0007" name="Error Code" abbrev="EC"/>
11972+
</field>
11973+
<field name="Serial Number" abbrev="serial_number" type="uint16_t">
11974+
<description>BMS serial number.</description>
11975+
</field>
11976+
<field name="FET Status" abbrev="fet_status" type="uint16_t" unit="Bitfield" prefix="FET">
11977+
<description>Host FET control register state.</description>
11978+
<value id="0x01" name="Charge FET" abbrev="CHG"/>
11979+
<value id="0x02" name="Discharge FET" abbrev="DSG"/>
11980+
<value id="0x04" name="Pre-Charge FET" abbrev="PCHG"/>
11981+
</field>
11982+
<field name="Safety Status" abbrev="safety_status" type="uint32_t" unit="Bitfield" prefix="SS">
11983+
<description>Safety Status register bitfield from the battery gauge IC.</description>
11984+
<value id="0x00100000" name="Overcharge" abbrev="OC"/>
11985+
<value id="0x00040000" name="Charge Timeout" abbrev="CTO"/>
11986+
<value id="0x00010000" name="Precharge Timeout" abbrev="PTO"/>
11987+
<value id="0x00004000" name="Overcurrent During Discharge Latch" abbrev="OCDL"/>
11988+
<value id="0x00002000" name="Overtemperature Fault" abbrev="OTF"/>
11989+
<value id="0x00001000" name="AFE Alert" abbrev="AFE_OVRD"/>
11990+
<value id="0x00000800" name="Undertemperature During Discharge" abbrev="UTD"/>
11991+
<value id="0x00000400" name="Undertemperature During Charge" abbrev="UTC"/>
11992+
<value id="0x00000200" name="Overtemperature During Discharge" abbrev="OTD"/>
11993+
<value id="0x00000100" name="Overtemperature During Charge" abbrev="OTC"/>
11994+
<value id="0x00000080" name="Short Circuit During Discharge Latch" abbrev="ASCDL"/>
11995+
<value id="0x00000040" name="Short Circuit During Discharge" abbrev="ASCD"/>
11996+
<value id="0x00000020" name="Overload During Discharge Latch" abbrev="AOLDL"/>
11997+
<value id="0x00000010" name="Overload During Discharge" abbrev="AOLD"/>
11998+
<value id="0x00000008" name="Overcurrent During Discharge" abbrev="OCD"/>
11999+
<value id="0x00000004" name="Overcurrent During Charge" abbrev="OCC"/>
12000+
<value id="0x00000002" name="Cell Overvoltage" abbrev="COV"/>
12001+
<value id="0x00000001" name="Cell Undervoltage" abbrev="CUV"/>
12002+
</field>
12003+
<field name="PF Status" abbrev="pf_status" type="uint32_t" unit="Bitfield" prefix="PF">
12004+
<description>Permanent Failure Status register bitfield from the battery gauge IC.</description>
12005+
<value id="0x00020000" name="Data Flash Wearout Failure" abbrev="DFW"/>
12006+
<value id="0x00010000" name="Instruction Flash Checksum Failure" abbrev="IFC"/>
12007+
<value id="0x00008000" name="Safety Overtemperature FET Failure" abbrev="SOTF"/>
12008+
<value id="0x00004000" name="Open Thermistor TS3 Failure" abbrev="TS3"/>
12009+
<value id="0x00002000" name="Open Thermistor TS2 Failure" abbrev="TS2"/>
12010+
<value id="0x00001000" name="Open Thermistor TS1 Failure" abbrev="TS1"/>
12011+
<value id="0x00000800" name="AFE XREADY Failure" abbrev="AFE_XRDY"/>
12012+
<value id="0x00000400" name="AFE Override Failure" abbrev="AFE_OVRD"/>
12013+
<value id="0x00000200" name="AFE Communication Failure" abbrev="AFEC"/>
12014+
<value id="0x00000100" name="AFE Register Failure" abbrev="AFER"/>
12015+
<value id="0x00000080" name="Discharge FET Failure" abbrev="DFETF"/>
12016+
<value id="0x00000040" name="Charge FET Failure" abbrev="CFETF"/>
12017+
<value id="0x00000020" name="Voltage Imbalance At Rest Failure" abbrev="VIMR"/>
12018+
<value id="0x00000010" name="Safety Overtemperature Cell Failure" abbrev="SOT"/>
12019+
<value id="0x00000008" name="Safety Overcurrent in Discharge" abbrev="SOCD"/>
12020+
<value id="0x00000004" name="Safety Overcurrent in Charge" abbrev="SOCC"/>
12021+
<value id="0x00000002" name="Safety Cell Overvoltage Failure" abbrev="SOV"/>
12022+
<value id="0x00000001" name="Safety Cell Undervoltage Failure" abbrev="SUV"/>
12023+
</field>
12024+
<field name="Operation Status" abbrev="operation_status" type="uint32_t" unit="Bitfield" prefix="OS">
12025+
<description>Operation Status register bitfield from the battery gauge IC.</description>
12026+
<value id="0x80000000" name="KEYIN" abbrev="KEYIN"/>
12027+
<value id="0x10000000" name="Cell Balancing" abbrev="CB"/>
12028+
<value id="0x08000000" name="CC Measurement in SLEEP" abbrev="SLPCC"/>
12029+
<value id="0x04000000" name="ADC Measurement in SLEEP" abbrev="SLPAD"/>
12030+
<value id="0x01000000" name="Initialization After Full Reset" abbrev="INIT"/>
12031+
<value id="0x00800000" name="SLEEP Mode" abbrev="SLEEPM"/>
12032+
<value id="0x00400000" name="400-kHz SMBus Mode" abbrev="XL"/>
12033+
<value id="0x00200000" name="Calibration Output CC" abbrev="CAL_OFFSET"/>
12034+
<value id="0x00100000" name="Calibration Output ADC and CC" abbrev="CAL"/>
12035+
<value id="0x00040000" name="Authentication In Progress" abbrev="AUTH"/>
12036+
<value id="0x00020000" name="LED Display" abbrev="LED"/>
12037+
<value id="0x00010000" name="SHUTDOWN Via Command" abbrev="SDM"/>
12038+
<value id="0x00008000" name="SLEEP Conditions Met" abbrev="SLEEP"/>
12039+
<value id="0x00004000" name="Charging Disabled" abbrev="XCHG"/>
12040+
<value id="0x00002000" name="Discharging Disabled" abbrev="XDSG"/>
12041+
<value id="0x00001000" name="Permanent Failure Mode" abbrev="PF"/>
12042+
<value id="0x00000800" name="Safety Mode" abbrev="SAFE_MODE"/>
12043+
<value id="0x00000400" name="Shutdown Via Low Voltage" abbrev="SDV"/>
12044+
<value id="0x00000200" name="Security Mode SEC1" abbrev="SEC1"/>
12045+
<value id="0x00000100" name="Security Mode SEC0" abbrev="SEC0"/>
12046+
<value id="0x00000020" name="SAFE Pin" abbrev="SAFE"/>
12047+
<value id="0x00000010" name="Host FET Control" abbrev="HCFET"/>
12048+
<value id="0x00000008" name="Precharge FET" abbrev="PCHG"/>
12049+
<value id="0x00000004" name="DSG FET" abbrev="DSG"/>
12050+
<value id="0x00000002" name="CHG FET" abbrev="CHG"/>
12051+
<value id="0x00000001" name="System Present Low" abbrev="PRES"/>
12052+
</field>
12053+
<field name="Charging Status" abbrev="charging_status" type="uint16_t" unit="Bitfield" prefix="CS">
12054+
<description>Charging Status register bitfield from the battery gauge IC.</description>
12055+
<value id="0x8000" name="Charge Termination" abbrev="VCT"/>
12056+
<value id="0x2000" name="Charge Suspend" abbrev="SU"/>
12057+
<value id="0x1000" name="Charge Inhibit" abbrev="IN"/>
12058+
<value id="0x0200" name="Fast Charge Mode" abbrev="FCHG"/>
12059+
<value id="0x0100" name="Pre-Charge Mode" abbrev="PCHG"/>
12060+
<value id="0x0010" name="Overtemperature Region" abbrev="OT"/>
12061+
<value id="0x0008" name="High Temperature Region" abbrev="HT"/>
12062+
<value id="0x0004" name="Standard Temperature Region" abbrev="ST"/>
12063+
<value id="0x0002" name="Low Temperature Region" abbrev="LT"/>
12064+
<value id="0x0001" name="Undertemperature Region" abbrev="UT"/>
12065+
</field>
12066+
<field name="Gauging Status" abbrev="gauging_status" type="uint16_t" unit="Bitfield" prefix="GS">
12067+
<description>Gauging Status register bitfield from the battery gauge IC.</description>
12068+
<value id="0x8000" name="Discharge Qualified for Learning" abbrev="VDQ"/>
12069+
<value id="0x4000" name="End-of-Discharge Voltage Level 2" abbrev="EDV2"/>
12070+
<value id="0x2000" name="End-of-Discharge Voltage Level 1" abbrev="EDV1"/>
12071+
<value id="0x0400" name="Full Charge Capacity Updated" abbrev="FCCX"/>
12072+
<value id="0x0100" name="Rest" abbrev="REST"/>
12073+
<value id="0x0080" name="Condition Flag" abbrev="CF"/>
12074+
<value id="0x0040" name="Discharge or Relax" abbrev="DSG"/>
12075+
<value id="0x0020" name="End-of-Discharge Voltage Level 0" abbrev="EDV0"/>
12076+
<value id="0x0010" name="Cell Balancing Possible" abbrev="BAL_OK"/>
12077+
<value id="0x0008" name="Terminate Charge" abbrev="TC"/>
12078+
<value id="0x0004" name="Terminate Discharge" abbrev="TD"/>
12079+
<value id="0x0002" name="Fully Charged" abbrev="FC"/>
12080+
<value id="0x0001" name="Fully Discharged" abbrev="FD"/>
12081+
</field>
12082+
<field name="Cell Voltages" abbrev="cell_voltages" type="message-list" message-type="BmsCellVoltage">
12083+
<description>Individual cell voltages (populated for READ_CELL_VOLTAGES and READ_ALL).</description>
12084+
</field>
12085+
<field name="Registers" abbrev="registers" type="message-list" message-type="BmsRegister">
12086+
<description>
12087+
Arbitrary SBS register values. Each entry carries a register
12088+
address and its raw value, allowing the handler to expose new
12089+
registers without protocol changes. Populated alongside the
12090+
typed fields for READ_TELEMETRY, READ_STATUS and READ_ALL;
12091+
always populated for READ_RAW.
12092+
</description>
12093+
</field>
12094+
<field name="Data" abbrev="data" type="rawdata">
12095+
<description>Raw response data for READ_RAW / WRITE_RAW operations.</description>
12096+
</field>
12097+
</message>
12098+
12099+
<message id="2043" name="BMS Cell Voltage" abbrev="BmsCellVoltage" source="vehicle" category="Sensors">
12100+
<description>
12101+
Voltage of a single battery cell, used as a sub-message inside BmsData.
12102+
</description>
12103+
<field name="Cell Number" abbrev="cell_number" type="uint8_t">
12104+
<description>Cell index (1-based).</description>
12105+
</field>
12106+
<field name="Voltage" abbrev="voltage" type="fp32_t" unit="V">
12107+
<description>Cell voltage.</description>
12108+
</field>
12109+
</message>
12110+
12111+
<message id="2044" name="BMS Register" abbrev="BmsRegister" source="vehicle" category="Sensors">
12112+
<description>
12113+
Raw SBS register value, used as a sub-message inside BmsData.
12114+
Allows returning arbitrary register data in a structured way
12115+
without requiring protocol changes for each new register.
12116+
</description>
12117+
<field name="Register" abbrev="reg" type="uint8_t">
12118+
<description>SBS register address.</description>
12119+
</field>
12120+
<field name="Value" abbrev="value" type="rawdata">
12121+
<description>Raw register value (length depends on register).</description>
12122+
</field>
12123+
</message>
12124+
1182912125
</messages>

0 commit comments

Comments
 (0)