76 bool currentLimitViolated =
false;
80 currentLimitViolated =
true;
83 return currentLimitViolated;
87 bool currentLimitViolated =
false;
91 currentLimitViolated =
true;
94 return currentLimitViolated;
98 bool currentLimitViolated =
false;
102 currentLimitViolated =
true;
106 currentLimitViolated =
true;
110 currentLimitViolated =
false;
112 return currentLimitViolated;
117 bool currentOnOpenString =
false;
123 if ((stringClosed ==
false) && (stringPrecharging ==
false)) {
124 currentOnOpenString =
true;
127 return currentOnOpenString;
131 #ifdef UNITY_UNIT_TEST
Configuration of the battery cell (e.g., minimum and maximum cell voltage)
#define BC_CURRENT_MAX_DISCHARGE_MSL_mA
Maximum discharge current limit.
#define BC_CURRENT_MAX_CHARGE_MSL_mA
Maximum charge current limit.
Configuration of the battery system (e.g., number of battery modules, battery cells,...
#define BS_NR_OF_PARALLEL_CELLS_PER_CELL_BLOCK
number of parallel connected battery cells in a cell block
#define BS_NR_OF_STRINGS
Number of parallel strings in the battery pack.
#define BS_MAXIMUM_PACK_CURRENT_mA
Maximum pack current limit in mA that is used in the SOA module to check for pack overcurrent.
#define BS_MAXIMUM_STRING_CURRENT_mA
Maximum string current limit in mA that is used in the SOA module to check for string overcurrent.
bool BMS_IsStringPrecharging(uint8_t stringNumber)
Returns if string is currently precharging or not.
bool BMS_IsStringClosed(uint8_t stringNumber)
Returns string state (closed or open)
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
bool SOA_IsCurrentOnOpenString(BMS_CURRENT_FLOW_STATE_e currentDirection, uint8_t stringNumber)
Checks if string current is floating while contactors are open.
bool SOA_IsPackCurrentLimitViolated(uint32_t current_mA, BMS_CURRENT_FLOW_STATE_e currentDirection)
Checks if pack current limit is violated.
bool SOA_IsStringCurrentLimitViolated(uint32_t current_mA, BMS_CURRENT_FLOW_STATE_e currentDirection)
Checks if string current limit is violated.
bool SOA_IsCellCurrentLimitViolated(uint32_t current_mA, BMS_CURRENT_FLOW_STATE_e currentDirection)
Checks if cell current limit is violated.
Configuration header for SOA.