58 #include "Mockfassert.h"
59 #include "Mockmxm_1785x.h"
60 #include "Mockmxm_basic_defines.h"
71 .allowStartup =
false,
72 .operationRequested =
false,
73 .firstMeasurementDone =
false,
74 .stopRequested =
false,
75 .openwireRequested =
false,
76 .undervoltageAlert =
false,
78 .mxmVoltageCellCounter = 0,
86 .deviceAddress = 0x00,
199 const uint8_t highestDevice = 13u;
210 const uint8_t highestDevice = 13u;
221 const uint8_t highestDevice = 13u;
232 const uint8_t highestDevice = 13u;
247 const uint8_t highestDevice = 13u;
263 const uint8_t highestDevice = 13u;
280 const uint8_t highestDevice = 13u;
320 const uint8_t highestDevice = 13u;
330 const uint8_t highestDevice = 10u;
333 for (uint8_t i = 0u; i < highestDevice; i++) {
math library for often used math functions
#define NULL_PTR
Null pointer.
#define MXM_MAXIMUM_NR_OF_MODULES
Maximum number of modules.
#define BATTERY_MANAGEMENT_TX_LENGTH_READALL
Battery Management Protocol lengths of TX buffer.
MXM_REG_NAME_e
MAX1785x register names.
bool MXM_CheckIfADeviceIsConnected(const MXM_MONITORING_INSTANCE_s *const kpkState, uint8_t device)
check if a device is connected
void MXM_MonRegistryParseIdIntoDevices(MXM_MONITORING_INSTANCE_s *pState, uint8_t rxBufferLength, MXM_REG_NAME_e type)
Parse ID (1 or 2) into the registry.
void MXM_MonRegistryInit(MXM_MONITORING_INSTANCE_s *pState)
Initialize monitoring registry.
STD_RETURN_TYPE_e MXM_MonRegistryConnectDevices(MXM_MONITORING_INSTANCE_s *pState, uint8_t numberOfDevices)
Mark devices as connected in the registry and set the address.
uint8_t MXM_MonRegistryGetHighestConnected5XDevice(const MXM_MONITORING_INSTANCE_s *const kpkState)
Parse number of highest connected device from monitoring- register.
void MXM_MonRegistryParseStatusFmeaIntoDevices(MXM_MONITORING_INSTANCE_s *pState, uint8_t rxBufferLength)
Parse STATUS or FMEA into the registry.
void MXM_MonRegistryParseVersionIntoDevices(MXM_MONITORING_INSTANCE_s *pState, uint8_t rxBufferLength)
Parse Version into the registry.
bool MXM_CheckIfADeviceHasBeenReset(const MXM_MONITORING_INSTANCE_s *const kpkState)
check if one of the devices in the registry has the ALRTRST bit set
Functions in order to have a registry of monitoring ICs.
uint8_t rxBuffer[MXM_RX_BUFFER_LENGTH]
MXM_REGISTRY_ENTRY_s registry[MXM_MAXIMUM_NR_OF_MODULES]
MXM_STATEMACHINE_STATES_e state
MXM_siliconVersion_e siliconVersion
#define TEST_ASSERT_PASS_ASSERT(_code_under_test)
assert whether assert macro has passed
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
void testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId1(void)
void testMXM_MonRegistryParseVersionIntoDevicesWrongBufferLength(void)
void testMXM_CheckIfADeviceIsConnectedinvalidValues(void)
void testMXM_MonRegistryInitNullPointer(void)
void testMXM_MonRegistryGetHighestConnected5XDeviceNullPointer(void)
void testMXM_MonRegistryParseStatusFmeaIntoDevicesCheckAscendingBuffer(void)
void testMXM_MonRegistryConnectDevicesNullPointer(void)
void testMXM_CheckIfADeviceHasBeenReset(void)
static void rxBufferFillAscending(MXM_MONITORING_INSTANCE_s *pState)
void testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId2(void)
void testMXM_CheckIfADeviceIsConnected(void)
void testMXM_MonRegistryParseVersionIntoDevicesCheckAscendingBuffer(void)
void testMXM_MonRegistryParseStatusFmeaIntoDevicesNullPointer(void)
void testMXM_MonRegistryParseVersionIntoDevicesNullPointer(void)
static MXM_MONITORING_INSTANCE_s mxm_state
void testRegistryConnectDevicesInvalidNumber(void)
void testRegistryInitiated(void)
void testMXM_MonRegistryParseIdIntoDevicesNullPointer(void)
void testMXM_MonRegistryParseIdIntoDevicesCheckAscendingBufferId2(void)
void testMXM_MonRegistryParseIdIntoDevicesWrongBufferLengthId1(void)
void testMXM_MonRegistryParseIdIntoDevicesInvalidRegister(void)
void testMXM_MonRegistryParseStatusFmeaIntoDevicesWrongBufferLength(void)
void testMXM_MonRegistryParseIdIntoDevicesValidRegister(void)
void testRegistryConnectDevices(void)