63 #define CANRX_CURRENT_SENSOR_DIAGNOSIS_OVERCURRENT_BITMASK (0x1u)
65 #define CANRX_CURRENT_SENSOR_DIAGNOSIS_ACTUAL_MEASUREMENT_ERROR_BITMASK (0x2u)
67 #define CANRX_CURRENT_SENSOR_DIAGNOSIS_ANY_MEASUREMENT_ERROR_BITMASK (0x4u)
69 #define CANRX_CURRENT_SENSOR_DIAGNOSIS_SYSTEM_ERROR_BITMASK (0x8u)
82 const uint8_t *
const kpkCanData,
95 const CAN_SIGNAL_TYPE_s currentSensorData = {23u, 32u, 1.0f, 0.0f, -2147483648.0f, 2147483648.0f};
97 uint64_t messageData = 0u;
98 uint64_t canSignal = 0u;
100 int32_t sensorSignalValue = 0;
101 uint8_t diagInfo = 0u;
102 uint8_t stringNumber = 0u;
115 diagInfo = canSignal & 0xF0u;
122 switch (message.
id) {
177 switch (message.
id) {
180 sensorSignalValue = (int32_t)canSignal;
189 sensorSignalValue = (int32_t)canSignal;
197 sensorSignalValue = (int32_t)canSignal;
205 sensorSignalValue = (int32_t)canSignal;
213 sensorSignalValue = (int32_t)canSignal;
218 sensorSignalValue = (int32_t)canSignal;
227 sensorSignalValue = (int32_t)canSignal;
235 sensorSignalValue = (int32_t)canSignal;
252 #ifdef UNITY_UNIT_TEST
#define CANRX_CURRENT_SENSOR_DIAGNOSIS_SYSTEM_ERROR_BITMASK
#define CANRX_CURRENT_SENSOR_DIAGNOSIS_ANY_MEASUREMENT_ERROR_BITMASK
uint32_t CANRX_CurrentSensor(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for current sensor measurements
#define CANRX_CURRENT_SENSOR_DIAGNOSIS_ACTUAL_MEASUREMENT_ERROR_BITMASK
#define CANRX_CURRENT_SENSOR_DIAGNOSIS_OVERCURRENT_BITMASK
Header for the driver for the CAN module.
#define CANRX_STRING0_POWER_ID
#define CANRX_STRING0_VOLTAGE2_ID
#define CANRX_STRING0_ENERGY_COUNTER_ID
#define CANRX_STRING0_CURRENT_COUNTER_ID
#define CANRX_STRING0_CURRENT_ID
#define CANRX_STRING0_VOLTAGE1_ID
#define CANRX_CURRENT_SENSOR_MESSAGES_DLC
#define CANRX_STRING0_VOLTAGE3_ID
#define CANRX_STRING0_TEMPERATURE_ID
void CAN_RxGetMessageDataFromCanData(uint64_t *pMessage, const uint8_t *const kpkCanData, CAN_ENDIANNESS_e endianness)
Copy CAN data from 8 bytes to a 64-bit variable.
void CAN_RxGetSignalDataFromMessageData(uint64_t message, uint64_t bitStart, uint8_t bitLength, uint64_t *pCanSignal, CAN_ENDIANNESS_e endianness)
Gets CAN signal data from a 64-bit variable. This function is used to get signal data from a 64-bit C...
Headers for the helper functions for the CAN module.
#define DATA_WRITE_DATA(...)
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
#define NULL_PTR
Null pointer.
uint32_t OS_GetTickCount(void)
Returns OS based system tick value.
CAN_ENDIANNESS_e endianness
DATA_BLOCK_CURRENT_SENSOR_s * pTableCurrentSensor
uint32_t previousTimestampCurrent[BS_NR_OF_STRINGS]
uint32_t timestampCurrent[BS_NR_OF_STRINGS]
uint32_t previousTimestampHighVoltage[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
int32_t current_mA[BS_NR_OF_STRINGS]
uint32_t timestampHighVoltage[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
uint32_t previousTimestampPower[BS_NR_OF_STRINGS]
uint8_t invalidSensorTemperatureMeasurement[BS_NR_OF_STRINGS]
int32_t energyCounter_Wh[BS_NR_OF_STRINGS]
uint32_t timestampPower[BS_NR_OF_STRINGS]
uint32_t previousTimestampEnergyCounting[BS_NR_OF_STRINGS]
int32_t highVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
uint8_t invalidCurrentMeasurement[BS_NR_OF_STRINGS]
uint8_t invalidHighVoltageMeasurement[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
uint8_t invalidCurrentCountingMeasurement[BS_NR_OF_STRINGS]
uint32_t timestampEnergyCounting[BS_NR_OF_STRINGS]
int32_t power_W[BS_NR_OF_STRINGS]
int32_t currentCounter_As[BS_NR_OF_STRINGS]
uint32_t timestampCurrentCounting[BS_NR_OF_STRINGS]
int32_t sensorTemperature_ddegC[BS_NR_OF_STRINGS]
uint32_t previousTimestampCurrentCounting[BS_NR_OF_STRINGS]
uint8_t invalidPowerMeasurement[BS_NR_OF_STRINGS]
uint8_t invalidEnergyCountingMeasurement[BS_NR_OF_STRINGS]