61 #define CAN_currentSensorDiagOcs (0x1u)
63 #define CAN_currentSensorDiagActualMeasurementError (0x2u)
65 #define CAN_currentSensorDiagAnyMeasurementError (0x4u)
67 #define CAN_currentSensorDiagSystemError (0x8u)
100 uint64_t message = 0u;
101 uint64_t canSignal = 0u;
103 int32_t sensorSignalValue = 0;
104 uint8_t diagInfo = 0u;
105 uint8_t stringNumber = 0u;
122 diagInfo = canSignal & 0xF0u;
205 sensorSignalValue = (int32_t)canSignal;
216 sensorSignalValue = (int32_t)canSignal;
226 sensorSignalValue = (int32_t)canSignal;
236 sensorSignalValue = (int32_t)canSignal;
246 sensorSignalValue = (int32_t)canSignal;
253 sensorSignalValue = (int32_t)canSignal;
264 sensorSignalValue = (int32_t)canSignal;
274 sensorSignalValue = (int32_t)canSignal;
291 #ifdef UNITY_UNIT_TEST
static const CAN_SIGNAL_TYPE_s currentSensorData
static const CAN_SIGNAL_TYPE_s currentSensorStatus
#define CAN_currentSensorDiagActualMeasurementError
uint32_t CAN_RxCurrentSensor(uint32_t id, uint8_t dlc, CAN_ENDIANNESS_e endianness, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for current sensor measurements
#define CAN_currentSensorDiagOcs
#define CAN_currentSensorDiagAnyMeasurementError
#define CAN_currentSensorDiagSystemError
#define CAN_ID_STRING1_VOLTAGE1
#define CAN_ID_STRING0_CURRENT
#define CAN_ID_STRING2_TEMPERATURE
#define CAN_ID_STRING2_VOLTAGE2
#define CAN_ID_STRING1_TEMPERATURE
#define CAN_ID_STRING2_CURRENT_COUNTER
#define CAN_ID_STRING0_CURRENT_COUNTER
#define CAN_ID_STRING0_TEMPERATURE
enum CAN_ENDIANNESS CAN_ENDIANNESS_e
#define CAN_ID_STRING0_VOLTAGE3
#define CAN_ID_STRING1_VOLTAGE3
#define CAN_ID_STRING1_CURRENT_COUNTER
#define CAN_ID_STRING1_ENERGY_COUNTER
#define CAN_ID_STRING0_VOLTAGE2
#define CAN_ID_STRING2_VOLTAGE1
#define CAN_ID_STRING1_CURRENT
#define CAN_ID_STRING2_ENERGY_COUNTER
#define CAN_ID_STRING2_POWER
#define CAN_ID_STRING1_VOLTAGE2
#define CAN_ID_STRING2_VOLTAGE3
#define CAN_ID_STRING0_VOLTAGE1
#define CAN_ID_STRING0_POWER
#define CAN_ID_STRING1_POWER
#define CAN_ID_STRING2_CURRENT
#define CAN_ID_STRING0_ENERGY_COUNTER
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.
DATA_BLOCK_CURRENT_SENSOR_s * pTableCurrentSensor
uint8_t invalidCurrentMeasurement[BS_NR_OF_STRINGS]
uint32_t timestampCurrent[BS_NR_OF_STRINGS]
uint32_t previousTimestampCurrentCounting[BS_NR_OF_STRINGS]
uint32_t timestampPower[BS_NR_OF_STRINGS]
int32_t power_W[BS_NR_OF_STRINGS]
uint8_t invalidSensorTemperatureMeasurement[BS_NR_OF_STRINGS]
uint8_t invalidHighVoltageMeasurement[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
uint32_t previousTimestampPower[BS_NR_OF_STRINGS]
int32_t current_mA[BS_NR_OF_STRINGS]
uint8_t invalidCurrentCountingMeasurement[BS_NR_OF_STRINGS]
uint32_t timestampHighVoltage[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
uint8_t invalidPowerMeasurement[BS_NR_OF_STRINGS]
uint32_t previousTimestampHighVoltage[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
int32_t sensorTemperature_ddegC[BS_NR_OF_STRINGS]
uint32_t timestampEnergyCounting[BS_NR_OF_STRINGS]
int32_t currentCounter_As[BS_NR_OF_STRINGS]
int32_t highVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR]
uint8_t invalidEnergyCountingMeasurement[BS_NR_OF_STRINGS]
uint32_t previousTimestampEnergyCounting[BS_NR_OF_STRINGS]
int32_t energyCounter_Wh[BS_NR_OF_STRINGS]
uint32_t timestampCurrentCounting[BS_NR_OF_STRINGS]
uint32_t previousTimestampCurrent[BS_NR_OF_STRINGS]