59 #include "Mockfassert.h"
60 #include "Mockmxm_1785x.h"
61 #include "Mockmxm_basic_defines.h"
72 TEST_INCLUDE_PATH(
"../../src/app/driver/afe/maxim/common")
73 TEST_INCLUDE_PATH("../../src/app/driver/afe/maxim/common/config")
74 TEST_INCLUDE_PATH("../../src/app/driver/config")
75 TEST_INCLUDE_PATH("../../src/app/driver/foxmath")
76 TEST_INCLUDE_PATH("../../src/app/driver/spi")
82 .allowStartup =
false,
83 .operationRequested =
false,
84 .firstMeasurementDone =
false,
85 .stopRequested =
false,
86 .openWireRequested =
false,
87 .undervoltageAlert =
false,
89 .mxmVoltageCellCounter = 0,
97 .deviceAddress = 0x00,
210 const uint8_t highestDevice = 13u;
221 const uint8_t highestDevice = 13u;
232 const uint8_t highestDevice = 13u;
243 const uint8_t highestDevice = 13u;
258 const uint8_t highestDevice = 13u;
274 const uint8_t highestDevice = 13u;
291 const uint8_t highestDevice = 13u;
331 const uint8_t highestDevice = 13u;
341 const uint8_t highestDevice = 10u;
344 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_SILICON_VERSION_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)