foxBMS  1.1.0
The foxBMS Battery Management System API Documentation
MXM_5X_INSTANCE Struct Reference

5x statemachine structure More...

#include <mxm_battery_management.h>

Collaboration diagram for MXM_5X_INSTANCE:

Data Fields

MXM_5X_SUBSTATES_e substate
MXM_5X_COMMAND_PAYLOAD_s commandPayload
uint8_t numberOfSatellites
 Number of satellites. More...
STD_RETURN_TYPE_e numberOfSatellitesIsGood
 Command Buffer. More...
uint8_t lastDCByte
 Tracks the last received DC byte. More...
uint8_t commandBufferCurrentLength
 Length of Command Buffer. More...
uint16_t commandBuffer [COMMAND_BUFFER_LENGTH]
uint16_t rxBuffer [MXM_5X_RX_BUFFER_LEN]

Detailed Description

5x statemachine structure

Definition at line 251 of file mxm_battery_management.h.

Field Documentation

◆ commandBuffer


buffer for BMS commands

Definition at line 299 of file mxm_battery_management.h.

◆ commandBufferCurrentLength

uint8_t MXM_5X_INSTANCE::commandBufferCurrentLength

Length of Command Buffer.

Length of the array MXM_5X_INSTANCE::commandBuffer.

Definition at line 298 of file mxm_battery_management.h.

◆ commandPayload


command payload of the Battery Management Protocol

Definition at line 254 of file mxm_battery_management.h.

◆ lastDCByte

uint8_t MXM_5X_INSTANCE::lastDCByte

Tracks the last received DC byte.

Definition at line 293 of file mxm_battery_management.h.

◆ numberOfSatellites

uint8_t MXM_5X_INSTANCE::numberOfSatellites

Number of satellites.

This variable tracks the number of monitoring ICs that have been found during the enumeration of all connected monitoring ICs. Therefore this variable is initialized with 0. This value will be compared with the expected number of monitoring ICs which is set in BS_NR_OF_MODULES.

Definition at line 265 of file mxm_battery_management.h.

◆ numberOfSatellitesIsGood

STD_RETURN_TYPE_e MXM_5X_INSTANCE::numberOfSatellitesIsGood

Command Buffer.

This variable contains a buffer for Battery Management Protocol commands. The content is constructed by calling functions like MXM_5XConstructCommandBufferHelloall() and similar.

Afterwards this buffer can be passed on to the lower state-machine as payload. The length of this buffer is described in MXM_5X_INSTANCE::commandBufferCurrentLength.

Number of monitoring ICs matches the expected number.

This status variable indicates whether the number of found monitoring ICs in MXM_5X_INSTANCE::numberOfSatellites matches with the configured number of monitoring ICs in BS_NR_OF_MODULES. This variable is updated during execution of the substate MXM_5X_INIT_WAKE_UP_SATELLITE_DEVICES_HELLOALL_VERIFY_MSG_AND_COUNT in the state MXM_STATEMACH_5X_INIT in MXM_5XStateMachine().

In case the numbers are the same, the variable will read STD_OK, otherwise it will be set to STD_NOT_OK.

Definition at line 289 of file mxm_battery_management.h.

◆ processed


status-indicator of the underlying state-machine

Definition at line 255 of file mxm_battery_management.h.

◆ rxBuffer

uint16_t MXM_5X_INSTANCE::rxBuffer[MXM_5X_RX_BUFFER_LEN]

array containing the buffer for received data

Definition at line 300 of file mxm_battery_management.h.

◆ state


state of Driver State Machine

Definition at line 252 of file mxm_battery_management.h.

◆ status41b


for tracking of 41B state-machine

Definition at line 256 of file mxm_battery_management.h.

◆ substate


substate of current Driver State

Definition at line 253 of file mxm_battery_management.h.

The documentation for this struct was generated from the following file: