foxBMS
1.4.1
The foxBMS Battery Management System API Documentation
|
5x statemachine structure More...
#include <mxm_battery_management.h>
Data Fields | |
MXM_STATEMACHINE_5X_e | state |
MXM_5X_SUBSTATES_e | substate |
MXM_5X_COMMAND_PAYLOAD_s | commandPayload |
MXM_5X_STATE_REQUEST_STATUS_e * | processed |
MXM_41B_STATE_REQUEST_STATUS_e | status41b |
uint8_t | numberOfSatellites |
Number of satellites. More... | |
STD_RETURN_TYPE_e | numberOfSatellitesIsGood |
Number of monitoring ICs matches the expected number. More... | |
uint8_t | lastDCByte |
Tracks the last received DC byte. More... | |
uint8_t | errorCounter |
uint32_t | resetWaitTimestamp |
uint8_t | commandBufferCurrentLength |
Length of Command Buffer. More... | |
uint16_t | commandBuffer [COMMAND_BUFFER_LENGTH] |
Command Buffer. More... | |
uint16_t | rxBuffer [MXM_5X_RX_BUFFER_LEN] |
5x statemachine structure
Definition at line 246 of file mxm_battery_management.h.
uint16_t MXM_5X_INSTANCE_s::commandBuffer[COMMAND_BUFFER_LENGTH] |
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_s::commandBufferCurrentLength.
Definition at line 296 of file mxm_battery_management.h.
uint8_t MXM_5X_INSTANCE_s::commandBufferCurrentLength |
Length of Command Buffer.
Length of the array MXM_5X_INSTANCE_s::commandBuffer.
Definition at line 285 of file mxm_battery_management.h.
MXM_5X_COMMAND_PAYLOAD_s MXM_5X_INSTANCE_s::commandPayload |
command payload of the Battery Management Protocol
Definition at line 249 of file mxm_battery_management.h.
uint8_t MXM_5X_INSTANCE_s::errorCounter |
counts the number of errors that the underlying state-machine has encountered.
Definition at line 279 of file mxm_battery_management.h.
uint8_t MXM_5X_INSTANCE_s::lastDCByte |
Tracks the last received DC byte.
Definition at line 278 of file mxm_battery_management.h.
uint8_t MXM_5X_INSTANCE_s::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_PER_STRING.
Definition at line 260 of file mxm_battery_management.h.
STD_RETURN_TYPE_e MXM_5X_INSTANCE_s::numberOfSatellitesIsGood |
Number of monitoring ICs matches the expected number.
This status variable indicates whether the number of found monitoring ICs in MXM_5X_INSTANCE_s::numberOfSatellites matches with the configured number of monitoring ICs in BS_NR_OF_MODULES_PER_STRING. 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 274 of file mxm_battery_management.h.
MXM_5X_STATE_REQUEST_STATUS_e* MXM_5X_INSTANCE_s::processed |
status-indicator of the underlying state-machine
Definition at line 250 of file mxm_battery_management.h.
uint32_t MXM_5X_INSTANCE_s::resetWaitTimestamp |
timestamp of the moment when waiting for the devices to be reset has started
Definition at line 280 of file mxm_battery_management.h.
uint16_t MXM_5X_INSTANCE_s::rxBuffer[MXM_5X_RX_BUFFER_LEN] |
array containing the buffer for received data
Definition at line 297 of file mxm_battery_management.h.
MXM_STATEMACHINE_5X_e MXM_5X_INSTANCE_s::state |
state of Driver State Machine
Definition at line 247 of file mxm_battery_management.h.
MXM_41B_STATE_REQUEST_STATUS_e MXM_5X_INSTANCE_s::status41b |
for tracking of 41B state-machine
Definition at line 251 of file mxm_battery_management.h.
MXM_5X_SUBSTATES_e MXM_5X_INSTANCE_s::substate |
substate of current Driver State
Definition at line 248 of file mxm_battery_management.h.