commit 255415e5e7a7c40129f14657c95660c58a97c4ed Author: cfif Date: Fri Nov 21 09:54:16 2025 +0300 Обновление diff --git a/butl/ccu_candb-binutil.c b/butl/ccu_candb-binutil.c new file mode 100644 index 0000000..bbbc5a9 --- /dev/null +++ b/butl/ccu_candb-binutil.c @@ -0,0 +1,153 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#include "ccu_candb-binutil.h" + +// DBC file version +#if (VER_CANDB_MAJ != (0U)) || (VER_CANDB_MIN != (0U)) +#error The CCU_CANDB binutil source file has inconsistency with core dbc lib! +#endif + +#ifdef __DEF_CCU_CANDB__ + +ccu_candb_rx_t ccu_candb_rx; + +ccu_candb_tx_t ccu_candb_tx; + +#endif // __DEF_CCU_CANDB__ + +uint32_t ccu_candb_Receive(ccu_candb_rx_t* _m, const uint8_t* _d, uint32_t _id, uint8_t dlc_) +{ + uint32_t recid = 0; + if ((_id >= 0x100U) && (_id < 0x4D0U)) { + if ((_id >= 0x100U) && (_id < 0x24CU)) { + if ((_id >= 0x100U) && (_id < 0x157U)) { + if ((_id >= 0x100U) && (_id < 0x152U)) { + if (_id == 0x100U) { + recid = Unpack_ESC_04_candb(&(_m->ESC_04), _d, dlc_); + } else if (_id == 0x150U) { + recid = Unpack_EMS_Veh_candb(&(_m->EMS_Veh), _d, dlc_); + } + } else { + if (_id == 0x152U) { + recid = Unpack_BCM_Powertrain_candb(&(_m->BCM_Powertrain), _d, dlc_); + } else if (_id == 0x153U) { + recid = Unpack_EMS_Veh_02_candb(&(_m->EMS_Veh_02), _d, dlc_); + } + } + } else { + if ((_id >= 0x157U) && (_id < 0x244U)) { + if (_id == 0x157U) { + recid = Unpack_BCM_EEM_candb(&(_m->BCM_EEM), _d, dlc_); + } else if (_id == 0x243U) { + recid = Unpack_DMFR_Msg1_candb(&(_m->DMFR_Msg1), _d, dlc_); + } + } else { + if (_id == 0x244U) { + recid = Unpack_DMFL_Msg1_candb(&(_m->DMFL_Msg1), _d, dlc_); + } else if (_id == 0x247U) { + recid = Unpack_TM_Stat_candb(&(_m->TM_Stat), _d, dlc_); + } + } + } + } else { + if ((_id >= 0x24CU) && (_id < 0x305U)) { + if ((_id >= 0x24CU) && (_id < 0x280U)) { + if (_id == 0x24CU) { + recid = Unpack_TM_CP_candb(&(_m->TM_CP), _d, dlc_); + } else if (_id == 0x25AU) { + recid = Unpack_HVC_CCU_Status_Msg_candb(&(_m->HVC_CCU_Status_Msg), _d, dlc_); + } + } else { + if (_id == 0x280U) { + recid = Unpack_BCM_VEH_STATE_candb(&(_m->BCM_VEH_STATE), _d, dlc_); + } else if (_id == 0x298U) { + recid = Unpack_EMS_HVC_Req_Msg_candb(&(_m->EMS_HVC_Req_Msg), _d, dlc_); + } + } + } else { + if ((_id >= 0x305U) && (_id < 0x39DU)) { + if (_id == 0x305U) { + recid = Unpack_HVC_Err_Status_Msg_candb(&(_m->HVC_Err_Status_Msg), _d, dlc_); + } else if (_id == 0x365U) { + recid = Unpack_BCM_CLIMATIC_DATA_candb(&(_m->BCM_CLIMATIC_DATA), _d, dlc_); + } + } else { + if (_id == 0x39DU) { + recid = Unpack_VCU_CCU_Req_candb(&(_m->VCU_CCU_Req), _d, dlc_); + } else if (_id == 0x3C1U) { + recid = Unpack_ESC_08_candb(&(_m->ESC_08), _d, dlc_); + } + } + } + } + } else { + if ((_id >= 0x4D0U) && (_id < 0x523U)) { + if ((_id >= 0x4D0U) && (_id < 0x50FU)) { + if ((_id >= 0x4D0U) && (_id < 0x4D2U)) { + if (_id == 0x4D0U) { + recid = Unpack_SMFL_status_candb(&(_m->SMFL_status), _d, dlc_); + } else if (_id == 0x4D1U) { + recid = Unpack_SMFR_status_candb(&(_m->SMFR_status), _d, dlc_); + } + } else { + if (_id == 0x4D2U) { + recid = Unpack_SMRL_status_candb(&(_m->SMRL_status), _d, dlc_); + } else if (_id == 0x4D3U) { + recid = Unpack_SMRR_status_candb(&(_m->SMRR_status), _d, dlc_); + } + } + } else { + if ((_id >= 0x50FU) && (_id < 0x521U)) { + if (_id == 0x50FU) { + recid = Unpack_SDM_Cmd_candb(&(_m->SDM_Cmd), _d, dlc_); + } else if (_id == 0x51AU) { + recid = Unpack_VEH_VIN_candb(&(_m->VEH_VIN), _d, dlc_); + } + } else { + if (_id == 0x521U) { + recid = Unpack_OCUFL_MSG_candb(&(_m->OCUFL_MSG), _d, dlc_); + } else if (_id == 0x522U) { + recid = Unpack_OCUFR_MSG_candb(&(_m->OCUFR_MSG), _d, dlc_); + } + } + } + } else { + if ((_id >= 0x523U) && (_id < 0x5A2U)) { + if ((_id >= 0x523U) && (_id < 0x589U)) { + if (_id == 0x523U) { + recid = Unpack_OCURL_MSG_candb(&(_m->OCURL_MSG), _d, dlc_); + } else if (_id == 0x524U) { + recid = Unpack_OCURR_MSG_candb(&(_m->OCURR_MSG), _d, dlc_); + } + } else { + if (_id == 0x589U) { + recid = Unpack_DW_STATE_candb(&(_m->DW_STATE), _d, dlc_); + } else if (_id == 0x5A1U) { + recid = Unpack_FIU_CCU1_candb(&(_m->FIU_CCU1), _d, dlc_); + } + } + } else { + if ((_id >= 0x5A2U) && (_id < 0x7ABU)) { + if (_id == 0x5A2U) { + recid = Unpack_FIU_CCU2_candb(&(_m->FIU_CCU2), _d, dlc_); + } else if (_id == 0x5A3U) { + recid = Unpack_FIU_CCU3_candb(&(_m->FIU_CCU3), _d, dlc_); + } + } else { + if (_id == 0x7ABU) { + recid = Unpack_Diag_To_CCU_candb(&(_m->Diag_To_CCU), _d, dlc_); + } else { + if (_id == 0x7DFU) { + recid = Unpack_Diag_Functional_candb(&(_m->Diag_Functional), _d, dlc_); + } else if (_id == 0x18FF7919U) { + recid = Unpack_HVC_01_candb(&(_m->HVC_01), _d, dlc_); + } + } + } + } + } + } + + return recid; +} + diff --git a/butl/ccu_candb-binutil.h b/butl/ccu_candb-binutil.h new file mode 100644 index 0000000..bc7c031 --- /dev/null +++ b/butl/ccu_candb-binutil.h @@ -0,0 +1,78 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "dbccodeconf.h" + +#include "candb.h" + +typedef struct +{ + ESC_04_t ESC_04; + EMS_Veh_t EMS_Veh; + BCM_Powertrain_t BCM_Powertrain; + EMS_Veh_02_t EMS_Veh_02; + BCM_EEM_t BCM_EEM; + DMFR_Msg1_t DMFR_Msg1; + DMFL_Msg1_t DMFL_Msg1; + TM_Stat_t TM_Stat; + TM_CP_t TM_CP; + HVC_CCU_Status_Msg_t HVC_CCU_Status_Msg; + BCM_VEH_STATE_t BCM_VEH_STATE; + EMS_HVC_Req_Msg_t EMS_HVC_Req_Msg; + HVC_Err_Status_Msg_t HVC_Err_Status_Msg; + BCM_CLIMATIC_DATA_t BCM_CLIMATIC_DATA; + VCU_CCU_Req_t VCU_CCU_Req; + ESC_08_t ESC_08; + SMFL_status_t SMFL_status; + SMFR_status_t SMFR_status; + SMRL_status_t SMRL_status; + SMRR_status_t SMRR_status; + SDM_Cmd_t SDM_Cmd; + VEH_VIN_t VEH_VIN; + OCUFL_MSG_t OCUFL_MSG; + OCUFR_MSG_t OCUFR_MSG; + OCURL_MSG_t OCURL_MSG; + OCURR_MSG_t OCURR_MSG; + DW_STATE_t DW_STATE; + FIU_CCU1_t FIU_CCU1; + FIU_CCU2_t FIU_CCU2; + FIU_CCU3_t FIU_CCU3; + Diag_To_CCU_t Diag_To_CCU; + Diag_Functional_t Diag_Functional; + HVC_01_t HVC_01; +} ccu_candb_rx_t; + +typedef struct +{ + CCU_HVC_Req_Msg_t CCU_HVC_Req_Msg; + CCU_Stat1_t CCU_Stat1; + CCU_Stat2_t CCU_Stat2; + CCU_Requests_t CCU_Requests; + CCU_Stat3_t CCU_Stat3; + CCU_VCU_Msg1_t CCU_VCU_Msg1; + CCU_VCU_Msg2_t CCU_VCU_Msg2; + CCU_Msg1_t CCU_Msg1; + CCU_Errors_t CCU_Errors; + CCU_Msg3_t CCU_Msg3; + Diag_From_CCU_t Diag_From_CCU; + CCU_AC_Ctrl_t CCU_AC_Ctrl; +} ccu_candb_tx_t; + +uint32_t ccu_candb_Receive(ccu_candb_rx_t* m, const uint8_t* d, uint32_t msgid, uint8_t dlc); + +#ifdef __DEF_CCU_CANDB__ + +extern ccu_candb_rx_t ccu_candb_rx; + +extern ccu_candb_tx_t ccu_candb_tx; + +#endif // __DEF_CCU_CANDB__ + +#ifdef __cplusplus +} +#endif diff --git a/butl/vector__xxx_candb-binutil.c b/butl/vector__xxx_candb-binutil.c new file mode 100644 index 0000000..cfa8c66 --- /dev/null +++ b/butl/vector__xxx_candb-binutil.c @@ -0,0 +1,69 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#include "vector__xxx_candb-binutil.h" + +// DBC file version +#if (VER_CANDB_MAJ != (0U)) || (VER_CANDB_MIN != (0U)) +#error The VECTOR__XXX_CANDB binutil source file has inconsistency with core dbc lib! +#endif + +#ifdef __DEF_VECTOR__XXX_CANDB__ + +vector__xxx_candb_rx_t vector__xxx_candb_rx; + +vector__xxx_candb_tx_t vector__xxx_candb_tx; + +#endif // __DEF_VECTOR__XXX_CANDB__ + +uint32_t vector__xxx_candb_Receive(vector__xxx_candb_rx_t* _m, const uint8_t* _d, uint32_t _id, uint8_t dlc_) +{ + uint32_t recid = 0; + if ((_id >= 0x310U) && (_id < 0x316U)) { + if ((_id >= 0x310U) && (_id < 0x313U)) { + if (_id == 0x310U) { + recid = Unpack_CCU_HVC_Req_Msg_candb(&(_m->CCU_HVC_Req_Msg), _d, dlc_); + } else { + if (_id == 0x311U) { + recid = Unpack_CCU_Stat1_candb(&(_m->CCU_Stat1), _d, dlc_); + } else if (_id == 0x312U) { + recid = Unpack_CCU_Stat2_candb(&(_m->CCU_Stat2), _d, dlc_); + } + } + } else { + if (_id == 0x313U) { + recid = Unpack_CCU_Requests_candb(&(_m->CCU_Requests), _d, dlc_); + } else { + if (_id == 0x314U) { + recid = Unpack_CCU_Stat3_candb(&(_m->CCU_Stat3), _d, dlc_); + } else if (_id == 0x315U) { + recid = Unpack_CCU_VCU_Msg1_candb(&(_m->CCU_VCU_Msg1), _d, dlc_); + } + } + } + } else { + if ((_id >= 0x316U) && (_id < 0x501U)) { + if (_id == 0x316U) { + recid = Unpack_CCU_VCU_Msg2_candb(&(_m->CCU_VCU_Msg2), _d, dlc_); + } else { + if (_id == 0x380U) { + recid = Unpack_CCU_Msg1_candb(&(_m->CCU_Msg1), _d, dlc_); + } else if (_id == 0x4FEU) { + recid = Unpack_CCU_Errors_candb(&(_m->CCU_Errors), _d, dlc_); + } + } + } else { + if (_id == 0x501U) { + recid = Unpack_CCU_Msg3_candb(&(_m->CCU_Msg3), _d, dlc_); + } else { + if (_id == 0x7BBU) { + recid = Unpack_Diag_From_CCU_candb(&(_m->Diag_From_CCU), _d, dlc_); + } else if (_id == 0x18FFF200U) { + recid = Unpack_CCU_AC_Ctrl_candb(&(_m->CCU_AC_Ctrl), _d, dlc_); + } + } + } + } + + return recid; +} + diff --git a/butl/vector__xxx_candb-binutil.h b/butl/vector__xxx_candb-binutil.h new file mode 100644 index 0000000..1d64ce5 --- /dev/null +++ b/butl/vector__xxx_candb-binutil.h @@ -0,0 +1,78 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "dbccodeconf.h" + +#include "candb.h" + +typedef struct +{ + CCU_HVC_Req_Msg_t CCU_HVC_Req_Msg; + CCU_Stat1_t CCU_Stat1; + CCU_Stat2_t CCU_Stat2; + CCU_Requests_t CCU_Requests; + CCU_Stat3_t CCU_Stat3; + CCU_VCU_Msg1_t CCU_VCU_Msg1; + CCU_VCU_Msg2_t CCU_VCU_Msg2; + CCU_Msg1_t CCU_Msg1; + CCU_Errors_t CCU_Errors; + CCU_Msg3_t CCU_Msg3; + Diag_From_CCU_t Diag_From_CCU; + CCU_AC_Ctrl_t CCU_AC_Ctrl; +} vector__xxx_candb_rx_t; + +typedef struct +{ + ESC_04_t ESC_04; + EMS_Veh_t EMS_Veh; + BCM_Powertrain_t BCM_Powertrain; + EMS_Veh_02_t EMS_Veh_02; + BCM_EEM_t BCM_EEM; + DMFR_Msg1_t DMFR_Msg1; + DMFL_Msg1_t DMFL_Msg1; + TM_Stat_t TM_Stat; + TM_CP_t TM_CP; + HVC_CCU_Status_Msg_t HVC_CCU_Status_Msg; + BCM_VEH_STATE_t BCM_VEH_STATE; + EMS_HVC_Req_Msg_t EMS_HVC_Req_Msg; + HVC_Err_Status_Msg_t HVC_Err_Status_Msg; + BCM_CLIMATIC_DATA_t BCM_CLIMATIC_DATA; + VCU_CCU_Req_t VCU_CCU_Req; + ESC_08_t ESC_08; + SMFL_status_t SMFL_status; + SMFR_status_t SMFR_status; + SMRL_status_t SMRL_status; + SMRR_status_t SMRR_status; + SDM_Cmd_t SDM_Cmd; + VEH_VIN_t VEH_VIN; + OCUFL_MSG_t OCUFL_MSG; + OCUFR_MSG_t OCUFR_MSG; + OCURL_MSG_t OCURL_MSG; + OCURR_MSG_t OCURR_MSG; + DW_STATE_t DW_STATE; + FIU_CCU1_t FIU_CCU1; + FIU_CCU2_t FIU_CCU2; + FIU_CCU3_t FIU_CCU3; + Diag_To_CCU_t Diag_To_CCU; + Diag_Functional_t Diag_Functional; + HVC_01_t HVC_01; +} vector__xxx_candb_tx_t; + +uint32_t vector__xxx_candb_Receive(vector__xxx_candb_rx_t* m, const uint8_t* d, uint32_t msgid, uint8_t dlc); + +#ifdef __DEF_VECTOR__XXX_CANDB__ + +extern vector__xxx_candb_rx_t vector__xxx_candb_rx; + +extern vector__xxx_candb_tx_t vector__xxx_candb_tx; + +#endif // __DEF_VECTOR__XXX_CANDB__ + +#ifdef __cplusplus +} +#endif diff --git a/conf/candb-config.h b/conf/candb-config.h new file mode 100644 index 0000000..d28a8c8 --- /dev/null +++ b/conf/candb-config.h @@ -0,0 +1,131 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#pragma once + +/* include common dbccode configurations */ +#include "dbccodeconf.h" + +#define __DEF_CCU_CANDB__ + +/* ------------------------------------------------------------------------- * + This define enables using CAN message structs with bit-fielded signals + layout. + + Note(!): bit-feild was not tested properly. */ + +/* #define CANDB_USE_BITS_SIGNAL */ + + +/* ------------------------------------------------------------------------- * + This macro enables using CAN message descriptive struct packing functions + (by default signature of pack function intakes a few simple typed params + for loading data, len, etc). To compile you need to define the struct + __CoderDbcCanFrame_t__ which must have fields: + + u32 MsgId (CAN Frame message ID) + u8 DLC (CAN Frame payload length field) + u8 Data[8] (CAN Frame payload data) + u8 IDE (CAN Frame Extended (1) / Standard (0) ID type) + + This struct definition have to be placed (or be included) in dbccodeconf.h */ + +/* #define CANDB_USE_CANSTRUCT */ + + +/* ------------------------------------------------------------------------- * + All the signals which have values of factor != 1 or offset != 0 + will be named in message struct with posfix '_ro'. Pack to payload + operations will be made on this signal value as well as unpack from payload. + + USE_SIGFLOAT macro makes some difference: + + 1. All the '_ro' fields will have a pair field with '_phys' postfix. + If only offset != 0 is true then the type of '_phys' signal is the same + as '_ro' signal. In other case the type will be @sigfloat_t which + have to be defined in user dbccodeconf.h + + 2. In pack function '_ro' signal will be rewritten by '_phys' signal, which + requires from user to use ONLY '_phys' signal for packing frame + + 3. In unpack function '_phys' signal will be written by '_ro' signal. + User have to use '_phys' signal to read physical value. */ + +/* #define CANDB_USE_SIGFLOAT */ + + +/* ------------------------------------------------------------------------- * + Note(!) that the "canmonitorutil.h" must be accessed in include path: + + This macro adds: + + - monitor field @mon1 to message struct + + - capture system tick in unpack function and save value to mon1 field + to provide to user better missing frame detection code. For this case + user must provide function declared in canmonitorutil.h - GetSysTick() + which may return 1ms uptime. + + - calling function FMon_*** (from 'fmon' driver) inside unpack function + which is empty by default and have to be filled by user if + tests for DLC, rolling, checksum are necessary */ + + #define CANDB_USE_DIAG_MONITORS + + +/* ------------------------------------------------------------------------- * + When monitor using is enabled (CANDB_USE_DIAG_MONITORS) and define below + uncommented, additional signal will be added to message struct. ***_expt: + expected rolling counter, to perform monitoring rolling counter sequence + automatically (result may be tested in dedicated Fmon_*** function) */ + +/* #define CANDB_AUTO_ROLL */ + + +/* ------------------------------------------------------------------------- * + When monitor using is enabled (CANDB_USE_DIAG_MONITORS) and define below + uncommented, frame checksum signal may be handled automatically. + + The signal which may be marked as checksum signal must have substring + with next format: + + + where: + + - "Checksum": constant marker word + + - "XOR8": type of method, this text will be passed to GetFrameHash + (canmonitorutil.h) function as is, the best use case is to define 'enum + DbcCanCrcMethods' in canmonitorutil.h file with all possible + checksum algorithms (e.g. XOR8, XOR4 etc) + + - "3": optional value that will be passed to GetFrameHash as integer value + + Function GetFrameHash have to be implemented by user + + In pack function checksum signal will be calculated automatically + and loaded to payload + + In unpack function checksum signal is checked with calculated. + (result may be tested in dedicated Fmon_*** function). */ + +/* #define CANDB_AUTO_CSM */ + + +/* ------------------------------------------------------------------------- * + FMon handling model can be build in two ways: + + 1 - Default. In this case when specific frame unpack is called the + specific FMon_{Frame name}_{driver name} functoin will be called. + User's code scope has to define each of these functions. Each function is + responsible for the error handling of one frame + + 2 - MONO. In this case there is only one function to perform any frame + monitoring. This function has to be implemented in the user's code scope. + This function is named as FMon_MONO_{driver name}. It takes frame id + which can be used for selection of the logic for a frame monitoring. + This mode costs a bit more in runtime but when you often edit you DBC and you + have more than one project it could be more maintanable (there is + no necessity to replace source code) + + For using MONO way uncomment line below */ +/* #define CANDB_USE_MONO_FMON */ diff --git a/conf/dbccodeconf.h b/conf/dbccodeconf.h new file mode 100644 index 0000000..5f62b7c --- /dev/null +++ b/conf/dbccodeconf.h @@ -0,0 +1,33 @@ +// Generator version : v3.1 +#pragma once + +#include +#include "SystemDelayInterface.h" + +// when USE_SIGFLOAT enabed the sigfloat_t must be defined +// typedef double sigfloat_t; + +// when USE_CANSTRUCT enabled __CoderDbcCanFrame_t__ must be defined +// #include "{header_with_can_struct}" +// typedef {can_struct} __CoderDbcCanFrame_t__; + +// if you need to allocate rx and tx messages structs put the allocation macro here +// #define __DEF_{your_driver_name}__ + +// defualt @__ext_sig__ help types definition + +typedef uint32_t ubitext_t; +typedef int32_t bitext_t; + +// To provide a way to make missing control correctly you +// have to define macro @GetSystemTick() which has to +// return kind of tick counter (e.g. 1 ms ticker) + +// #define GetSystemTick() __get__tick__() + #define GetSystemTick() (uint32_t)SystemGetMs() + +// To provide a way to calculate hash (crc) for CAN +// frame's data field you have to define macro @GetFrameHash + +// #define GetFrameHash(a,b,c,d,e) __get_hash__(a,b,c,d,e) + diff --git a/inc/canmonitorutil.h b/inc/canmonitorutil.h new file mode 100644 index 0000000..2289caa --- /dev/null +++ b/inc/canmonitorutil.h @@ -0,0 +1,54 @@ +// Generator version : v3.1 +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// declare here all availible checksum algorithms +typedef enum +{ + // XOR8 = 0, + // XOR4 = 1, + // etc + + // it is up to user to have or to skip final enum value - @CRC_ALG_COUNT + CRC_ALG_COUNT +} DbcCanCrcMethods; + +typedef struct +{ + // @last_cycle keeps tick-value when last frame was received + uint32_t last_cycle; + + // @timeout_cycle keeps maximum timeout for frame, user responsibility + // to init this field and use it in missing frame monitoring function + uint32_t timeout_cycle; + + // @frame_cnt keeps count of all the received frames + uint32_t frame_cnt; + + // setting up @roll_error bit indicates roll counting fail. + // Bit is not clearing automatically! + uint32_t roll_error : 1; + + // setting up @checksum_error bit indicates checksum checking failure. + // Bit is not clearing automatically! + uint32_t csm_error : 1; + + // setting up @cycle_error bit indicates that time was overrunned. + // Bit is not clearing automatically! + uint32_t cycle_error : 1; + + // setting up @dlc_error bit indicates that the actual length of + // CAN frame is less then defined by CAN matrix! + uint32_t dlc_error : 1; + +} FrameMonitor_t; + +#ifdef __cplusplus +} +#endif + diff --git a/lib/candb-fmon.h b/lib/candb-fmon.h new file mode 100644 index 0000000..8f001a6 --- /dev/null +++ b/lib/candb-fmon.h @@ -0,0 +1,175 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +// DBC file version +#define VER_CANDB_MAJ_FMON (0U) +#define VER_CANDB_MIN_FMON (0U) + +#include "candb-config.h" + +#ifdef CANDB_USE_DIAG_MONITORS + +#include "canmonitorutil.h" +/* +This file contains the prototypes of all the functions that will be called +from each Unpack_*name* function to detect DBC related errors +It is the user responsibility to defined these functions in the +separated .c file. If it won't be done the linkage error will happen +*/ + +#ifdef CANDB_USE_MONO_FMON + +void _FMon_MONO_candb(FrameMonitor_t* _mon, uint32_t msgid); + +#define FMon_ESC_04_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_EMS_Veh_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_BCM_Powertrain_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_EMS_Veh_02_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_BCM_EEM_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_DMFR_Msg1_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_DMFL_Msg1_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_TM_Stat_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_TM_CP_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_HVC_CCU_Status_Msg_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_BCM_VEH_STATE_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_EMS_HVC_Req_Msg_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_HVC_Err_Status_Msg_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_HVC_Req_Msg_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Stat1_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Stat2_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Requests_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Stat3_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_VCU_Msg1_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_VCU_Msg2_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_BCM_CLIMATIC_DATA_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Msg1_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_VCU_CCU_Req_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_ESC_08_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_SMFL_status_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_SMFR_status_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_SMRL_status_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_SMRR_status_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Errors_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_Msg3_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_SDM_Cmd_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_VEH_VIN_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_OCUFL_MSG_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_OCUFR_MSG_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_OCURL_MSG_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_OCURR_MSG_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_DW_STATE_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_FIU_CCU1_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_FIU_CCU2_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_FIU_CCU3_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_Diag_To_CCU_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_Diag_From_CCU_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_Diag_Functional_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_HVC_01_candb(x, y) _FMon_MONO_candb((x), (y)) +#define FMon_CCU_AC_Ctrl_candb(x, y) _FMon_MONO_candb((x), (y)) + +#else + +void _FMon_ESC_04_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_EMS_Veh_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_BCM_Powertrain_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_EMS_Veh_02_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_BCM_EEM_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_DMFR_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_DMFL_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_TM_Stat_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_TM_CP_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_HVC_CCU_Status_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_BCM_VEH_STATE_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_EMS_HVC_Req_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_HVC_Err_Status_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_HVC_Req_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Stat1_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Stat2_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Requests_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Stat3_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_VCU_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_VCU_Msg2_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_BCM_CLIMATIC_DATA_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_VCU_CCU_Req_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_ESC_08_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_SMFL_status_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_SMFR_status_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_SMRL_status_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_SMRR_status_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Errors_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_Msg3_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_SDM_Cmd_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_VEH_VIN_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_OCUFL_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_OCUFR_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_OCURL_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_OCURR_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_DW_STATE_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_FIU_CCU1_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_FIU_CCU2_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_FIU_CCU3_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_Diag_To_CCU_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_Diag_From_CCU_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_Diag_Functional_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_HVC_01_candb(FrameMonitor_t* _mon, uint32_t msgid); +void _FMon_CCU_AC_Ctrl_candb(FrameMonitor_t* _mon, uint32_t msgid); + +#define FMon_ESC_04_candb(x, y) _FMon_ESC_04_candb((x), (y)) +#define FMon_EMS_Veh_candb(x, y) _FMon_EMS_Veh_candb((x), (y)) +#define FMon_BCM_Powertrain_candb(x, y) _FMon_BCM_Powertrain_candb((x), (y)) +#define FMon_EMS_Veh_02_candb(x, y) _FMon_EMS_Veh_02_candb((x), (y)) +#define FMon_BCM_EEM_candb(x, y) _FMon_BCM_EEM_candb((x), (y)) +#define FMon_DMFR_Msg1_candb(x, y) _FMon_DMFR_Msg1_candb((x), (y)) +#define FMon_DMFL_Msg1_candb(x, y) _FMon_DMFL_Msg1_candb((x), (y)) +#define FMon_TM_Stat_candb(x, y) _FMon_TM_Stat_candb((x), (y)) +#define FMon_TM_CP_candb(x, y) _FMon_TM_CP_candb((x), (y)) +#define FMon_HVC_CCU_Status_Msg_candb(x, y) _FMon_HVC_CCU_Status_Msg_candb((x), (y)) +#define FMon_BCM_VEH_STATE_candb(x, y) _FMon_BCM_VEH_STATE_candb((x), (y)) +#define FMon_EMS_HVC_Req_Msg_candb(x, y) _FMon_EMS_HVC_Req_Msg_candb((x), (y)) +#define FMon_HVC_Err_Status_Msg_candb(x, y) _FMon_HVC_Err_Status_Msg_candb((x), (y)) +#define FMon_CCU_HVC_Req_Msg_candb(x, y) _FMon_CCU_HVC_Req_Msg_candb((x), (y)) +#define FMon_CCU_Stat1_candb(x, y) _FMon_CCU_Stat1_candb((x), (y)) +#define FMon_CCU_Stat2_candb(x, y) _FMon_CCU_Stat2_candb((x), (y)) +#define FMon_CCU_Requests_candb(x, y) _FMon_CCU_Requests_candb((x), (y)) +#define FMon_CCU_Stat3_candb(x, y) _FMon_CCU_Stat3_candb((x), (y)) +#define FMon_CCU_VCU_Msg1_candb(x, y) _FMon_CCU_VCU_Msg1_candb((x), (y)) +#define FMon_CCU_VCU_Msg2_candb(x, y) _FMon_CCU_VCU_Msg2_candb((x), (y)) +#define FMon_BCM_CLIMATIC_DATA_candb(x, y) _FMon_BCM_CLIMATIC_DATA_candb((x), (y)) +#define FMon_CCU_Msg1_candb(x, y) _FMon_CCU_Msg1_candb((x), (y)) +#define FMon_VCU_CCU_Req_candb(x, y) _FMon_VCU_CCU_Req_candb((x), (y)) +#define FMon_ESC_08_candb(x, y) _FMon_ESC_08_candb((x), (y)) +#define FMon_SMFL_status_candb(x, y) _FMon_SMFL_status_candb((x), (y)) +#define FMon_SMFR_status_candb(x, y) _FMon_SMFR_status_candb((x), (y)) +#define FMon_SMRL_status_candb(x, y) _FMon_SMRL_status_candb((x), (y)) +#define FMon_SMRR_status_candb(x, y) _FMon_SMRR_status_candb((x), (y)) +#define FMon_CCU_Errors_candb(x, y) _FMon_CCU_Errors_candb((x), (y)) +#define FMon_CCU_Msg3_candb(x, y) _FMon_CCU_Msg3_candb((x), (y)) +#define FMon_SDM_Cmd_candb(x, y) _FMon_SDM_Cmd_candb((x), (y)) +#define FMon_VEH_VIN_candb(x, y) _FMon_VEH_VIN_candb((x), (y)) +#define FMon_OCUFL_MSG_candb(x, y) _FMon_OCUFL_MSG_candb((x), (y)) +#define FMon_OCUFR_MSG_candb(x, y) _FMon_OCUFR_MSG_candb((x), (y)) +#define FMon_OCURL_MSG_candb(x, y) _FMon_OCURL_MSG_candb((x), (y)) +#define FMon_OCURR_MSG_candb(x, y) _FMon_OCURR_MSG_candb((x), (y)) +#define FMon_DW_STATE_candb(x, y) _FMon_DW_STATE_candb((x), (y)) +#define FMon_FIU_CCU1_candb(x, y) _FMon_FIU_CCU1_candb((x), (y)) +#define FMon_FIU_CCU2_candb(x, y) _FMon_FIU_CCU2_candb((x), (y)) +#define FMon_FIU_CCU3_candb(x, y) _FMon_FIU_CCU3_candb((x), (y)) +#define FMon_Diag_To_CCU_candb(x, y) _FMon_Diag_To_CCU_candb((x), (y)) +#define FMon_Diag_From_CCU_candb(x, y) _FMon_Diag_From_CCU_candb((x), (y)) +#define FMon_Diag_Functional_candb(x, y) _FMon_Diag_Functional_candb((x), (y)) +#define FMon_HVC_01_candb(x, y) _FMon_HVC_01_candb((x), (y)) +#define FMon_CCU_AC_Ctrl_candb(x, y) _FMon_CCU_AC_Ctrl_candb((x), (y)) + +#endif + +#endif // CANDB_USE_DIAG_MONITORS + +#ifdef __cplusplus +} +#endif diff --git a/lib/candb.c b/lib/candb.c new file mode 100644 index 0000000..6442d49 --- /dev/null +++ b/lib/candb.c @@ -0,0 +1,3013 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#include "candb.h" + + +// DBC file version +#if (VER_CANDB_MAJ != (0U)) || (VER_CANDB_MIN != (0U)) +#error The CANDB dbc source files have different versions +#endif + +#ifdef CANDB_USE_DIAG_MONITORS +// Function prototypes to be called each time CAN frame is unpacked +// FMon function may detect RC, CRC or DLC violation +#include "candb-fmon.h" + +#endif // CANDB_USE_DIAG_MONITORS + +// This macro guard for the case when you need to enable +// using diag monitors but there is no necessity in proper +// SysTick provider. For providing one you need define macro +// before this line - in dbccodeconf.h + +#ifndef GetSystemTick +#define GetSystemTick() (0u) +#endif + +// This macro guard is for the case when you want to build +// app with enabled optoin auto CSM, but don't yet have +// proper getframehash implementation + +#ifndef GetFrameHash +#define GetFrameHash(a,b,c,d,e) (0u) +#endif + +// This function performs extension of sign for the signals +// whose bit width value is not aligned to one of power of 2 or less than 8. +// The types 'bitext_t' and 'ubitext_t' define the biggest bit width which +// can be correctly handled. You need to select type which can contain +// n+1 bits where n is the largest signed signal width. For example if +// the most wide signed signal has a width of 31 bits you need to set +// bitext_t as int32_t and ubitext_t as uint32_t +// Defined these typedefs in @dbccodeconf.h or locally in 'dbcdrvname'-config.h +static bitext_t __ext_sig__(ubitext_t val, uint8_t bits) +{ + ubitext_t const m = (ubitext_t) (1u << (bits - 1u)); + return ((val ^ m) - m); +} + +uint32_t Unpack_ESC_04_candb(ESC_04_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->ESC_VehicleSpeed_ro = (uint16_t) ( ((_d[1] & (0xFFU)) << 8U) | (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->ESC_VehicleSpeed_phys = (sigfloat_t)(CANDB_ESC_VehicleSpeed_ro_fromS(_m->ESC_VehicleSpeed_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->ESC_VehicleSpeed_ValueError = (uint8_t) ( (_d[2] & (0x01U)) ); + _m->ESC_04_RC = (uint8_t) ( ((_d[6] >> 4U) & (0x0FU)) ); + _m->ESC_04_CS = (uint8_t) ( (_d[7] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < ESC_04_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_ESC_04_candb(&_m->mon1, ESC_04_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return ESC_04_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_ESC_04_candb(ESC_04_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(ESC_04_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->ESC_VehicleSpeed_ro = (uint16_t) CANDB_ESC_VehicleSpeed_ro_toS(_m->ESC_VehicleSpeed_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->ESC_VehicleSpeed_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->ESC_VehicleSpeed_ro >> 8U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( (_m->ESC_VehicleSpeed_ValueError & (0x01U)) ); + cframe->Data[6] |= (uint8_t) ( ((_m->ESC_04_RC & (0x0FU)) << 4U) ); + cframe->Data[7] |= (uint8_t) ( (_m->ESC_04_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) ESC_04_CANID; + cframe->DLC = (uint8_t) ESC_04_DLC; + cframe->IDE = (uint8_t) ESC_04_IDE; + return ESC_04_CANID; +} + +#else + +uint32_t Pack_ESC_04_candb(ESC_04_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(ESC_04_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->ESC_VehicleSpeed_ro = (uint16_t) CANDB_ESC_VehicleSpeed_ro_toS(_m->ESC_VehicleSpeed_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->ESC_VehicleSpeed_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->ESC_VehicleSpeed_ro >> 8U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( (_m->ESC_VehicleSpeed_ValueError & (0x01U)) ); + _d[6] |= (uint8_t) ( ((_m->ESC_04_RC & (0x0FU)) << 4U) ); + _d[7] |= (uint8_t) ( (_m->ESC_04_CS & (0xFFU)) ); + + *_len = (uint8_t) ESC_04_DLC; + *_ide = (uint8_t) ESC_04_IDE; + return ESC_04_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_EMS_Veh_candb(EMS_Veh_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->EMS_nICEngineSpeed3_Val_ro = (uint16_t) ( ((_d[1] & (0xFFU)) << 8U) | (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->EMS_nICEngineSpeed3_Val_phys = (sigfloat_t)(CANDB_EMS_nICEngineSpeed3_Val_ro_fromS(_m->EMS_nICEngineSpeed3_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->EMS_EngCoolTemp_Val_ro = (uint8_t) ( (_d[2] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->EMS_EngCoolTemp_Val_phys = (int16_t) CANDB_EMS_EngCoolTemp_Val_ro_fromS(_m->EMS_EngCoolTemp_Val_ro); +#endif // CANDB_USE_SIGFLOAT + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < EMS_Veh_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_EMS_Veh_candb(&_m->mon1, EMS_Veh_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return EMS_Veh_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_EMS_Veh_candb(EMS_Veh_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(EMS_Veh_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->EMS_nICEngineSpeed3_Val_ro = (uint16_t) CANDB_EMS_nICEngineSpeed3_Val_ro_toS(_m->EMS_nICEngineSpeed3_Val_phys); + _m->EMS_EngCoolTemp_Val_ro = (uint8_t) CANDB_EMS_EngCoolTemp_Val_ro_toS(_m->EMS_EngCoolTemp_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->EMS_nICEngineSpeed3_Val_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->EMS_nICEngineSpeed3_Val_ro >> 8U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( (_m->EMS_EngCoolTemp_Val_ro & (0xFFU)) ); + + cframe->MsgId = (uint32_t) EMS_Veh_CANID; + cframe->DLC = (uint8_t) EMS_Veh_DLC; + cframe->IDE = (uint8_t) EMS_Veh_IDE; + return EMS_Veh_CANID; +} + +#else + +uint32_t Pack_EMS_Veh_candb(EMS_Veh_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(EMS_Veh_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->EMS_nICEngineSpeed3_Val_ro = (uint16_t) CANDB_EMS_nICEngineSpeed3_Val_ro_toS(_m->EMS_nICEngineSpeed3_Val_phys); + _m->EMS_EngCoolTemp_Val_ro = (uint8_t) CANDB_EMS_EngCoolTemp_Val_ro_toS(_m->EMS_EngCoolTemp_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->EMS_nICEngineSpeed3_Val_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->EMS_nICEngineSpeed3_Val_ro >> 8U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( (_m->EMS_EngCoolTemp_Val_ro & (0xFFU)) ); + + *_len = (uint8_t) EMS_Veh_DLC; + *_ide = (uint8_t) EMS_Veh_IDE; + return EMS_Veh_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_Powertrain_candb(BCM_Powertrain_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->BCM_AmbTempRaw_ro = (uint16_t) ( ((_d[1] & (0xFFU)) << 8U) | (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_AmbTempRaw_phys = (sigfloat_t)(CANDB_BCM_AmbTempRaw_ro_fromS(_m->BCM_AmbTempRaw_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->BCM_Powertrain_RC = (uint8_t) ( (_d[4] & (0x0FU)) ); + _m->BCM_Powertrain_CS = (uint8_t) ( (_d[5] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < BCM_Powertrain_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_BCM_Powertrain_candb(&_m->mon1, BCM_Powertrain_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return BCM_Powertrain_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_BCM_Powertrain_candb(BCM_Powertrain_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_Powertrain_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_AmbTempRaw_ro = (uint16_t) CANDB_BCM_AmbTempRaw_ro_toS(_m->BCM_AmbTempRaw_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->BCM_AmbTempRaw_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->BCM_AmbTempRaw_ro >> 8U) & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( (_m->BCM_Powertrain_RC & (0x0FU)) ); + cframe->Data[5] |= (uint8_t) ( (_m->BCM_Powertrain_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) BCM_Powertrain_CANID; + cframe->DLC = (uint8_t) BCM_Powertrain_DLC; + cframe->IDE = (uint8_t) BCM_Powertrain_IDE; + return BCM_Powertrain_CANID; +} + +#else + +uint32_t Pack_BCM_Powertrain_candb(BCM_Powertrain_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_Powertrain_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_AmbTempRaw_ro = (uint16_t) CANDB_BCM_AmbTempRaw_ro_toS(_m->BCM_AmbTempRaw_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->BCM_AmbTempRaw_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->BCM_AmbTempRaw_ro >> 8U) & (0xFFU)) ); + _d[4] |= (uint8_t) ( (_m->BCM_Powertrain_RC & (0x0FU)) ); + _d[5] |= (uint8_t) ( (_m->BCM_Powertrain_CS & (0xFFU)) ); + + *_len = (uint8_t) BCM_Powertrain_DLC; + *_ide = (uint8_t) BCM_Powertrain_IDE; + return BCM_Powertrain_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_EMS_Veh_02_candb(EMS_Veh_02_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->BMS_ActualTemp_Val_ro = (uint8_t) ( ((_d[1] & (0x07U)) << 5U) | ((_d[0] >> 3U) & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->BMS_ActualTemp_Val_phys = (sigfloat_t)(CANDB_BMS_ActualTemp_Val_ro_fromS(_m->BMS_ActualTemp_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->EMS_Veh_02_RC = (uint8_t) ( ((_d[1] >> 4U) & (0x0FU)) ); + _m->EMS_Veh_02_CS = (uint8_t) ( (_d[2] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < EMS_Veh_02_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_EMS_Veh_02_candb(&_m->mon1, EMS_Veh_02_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return EMS_Veh_02_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_EMS_Veh_02_candb(EMS_Veh_02_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(EMS_Veh_02_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->BMS_ActualTemp_Val_ro = (uint8_t) CANDB_BMS_ActualTemp_Val_ro_toS(_m->BMS_ActualTemp_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( ((_m->BMS_ActualTemp_Val_ro & (0x1FU)) << 3U) ); + cframe->Data[1] |= (uint8_t) ( ((_m->BMS_ActualTemp_Val_ro >> 5U) & (0x07U)) | ((_m->EMS_Veh_02_RC & (0x0FU)) << 4U) ); + cframe->Data[2] |= (uint8_t) ( (_m->EMS_Veh_02_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) EMS_Veh_02_CANID; + cframe->DLC = (uint8_t) EMS_Veh_02_DLC; + cframe->IDE = (uint8_t) EMS_Veh_02_IDE; + return EMS_Veh_02_CANID; +} + +#else + +uint32_t Pack_EMS_Veh_02_candb(EMS_Veh_02_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(EMS_Veh_02_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->BMS_ActualTemp_Val_ro = (uint8_t) CANDB_BMS_ActualTemp_Val_ro_toS(_m->BMS_ActualTemp_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( ((_m->BMS_ActualTemp_Val_ro & (0x1FU)) << 3U) ); + _d[1] |= (uint8_t) ( ((_m->BMS_ActualTemp_Val_ro >> 5U) & (0x07U)) | ((_m->EMS_Veh_02_RC & (0x0FU)) << 4U) ); + _d[2] |= (uint8_t) ( (_m->EMS_Veh_02_CS & (0xFFU)) ); + + *_len = (uint8_t) EMS_Veh_02_DLC; + *_ide = (uint8_t) EMS_Veh_02_IDE; + return EMS_Veh_02_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_EEM_candb(BCM_EEM_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->BCM_EEM_StPowMgn = (uint8_t) ( ((_d[1] >> 2U) & (0x07U)) ); + _m->BCM_EEM_RC = (uint8_t) ( ((_d[3] >> 4U) & (0x0FU)) ); + _m->BCM_EEM_CS = (uint8_t) ( (_d[4] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < BCM_EEM_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_BCM_EEM_candb(&_m->mon1, BCM_EEM_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return BCM_EEM_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_BCM_EEM_candb(BCM_EEM_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_EEM_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[1] |= (uint8_t) ( ((_m->BCM_EEM_StPowMgn & (0x07U)) << 2U) ); + cframe->Data[3] |= (uint8_t) ( ((_m->BCM_EEM_RC & (0x0FU)) << 4U) ); + cframe->Data[4] |= (uint8_t) ( (_m->BCM_EEM_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) BCM_EEM_CANID; + cframe->DLC = (uint8_t) BCM_EEM_DLC; + cframe->IDE = (uint8_t) BCM_EEM_IDE; + return BCM_EEM_CANID; +} + +#else + +uint32_t Pack_BCM_EEM_candb(BCM_EEM_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_EEM_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[1] |= (uint8_t) ( ((_m->BCM_EEM_StPowMgn & (0x07U)) << 2U) ); + _d[3] |= (uint8_t) ( ((_m->BCM_EEM_RC & (0x0FU)) << 4U) ); + _d[4] |= (uint8_t) ( (_m->BCM_EEM_CS & (0xFFU)) ); + + *_len = (uint8_t) BCM_EEM_DLC; + *_ide = (uint8_t) BCM_EEM_IDE; + return BCM_EEM_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_DMFR_Msg1_candb(DMFR_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->DMFR_MirrorHeating_Status = (uint8_t) ( ((_d[0] >> 5U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < DMFR_Msg1_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_DMFR_Msg1_candb(&_m->mon1, DMFR_Msg1_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return DMFR_Msg1_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_DMFR_Msg1_candb(DMFR_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(DMFR_Msg1_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( ((_m->DMFR_MirrorHeating_Status & (0x03U)) << 5U) ); + + cframe->MsgId = (uint32_t) DMFR_Msg1_CANID; + cframe->DLC = (uint8_t) DMFR_Msg1_DLC; + cframe->IDE = (uint8_t) DMFR_Msg1_IDE; + return DMFR_Msg1_CANID; +} + +#else + +uint32_t Pack_DMFR_Msg1_candb(DMFR_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(DMFR_Msg1_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( ((_m->DMFR_MirrorHeating_Status & (0x03U)) << 5U) ); + + *_len = (uint8_t) DMFR_Msg1_DLC; + *_ide = (uint8_t) DMFR_Msg1_IDE; + return DMFR_Msg1_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_DMFL_Msg1_candb(DMFL_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->DMFL_MirrorHeating_Status = (uint8_t) ( (_d[1] & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < DMFL_Msg1_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_DMFL_Msg1_candb(&_m->mon1, DMFL_Msg1_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return DMFL_Msg1_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_DMFL_Msg1_candb(DMFL_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(DMFL_Msg1_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[1] |= (uint8_t) ( (_m->DMFL_MirrorHeating_Status & (0x03U)) ); + + cframe->MsgId = (uint32_t) DMFL_Msg1_CANID; + cframe->DLC = (uint8_t) DMFL_Msg1_DLC; + cframe->IDE = (uint8_t) DMFL_Msg1_IDE; + return DMFL_Msg1_CANID; +} + +#else + +uint32_t Pack_DMFL_Msg1_candb(DMFL_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(DMFL_Msg1_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[1] |= (uint8_t) ( (_m->DMFL_MirrorHeating_Status & (0x03U)) ); + + *_len = (uint8_t) DMFL_Msg1_DLC; + *_ide = (uint8_t) DMFL_Msg1_IDE; + return DMFL_Msg1_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_TM_Stat_candb(TM_Stat_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->TM_RearWindowHeating_Stat = (uint8_t) ( (_d[0] & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < TM_Stat_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_TM_Stat_candb(&_m->mon1, TM_Stat_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return TM_Stat_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_TM_Stat_candb(TM_Stat_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(TM_Stat_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->TM_RearWindowHeating_Stat & (0x01U)) ); + + cframe->MsgId = (uint32_t) TM_Stat_CANID; + cframe->DLC = (uint8_t) TM_Stat_DLC; + cframe->IDE = (uint8_t) TM_Stat_IDE; + return TM_Stat_CANID; +} + +#else + +uint32_t Pack_TM_Stat_candb(TM_Stat_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(TM_Stat_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->TM_RearWindowHeating_Stat & (0x01U)) ); + + *_len = (uint8_t) TM_Stat_DLC; + *_ide = (uint8_t) TM_Stat_IDE; + return TM_Stat_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_TM_CP_candb(TM_CP_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCPF_AutoButtonR_Stat = (uint8_t) ( (_d[2] & (0x03U)) ); + _m->CCPR_AutoButtonL_Stat = (uint8_t) ( ((_d[2] >> 2U) & (0x03U)) ); + _m->CCPR_AutoButtonR_Stat = (uint8_t) ( ((_d[2] >> 4U) & (0x03U)) ); + _m->CCPF_DefButton_Stat = (uint8_t) ( ((_d[2] >> 6U) & (0x03U)) ); + _m->CCPF_TempToggleR_Stat = (uint8_t) ( (_d[3] & (0x07U)) ); + _m->CCPF_TempToggleL_Stat = (uint8_t) ( ((_d[3] >> 3U) & (0x07U)) ); + _m->CCPF_AutoButtonL_Stat = (uint8_t) ( ((_d[3] >> 6U) & (0x03U)) ); + _m->CCPR_TempToggleR_Stat = (uint8_t) ( (_d[4] & (0x07U)) ); + _m->CCPR_TempToggleL_Stat = (uint8_t) ( ((_d[4] >> 3U) & (0x07U)) ); + _m->CCPF_RecButton_Stat = (uint8_t) ( ((_d[4] >> 6U) & (0x03U)) ); + _m->CCPF_AcMaxButton_Stat = (uint8_t) ( (_d[5] & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < TM_CP_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_TM_CP_candb(&_m->mon1, TM_CP_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return TM_CP_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_TM_CP_candb(TM_CP_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(TM_CP_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[2] |= (uint8_t) ( (_m->CCPF_AutoButtonR_Stat & (0x03U)) | ((_m->CCPR_AutoButtonL_Stat & (0x03U)) << 2U) | ((_m->CCPR_AutoButtonR_Stat & (0x03U)) << 4U) | ((_m->CCPF_DefButton_Stat & (0x03U)) << 6U) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCPF_TempToggleR_Stat & (0x07U)) | ((_m->CCPF_TempToggleL_Stat & (0x07U)) << 3U) | ((_m->CCPF_AutoButtonL_Stat & (0x03U)) << 6U) ); + cframe->Data[4] |= (uint8_t) ( (_m->CCPR_TempToggleR_Stat & (0x07U)) | ((_m->CCPR_TempToggleL_Stat & (0x07U)) << 3U) | ((_m->CCPF_RecButton_Stat & (0x03U)) << 6U) ); + cframe->Data[5] |= (uint8_t) ( (_m->CCPF_AcMaxButton_Stat & (0x03U)) ); + + cframe->MsgId = (uint32_t) TM_CP_CANID; + cframe->DLC = (uint8_t) TM_CP_DLC; + cframe->IDE = (uint8_t) TM_CP_IDE; + return TM_CP_CANID; +} + +#else + +uint32_t Pack_TM_CP_candb(TM_CP_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(TM_CP_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[2] |= (uint8_t) ( (_m->CCPF_AutoButtonR_Stat & (0x03U)) | ((_m->CCPR_AutoButtonL_Stat & (0x03U)) << 2U) | ((_m->CCPR_AutoButtonR_Stat & (0x03U)) << 4U) | ((_m->CCPF_DefButton_Stat & (0x03U)) << 6U) ); + _d[3] |= (uint8_t) ( (_m->CCPF_TempToggleR_Stat & (0x07U)) | ((_m->CCPF_TempToggleL_Stat & (0x07U)) << 3U) | ((_m->CCPF_AutoButtonL_Stat & (0x03U)) << 6U) ); + _d[4] |= (uint8_t) ( (_m->CCPR_TempToggleR_Stat & (0x07U)) | ((_m->CCPR_TempToggleL_Stat & (0x07U)) << 3U) | ((_m->CCPF_RecButton_Stat & (0x03U)) << 6U) ); + _d[5] |= (uint8_t) ( (_m->CCPF_AcMaxButton_Stat & (0x03U)) ); + + *_len = (uint8_t) TM_CP_DLC; + *_ide = (uint8_t) TM_CP_IDE; + return TM_CP_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_HVC_CCU_Status_Msg_candb(HVC_CCU_Status_Msg_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->HVC_eCompActSpeed_Val_ro = (uint8_t) ( (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_eCompActSpeed_Val_phys = (uint16_t) CANDB_HVC_eCompActSpeed_Val_ro_fromS(_m->HVC_eCompActSpeed_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_eComp_Stat = (uint8_t) ( (_d[1] & (0x07U)) ); + _m->HVC_CCU_Status_RC = (uint8_t) ( ((_d[1] >> 4U) & (0x0FU)) ); + _m->HVC_CCU_Status_CS = (uint8_t) ( (_d[2] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < HVC_CCU_Status_Msg_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_HVC_CCU_Status_Msg_candb(&_m->mon1, HVC_CCU_Status_Msg_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return HVC_CCU_Status_Msg_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_HVC_CCU_Status_Msg_candb(HVC_CCU_Status_Msg_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(HVC_CCU_Status_Msg_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_eCompActSpeed_Val_ro = (uint8_t) CANDB_HVC_eCompActSpeed_Val_ro_toS(_m->HVC_eCompActSpeed_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->HVC_eCompActSpeed_Val_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( (_m->HVC_eComp_Stat & (0x07U)) | ((_m->HVC_CCU_Status_RC & (0x0FU)) << 4U) ); + cframe->Data[2] |= (uint8_t) ( (_m->HVC_CCU_Status_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) HVC_CCU_Status_Msg_CANID; + cframe->DLC = (uint8_t) HVC_CCU_Status_Msg_DLC; + cframe->IDE = (uint8_t) HVC_CCU_Status_Msg_IDE; + return HVC_CCU_Status_Msg_CANID; +} + +#else + +uint32_t Pack_HVC_CCU_Status_Msg_candb(HVC_CCU_Status_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(HVC_CCU_Status_Msg_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_eCompActSpeed_Val_ro = (uint8_t) CANDB_HVC_eCompActSpeed_Val_ro_toS(_m->HVC_eCompActSpeed_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->HVC_eCompActSpeed_Val_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( (_m->HVC_eComp_Stat & (0x07U)) | ((_m->HVC_CCU_Status_RC & (0x0FU)) << 4U) ); + _d[2] |= (uint8_t) ( (_m->HVC_CCU_Status_CS & (0xFFU)) ); + + *_len = (uint8_t) HVC_CCU_Status_Msg_DLC; + *_ide = (uint8_t) HVC_CCU_Status_Msg_IDE; + return HVC_CCU_Status_Msg_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_VEH_STATE_candb(BCM_VEH_STATE_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->BCM_T15_Stat = (uint8_t) ( (_d[0] & (0x01U)) ); + _m->BCM_T30d_Stat = (uint8_t) ( ((_d[0] >> 1U) & (0x01U)) ); + _m->BCM_T30i_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->StealthModeEn = (uint8_t) ( ((_d[0] >> 6U) & (0x01U)) ); + _m->BCM_CCTerm_Stat = (uint8_t) ( ((_d[1] >> 5U) & (0x01U)) ); + _m->BCM_T30i_DisableWarning = (uint8_t) ( ((_d[1] >> 6U) & (0x01U)) ); + _m->BCM_T30d_DisableWarning = (uint8_t) ( (_d[3] & (0x01U)) ); + _m->BCM_IndFadingTime_Req_ro = (uint8_t) ( ((_d[3] >> 2U) & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_IndFadingTime_Req_phys = (sigfloat_t)(CANDB_BCM_IndFadingTime_Req_ro_fromS(_m->BCM_IndFadingTime_Req_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->BCM_CCTermDisableWarning = (uint8_t) ( ((_d[3] >> 7U) & (0x01U)) ); + _m->BCM_VehicleMode_Stat = (uint8_t) ( (_d[6] & (0x0FU)) ); + _m->BCM_SwIndIntens_Stat = (uint8_t) ( ((_d[6] >> 4U) & (0x01U)) ); + _m->BCM_Vehicle_DrvMode = (uint8_t) ( ((_d[6] >> 5U) & (0x07U)) ); + _m->BCM_LVBatteryVoltage_ro = (uint8_t) ( (_d[7] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_LVBatteryVoltage_phys = (sigfloat_t)(CANDB_BCM_LVBatteryVoltage_ro_fromS(_m->BCM_LVBatteryVoltage_ro)); +#endif // CANDB_USE_SIGFLOAT + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < BCM_VEH_STATE_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_BCM_VEH_STATE_candb(&_m->mon1, BCM_VEH_STATE_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return BCM_VEH_STATE_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_BCM_VEH_STATE_candb(BCM_VEH_STATE_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_VEH_STATE_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_IndFadingTime_Req_ro = (uint8_t) CANDB_BCM_IndFadingTime_Req_ro_toS(_m->BCM_IndFadingTime_Req_phys); + _m->BCM_LVBatteryVoltage_ro = (uint8_t) CANDB_BCM_LVBatteryVoltage_ro_toS(_m->BCM_LVBatteryVoltage_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->BCM_T15_Stat & (0x01U)) | ((_m->BCM_T30d_Stat & (0x01U)) << 1U) | ((_m->BCM_T30i_Stat & (0x01U)) << 2U) | ((_m->StealthModeEn & (0x01U)) << 6U) ); + cframe->Data[1] |= (uint8_t) ( ((_m->BCM_CCTerm_Stat & (0x01U)) << 5U) | ((_m->BCM_T30i_DisableWarning & (0x01U)) << 6U) ); + cframe->Data[3] |= (uint8_t) ( (_m->BCM_T30d_DisableWarning & (0x01U)) | ((_m->BCM_IndFadingTime_Req_ro & (0x1FU)) << 2U) | ((_m->BCM_CCTermDisableWarning & (0x01U)) << 7U) ); + cframe->Data[6] |= (uint8_t) ( (_m->BCM_VehicleMode_Stat & (0x0FU)) | ((_m->BCM_SwIndIntens_Stat & (0x01U)) << 4U) | ((_m->BCM_Vehicle_DrvMode & (0x07U)) << 5U) ); + cframe->Data[7] |= (uint8_t) ( (_m->BCM_LVBatteryVoltage_ro & (0xFFU)) ); + + cframe->MsgId = (uint32_t) BCM_VEH_STATE_CANID; + cframe->DLC = (uint8_t) BCM_VEH_STATE_DLC; + cframe->IDE = (uint8_t) BCM_VEH_STATE_IDE; + return BCM_VEH_STATE_CANID; +} + +#else + +uint32_t Pack_BCM_VEH_STATE_candb(BCM_VEH_STATE_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_VEH_STATE_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->BCM_IndFadingTime_Req_ro = (uint8_t) CANDB_BCM_IndFadingTime_Req_ro_toS(_m->BCM_IndFadingTime_Req_phys); + _m->BCM_LVBatteryVoltage_ro = (uint8_t) CANDB_BCM_LVBatteryVoltage_ro_toS(_m->BCM_LVBatteryVoltage_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->BCM_T15_Stat & (0x01U)) | ((_m->BCM_T30d_Stat & (0x01U)) << 1U) | ((_m->BCM_T30i_Stat & (0x01U)) << 2U) | ((_m->StealthModeEn & (0x01U)) << 6U) ); + _d[1] |= (uint8_t) ( ((_m->BCM_CCTerm_Stat & (0x01U)) << 5U) | ((_m->BCM_T30i_DisableWarning & (0x01U)) << 6U) ); + _d[3] |= (uint8_t) ( (_m->BCM_T30d_DisableWarning & (0x01U)) | ((_m->BCM_IndFadingTime_Req_ro & (0x1FU)) << 2U) | ((_m->BCM_CCTermDisableWarning & (0x01U)) << 7U) ); + _d[6] |= (uint8_t) ( (_m->BCM_VehicleMode_Stat & (0x0FU)) | ((_m->BCM_SwIndIntens_Stat & (0x01U)) << 4U) | ((_m->BCM_Vehicle_DrvMode & (0x07U)) << 5U) ); + _d[7] |= (uint8_t) ( (_m->BCM_LVBatteryVoltage_ro & (0xFFU)) ); + + *_len = (uint8_t) BCM_VEH_STATE_DLC; + *_ide = (uint8_t) BCM_VEH_STATE_IDE; + return BCM_VEH_STATE_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_EMS_HVC_Req_Msg_candb(EMS_HVC_Req_Msg_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->EMS_eCompChiller_Req = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->EMS_HVC_Req_RC = (uint8_t) ( ((_d[1] >> 4U) & (0x0FU)) ); + _m->EMS_HVC_Req_CS = (uint8_t) ( (_d[2] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < EMS_HVC_Req_Msg_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_EMS_HVC_Req_Msg_candb(&_m->mon1, EMS_HVC_Req_Msg_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return EMS_HVC_Req_Msg_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_EMS_HVC_Req_Msg_candb(EMS_HVC_Req_Msg_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(EMS_HVC_Req_Msg_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( ((_m->EMS_eCompChiller_Req & (0x01U)) << 2U) ); + cframe->Data[1] |= (uint8_t) ( ((_m->EMS_HVC_Req_RC & (0x0FU)) << 4U) ); + cframe->Data[2] |= (uint8_t) ( (_m->EMS_HVC_Req_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) EMS_HVC_Req_Msg_CANID; + cframe->DLC = (uint8_t) EMS_HVC_Req_Msg_DLC; + cframe->IDE = (uint8_t) EMS_HVC_Req_Msg_IDE; + return EMS_HVC_Req_Msg_CANID; +} + +#else + +uint32_t Pack_EMS_HVC_Req_Msg_candb(EMS_HVC_Req_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(EMS_HVC_Req_Msg_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( ((_m->EMS_eCompChiller_Req & (0x01U)) << 2U) ); + _d[1] |= (uint8_t) ( ((_m->EMS_HVC_Req_RC & (0x0FU)) << 4U) ); + _d[2] |= (uint8_t) ( (_m->EMS_HVC_Req_CS & (0xFFU)) ); + + *_len = (uint8_t) EMS_HVC_Req_Msg_DLC; + *_ide = (uint8_t) EMS_HVC_Req_Msg_IDE; + return EMS_HVC_Req_Msg_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_HVC_Err_Status_Msg_candb(HVC_Err_Status_Msg_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->HVC_CompSpeed_Val_ro = (uint8_t) ( (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompSpeed_Val_phys = (uint16_t) CANDB_HVC_CompSpeed_Val_ro_fromS(_m->HVC_CompSpeed_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_Comp_Stat = (uint8_t) ( (_d[1] & (0x03U)) ); + _m->HVC_Reserved01 = (uint8_t) ( ((_d[1] >> 2U) & (0x3FU)) ); + _m->HVC_CompInputV_Val_ro = (uint8_t) ( (_d[2] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompInputV_Val_phys = (uint16_t) CANDB_HVC_CompInputV_Val_ro_fromS(_m->HVC_CompInputV_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_CompInputC_Val_ro = (uint8_t) ( (_d[3] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompInputC_Val_phys = (sigfloat_t)(CANDB_HVC_CompInputC_Val_ro_fromS(_m->HVC_CompInputC_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_CompInvTemp_Val_ro = (uint8_t) ( (_d[4] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompInvTemp_Val_phys = (int16_t) CANDB_HVC_CompInvTemp_Val_ro_fromS(_m->HVC_CompInvTemp_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_CompPhaseC_Val_ro = (uint8_t) ( (_d[5] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompPhaseC_Val_phys = (sigfloat_t)(CANDB_HVC_CompPhaseC_Val_ro_fromS(_m->HVC_CompPhaseC_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_CompUV_Stat = (uint8_t) ( (_d[6] & (0x01U)) ); + _m->HVC_CompOV_Stat = (uint8_t) ( ((_d[6] >> 1U) & (0x01U)) ); + _m->HVC_CompOvHeat_Stat = (uint8_t) ( ((_d[6] >> 2U) & (0x01U)) ); + _m->HVC_CompOvTorque_Stat = (uint8_t) ( ((_d[6] >> 3U) & (0x01U)) ); + _m->HVC_CompLowVoltErr_Stat = (uint8_t) ( ((_d[6] >> 4U) & (0x01U)) ); + _m->HVC_CompComErr_Stat = (uint8_t) ( ((_d[6] >> 5U) & (0x01U)) ); + _m->HVC_Reserved02 = (uint8_t) ( ((_d[6] >> 6U) & (0x03U)) ); + _m->HVC_CompTempSensErr_Stat = (uint8_t) ( (_d[7] & (0x01U)) ); + _m->HVC_CompCurrSensErr_Stat = (uint8_t) ( ((_d[7] >> 1U) & (0x01U)) ); + _m->HVC_CompCurrShortCirc_Stat = (uint8_t) ( ((_d[7] >> 2U) & (0x01U)) ); + _m->HVC_CompInPowSupply_Stat = (uint8_t) ( ((_d[7] >> 3U) & (0x01U)) ); + _m->HVC_CompTorqueStallErr_Stat = (uint8_t) ( ((_d[7] >> 4U) & (0x01U)) ); + _m->HVC_CompVoltSensErr_Stat = (uint8_t) ( ((_d[7] >> 5U) & (0x01U)) ); + _m->HVC_Reserved03 = (uint8_t) ( ((_d[7] >> 6U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < HVC_Err_Status_Msg_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_HVC_Err_Status_Msg_candb(&_m->mon1, HVC_Err_Status_Msg_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return HVC_Err_Status_Msg_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_HVC_Err_Status_Msg_candb(HVC_Err_Status_Msg_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(HVC_Err_Status_Msg_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompSpeed_Val_ro = (uint8_t) CANDB_HVC_CompSpeed_Val_ro_toS(_m->HVC_CompSpeed_Val_phys); + _m->HVC_CompInputV_Val_ro = (uint8_t) CANDB_HVC_CompInputV_Val_ro_toS(_m->HVC_CompInputV_Val_phys); + _m->HVC_CompInputC_Val_ro = (uint8_t) CANDB_HVC_CompInputC_Val_ro_toS(_m->HVC_CompInputC_Val_phys); + _m->HVC_CompInvTemp_Val_ro = (uint8_t) CANDB_HVC_CompInvTemp_Val_ro_toS(_m->HVC_CompInvTemp_Val_phys); + _m->HVC_CompPhaseC_Val_ro = (uint8_t) CANDB_HVC_CompPhaseC_Val_ro_toS(_m->HVC_CompPhaseC_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->HVC_CompSpeed_Val_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( (_m->HVC_Comp_Stat & (0x03U)) | ((_m->HVC_Reserved01 & (0x3FU)) << 2U) ); + cframe->Data[2] |= (uint8_t) ( (_m->HVC_CompInputV_Val_ro & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->HVC_CompInputC_Val_ro & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( (_m->HVC_CompInvTemp_Val_ro & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( (_m->HVC_CompPhaseC_Val_ro & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( (_m->HVC_CompUV_Stat & (0x01U)) | ((_m->HVC_CompOV_Stat & (0x01U)) << 1U) | ((_m->HVC_CompOvHeat_Stat & (0x01U)) << 2U) | ((_m->HVC_CompOvTorque_Stat & (0x01U)) << 3U) | ((_m->HVC_CompLowVoltErr_Stat & (0x01U)) << 4U) | ((_m->HVC_CompComErr_Stat & (0x01U)) << 5U) | ((_m->HVC_Reserved02 & (0x03U)) << 6U) ); + cframe->Data[7] |= (uint8_t) ( (_m->HVC_CompTempSensErr_Stat & (0x01U)) | ((_m->HVC_CompCurrSensErr_Stat & (0x01U)) << 1U) | ((_m->HVC_CompCurrShortCirc_Stat & (0x01U)) << 2U) | ((_m->HVC_CompInPowSupply_Stat & (0x01U)) << 3U) | ((_m->HVC_CompTorqueStallErr_Stat & (0x01U)) << 4U) | ((_m->HVC_CompVoltSensErr_Stat & (0x01U)) << 5U) | ((_m->HVC_Reserved03 & (0x03U)) << 6U) ); + + cframe->MsgId = (uint32_t) HVC_Err_Status_Msg_CANID; + cframe->DLC = (uint8_t) HVC_Err_Status_Msg_DLC; + cframe->IDE = (uint8_t) HVC_Err_Status_Msg_IDE; + return HVC_Err_Status_Msg_CANID; +} + +#else + +uint32_t Pack_HVC_Err_Status_Msg_candb(HVC_Err_Status_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(HVC_Err_Status_Msg_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_CompSpeed_Val_ro = (uint8_t) CANDB_HVC_CompSpeed_Val_ro_toS(_m->HVC_CompSpeed_Val_phys); + _m->HVC_CompInputV_Val_ro = (uint8_t) CANDB_HVC_CompInputV_Val_ro_toS(_m->HVC_CompInputV_Val_phys); + _m->HVC_CompInputC_Val_ro = (uint8_t) CANDB_HVC_CompInputC_Val_ro_toS(_m->HVC_CompInputC_Val_phys); + _m->HVC_CompInvTemp_Val_ro = (uint8_t) CANDB_HVC_CompInvTemp_Val_ro_toS(_m->HVC_CompInvTemp_Val_phys); + _m->HVC_CompPhaseC_Val_ro = (uint8_t) CANDB_HVC_CompPhaseC_Val_ro_toS(_m->HVC_CompPhaseC_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->HVC_CompSpeed_Val_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( (_m->HVC_Comp_Stat & (0x03U)) | ((_m->HVC_Reserved01 & (0x3FU)) << 2U) ); + _d[2] |= (uint8_t) ( (_m->HVC_CompInputV_Val_ro & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->HVC_CompInputC_Val_ro & (0xFFU)) ); + _d[4] |= (uint8_t) ( (_m->HVC_CompInvTemp_Val_ro & (0xFFU)) ); + _d[5] |= (uint8_t) ( (_m->HVC_CompPhaseC_Val_ro & (0xFFU)) ); + _d[6] |= (uint8_t) ( (_m->HVC_CompUV_Stat & (0x01U)) | ((_m->HVC_CompOV_Stat & (0x01U)) << 1U) | ((_m->HVC_CompOvHeat_Stat & (0x01U)) << 2U) | ((_m->HVC_CompOvTorque_Stat & (0x01U)) << 3U) | ((_m->HVC_CompLowVoltErr_Stat & (0x01U)) << 4U) | ((_m->HVC_CompComErr_Stat & (0x01U)) << 5U) | ((_m->HVC_Reserved02 & (0x03U)) << 6U) ); + _d[7] |= (uint8_t) ( (_m->HVC_CompTempSensErr_Stat & (0x01U)) | ((_m->HVC_CompCurrSensErr_Stat & (0x01U)) << 1U) | ((_m->HVC_CompCurrShortCirc_Stat & (0x01U)) << 2U) | ((_m->HVC_CompInPowSupply_Stat & (0x01U)) << 3U) | ((_m->HVC_CompTorqueStallErr_Stat & (0x01U)) << 4U) | ((_m->HVC_CompVoltSensErr_Stat & (0x01U)) << 5U) | ((_m->HVC_Reserved03 & (0x03U)) << 6U) ); + + *_len = (uint8_t) HVC_Err_Status_Msg_DLC; + *_ide = (uint8_t) HVC_Err_Status_Msg_IDE; + return HVC_Err_Status_Msg_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_HVC_Req_Msg_candb(CCU_HVC_Req_Msg_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_eCompSpeedReq_Val_ro = (uint8_t) ( (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_eCompSpeedReq_Val_phys = (uint16_t) CANDB_CCU_eCompSpeedReq_Val_ro_fromS(_m->CCU_eCompSpeedReq_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_eCompReq_Stat = (uint8_t) ( (_d[1] & (0x01U)) ); + _m->CCU_LowTempValve_Req = (uint8_t) ( ((_d[1] >> 1U) & (0x03U)) ); + _m->CCU_HVC_Req_RC = (uint8_t) ( ((_d[1] >> 4U) & (0x0FU)) ); + _m->CCU_HVC_Req_CS = (uint8_t) ( (_d[2] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_HVC_Req_Msg_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_HVC_Req_Msg_candb(&_m->mon1, CCU_HVC_Req_Msg_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_HVC_Req_Msg_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_HVC_Req_Msg_candb(CCU_HVC_Req_Msg_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_HVC_Req_Msg_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_eCompSpeedReq_Val_ro = (uint8_t) CANDB_CCU_eCompSpeedReq_Val_ro_toS(_m->CCU_eCompSpeedReq_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_eCompSpeedReq_Val_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( (_m->CCU_eCompReq_Stat & (0x01U)) | ((_m->CCU_LowTempValve_Req & (0x03U)) << 1U) | ((_m->CCU_HVC_Req_RC & (0x0FU)) << 4U) ); + cframe->Data[2] |= (uint8_t) ( (_m->CCU_HVC_Req_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) CCU_HVC_Req_Msg_CANID; + cframe->DLC = (uint8_t) CCU_HVC_Req_Msg_DLC; + cframe->IDE = (uint8_t) CCU_HVC_Req_Msg_IDE; + return CCU_HVC_Req_Msg_CANID; +} + +#else + +uint32_t Pack_CCU_HVC_Req_Msg_candb(CCU_HVC_Req_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_HVC_Req_Msg_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_eCompSpeedReq_Val_ro = (uint8_t) CANDB_CCU_eCompSpeedReq_Val_ro_toS(_m->CCU_eCompSpeedReq_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->CCU_eCompSpeedReq_Val_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( (_m->CCU_eCompReq_Stat & (0x01U)) | ((_m->CCU_LowTempValve_Req & (0x03U)) << 1U) | ((_m->CCU_HVC_Req_RC & (0x0FU)) << 4U) ); + _d[2] |= (uint8_t) ( (_m->CCU_HVC_Req_CS & (0xFFU)) ); + + *_len = (uint8_t) CCU_HVC_Req_Msg_DLC; + *_ide = (uint8_t) CCU_HVC_Req_Msg_IDE; + return CCU_HVC_Req_Msg_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Stat1_candb(CCU_Stat1_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_ModeFL_Stat = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->CCU_ModeFR_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x03U)) ); + _m->CCU_ModeRL_Stat = (uint8_t) ( ((_d[0] >> 4U) & (0x03U)) ); + _m->CCU_ModeRR_Stat = (uint8_t) ( ((_d[0] >> 6U) & (0x03U)) ); + _m->CCU_AutoModeFL_Stat = (uint8_t) ( (_d[1] & (0x07U)) ); + _m->CCU_AutoModeFR_Stat = (uint8_t) ( ((_d[1] >> 3U) & (0x07U)) ); + _m->CCU_AirDirectionRL_Face_Stat = (uint8_t) ( ((_d[1] >> 6U) & (0x01U)) ); + _m->CCU_AirDirectionRL_Foot_Stat = (uint8_t) ( ((_d[1] >> 7U) & (0x01U)) ); + _m->CCU_AutoModeRL_Stat = (uint8_t) ( (_d[2] & (0x07U)) ); + _m->CCU_AutoModeRR_Stat = (uint8_t) ( ((_d[2] >> 3U) & (0x07U)) ); + _m->CCU_AirDirectionRR_Face_Stat = (uint8_t) ( ((_d[2] >> 6U) & (0x01U)) ); + _m->CCU_AirDirectionRR_Foot_Stat = (uint8_t) ( ((_d[2] >> 7U) & (0x01U)) ); + _m->CCU_AirDirectionFL_Def_Stat = (uint8_t) ( (_d[3] & (0x01U)) ); + _m->CCU_AirDirectionFL_Face_Stat = (uint8_t) ( ((_d[3] >> 1U) & (0x01U)) ); + _m->CCU_AirDirectionFL_Foot_Stat = (uint8_t) ( ((_d[3] >> 2U) & (0x01U)) ); + _m->CCU_AirDirectionFR_Def_Stat = (uint8_t) ( ((_d[3] >> 3U) & (0x01U)) ); + _m->CCU_AirDirectionFR_Face_Stat = (uint8_t) ( ((_d[3] >> 4U) & (0x01U)) ); + _m->CCU_AirDirectionFR_Foot_Stat = (uint8_t) ( ((_d[3] >> 5U) & (0x01U)) ); + _m->CCU_Recirculation_Stat = (uint8_t) ( ((_d[3] >> 6U) & (0x03U)) ); + _m->CCU_BlowerSpeedFL_Stat = (uint8_t) ( (_d[4] & (0x07U)) ); + _m->CCU_TargetTempFL_Stat_ro = (uint8_t) ( ((_d[4] >> 3U) & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_TargetTempFL_Stat_phys = (sigfloat_t)(CANDB_CCU_TargetTempFL_Stat_ro_fromS(_m->CCU_TargetTempFL_Stat_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_BlowerSpeedFR_Stat = (uint8_t) ( (_d[5] & (0x07U)) ); + _m->CCU_TargetTempFR_Stat_ro = (uint8_t) ( ((_d[5] >> 3U) & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_TargetTempFR_Stat_phys = (sigfloat_t)(CANDB_CCU_TargetTempFR_Stat_ro_fromS(_m->CCU_TargetTempFR_Stat_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_BlowerSpeedRL_Stat = (uint8_t) ( (_d[6] & (0x07U)) ); + _m->CCU_TargetTempRR_Stat_ro = (uint8_t) ( ((_d[6] >> 3U) & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_TargetTempRR_Stat_phys = (sigfloat_t)(CANDB_CCU_TargetTempRR_Stat_ro_fromS(_m->CCU_TargetTempRR_Stat_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_BlowerSpeedRR_Stat = (uint8_t) ( (_d[7] & (0x07U)) ); + _m->CCU_TargetTempRL_Stat_ro = (uint8_t) ( ((_d[7] >> 3U) & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_TargetTempRL_Stat_phys = (sigfloat_t)(CANDB_CCU_TargetTempRL_Stat_ro_fromS(_m->CCU_TargetTempRL_Stat_ro)); +#endif // CANDB_USE_SIGFLOAT + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Stat1_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Stat1_candb(&_m->mon1, CCU_Stat1_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Stat1_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Stat1_candb(CCU_Stat1_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Stat1_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_TargetTempFL_Stat_ro = (uint8_t) CANDB_CCU_TargetTempFL_Stat_ro_toS(_m->CCU_TargetTempFL_Stat_phys); + _m->CCU_TargetTempFR_Stat_ro = (uint8_t) CANDB_CCU_TargetTempFR_Stat_ro_toS(_m->CCU_TargetTempFR_Stat_phys); + _m->CCU_TargetTempRR_Stat_ro = (uint8_t) CANDB_CCU_TargetTempRR_Stat_ro_toS(_m->CCU_TargetTempRR_Stat_phys); + _m->CCU_TargetTempRL_Stat_ro = (uint8_t) CANDB_CCU_TargetTempRL_Stat_ro_toS(_m->CCU_TargetTempRL_Stat_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_ModeFL_Stat & (0x03U)) | ((_m->CCU_ModeFR_Stat & (0x03U)) << 2U) | ((_m->CCU_ModeRL_Stat & (0x03U)) << 4U) | ((_m->CCU_ModeRR_Stat & (0x03U)) << 6U) ); + cframe->Data[1] |= (uint8_t) ( (_m->CCU_AutoModeFL_Stat & (0x07U)) | ((_m->CCU_AutoModeFR_Stat & (0x07U)) << 3U) | ((_m->CCU_AirDirectionRL_Face_Stat & (0x01U)) << 6U) | ((_m->CCU_AirDirectionRL_Foot_Stat & (0x01U)) << 7U) ); + cframe->Data[2] |= (uint8_t) ( (_m->CCU_AutoModeRL_Stat & (0x07U)) | ((_m->CCU_AutoModeRR_Stat & (0x07U)) << 3U) | ((_m->CCU_AirDirectionRR_Face_Stat & (0x01U)) << 6U) | ((_m->CCU_AirDirectionRR_Foot_Stat & (0x01U)) << 7U) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_AirDirectionFL_Def_Stat & (0x01U)) | ((_m->CCU_AirDirectionFL_Face_Stat & (0x01U)) << 1U) | ((_m->CCU_AirDirectionFL_Foot_Stat & (0x01U)) << 2U) | ((_m->CCU_AirDirectionFR_Def_Stat & (0x01U)) << 3U) | ((_m->CCU_AirDirectionFR_Face_Stat & (0x01U)) << 4U) | ((_m->CCU_AirDirectionFR_Foot_Stat & (0x01U)) << 5U) | ((_m->CCU_Recirculation_Stat & (0x03U)) << 6U) ); + cframe->Data[4] |= (uint8_t) ( (_m->CCU_BlowerSpeedFL_Stat & (0x07U)) | ((_m->CCU_TargetTempFL_Stat_ro & (0x1FU)) << 3U) ); + cframe->Data[5] |= (uint8_t) ( (_m->CCU_BlowerSpeedFR_Stat & (0x07U)) | ((_m->CCU_TargetTempFR_Stat_ro & (0x1FU)) << 3U) ); + cframe->Data[6] |= (uint8_t) ( (_m->CCU_BlowerSpeedRL_Stat & (0x07U)) | ((_m->CCU_TargetTempRR_Stat_ro & (0x1FU)) << 3U) ); + cframe->Data[7] |= (uint8_t) ( (_m->CCU_BlowerSpeedRR_Stat & (0x07U)) | ((_m->CCU_TargetTempRL_Stat_ro & (0x1FU)) << 3U) ); + + cframe->MsgId = (uint32_t) CCU_Stat1_CANID; + cframe->DLC = (uint8_t) CCU_Stat1_DLC; + cframe->IDE = (uint8_t) CCU_Stat1_IDE; + return CCU_Stat1_CANID; +} + +#else + +uint32_t Pack_CCU_Stat1_candb(CCU_Stat1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Stat1_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_TargetTempFL_Stat_ro = (uint8_t) CANDB_CCU_TargetTempFL_Stat_ro_toS(_m->CCU_TargetTempFL_Stat_phys); + _m->CCU_TargetTempFR_Stat_ro = (uint8_t) CANDB_CCU_TargetTempFR_Stat_ro_toS(_m->CCU_TargetTempFR_Stat_phys); + _m->CCU_TargetTempRR_Stat_ro = (uint8_t) CANDB_CCU_TargetTempRR_Stat_ro_toS(_m->CCU_TargetTempRR_Stat_phys); + _m->CCU_TargetTempRL_Stat_ro = (uint8_t) CANDB_CCU_TargetTempRL_Stat_ro_toS(_m->CCU_TargetTempRL_Stat_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->CCU_ModeFL_Stat & (0x03U)) | ((_m->CCU_ModeFR_Stat & (0x03U)) << 2U) | ((_m->CCU_ModeRL_Stat & (0x03U)) << 4U) | ((_m->CCU_ModeRR_Stat & (0x03U)) << 6U) ); + _d[1] |= (uint8_t) ( (_m->CCU_AutoModeFL_Stat & (0x07U)) | ((_m->CCU_AutoModeFR_Stat & (0x07U)) << 3U) | ((_m->CCU_AirDirectionRL_Face_Stat & (0x01U)) << 6U) | ((_m->CCU_AirDirectionRL_Foot_Stat & (0x01U)) << 7U) ); + _d[2] |= (uint8_t) ( (_m->CCU_AutoModeRL_Stat & (0x07U)) | ((_m->CCU_AutoModeRR_Stat & (0x07U)) << 3U) | ((_m->CCU_AirDirectionRR_Face_Stat & (0x01U)) << 6U) | ((_m->CCU_AirDirectionRR_Foot_Stat & (0x01U)) << 7U) ); + _d[3] |= (uint8_t) ( (_m->CCU_AirDirectionFL_Def_Stat & (0x01U)) | ((_m->CCU_AirDirectionFL_Face_Stat & (0x01U)) << 1U) | ((_m->CCU_AirDirectionFL_Foot_Stat & (0x01U)) << 2U) | ((_m->CCU_AirDirectionFR_Def_Stat & (0x01U)) << 3U) | ((_m->CCU_AirDirectionFR_Face_Stat & (0x01U)) << 4U) | ((_m->CCU_AirDirectionFR_Foot_Stat & (0x01U)) << 5U) | ((_m->CCU_Recirculation_Stat & (0x03U)) << 6U) ); + _d[4] |= (uint8_t) ( (_m->CCU_BlowerSpeedFL_Stat & (0x07U)) | ((_m->CCU_TargetTempFL_Stat_ro & (0x1FU)) << 3U) ); + _d[5] |= (uint8_t) ( (_m->CCU_BlowerSpeedFR_Stat & (0x07U)) | ((_m->CCU_TargetTempFR_Stat_ro & (0x1FU)) << 3U) ); + _d[6] |= (uint8_t) ( (_m->CCU_BlowerSpeedRL_Stat & (0x07U)) | ((_m->CCU_TargetTempRR_Stat_ro & (0x1FU)) << 3U) ); + _d[7] |= (uint8_t) ( (_m->CCU_BlowerSpeedRR_Stat & (0x07U)) | ((_m->CCU_TargetTempRL_Stat_ro & (0x1FU)) << 3U) ); + + *_len = (uint8_t) CCU_Stat1_DLC; + *_ide = (uint8_t) CCU_Stat1_IDE; + return CCU_Stat1_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Stat2_candb(CCU_Stat2_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_AromaCartridgeSw_Stat = (uint8_t) ( (_d[0] & (0x01U)) ); + _m->CCU_FrontZoneSync_Stat = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->CCU_RearZoneSync_Stat = (uint8_t) ( ((_d[0] >> 4U) & (0x01U)) ); + _m->CCU_AllZoneSync_Stat = (uint8_t) ( ((_d[0] >> 5U) & (0x01U)) ); + _m->CCU_ACfront_Stat = (uint8_t) ( ((_d[0] >> 6U) & (0x01U)) ); + _m->CCU_ACrear_Stat = (uint8_t) ( ((_d[0] >> 7U) & (0x01U)) ); + _m->CCU_ACmaxF_Stat = (uint8_t) ( (_d[1] & (0x01U)) ); + _m->CCU_ACmaxR_Stat = (uint8_t) ( ((_d[1] >> 1U) & (0x01U)) ); + _m->CCU_Defrost_Stat = (uint8_t) ( ((_d[1] >> 2U) & (0x01U)) ); + _m->CCU_Ionization_Stat = (uint8_t) ( ((_d[1] >> 3U) & (0x01U)) ); + _m->CCU_FootTempCorFL_Stat = (uint8_t) ( (_d[2] & (0x07U)) ); + _m->CCU_FootTempCorFR_Stat = (uint8_t) ( ((_d[2] >> 3U) & (0x07U)) ); + _m->CCU_AromaIntens_Stat = (uint8_t) ( ((_d[2] >> 6U) & (0x03U)) ); + _m->CCU_FootTempCorRL_Stat = (uint8_t) ( (_d[3] & (0x07U)) ); + _m->CCU_FootTempCorRR_Stat = (uint8_t) ( ((_d[3] >> 3U) & (0x07U)) ); + _m->CCU_DeflectorSwDL_Stat = (uint8_t) ( (_d[4] & (0x03U)) ); + _m->CCU_DeflectorSwDR_Stat = (uint8_t) ( ((_d[4] >> 2U) & (0x03U)) ); + _m->CCU_DeflectorSwFPL_Stat = (uint8_t) ( ((_d[4] >> 4U) & (0x03U)) ); + _m->CCU_DeflectorSwFPR_Stat = (uint8_t) ( ((_d[4] >> 6U) & (0x03U)) ); + _m->CCU_DeflectorSwFCL_Stat = (uint8_t) ( (_d[5] & (0x03U)) ); + _m->CCU_DeflectorSwFCR_Stat = (uint8_t) ( ((_d[5] >> 2U) & (0x03U)) ); + _m->CCU_DeflectorSwRLB_Stat = (uint8_t) ( ((_d[5] >> 4U) & (0x03U)) ); + _m->CCU_DeflectorSwRRB_Stat = (uint8_t) ( ((_d[5] >> 6U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Stat2_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Stat2_candb(&_m->mon1, CCU_Stat2_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Stat2_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Stat2_candb(CCU_Stat2_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Stat2_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_AromaCartridgeSw_Stat & (0x01U)) | ((_m->CCU_FrontZoneSync_Stat & (0x01U)) << 3U) | ((_m->CCU_RearZoneSync_Stat & (0x01U)) << 4U) | ((_m->CCU_AllZoneSync_Stat & (0x01U)) << 5U) | ((_m->CCU_ACfront_Stat & (0x01U)) << 6U) | ((_m->CCU_ACrear_Stat & (0x01U)) << 7U) ); + cframe->Data[1] |= (uint8_t) ( (_m->CCU_ACmaxF_Stat & (0x01U)) | ((_m->CCU_ACmaxR_Stat & (0x01U)) << 1U) | ((_m->CCU_Defrost_Stat & (0x01U)) << 2U) | ((_m->CCU_Ionization_Stat & (0x01U)) << 3U) ); + cframe->Data[2] |= (uint8_t) ( (_m->CCU_FootTempCorFL_Stat & (0x07U)) | ((_m->CCU_FootTempCorFR_Stat & (0x07U)) << 3U) | ((_m->CCU_AromaIntens_Stat & (0x03U)) << 6U) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_FootTempCorRL_Stat & (0x07U)) | ((_m->CCU_FootTempCorRR_Stat & (0x07U)) << 3U) ); + cframe->Data[4] |= (uint8_t) ( (_m->CCU_DeflectorSwDL_Stat & (0x03U)) | ((_m->CCU_DeflectorSwDR_Stat & (0x03U)) << 2U) | ((_m->CCU_DeflectorSwFPL_Stat & (0x03U)) << 4U) | ((_m->CCU_DeflectorSwFPR_Stat & (0x03U)) << 6U) ); + cframe->Data[5] |= (uint8_t) ( (_m->CCU_DeflectorSwFCL_Stat & (0x03U)) | ((_m->CCU_DeflectorSwFCR_Stat & (0x03U)) << 2U) | ((_m->CCU_DeflectorSwRLB_Stat & (0x03U)) << 4U) | ((_m->CCU_DeflectorSwRRB_Stat & (0x03U)) << 6U) ); + + cframe->MsgId = (uint32_t) CCU_Stat2_CANID; + cframe->DLC = (uint8_t) CCU_Stat2_DLC; + cframe->IDE = (uint8_t) CCU_Stat2_IDE; + return CCU_Stat2_CANID; +} + +#else + +uint32_t Pack_CCU_Stat2_candb(CCU_Stat2_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Stat2_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->CCU_AromaCartridgeSw_Stat & (0x01U)) | ((_m->CCU_FrontZoneSync_Stat & (0x01U)) << 3U) | ((_m->CCU_RearZoneSync_Stat & (0x01U)) << 4U) | ((_m->CCU_AllZoneSync_Stat & (0x01U)) << 5U) | ((_m->CCU_ACfront_Stat & (0x01U)) << 6U) | ((_m->CCU_ACrear_Stat & (0x01U)) << 7U) ); + _d[1] |= (uint8_t) ( (_m->CCU_ACmaxF_Stat & (0x01U)) | ((_m->CCU_ACmaxR_Stat & (0x01U)) << 1U) | ((_m->CCU_Defrost_Stat & (0x01U)) << 2U) | ((_m->CCU_Ionization_Stat & (0x01U)) << 3U) ); + _d[2] |= (uint8_t) ( (_m->CCU_FootTempCorFL_Stat & (0x07U)) | ((_m->CCU_FootTempCorFR_Stat & (0x07U)) << 3U) | ((_m->CCU_AromaIntens_Stat & (0x03U)) << 6U) ); + _d[3] |= (uint8_t) ( (_m->CCU_FootTempCorRL_Stat & (0x07U)) | ((_m->CCU_FootTempCorRR_Stat & (0x07U)) << 3U) ); + _d[4] |= (uint8_t) ( (_m->CCU_DeflectorSwDL_Stat & (0x03U)) | ((_m->CCU_DeflectorSwDR_Stat & (0x03U)) << 2U) | ((_m->CCU_DeflectorSwFPL_Stat & (0x03U)) << 4U) | ((_m->CCU_DeflectorSwFPR_Stat & (0x03U)) << 6U) ); + _d[5] |= (uint8_t) ( (_m->CCU_DeflectorSwFCL_Stat & (0x03U)) | ((_m->CCU_DeflectorSwFCR_Stat & (0x03U)) << 2U) | ((_m->CCU_DeflectorSwRLB_Stat & (0x03U)) << 4U) | ((_m->CCU_DeflectorSwRRB_Stat & (0x03U)) << 6U) ); + + *_len = (uint8_t) CCU_Stat2_DLC; + *_ide = (uint8_t) CCU_Stat2_IDE; + return CCU_Stat2_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Requests_candb(CCU_Requests_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_CarpetHeatFL_Req = (uint8_t) ( (_d[0] & (0x01U)) ); + _m->CCU_CarpetHeatFR_Req = (uint8_t) ( ((_d[0] >> 1U) & (0x01U)) ); + _m->CCU_CarpetHeatRL_Req = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->CCU_CarpetHeatRR_Req = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Requests_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Requests_candb(&_m->mon1, CCU_Requests_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Requests_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Requests_candb(CCU_Requests_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Requests_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_CarpetHeatFL_Req & (0x01U)) | ((_m->CCU_CarpetHeatFR_Req & (0x01U)) << 1U) | ((_m->CCU_CarpetHeatRL_Req & (0x01U)) << 2U) | ((_m->CCU_CarpetHeatRR_Req & (0x01U)) << 3U) ); + + cframe->MsgId = (uint32_t) CCU_Requests_CANID; + cframe->DLC = (uint8_t) CCU_Requests_DLC; + cframe->IDE = (uint8_t) CCU_Requests_IDE; + return CCU_Requests_CANID; +} + +#else + +uint32_t Pack_CCU_Requests_candb(CCU_Requests_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Requests_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->CCU_CarpetHeatFL_Req & (0x01U)) | ((_m->CCU_CarpetHeatFR_Req & (0x01U)) << 1U) | ((_m->CCU_CarpetHeatRL_Req & (0x01U)) << 2U) | ((_m->CCU_CarpetHeatRR_Req & (0x01U)) << 3U) ); + + *_len = (uint8_t) CCU_Requests_DLC; + *_ide = (uint8_t) CCU_Requests_IDE; + return CCU_Requests_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Stat3_candb(CCU_Stat3_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_AromaCartridgeCapacity_Stat_ro = (uint8_t) ( (_d[0] & (0x0FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_AromaCartridgeCapacity_Stat_phys = (uint8_t) CANDB_CCU_AromaCartridgeCapacity_Stat_ro_fromS(_m->CCU_AromaCartridgeCapacity_Stat_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_AromaCartridgeFlavor_Stat = (uint8_t) ( ((_d[1] >> 4U) & (0x0FU)) ); + _m->CCU_AromaFaultReason_Stat = (uint8_t) ( (_d[3] & (0x07U)) ); + _m->CCU_RLfootBlowDis_Stat = (uint8_t) ( ((_d[3] >> 3U) & (0x01U)) ); + _m->CCU_RRfootBlowDis_Stat = (uint8_t) ( ((_d[3] >> 4U) & (0x01U)) ); + _m->CCU_RestMode2_Stat = (uint8_t) ( ((_d[3] >> 5U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Stat3_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Stat3_candb(&_m->mon1, CCU_Stat3_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Stat3_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Stat3_candb(CCU_Stat3_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Stat3_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_AromaCartridgeCapacity_Stat_ro = (uint8_t) CANDB_CCU_AromaCartridgeCapacity_Stat_ro_toS(_m->CCU_AromaCartridgeCapacity_Stat_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_AromaCartridgeCapacity_Stat_ro & (0x0FU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->CCU_AromaCartridgeFlavor_Stat & (0x0FU)) << 4U) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_AromaFaultReason_Stat & (0x07U)) | ((_m->CCU_RLfootBlowDis_Stat & (0x01U)) << 3U) | ((_m->CCU_RRfootBlowDis_Stat & (0x01U)) << 4U) | ((_m->CCU_RestMode2_Stat & (0x03U)) << 5U) ); + + cframe->MsgId = (uint32_t) CCU_Stat3_CANID; + cframe->DLC = (uint8_t) CCU_Stat3_DLC; + cframe->IDE = (uint8_t) CCU_Stat3_IDE; + return CCU_Stat3_CANID; +} + +#else + +uint32_t Pack_CCU_Stat3_candb(CCU_Stat3_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Stat3_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_AromaCartridgeCapacity_Stat_ro = (uint8_t) CANDB_CCU_AromaCartridgeCapacity_Stat_ro_toS(_m->CCU_AromaCartridgeCapacity_Stat_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->CCU_AromaCartridgeCapacity_Stat_ro & (0x0FU)) ); + _d[1] |= (uint8_t) ( ((_m->CCU_AromaCartridgeFlavor_Stat & (0x0FU)) << 4U) ); + _d[3] |= (uint8_t) ( (_m->CCU_AromaFaultReason_Stat & (0x07U)) | ((_m->CCU_RLfootBlowDis_Stat & (0x01U)) << 3U) | ((_m->CCU_RRfootBlowDis_Stat & (0x01U)) << 4U) | ((_m->CCU_RestMode2_Stat & (0x03U)) << 5U) ); + + *_len = (uint8_t) CCU_Stat3_DLC; + *_ide = (uint8_t) CCU_Stat3_IDE; + return CCU_Stat3_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_VCU_Msg1_candb(CCU_VCU_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_Sen_Pressure_ro = (uint16_t) ( ((_d[1] & (0x0FU)) << 8U) | (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_Sen_Pressure_phys = (sigfloat_t)(CANDB_CCU_Sen_Pressure_ro_fromS(_m->CCU_Sen_Pressure_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_EvaTargetTemp_Val_ro = (int16_t) __ext_sig__(( ((_d[2] & (0xFFU)) << 4U) | ((_d[1] >> 4U) & (0x0FU)) ), 12); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_EvaTargetTemp_Val_phys = (sigfloat_t)(CANDB_CCU_EvaTargetTemp_Val_ro_fromS(_m->CCU_EvaTargetTemp_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_EvaCurrTempF_Val_ro = (int16_t) __ext_sig__(( ((_d[4] & (0x0FU)) << 8U) | (_d[3] & (0xFFU)) ), 12); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_EvaCurrTempF_Val_phys = (sigfloat_t)(CANDB_CCU_EvaCurrTempF_Val_ro_fromS(_m->CCU_EvaCurrTempF_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_EvaCurrTempR_Val_ro = (int16_t) __ext_sig__(( ((_d[5] & (0xFFU)) << 4U) | ((_d[4] >> 4U) & (0x0FU)) ), 12); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_EvaCurrTempR_Val_phys = (sigfloat_t)(CANDB_CCU_EvaCurrTempR_Val_ro_fromS(_m->CCU_EvaCurrTempR_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_LiquidHeaterTargetTemp_Req = (uint8_t) ( (_d[6] & (0x7FU)) ); + _m->CCU_VCU_Msg1_RC = (uint8_t) ( ((_d[7] >> 4U) & (0x0FU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_VCU_Msg1_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_VCU_Msg1_candb(&_m->mon1, CCU_VCU_Msg1_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_VCU_Msg1_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_VCU_Msg1_candb(CCU_VCU_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_VCU_Msg1_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_Sen_Pressure_ro = (uint16_t) CANDB_CCU_Sen_Pressure_ro_toS(_m->CCU_Sen_Pressure_phys); + _m->CCU_EvaTargetTemp_Val_ro = (int16_t) CANDB_CCU_EvaTargetTemp_Val_ro_toS(_m->CCU_EvaTargetTemp_Val_phys); + _m->CCU_EvaCurrTempF_Val_ro = (int16_t) CANDB_CCU_EvaCurrTempF_Val_ro_toS(_m->CCU_EvaCurrTempF_Val_phys); + _m->CCU_EvaCurrTempR_Val_ro = (int16_t) CANDB_CCU_EvaCurrTempR_Val_ro_toS(_m->CCU_EvaCurrTempR_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_Sen_Pressure_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->CCU_Sen_Pressure_ro >> 8U) & (0x0FU)) | ((_m->CCU_EvaTargetTemp_Val_ro & (0x0FU)) << 4U) ); + cframe->Data[2] |= (uint8_t) ( ((_m->CCU_EvaTargetTemp_Val_ro >> 4U) & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_EvaCurrTempF_Val_ro & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( ((_m->CCU_EvaCurrTempF_Val_ro >> 8U) & (0x0FU)) | ((_m->CCU_EvaCurrTempR_Val_ro & (0x0FU)) << 4U) ); + cframe->Data[5] |= (uint8_t) ( ((_m->CCU_EvaCurrTempR_Val_ro >> 4U) & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( (_m->CCU_LiquidHeaterTargetTemp_Req & (0x7FU)) ); + cframe->Data[7] |= (uint8_t) ( ((_m->CCU_VCU_Msg1_RC & (0x0FU)) << 4U) ); + + cframe->MsgId = (uint32_t) CCU_VCU_Msg1_CANID; + cframe->DLC = (uint8_t) CCU_VCU_Msg1_DLC; + cframe->IDE = (uint8_t) CCU_VCU_Msg1_IDE; + return CCU_VCU_Msg1_CANID; +} + +#else + +uint32_t Pack_CCU_VCU_Msg1_candb(CCU_VCU_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_VCU_Msg1_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_Sen_Pressure_ro = (uint16_t) CANDB_CCU_Sen_Pressure_ro_toS(_m->CCU_Sen_Pressure_phys); + _m->CCU_EvaTargetTemp_Val_ro = (int16_t) CANDB_CCU_EvaTargetTemp_Val_ro_toS(_m->CCU_EvaTargetTemp_Val_phys); + _m->CCU_EvaCurrTempF_Val_ro = (int16_t) CANDB_CCU_EvaCurrTempF_Val_ro_toS(_m->CCU_EvaCurrTempF_Val_phys); + _m->CCU_EvaCurrTempR_Val_ro = (int16_t) CANDB_CCU_EvaCurrTempR_Val_ro_toS(_m->CCU_EvaCurrTempR_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->CCU_Sen_Pressure_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->CCU_Sen_Pressure_ro >> 8U) & (0x0FU)) | ((_m->CCU_EvaTargetTemp_Val_ro & (0x0FU)) << 4U) ); + _d[2] |= (uint8_t) ( ((_m->CCU_EvaTargetTemp_Val_ro >> 4U) & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->CCU_EvaCurrTempF_Val_ro & (0xFFU)) ); + _d[4] |= (uint8_t) ( ((_m->CCU_EvaCurrTempF_Val_ro >> 8U) & (0x0FU)) | ((_m->CCU_EvaCurrTempR_Val_ro & (0x0FU)) << 4U) ); + _d[5] |= (uint8_t) ( ((_m->CCU_EvaCurrTempR_Val_ro >> 4U) & (0xFFU)) ); + _d[6] |= (uint8_t) ( (_m->CCU_LiquidHeaterTargetTemp_Req & (0x7FU)) ); + _d[7] |= (uint8_t) ( ((_m->CCU_VCU_Msg1_RC & (0x0FU)) << 4U) ); + + *_len = (uint8_t) CCU_VCU_Msg1_DLC; + *_ide = (uint8_t) CCU_VCU_Msg1_IDE; + return CCU_VCU_Msg1_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_VCU_Msg2_candb(CCU_VCU_Msg2_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->eTXV_batChiller_Pos_Stat = (uint8_t) ( (_d[0] & (0x7FU)) ); + _m->eTXV_batChiller_Err_Stat = (uint8_t) ( (_d[1] & (0x03U)) ); + _m->eTXV_batChiller_Pressure_Val_ro = (uint8_t) ( ((_d[1] >> 2U) & (0x3FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->eTXV_batChiller_Pressure_Val_phys = (sigfloat_t)(CANDB_eTXV_batChiller_Pressure_Val_ro_fromS(_m->eTXV_batChiller_Pressure_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->eTXV_batChiller_Temp_Val_ro = (uint8_t) ( (_d[2] & (0x7FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->eTXV_batChiller_Temp_Val_phys = (int8_t) CANDB_eTXV_batChiller_Temp_Val_ro_fromS(_m->eTXV_batChiller_Temp_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->eTXV_eeChiller_Pos_Stat = (uint8_t) ( (_d[3] & (0x7FU)) ); + _m->eTXV_eeChiller_Err_Stat = (uint8_t) ( (_d[4] & (0x03U)) ); + _m->eTXV_eeChiller_Pressure_Val_ro = (uint8_t) ( ((_d[4] >> 2U) & (0x3FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->eTXV_eeChiller_Pressure_Val_phys = (sigfloat_t)(CANDB_eTXV_eeChiller_Pressure_Val_ro_fromS(_m->eTXV_eeChiller_Pressure_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->eTXV_eeChiller_Temp_Val_ro = (uint8_t) ( (_d[5] & (0x7FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->eTXV_eeChiller_Temp_Val_phys = (int8_t) CANDB_eTXV_eeChiller_Temp_Val_ro_fromS(_m->eTXV_eeChiller_Temp_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_VCU_Msg2_RC = (uint8_t) ( ((_d[7] >> 4U) & (0x0FU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_VCU_Msg2_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_VCU_Msg2_candb(&_m->mon1, CCU_VCU_Msg2_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_VCU_Msg2_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_VCU_Msg2_candb(CCU_VCU_Msg2_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_VCU_Msg2_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->eTXV_batChiller_Pressure_Val_ro = (uint8_t) CANDB_eTXV_batChiller_Pressure_Val_ro_toS(_m->eTXV_batChiller_Pressure_Val_phys); + _m->eTXV_batChiller_Temp_Val_ro = (uint8_t) CANDB_eTXV_batChiller_Temp_Val_ro_toS(_m->eTXV_batChiller_Temp_Val_phys); + _m->eTXV_eeChiller_Pressure_Val_ro = (uint8_t) CANDB_eTXV_eeChiller_Pressure_Val_ro_toS(_m->eTXV_eeChiller_Pressure_Val_phys); + _m->eTXV_eeChiller_Temp_Val_ro = (uint8_t) CANDB_eTXV_eeChiller_Temp_Val_ro_toS(_m->eTXV_eeChiller_Temp_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->eTXV_batChiller_Pos_Stat & (0x7FU)) ); + cframe->Data[1] |= (uint8_t) ( (_m->eTXV_batChiller_Err_Stat & (0x03U)) | ((_m->eTXV_batChiller_Pressure_Val_ro & (0x3FU)) << 2U) ); + cframe->Data[2] |= (uint8_t) ( (_m->eTXV_batChiller_Temp_Val_ro & (0x7FU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->eTXV_eeChiller_Pos_Stat & (0x7FU)) ); + cframe->Data[4] |= (uint8_t) ( (_m->eTXV_eeChiller_Err_Stat & (0x03U)) | ((_m->eTXV_eeChiller_Pressure_Val_ro & (0x3FU)) << 2U) ); + cframe->Data[5] |= (uint8_t) ( (_m->eTXV_eeChiller_Temp_Val_ro & (0x7FU)) ); + cframe->Data[7] |= (uint8_t) ( ((_m->CCU_VCU_Msg2_RC & (0x0FU)) << 4U) ); + + cframe->MsgId = (uint32_t) CCU_VCU_Msg2_CANID; + cframe->DLC = (uint8_t) CCU_VCU_Msg2_DLC; + cframe->IDE = (uint8_t) CCU_VCU_Msg2_IDE; + return CCU_VCU_Msg2_CANID; +} + +#else + +uint32_t Pack_CCU_VCU_Msg2_candb(CCU_VCU_Msg2_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_VCU_Msg2_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->eTXV_batChiller_Pressure_Val_ro = (uint8_t) CANDB_eTXV_batChiller_Pressure_Val_ro_toS(_m->eTXV_batChiller_Pressure_Val_phys); + _m->eTXV_batChiller_Temp_Val_ro = (uint8_t) CANDB_eTXV_batChiller_Temp_Val_ro_toS(_m->eTXV_batChiller_Temp_Val_phys); + _m->eTXV_eeChiller_Pressure_Val_ro = (uint8_t) CANDB_eTXV_eeChiller_Pressure_Val_ro_toS(_m->eTXV_eeChiller_Pressure_Val_phys); + _m->eTXV_eeChiller_Temp_Val_ro = (uint8_t) CANDB_eTXV_eeChiller_Temp_Val_ro_toS(_m->eTXV_eeChiller_Temp_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->eTXV_batChiller_Pos_Stat & (0x7FU)) ); + _d[1] |= (uint8_t) ( (_m->eTXV_batChiller_Err_Stat & (0x03U)) | ((_m->eTXV_batChiller_Pressure_Val_ro & (0x3FU)) << 2U) ); + _d[2] |= (uint8_t) ( (_m->eTXV_batChiller_Temp_Val_ro & (0x7FU)) ); + _d[3] |= (uint8_t) ( (_m->eTXV_eeChiller_Pos_Stat & (0x7FU)) ); + _d[4] |= (uint8_t) ( (_m->eTXV_eeChiller_Err_Stat & (0x03U)) | ((_m->eTXV_eeChiller_Pressure_Val_ro & (0x3FU)) << 2U) ); + _d[5] |= (uint8_t) ( (_m->eTXV_eeChiller_Temp_Val_ro & (0x7FU)) ); + _d[7] |= (uint8_t) ( ((_m->CCU_VCU_Msg2_RC & (0x0FU)) << 4U) ); + + *_len = (uint8_t) CCU_VCU_Msg2_DLC; + *_ide = (uint8_t) CCU_VCU_Msg2_IDE; + return CCU_VCU_Msg2_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_CLIMATIC_DATA_candb(BCM_CLIMATIC_DATA_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->SolarSensRightVal_ro = (uint8_t) ( (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->SolarSensRightVal_phys = (sigfloat_t)(CANDB_SolarSensRightVal_ro_fromS(_m->SolarSensRightVal_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->FrontWindowHeating_Status = (uint8_t) ( ((_d[1] >> 1U) & (0x01U)) ); + _m->RearWindowHeating_Status = (uint8_t) ( ((_d[1] >> 2U) & (0x01U)) ); + _m->SolarSensLeftVal_ro = (uint8_t) ( (_d[2] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->SolarSensLeftVal_phys = (sigfloat_t)(CANDB_SolarSensLeftVal_ro_fromS(_m->SolarSensLeftVal_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->SideWindowHeating_Status = (uint8_t) ( (_d[3] & (0x01U)) ); + _m->BCM_SideWindowType_Stat = (uint8_t) ( ((_d[3] >> 3U) & (0x01U)) ); + _m->BCM_WindowWashingSt = (uint8_t) ( ((_d[3] >> 5U) & (0x01U)) ); + _m->BCM_GloveBox_Stat = (uint8_t) ( ((_d[3] >> 6U) & (0x01U)) ); + _m->WindshieldTemp_ro = (uint8_t) ( (_d[4] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->WindshieldTemp_phys = (sigfloat_t)(CANDB_WindshieldTemp_ro_fromS(_m->WindshieldTemp_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->WindshieldHumidity_ro = (uint8_t) ( (_d[5] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->WindshieldHumidity_phys = (sigfloat_t)(CANDB_WindshieldHumidity_ro_fromS(_m->WindshieldHumidity_ro)); +#endif // CANDB_USE_SIGFLOAT + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < BCM_CLIMATIC_DATA_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_BCM_CLIMATIC_DATA_candb(&_m->mon1, BCM_CLIMATIC_DATA_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return BCM_CLIMATIC_DATA_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_BCM_CLIMATIC_DATA_candb(BCM_CLIMATIC_DATA_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_CLIMATIC_DATA_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->SolarSensRightVal_ro = (uint8_t) CANDB_SolarSensRightVal_ro_toS(_m->SolarSensRightVal_phys); + _m->SolarSensLeftVal_ro = (uint8_t) CANDB_SolarSensLeftVal_ro_toS(_m->SolarSensLeftVal_phys); + _m->WindshieldTemp_ro = (uint8_t) CANDB_WindshieldTemp_ro_toS(_m->WindshieldTemp_phys); + _m->WindshieldHumidity_ro = (uint8_t) CANDB_WindshieldHumidity_ro_toS(_m->WindshieldHumidity_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->SolarSensRightVal_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->FrontWindowHeating_Status & (0x01U)) << 1U) | ((_m->RearWindowHeating_Status & (0x01U)) << 2U) ); + cframe->Data[2] |= (uint8_t) ( (_m->SolarSensLeftVal_ro & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->SideWindowHeating_Status & (0x01U)) | ((_m->BCM_SideWindowType_Stat & (0x01U)) << 3U) | ((_m->BCM_WindowWashingSt & (0x01U)) << 5U) | ((_m->BCM_GloveBox_Stat & (0x01U)) << 6U) ); + cframe->Data[4] |= (uint8_t) ( (_m->WindshieldTemp_ro & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( (_m->WindshieldHumidity_ro & (0xFFU)) ); + + cframe->MsgId = (uint32_t) BCM_CLIMATIC_DATA_CANID; + cframe->DLC = (uint8_t) BCM_CLIMATIC_DATA_DLC; + cframe->IDE = (uint8_t) BCM_CLIMATIC_DATA_IDE; + return BCM_CLIMATIC_DATA_CANID; +} + +#else + +uint32_t Pack_BCM_CLIMATIC_DATA_candb(BCM_CLIMATIC_DATA_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(BCM_CLIMATIC_DATA_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->SolarSensRightVal_ro = (uint8_t) CANDB_SolarSensRightVal_ro_toS(_m->SolarSensRightVal_phys); + _m->SolarSensLeftVal_ro = (uint8_t) CANDB_SolarSensLeftVal_ro_toS(_m->SolarSensLeftVal_phys); + _m->WindshieldTemp_ro = (uint8_t) CANDB_WindshieldTemp_ro_toS(_m->WindshieldTemp_phys); + _m->WindshieldHumidity_ro = (uint8_t) CANDB_WindshieldHumidity_ro_toS(_m->WindshieldHumidity_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->SolarSensRightVal_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->FrontWindowHeating_Status & (0x01U)) << 1U) | ((_m->RearWindowHeating_Status & (0x01U)) << 2U) ); + _d[2] |= (uint8_t) ( (_m->SolarSensLeftVal_ro & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->SideWindowHeating_Status & (0x01U)) | ((_m->BCM_SideWindowType_Stat & (0x01U)) << 3U) | ((_m->BCM_WindowWashingSt & (0x01U)) << 5U) | ((_m->BCM_GloveBox_Stat & (0x01U)) << 6U) ); + _d[4] |= (uint8_t) ( (_m->WindshieldTemp_ro & (0xFFU)) ); + _d[5] |= (uint8_t) ( (_m->WindshieldHumidity_ro & (0xFFU)) ); + + *_len = (uint8_t) BCM_CLIMATIC_DATA_DLC; + *_ide = (uint8_t) BCM_CLIMATIC_DATA_IDE; + return BCM_CLIMATIC_DATA_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Msg1_candb(CCU_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_MirrorHeating_Req = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->CCU_RecirculationLed_Cmd = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->CCU_DefrostLed_Req = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->CCU_SideWindowHeating_Req = (uint8_t) ( ((_d[0] >> 4U) & (0x03U)) ); + _m->CCU_RearWindowHeating_Req = (uint8_t) ( ((_d[0] >> 6U) & (0x03U)) ); + _m->CCU_FrontWindowHeating_Req = (uint8_t) ( (_d[1] & (0x03U)) ); + _m->CCU_EmergAirCleaning_Stat = (uint8_t) ( ((_d[1] >> 2U) & (0x01U)) ); + _m->CCU_FireExtinguishSys_Stat = (uint8_t) ( ((_d[1] >> 3U) & (0x01U)) ); + _m->CCU_FLAutoPsngrLed_Cmd = (uint8_t) ( (_d[3] & (0x01U)) ); + _m->CCU_FRAutoPsngrLed_Cmd = (uint8_t) ( ((_d[3] >> 1U) & (0x01U)) ); + _m->CCU_RLAutoPsngrLed_Cmd = (uint8_t) ( ((_d[3] >> 2U) & (0x01U)) ); + _m->CCU_RRAutoPsngrLed_Cmd = (uint8_t) ( ((_d[3] >> 3U) & (0x01U)) ); + _m->CCU_AC_MaxLed_Cmd = (uint8_t) ( ((_d[3] >> 4U) & (0x01U)) ); + _m->CCU_MSG1_RC = (uint8_t) ( ((_d[6] >> 4U) & (0x0FU)) ); + _m->CCU_MSG1_CS = (uint8_t) ( (_d[7] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Msg1_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Msg1_candb(&_m->mon1, CCU_Msg1_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Msg1_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Msg1_candb(CCU_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Msg1_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_MirrorHeating_Req & (0x03U)) | ((_m->CCU_RecirculationLed_Cmd & (0x01U)) << 2U) | ((_m->CCU_DefrostLed_Req & (0x01U)) << 3U) | ((_m->CCU_SideWindowHeating_Req & (0x03U)) << 4U) | ((_m->CCU_RearWindowHeating_Req & (0x03U)) << 6U) ); + cframe->Data[1] |= (uint8_t) ( (_m->CCU_FrontWindowHeating_Req & (0x03U)) | ((_m->CCU_EmergAirCleaning_Stat & (0x01U)) << 2U) | ((_m->CCU_FireExtinguishSys_Stat & (0x01U)) << 3U) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_FLAutoPsngrLed_Cmd & (0x01U)) | ((_m->CCU_FRAutoPsngrLed_Cmd & (0x01U)) << 1U) | ((_m->CCU_RLAutoPsngrLed_Cmd & (0x01U)) << 2U) | ((_m->CCU_RRAutoPsngrLed_Cmd & (0x01U)) << 3U) | ((_m->CCU_AC_MaxLed_Cmd & (0x01U)) << 4U) ); + cframe->Data[6] |= (uint8_t) ( ((_m->CCU_MSG1_RC & (0x0FU)) << 4U) ); + cframe->Data[7] |= (uint8_t) ( (_m->CCU_MSG1_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) CCU_Msg1_CANID; + cframe->DLC = (uint8_t) CCU_Msg1_DLC; + cframe->IDE = (uint8_t) CCU_Msg1_IDE; + return CCU_Msg1_CANID; +} + +#else + +uint32_t Pack_CCU_Msg1_candb(CCU_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Msg1_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->CCU_MirrorHeating_Req & (0x03U)) | ((_m->CCU_RecirculationLed_Cmd & (0x01U)) << 2U) | ((_m->CCU_DefrostLed_Req & (0x01U)) << 3U) | ((_m->CCU_SideWindowHeating_Req & (0x03U)) << 4U) | ((_m->CCU_RearWindowHeating_Req & (0x03U)) << 6U) ); + _d[1] |= (uint8_t) ( (_m->CCU_FrontWindowHeating_Req & (0x03U)) | ((_m->CCU_EmergAirCleaning_Stat & (0x01U)) << 2U) | ((_m->CCU_FireExtinguishSys_Stat & (0x01U)) << 3U) ); + _d[3] |= (uint8_t) ( (_m->CCU_FLAutoPsngrLed_Cmd & (0x01U)) | ((_m->CCU_FRAutoPsngrLed_Cmd & (0x01U)) << 1U) | ((_m->CCU_RLAutoPsngrLed_Cmd & (0x01U)) << 2U) | ((_m->CCU_RRAutoPsngrLed_Cmd & (0x01U)) << 3U) | ((_m->CCU_AC_MaxLed_Cmd & (0x01U)) << 4U) ); + _d[6] |= (uint8_t) ( ((_m->CCU_MSG1_RC & (0x0FU)) << 4U) ); + _d[7] |= (uint8_t) ( (_m->CCU_MSG1_CS & (0xFFU)) ); + + *_len = (uint8_t) CCU_Msg1_DLC; + *_ide = (uint8_t) CCU_Msg1_IDE; + return CCU_Msg1_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_VCU_CCU_Req_candb(VCU_CCU_Req_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->VCU_eTXV_batChiller_Pos_Req = (uint8_t) ( (_d[0] & (0x7FU)) ); + _m->VCU_eTXV_eeChiller_Pos_Req = (uint8_t) ( (_d[1] & (0x7FU)) ); + _m->VCU_LiquidHeaterCurrentTemp_Stat_ro = (uint8_t) ( (_d[2] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->VCU_LiquidHeaterCurrentTemp_Stat_phys = (sigfloat_t)(CANDB_VCU_LiquidHeaterCurrentTemp_Stat_ro_fromS(_m->VCU_LiquidHeaterCurrentTemp_Stat_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->VCU_CCU_Req_RC = (uint8_t) ( (_d[3] & (0x0FU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < VCU_CCU_Req_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_VCU_CCU_Req_candb(&_m->mon1, VCU_CCU_Req_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return VCU_CCU_Req_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_VCU_CCU_Req_candb(VCU_CCU_Req_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(VCU_CCU_Req_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->VCU_LiquidHeaterCurrentTemp_Stat_ro = (uint8_t) CANDB_VCU_LiquidHeaterCurrentTemp_Stat_ro_toS(_m->VCU_LiquidHeaterCurrentTemp_Stat_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->VCU_eTXV_batChiller_Pos_Req & (0x7FU)) ); + cframe->Data[1] |= (uint8_t) ( (_m->VCU_eTXV_eeChiller_Pos_Req & (0x7FU)) ); + cframe->Data[2] |= (uint8_t) ( (_m->VCU_LiquidHeaterCurrentTemp_Stat_ro & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->VCU_CCU_Req_RC & (0x0FU)) ); + + cframe->MsgId = (uint32_t) VCU_CCU_Req_CANID; + cframe->DLC = (uint8_t) VCU_CCU_Req_DLC; + cframe->IDE = (uint8_t) VCU_CCU_Req_IDE; + return VCU_CCU_Req_CANID; +} + +#else + +uint32_t Pack_VCU_CCU_Req_candb(VCU_CCU_Req_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(VCU_CCU_Req_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->VCU_LiquidHeaterCurrentTemp_Stat_ro = (uint8_t) CANDB_VCU_LiquidHeaterCurrentTemp_Stat_ro_toS(_m->VCU_LiquidHeaterCurrentTemp_Stat_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->VCU_eTXV_batChiller_Pos_Req & (0x7FU)) ); + _d[1] |= (uint8_t) ( (_m->VCU_eTXV_eeChiller_Pos_Req & (0x7FU)) ); + _d[2] |= (uint8_t) ( (_m->VCU_LiquidHeaterCurrentTemp_Stat_ro & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->VCU_CCU_Req_RC & (0x0FU)) ); + + *_len = (uint8_t) VCU_CCU_Req_DLC; + *_ide = (uint8_t) VCU_CCU_Req_IDE; + return VCU_CCU_Req_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_ESC_08_candb(ESC_08_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->ESC_Mileage_Val_ro = (uint32_t) ( ((_d[3] & (0x07U)) << 24U) | ((_d[2] & (0xFFU)) << 16U) | ((_d[1] & (0xFFU)) << 8U) | (_d[0] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->ESC_Mileage_Val_phys = (sigfloat_t)(CANDB_ESC_Mileage_Val_ro_fromS(_m->ESC_Mileage_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->ESC_08_RC = (uint8_t) ( ((_d[3] >> 4U) & (0x0FU)) ); + _m->ESC_08_CS = (uint8_t) ( (_d[4] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < ESC_08_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_ESC_08_candb(&_m->mon1, ESC_08_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return ESC_08_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_ESC_08_candb(ESC_08_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(ESC_08_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->ESC_Mileage_Val_ro = (uint32_t) CANDB_ESC_Mileage_Val_ro_toS(_m->ESC_Mileage_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->ESC_Mileage_Val_ro & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->ESC_Mileage_Val_ro >> 8U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( ((_m->ESC_Mileage_Val_ro >> 16U) & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( ((_m->ESC_Mileage_Val_ro >> 24U) & (0x07U)) | ((_m->ESC_08_RC & (0x0FU)) << 4U) ); + cframe->Data[4] |= (uint8_t) ( (_m->ESC_08_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) ESC_08_CANID; + cframe->DLC = (uint8_t) ESC_08_DLC; + cframe->IDE = (uint8_t) ESC_08_IDE; + return ESC_08_CANID; +} + +#else + +uint32_t Pack_ESC_08_candb(ESC_08_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(ESC_08_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->ESC_Mileage_Val_ro = (uint32_t) CANDB_ESC_Mileage_Val_ro_toS(_m->ESC_Mileage_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->ESC_Mileage_Val_ro & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->ESC_Mileage_Val_ro >> 8U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( ((_m->ESC_Mileage_Val_ro >> 16U) & (0xFFU)) ); + _d[3] |= (uint8_t) ( ((_m->ESC_Mileage_Val_ro >> 24U) & (0x07U)) | ((_m->ESC_08_RC & (0x0FU)) << 4U) ); + _d[4] |= (uint8_t) ( (_m->ESC_08_CS & (0xFFU)) ); + + *_len = (uint8_t) ESC_08_DLC; + *_ide = (uint8_t) ESC_08_IDE; + return ESC_08_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMFL_status_candb(SMFL_status_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->SMFL_CarpetHeat_Stat = (uint8_t) ( ((_d[6] >> 1U) & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < SMFL_status_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_SMFL_status_candb(&_m->mon1, SMFL_status_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return SMFL_status_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_SMFL_status_candb(SMFL_status_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMFL_status_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[6] |= (uint8_t) ( ((_m->SMFL_CarpetHeat_Stat & (0x01U)) << 1U) ); + + cframe->MsgId = (uint32_t) SMFL_status_CANID; + cframe->DLC = (uint8_t) SMFL_status_DLC; + cframe->IDE = (uint8_t) SMFL_status_IDE; + return SMFL_status_CANID; +} + +#else + +uint32_t Pack_SMFL_status_candb(SMFL_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMFL_status_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[6] |= (uint8_t) ( ((_m->SMFL_CarpetHeat_Stat & (0x01U)) << 1U) ); + + *_len = (uint8_t) SMFL_status_DLC; + *_ide = (uint8_t) SMFL_status_IDE; + return SMFL_status_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMFR_status_candb(SMFR_status_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->SMFR_CarpetHeat_Stat = (uint8_t) ( ((_d[6] >> 1U) & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < SMFR_status_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_SMFR_status_candb(&_m->mon1, SMFR_status_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return SMFR_status_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_SMFR_status_candb(SMFR_status_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMFR_status_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[6] |= (uint8_t) ( ((_m->SMFR_CarpetHeat_Stat & (0x01U)) << 1U) ); + + cframe->MsgId = (uint32_t) SMFR_status_CANID; + cframe->DLC = (uint8_t) SMFR_status_DLC; + cframe->IDE = (uint8_t) SMFR_status_IDE; + return SMFR_status_CANID; +} + +#else + +uint32_t Pack_SMFR_status_candb(SMFR_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMFR_status_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[6] |= (uint8_t) ( ((_m->SMFR_CarpetHeat_Stat & (0x01U)) << 1U) ); + + *_len = (uint8_t) SMFR_status_DLC; + *_ide = (uint8_t) SMFR_status_IDE; + return SMFR_status_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMRL_status_candb(SMRL_status_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->SMRL_CarpetHeat_Stat = (uint8_t) ( ((_d[6] >> 1U) & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < SMRL_status_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_SMRL_status_candb(&_m->mon1, SMRL_status_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return SMRL_status_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_SMRL_status_candb(SMRL_status_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMRL_status_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[6] |= (uint8_t) ( ((_m->SMRL_CarpetHeat_Stat & (0x01U)) << 1U) ); + + cframe->MsgId = (uint32_t) SMRL_status_CANID; + cframe->DLC = (uint8_t) SMRL_status_DLC; + cframe->IDE = (uint8_t) SMRL_status_IDE; + return SMRL_status_CANID; +} + +#else + +uint32_t Pack_SMRL_status_candb(SMRL_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMRL_status_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[6] |= (uint8_t) ( ((_m->SMRL_CarpetHeat_Stat & (0x01U)) << 1U) ); + + *_len = (uint8_t) SMRL_status_DLC; + *_ide = (uint8_t) SMRL_status_IDE; + return SMRL_status_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMRR_status_candb(SMRR_status_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->SMRR_CarpetHeat_Stat = (uint8_t) ( ((_d[6] >> 1U) & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < SMRR_status_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_SMRR_status_candb(&_m->mon1, SMRR_status_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return SMRR_status_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_SMRR_status_candb(SMRR_status_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMRR_status_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[6] |= (uint8_t) ( ((_m->SMRR_CarpetHeat_Stat & (0x01U)) << 1U) ); + + cframe->MsgId = (uint32_t) SMRR_status_CANID; + cframe->DLC = (uint8_t) SMRR_status_DLC; + cframe->IDE = (uint8_t) SMRR_status_IDE; + return SMRR_status_CANID; +} + +#else + +uint32_t Pack_SMRR_status_candb(SMRR_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SMRR_status_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[6] |= (uint8_t) ( ((_m->SMRR_CarpetHeat_Stat & (0x01U)) << 1U) ); + + *_len = (uint8_t) SMRR_status_DLC; + *_ide = (uint8_t) SMRR_status_IDE; + return SMRR_status_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Errors_candb(CCU_Errors_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_IncarTempErrF_Stat = (uint8_t) ( (_d[0] & (0x01U)) ); + _m->CCU_IncarTempErrR_Stat = (uint8_t) ( ((_d[0] >> 1U) & (0x01U)) ); + _m->CCU_DuctTempSenErrF_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->CCU_DuctTempSenErrR_Stat = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->CCU_EvaTempSenErrF_Stat = (uint8_t) ( ((_d[0] >> 4U) & (0x01U)) ); + _m->CCU_EvaTempSenErrR_Stat = (uint8_t) ( ((_d[0] >> 5U) & (0x01U)) ); + _m->CCU_DeflectorSwErrF_Stat = (uint8_t) ( ((_d[0] >> 6U) & (0x01U)) ); + _m->CCU_DeflectorSwErrR_Stat = (uint8_t) ( ((_d[0] >> 7U) & (0x01U)) ); + _m->CCU_PressSenErr_Stat = (uint8_t) ( (_d[1] & (0x01U)) ); + _m->CCU_AmbienTemptSenErr_Stat = (uint8_t) ( ((_d[1] >> 1U) & (0x01U)) ); + _m->CCU_SealingValveErr_Stat = (uint8_t) ( ((_d[1] >> 2U) & (0x01U)) ); + _m->CCU_ETXVerr_Stat = (uint8_t) ( ((_d[1] >> 3U) & (0x01U)) ); + _m->CCU_HVACfanOrTXVerrF_Stat = (uint8_t) ( ((_d[1] >> 4U) & (0x01U)) ); + _m->CCU_HVACfanOrTXVerrR_Stat = (uint8_t) ( ((_d[1] >> 5U) & (0x01U)) ); + _m->CCU_ActuatorErrF_Stat = (uint8_t) ( ((_d[1] >> 6U) & (0x01U)) ); + _m->CCU_ActuatorErrR_Stat = (uint8_t) ( ((_d[1] >> 7U) & (0x01U)) ); + _m->CCU_UltravioletErr_Stat = (uint8_t) ( (_d[2] & (0x03U)) ); + _m->CCU_VinRecordErr_Stat = (uint8_t) ( ((_d[2] >> 2U) & (0x01U)) ); + _m->CCU_AirQualSenErr_Stat = (uint8_t) ( ((_d[2] >> 3U) & (0x07U)) ); + _m->CCU_CommErr_Stat = (uint8_t) ( ((_d[2] >> 6U) & (0x01U)) ); + _m->CCU_TWVerr_Stat = (uint8_t) ( ((_d[2] >> 7U) & (0x01U)) ); + _m->CCU_IonizationErr_Stat = (uint8_t) ( (_d[3] & (0x07U)) ); + _m->CCU_AromaErr_Stat = (uint8_t) ( ((_d[3] >> 3U) & (0x07U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Errors_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Errors_candb(&_m->mon1, CCU_Errors_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Errors_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Errors_candb(CCU_Errors_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Errors_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_IncarTempErrF_Stat & (0x01U)) | ((_m->CCU_IncarTempErrR_Stat & (0x01U)) << 1U) | ((_m->CCU_DuctTempSenErrF_Stat & (0x01U)) << 2U) | ((_m->CCU_DuctTempSenErrR_Stat & (0x01U)) << 3U) | ((_m->CCU_EvaTempSenErrF_Stat & (0x01U)) << 4U) | ((_m->CCU_EvaTempSenErrR_Stat & (0x01U)) << 5U) | ((_m->CCU_DeflectorSwErrF_Stat & (0x01U)) << 6U) | ((_m->CCU_DeflectorSwErrR_Stat & (0x01U)) << 7U) ); + cframe->Data[1] |= (uint8_t) ( (_m->CCU_PressSenErr_Stat & (0x01U)) | ((_m->CCU_AmbienTemptSenErr_Stat & (0x01U)) << 1U) | ((_m->CCU_SealingValveErr_Stat & (0x01U)) << 2U) | ((_m->CCU_ETXVerr_Stat & (0x01U)) << 3U) | ((_m->CCU_HVACfanOrTXVerrF_Stat & (0x01U)) << 4U) | ((_m->CCU_HVACfanOrTXVerrR_Stat & (0x01U)) << 5U) | ((_m->CCU_ActuatorErrF_Stat & (0x01U)) << 6U) | ((_m->CCU_ActuatorErrR_Stat & (0x01U)) << 7U) ); + cframe->Data[2] |= (uint8_t) ( (_m->CCU_UltravioletErr_Stat & (0x03U)) | ((_m->CCU_VinRecordErr_Stat & (0x01U)) << 2U) | ((_m->CCU_AirQualSenErr_Stat & (0x07U)) << 3U) | ((_m->CCU_CommErr_Stat & (0x01U)) << 6U) | ((_m->CCU_TWVerr_Stat & (0x01U)) << 7U) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_IonizationErr_Stat & (0x07U)) | ((_m->CCU_AromaErr_Stat & (0x07U)) << 3U) ); + + cframe->MsgId = (uint32_t) CCU_Errors_CANID; + cframe->DLC = (uint8_t) CCU_Errors_DLC; + cframe->IDE = (uint8_t) CCU_Errors_IDE; + return CCU_Errors_CANID; +} + +#else + +uint32_t Pack_CCU_Errors_candb(CCU_Errors_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Errors_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->CCU_IncarTempErrF_Stat & (0x01U)) | ((_m->CCU_IncarTempErrR_Stat & (0x01U)) << 1U) | ((_m->CCU_DuctTempSenErrF_Stat & (0x01U)) << 2U) | ((_m->CCU_DuctTempSenErrR_Stat & (0x01U)) << 3U) | ((_m->CCU_EvaTempSenErrF_Stat & (0x01U)) << 4U) | ((_m->CCU_EvaTempSenErrR_Stat & (0x01U)) << 5U) | ((_m->CCU_DeflectorSwErrF_Stat & (0x01U)) << 6U) | ((_m->CCU_DeflectorSwErrR_Stat & (0x01U)) << 7U) ); + _d[1] |= (uint8_t) ( (_m->CCU_PressSenErr_Stat & (0x01U)) | ((_m->CCU_AmbienTemptSenErr_Stat & (0x01U)) << 1U) | ((_m->CCU_SealingValveErr_Stat & (0x01U)) << 2U) | ((_m->CCU_ETXVerr_Stat & (0x01U)) << 3U) | ((_m->CCU_HVACfanOrTXVerrF_Stat & (0x01U)) << 4U) | ((_m->CCU_HVACfanOrTXVerrR_Stat & (0x01U)) << 5U) | ((_m->CCU_ActuatorErrF_Stat & (0x01U)) << 6U) | ((_m->CCU_ActuatorErrR_Stat & (0x01U)) << 7U) ); + _d[2] |= (uint8_t) ( (_m->CCU_UltravioletErr_Stat & (0x03U)) | ((_m->CCU_VinRecordErr_Stat & (0x01U)) << 2U) | ((_m->CCU_AirQualSenErr_Stat & (0x07U)) << 3U) | ((_m->CCU_CommErr_Stat & (0x01U)) << 6U) | ((_m->CCU_TWVerr_Stat & (0x01U)) << 7U) ); + _d[3] |= (uint8_t) ( (_m->CCU_IonizationErr_Stat & (0x07U)) | ((_m->CCU_AromaErr_Stat & (0x07U)) << 3U) ); + + *_len = (uint8_t) CCU_Errors_DLC; + *_ide = (uint8_t) CCU_Errors_IDE; + return CCU_Errors_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Msg3_candb(CCU_Msg3_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_FAN_Req = (uint8_t) ( (_d[0] & (0x7FU)) ); + _m->CCU_RestMode_Stat = (uint8_t) ( ((_d[1] >> 2U) & (0x03U)) ); + _m->CCU_IncarTempSum_Val_ro = (uint8_t) ( (_d[2] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_IncarTempSum_Val_phys = (sigfloat_t)(CANDB_CCU_IncarTempSum_Val_ro_fromS(_m->CCU_IncarTempSum_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_MSG3_RC = (uint8_t) ( (_d[3] & (0x0FU)) ); + _m->CCU_MSG3_CS = (uint8_t) ( (_d[4] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_Msg3_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_Msg3_candb(&_m->mon1, CCU_Msg3_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_Msg3_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_Msg3_candb(CCU_Msg3_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Msg3_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_IncarTempSum_Val_ro = (uint8_t) CANDB_CCU_IncarTempSum_Val_ro_toS(_m->CCU_IncarTempSum_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_FAN_Req & (0x7FU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->CCU_RestMode_Stat & (0x03U)) << 2U) ); + cframe->Data[2] |= (uint8_t) ( (_m->CCU_IncarTempSum_Val_ro & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_MSG3_RC & (0x0FU)) ); + cframe->Data[4] |= (uint8_t) ( (_m->CCU_MSG3_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) CCU_Msg3_CANID; + cframe->DLC = (uint8_t) CCU_Msg3_DLC; + cframe->IDE = (uint8_t) CCU_Msg3_IDE; + return CCU_Msg3_CANID; +} + +#else + +uint32_t Pack_CCU_Msg3_candb(CCU_Msg3_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_Msg3_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_IncarTempSum_Val_ro = (uint8_t) CANDB_CCU_IncarTempSum_Val_ro_toS(_m->CCU_IncarTempSum_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->CCU_FAN_Req & (0x7FU)) ); + _d[1] |= (uint8_t) ( ((_m->CCU_RestMode_Stat & (0x03U)) << 2U) ); + _d[2] |= (uint8_t) ( (_m->CCU_IncarTempSum_Val_ro & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->CCU_MSG3_RC & (0x0FU)) ); + _d[4] |= (uint8_t) ( (_m->CCU_MSG3_CS & (0xFFU)) ); + + *_len = (uint8_t) CCU_Msg3_DLC; + *_ide = (uint8_t) CCU_Msg3_IDE; + return CCU_Msg3_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SDM_Cmd_candb(SDM_Cmd_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->SDM_Aroma_Req = (uint8_t) ( ((_d[1] >> 6U) & (0x03U)) ); + _m->SDM_AromaIntens_Req = (uint8_t) ( ((_d[2] >> 6U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < SDM_Cmd_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_SDM_Cmd_candb(&_m->mon1, SDM_Cmd_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return SDM_Cmd_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_SDM_Cmd_candb(SDM_Cmd_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SDM_Cmd_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[1] |= (uint8_t) ( ((_m->SDM_Aroma_Req & (0x03U)) << 6U) ); + cframe->Data[2] |= (uint8_t) ( ((_m->SDM_AromaIntens_Req & (0x03U)) << 6U) ); + + cframe->MsgId = (uint32_t) SDM_Cmd_CANID; + cframe->DLC = (uint8_t) SDM_Cmd_DLC; + cframe->IDE = (uint8_t) SDM_Cmd_IDE; + return SDM_Cmd_CANID; +} + +#else + +uint32_t Pack_SDM_Cmd_candb(SDM_Cmd_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(SDM_Cmd_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[1] |= (uint8_t) ( ((_m->SDM_Aroma_Req & (0x03U)) << 6U) ); + _d[2] |= (uint8_t) ( ((_m->SDM_AromaIntens_Req & (0x03U)) << 6U) ); + + *_len = (uint8_t) SDM_Cmd_DLC; + *_ide = (uint8_t) SDM_Cmd_IDE; + return SDM_Cmd_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_VEH_VIN_candb(VEH_VIN_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->VIN_Addressing = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->VIN_Char1 = (uint8_t) ( (_d[1] & (0xFFU)) ); + _m->VIN_Char8 = (uint8_t) ( (_d[1] & (0xFFU)) ); + _m->VIN_Char15 = (uint8_t) ( (_d[1] & (0xFFU)) ); + _m->VIN_Char16 = (uint8_t) ( (_d[2] & (0xFFU)) ); + _m->VIN_Char2 = (uint8_t) ( (_d[2] & (0xFFU)) ); + _m->VIN_Char9 = (uint8_t) ( (_d[2] & (0xFFU)) ); + _m->VIN_Char10 = (uint8_t) ( (_d[3] & (0xFFU)) ); + _m->VIN_Char17 = (uint8_t) ( (_d[3] & (0xFFU)) ); + _m->VIN_Char3 = (uint8_t) ( (_d[3] & (0xFFU)) ); + _m->VIN_Char4 = (uint8_t) ( (_d[4] & (0xFFU)) ); + _m->VIN_Char11 = (uint8_t) ( (_d[4] & (0xFFU)) ); + _m->VIN_Char12 = (uint8_t) ( (_d[5] & (0xFFU)) ); + _m->VIN_Char5 = (uint8_t) ( (_d[5] & (0xFFU)) ); + _m->VIN_Char6 = (uint8_t) ( (_d[6] & (0xFFU)) ); + _m->VIN_Char13 = (uint8_t) ( (_d[6] & (0xFFU)) ); + _m->VIN_Char7 = (uint8_t) ( (_d[7] & (0xFFU)) ); + _m->VIN_Char14 = (uint8_t) ( (_d[7] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < VEH_VIN_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_VEH_VIN_candb(&_m->mon1, VEH_VIN_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return VEH_VIN_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_VEH_VIN_candb(VEH_VIN_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(VEH_VIN_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->VIN_Addressing & (0x03U)) ); + cframe->Data[1] |= (uint8_t) ( (_m->VIN_Char1 & (0xFFU)) | (_m->VIN_Char8 & (0xFFU)) | (_m->VIN_Char15 & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( (_m->VIN_Char16 & (0xFFU)) | (_m->VIN_Char2 & (0xFFU)) | (_m->VIN_Char9 & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->VIN_Char10 & (0xFFU)) | (_m->VIN_Char17 & (0xFFU)) | (_m->VIN_Char3 & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( (_m->VIN_Char4 & (0xFFU)) | (_m->VIN_Char11 & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( (_m->VIN_Char12 & (0xFFU)) | (_m->VIN_Char5 & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( (_m->VIN_Char6 & (0xFFU)) | (_m->VIN_Char13 & (0xFFU)) ); + cframe->Data[7] |= (uint8_t) ( (_m->VIN_Char7 & (0xFFU)) | (_m->VIN_Char14 & (0xFFU)) ); + + cframe->MsgId = (uint32_t) VEH_VIN_CANID; + cframe->DLC = (uint8_t) VEH_VIN_DLC; + cframe->IDE = (uint8_t) VEH_VIN_IDE; + return VEH_VIN_CANID; +} + +#else + +uint32_t Pack_VEH_VIN_candb(VEH_VIN_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(VEH_VIN_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->VIN_Addressing & (0x03U)) ); + _d[1] |= (uint8_t) ( (_m->VIN_Char1 & (0xFFU)) | (_m->VIN_Char8 & (0xFFU)) | (_m->VIN_Char15 & (0xFFU)) ); + _d[2] |= (uint8_t) ( (_m->VIN_Char16 & (0xFFU)) | (_m->VIN_Char2 & (0xFFU)) | (_m->VIN_Char9 & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->VIN_Char10 & (0xFFU)) | (_m->VIN_Char17 & (0xFFU)) | (_m->VIN_Char3 & (0xFFU)) ); + _d[4] |= (uint8_t) ( (_m->VIN_Char4 & (0xFFU)) | (_m->VIN_Char11 & (0xFFU)) ); + _d[5] |= (uint8_t) ( (_m->VIN_Char12 & (0xFFU)) | (_m->VIN_Char5 & (0xFFU)) ); + _d[6] |= (uint8_t) ( (_m->VIN_Char6 & (0xFFU)) | (_m->VIN_Char13 & (0xFFU)) ); + _d[7] |= (uint8_t) ( (_m->VIN_Char7 & (0xFFU)) | (_m->VIN_Char14 & (0xFFU)) ); + + *_len = (uint8_t) VEH_VIN_DLC; + *_ide = (uint8_t) VEH_VIN_IDE; + return VEH_VIN_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCUFL_MSG_candb(OCUFL_MSG_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->OCUFL_OccupantWeight_Stat = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->OCUFL_SeatOccupied_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->OCUFL_SensorError_Stat = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->OCUFL_MSG_RC = (uint8_t) ( ((_d[0] >> 4U) & (0x0FU)) ); + _m->OCUFL_MSG_CS = (uint8_t) ( (_d[1] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < OCUFL_MSG_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_OCUFL_MSG_candb(&_m->mon1, OCUFL_MSG_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return OCUFL_MSG_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_OCUFL_MSG_candb(OCUFL_MSG_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCUFL_MSG_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->OCUFL_OccupantWeight_Stat & (0x03U)) | ((_m->OCUFL_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCUFL_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCUFL_MSG_RC & (0x0FU)) << 4U) ); + cframe->Data[1] |= (uint8_t) ( (_m->OCUFL_MSG_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) OCUFL_MSG_CANID; + cframe->DLC = (uint8_t) OCUFL_MSG_DLC; + cframe->IDE = (uint8_t) OCUFL_MSG_IDE; + return OCUFL_MSG_CANID; +} + +#else + +uint32_t Pack_OCUFL_MSG_candb(OCUFL_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCUFL_MSG_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->OCUFL_OccupantWeight_Stat & (0x03U)) | ((_m->OCUFL_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCUFL_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCUFL_MSG_RC & (0x0FU)) << 4U) ); + _d[1] |= (uint8_t) ( (_m->OCUFL_MSG_CS & (0xFFU)) ); + + *_len = (uint8_t) OCUFL_MSG_DLC; + *_ide = (uint8_t) OCUFL_MSG_IDE; + return OCUFL_MSG_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCUFR_MSG_candb(OCUFR_MSG_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->OCUFR_OccupantWeight_Stat = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->OCUFR_SeatOccupied_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->OCUFR_SensorError_Stat = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->OCUFR_MSG_RC = (uint8_t) ( ((_d[0] >> 4U) & (0x0FU)) ); + _m->OCUFR_MSG_CS = (uint8_t) ( (_d[1] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < OCUFR_MSG_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_OCUFR_MSG_candb(&_m->mon1, OCUFR_MSG_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return OCUFR_MSG_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_OCUFR_MSG_candb(OCUFR_MSG_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCUFR_MSG_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->OCUFR_OccupantWeight_Stat & (0x03U)) | ((_m->OCUFR_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCUFR_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCUFR_MSG_RC & (0x0FU)) << 4U) ); + cframe->Data[1] |= (uint8_t) ( (_m->OCUFR_MSG_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) OCUFR_MSG_CANID; + cframe->DLC = (uint8_t) OCUFR_MSG_DLC; + cframe->IDE = (uint8_t) OCUFR_MSG_IDE; + return OCUFR_MSG_CANID; +} + +#else + +uint32_t Pack_OCUFR_MSG_candb(OCUFR_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCUFR_MSG_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->OCUFR_OccupantWeight_Stat & (0x03U)) | ((_m->OCUFR_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCUFR_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCUFR_MSG_RC & (0x0FU)) << 4U) ); + _d[1] |= (uint8_t) ( (_m->OCUFR_MSG_CS & (0xFFU)) ); + + *_len = (uint8_t) OCUFR_MSG_DLC; + *_ide = (uint8_t) OCUFR_MSG_IDE; + return OCUFR_MSG_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCURL_MSG_candb(OCURL_MSG_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->OCURL_OccupantWeight_Stat = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->OCURL_SeatOccupied_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->OCURL_SensorError_Stat = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->OCURL_MSG_RC = (uint8_t) ( ((_d[0] >> 4U) & (0x0FU)) ); + _m->OCURL_MSG_CS = (uint8_t) ( (_d[1] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < OCURL_MSG_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_OCURL_MSG_candb(&_m->mon1, OCURL_MSG_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return OCURL_MSG_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_OCURL_MSG_candb(OCURL_MSG_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCURL_MSG_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->OCURL_OccupantWeight_Stat & (0x03U)) | ((_m->OCURL_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCURL_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCURL_MSG_RC & (0x0FU)) << 4U) ); + cframe->Data[1] |= (uint8_t) ( (_m->OCURL_MSG_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) OCURL_MSG_CANID; + cframe->DLC = (uint8_t) OCURL_MSG_DLC; + cframe->IDE = (uint8_t) OCURL_MSG_IDE; + return OCURL_MSG_CANID; +} + +#else + +uint32_t Pack_OCURL_MSG_candb(OCURL_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCURL_MSG_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->OCURL_OccupantWeight_Stat & (0x03U)) | ((_m->OCURL_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCURL_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCURL_MSG_RC & (0x0FU)) << 4U) ); + _d[1] |= (uint8_t) ( (_m->OCURL_MSG_CS & (0xFFU)) ); + + *_len = (uint8_t) OCURL_MSG_DLC; + *_ide = (uint8_t) OCURL_MSG_IDE; + return OCURL_MSG_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCURR_MSG_candb(OCURR_MSG_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->OCURR_OccupantWeight_Stat = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->OCURR_SeatOccupied_Stat = (uint8_t) ( ((_d[0] >> 2U) & (0x01U)) ); + _m->OCURR_SensorError_Stat = (uint8_t) ( ((_d[0] >> 3U) & (0x01U)) ); + _m->OCURR_MSG_RC = (uint8_t) ( ((_d[0] >> 4U) & (0x0FU)) ); + _m->OCURR_MSG_CS = (uint8_t) ( (_d[1] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < OCURR_MSG_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_OCURR_MSG_candb(&_m->mon1, OCURR_MSG_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return OCURR_MSG_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_OCURR_MSG_candb(OCURR_MSG_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCURR_MSG_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->OCURR_OccupantWeight_Stat & (0x03U)) | ((_m->OCURR_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCURR_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCURR_MSG_RC & (0x0FU)) << 4U) ); + cframe->Data[1] |= (uint8_t) ( (_m->OCURR_MSG_CS & (0xFFU)) ); + + cframe->MsgId = (uint32_t) OCURR_MSG_CANID; + cframe->DLC = (uint8_t) OCURR_MSG_DLC; + cframe->IDE = (uint8_t) OCURR_MSG_IDE; + return OCURR_MSG_CANID; +} + +#else + +uint32_t Pack_OCURR_MSG_candb(OCURR_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(OCURR_MSG_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->OCURR_OccupantWeight_Stat & (0x03U)) | ((_m->OCURR_SeatOccupied_Stat & (0x01U)) << 2U) | ((_m->OCURR_SensorError_Stat & (0x01U)) << 3U) | ((_m->OCURR_MSG_RC & (0x0FU)) << 4U) ); + _d[1] |= (uint8_t) ( (_m->OCURR_MSG_CS & (0xFFU)) ); + + *_len = (uint8_t) OCURR_MSG_DLC; + *_ide = (uint8_t) OCURR_MSG_IDE; + return OCURR_MSG_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_DW_STATE_candb(DW_STATE_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->DW_GlassPosition_Stat = (uint8_t) ( ((_d[1] >> 2U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < DW_STATE_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_DW_STATE_candb(&_m->mon1, DW_STATE_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return DW_STATE_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_DW_STATE_candb(DW_STATE_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(DW_STATE_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[1] |= (uint8_t) ( ((_m->DW_GlassPosition_Stat & (0x03U)) << 2U) ); + + cframe->MsgId = (uint32_t) DW_STATE_CANID; + cframe->DLC = (uint8_t) DW_STATE_DLC; + cframe->IDE = (uint8_t) DW_STATE_IDE; + return DW_STATE_CANID; +} + +#else + +uint32_t Pack_DW_STATE_candb(DW_STATE_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(DW_STATE_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[1] |= (uint8_t) ( ((_m->DW_GlassPosition_Stat & (0x03U)) << 2U) ); + + *_len = (uint8_t) DW_STATE_DLC; + *_ide = (uint8_t) DW_STATE_IDE; + return DW_STATE_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_FIU_CCU1_candb(FIU_CCU1_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->FIU_TargetTempFL_Val_ro = (uint8_t) ( (_d[0] & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempFL_Val_phys = (sigfloat_t)(CANDB_FIU_TargetTempFL_Val_ro_fromS(_m->FIU_TargetTempFL_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->FIU_FootTempCorFL_Req = (uint8_t) ( ((_d[0] >> 5U) & (0x07U)) ); + _m->FIU_TargetTempFR_Val_ro = (uint8_t) ( (_d[1] & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempFR_Val_phys = (sigfloat_t)(CANDB_FIU_TargetTempFR_Val_ro_fromS(_m->FIU_TargetTempFR_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->FIU_FootTempCorFR_Req = (uint8_t) ( ((_d[1] >> 5U) & (0x07U)) ); + _m->FIU_CCmodeFL_Req = (uint8_t) ( (_d[2] & (0x03U)) ); + _m->FIU_AirDirectionFL_Def_Req = (uint8_t) ( ((_d[2] >> 2U) & (0x03U)) ); + _m->FIU_AirDirectionFL_Face_Req = (uint8_t) ( ((_d[2] >> 4U) & (0x03U)) ); + _m->FIU_AirDirectionFL_Foot_Req = (uint8_t) ( ((_d[2] >> 6U) & (0x03U)) ); + _m->FIU_CCmodeFR_Req = (uint8_t) ( (_d[3] & (0x03U)) ); + _m->FIU_AirDirectionFR_Def_Req = (uint8_t) ( ((_d[3] >> 2U) & (0x03U)) ); + _m->FIU_AirDirectionFR_Face_Req = (uint8_t) ( ((_d[3] >> 4U) & (0x03U)) ); + _m->FIU_AirDirectionFR_Foot_Req = (uint8_t) ( ((_d[3] >> 6U) & (0x03U)) ); + _m->FIU_BlowerSpeedFL_Req = (uint8_t) ( (_d[4] & (0x0FU)) ); + _m->FIU_BlowerSpeedFR_Req = (uint8_t) ( ((_d[4] >> 4U) & (0x0FU)) ); + _m->FIU_CCautoModeFL_Req = (uint8_t) ( (_d[5] & (0x07U)) ); + _m->FIU_CCautoModeFR_Req = (uint8_t) ( ((_d[5] >> 3U) & (0x07U)) ); + _m->FIU_Recirculation_Req = (uint8_t) ( ((_d[5] >> 6U) & (0x03U)) ); + _m->FIU_DeflectorSwDL_Req = (uint8_t) ( (_d[6] & (0x07U)) ); + _m->FIU_DeflectorSwDR_Req = (uint8_t) ( ((_d[6] >> 3U) & (0x07U)) ); + _m->FIU_ACfrontOFF_Req = (uint8_t) ( ((_d[6] >> 6U) & (0x03U)) ); + _m->FIU_DeflectorSwFPL_Req = (uint8_t) ( (_d[7] & (0x07U)) ); + _m->FIU_DeflectorSwFPR_Req = (uint8_t) ( ((_d[7] >> 3U) & (0x07U)) ); + _m->FIU_FrontZoneSync_Req = (uint8_t) ( ((_d[7] >> 6U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < FIU_CCU1_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_FIU_CCU1_candb(&_m->mon1, FIU_CCU1_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return FIU_CCU1_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_FIU_CCU1_candb(FIU_CCU1_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(FIU_CCU1_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempFL_Val_ro = (uint8_t) CANDB_FIU_TargetTempFL_Val_ro_toS(_m->FIU_TargetTempFL_Val_phys); + _m->FIU_TargetTempFR_Val_ro = (uint8_t) CANDB_FIU_TargetTempFR_Val_ro_toS(_m->FIU_TargetTempFR_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->FIU_TargetTempFL_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorFL_Req & (0x07U)) << 5U) ); + cframe->Data[1] |= (uint8_t) ( (_m->FIU_TargetTempFR_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorFR_Req & (0x07U)) << 5U) ); + cframe->Data[2] |= (uint8_t) ( (_m->FIU_CCmodeFL_Req & (0x03U)) | ((_m->FIU_AirDirectionFL_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionFL_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionFL_Foot_Req & (0x03U)) << 6U) ); + cframe->Data[3] |= (uint8_t) ( (_m->FIU_CCmodeFR_Req & (0x03U)) | ((_m->FIU_AirDirectionFR_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionFR_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionFR_Foot_Req & (0x03U)) << 6U) ); + cframe->Data[4] |= (uint8_t) ( (_m->FIU_BlowerSpeedFL_Req & (0x0FU)) | ((_m->FIU_BlowerSpeedFR_Req & (0x0FU)) << 4U) ); + cframe->Data[5] |= (uint8_t) ( (_m->FIU_CCautoModeFL_Req & (0x07U)) | ((_m->FIU_CCautoModeFR_Req & (0x07U)) << 3U) | ((_m->FIU_Recirculation_Req & (0x03U)) << 6U) ); + cframe->Data[6] |= (uint8_t) ( (_m->FIU_DeflectorSwDL_Req & (0x07U)) | ((_m->FIU_DeflectorSwDR_Req & (0x07U)) << 3U) | ((_m->FIU_ACfrontOFF_Req & (0x03U)) << 6U) ); + cframe->Data[7] |= (uint8_t) ( (_m->FIU_DeflectorSwFPL_Req & (0x07U)) | ((_m->FIU_DeflectorSwFPR_Req & (0x07U)) << 3U) | ((_m->FIU_FrontZoneSync_Req & (0x03U)) << 6U) ); + + cframe->MsgId = (uint32_t) FIU_CCU1_CANID; + cframe->DLC = (uint8_t) FIU_CCU1_DLC; + cframe->IDE = (uint8_t) FIU_CCU1_IDE; + return FIU_CCU1_CANID; +} + +#else + +uint32_t Pack_FIU_CCU1_candb(FIU_CCU1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(FIU_CCU1_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempFL_Val_ro = (uint8_t) CANDB_FIU_TargetTempFL_Val_ro_toS(_m->FIU_TargetTempFL_Val_phys); + _m->FIU_TargetTempFR_Val_ro = (uint8_t) CANDB_FIU_TargetTempFR_Val_ro_toS(_m->FIU_TargetTempFR_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->FIU_TargetTempFL_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorFL_Req & (0x07U)) << 5U) ); + _d[1] |= (uint8_t) ( (_m->FIU_TargetTempFR_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorFR_Req & (0x07U)) << 5U) ); + _d[2] |= (uint8_t) ( (_m->FIU_CCmodeFL_Req & (0x03U)) | ((_m->FIU_AirDirectionFL_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionFL_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionFL_Foot_Req & (0x03U)) << 6U) ); + _d[3] |= (uint8_t) ( (_m->FIU_CCmodeFR_Req & (0x03U)) | ((_m->FIU_AirDirectionFR_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionFR_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionFR_Foot_Req & (0x03U)) << 6U) ); + _d[4] |= (uint8_t) ( (_m->FIU_BlowerSpeedFL_Req & (0x0FU)) | ((_m->FIU_BlowerSpeedFR_Req & (0x0FU)) << 4U) ); + _d[5] |= (uint8_t) ( (_m->FIU_CCautoModeFL_Req & (0x07U)) | ((_m->FIU_CCautoModeFR_Req & (0x07U)) << 3U) | ((_m->FIU_Recirculation_Req & (0x03U)) << 6U) ); + _d[6] |= (uint8_t) ( (_m->FIU_DeflectorSwDL_Req & (0x07U)) | ((_m->FIU_DeflectorSwDR_Req & (0x07U)) << 3U) | ((_m->FIU_ACfrontOFF_Req & (0x03U)) << 6U) ); + _d[7] |= (uint8_t) ( (_m->FIU_DeflectorSwFPL_Req & (0x07U)) | ((_m->FIU_DeflectorSwFPR_Req & (0x07U)) << 3U) | ((_m->FIU_FrontZoneSync_Req & (0x03U)) << 6U) ); + + *_len = (uint8_t) FIU_CCU1_DLC; + *_ide = (uint8_t) FIU_CCU1_IDE; + return FIU_CCU1_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_FIU_CCU2_candb(FIU_CCU2_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->FIU_TargetTempRL_Val_ro = (uint8_t) ( (_d[0] & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempRL_Val_phys = (sigfloat_t)(CANDB_FIU_TargetTempRL_Val_ro_fromS(_m->FIU_TargetTempRL_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->FIU_FootTempCorRL_Req = (uint8_t) ( ((_d[0] >> 5U) & (0x07U)) ); + _m->FIU_TargetTempRR_Val_ro = (uint8_t) ( (_d[1] & (0x1FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempRR_Val_phys = (sigfloat_t)(CANDB_FIU_TargetTempRR_Val_ro_fromS(_m->FIU_TargetTempRR_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->FIU_FootTempCorRR_Req = (uint8_t) ( ((_d[1] >> 5U) & (0x07U)) ); + _m->FIU_CCmodeRL_Req = (uint8_t) ( (_d[2] & (0x03U)) ); + _m->FIU_AirDirectionRL_Def_Req = (uint8_t) ( ((_d[2] >> 2U) & (0x03U)) ); + _m->FIU_AirDirectionRL_Face_Req = (uint8_t) ( ((_d[2] >> 4U) & (0x03U)) ); + _m->FIU_AirDirectionRL_Foot_Req = (uint8_t) ( ((_d[2] >> 6U) & (0x03U)) ); + _m->FIU_CCmodeRR_Req = (uint8_t) ( (_d[3] & (0x03U)) ); + _m->FIU_AirDirectionRR_Def_Req = (uint8_t) ( ((_d[3] >> 2U) & (0x03U)) ); + _m->FIU_AirDirectionRR_Face_Req = (uint8_t) ( ((_d[3] >> 4U) & (0x03U)) ); + _m->FIU_AirDirectionRR_Foot_Req = (uint8_t) ( ((_d[3] >> 6U) & (0x03U)) ); + _m->FIU_BlowerSpeedRL_Req = (uint8_t) ( (_d[4] & (0x0FU)) ); + _m->FIU_BlowerSpeedRR_Req = (uint8_t) ( ((_d[4] >> 4U) & (0x0FU)) ); + _m->FIU_CCautoModeRL_Req = (uint8_t) ( (_d[5] & (0x07U)) ); + _m->FIU_CCautoModeRR_Req = (uint8_t) ( ((_d[5] >> 3U) & (0x07U)) ); + _m->FIU_DeflectorSwRLB_Req = (uint8_t) ( (_d[6] & (0x07U)) ); + _m->FIU_DeflectorSwFCL_Req = (uint8_t) ( ((_d[6] >> 3U) & (0x07U)) ); + _m->FIU_ACrearOFF_Req = (uint8_t) ( ((_d[6] >> 6U) & (0x03U)) ); + _m->FIU_DeflectorSwFCR_Req = (uint8_t) ( (_d[7] & (0x07U)) ); + _m->FIU_DeflectorSwRRB_Req = (uint8_t) ( ((_d[7] >> 3U) & (0x07U)) ); + _m->FIU_RearZoneSync_Req = (uint8_t) ( ((_d[7] >> 6U) & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < FIU_CCU2_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_FIU_CCU2_candb(&_m->mon1, FIU_CCU2_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return FIU_CCU2_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_FIU_CCU2_candb(FIU_CCU2_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(FIU_CCU2_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempRL_Val_ro = (uint8_t) CANDB_FIU_TargetTempRL_Val_ro_toS(_m->FIU_TargetTempRL_Val_phys); + _m->FIU_TargetTempRR_Val_ro = (uint8_t) CANDB_FIU_TargetTempRR_Val_ro_toS(_m->FIU_TargetTempRR_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->FIU_TargetTempRL_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorRL_Req & (0x07U)) << 5U) ); + cframe->Data[1] |= (uint8_t) ( (_m->FIU_TargetTempRR_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorRR_Req & (0x07U)) << 5U) ); + cframe->Data[2] |= (uint8_t) ( (_m->FIU_CCmodeRL_Req & (0x03U)) | ((_m->FIU_AirDirectionRL_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionRL_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionRL_Foot_Req & (0x03U)) << 6U) ); + cframe->Data[3] |= (uint8_t) ( (_m->FIU_CCmodeRR_Req & (0x03U)) | ((_m->FIU_AirDirectionRR_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionRR_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionRR_Foot_Req & (0x03U)) << 6U) ); + cframe->Data[4] |= (uint8_t) ( (_m->FIU_BlowerSpeedRL_Req & (0x0FU)) | ((_m->FIU_BlowerSpeedRR_Req & (0x0FU)) << 4U) ); + cframe->Data[5] |= (uint8_t) ( (_m->FIU_CCautoModeRL_Req & (0x07U)) | ((_m->FIU_CCautoModeRR_Req & (0x07U)) << 3U) ); + cframe->Data[6] |= (uint8_t) ( (_m->FIU_DeflectorSwRLB_Req & (0x07U)) | ((_m->FIU_DeflectorSwFCL_Req & (0x07U)) << 3U) | ((_m->FIU_ACrearOFF_Req & (0x03U)) << 6U) ); + cframe->Data[7] |= (uint8_t) ( (_m->FIU_DeflectorSwFCR_Req & (0x07U)) | ((_m->FIU_DeflectorSwRRB_Req & (0x07U)) << 3U) | ((_m->FIU_RearZoneSync_Req & (0x03U)) << 6U) ); + + cframe->MsgId = (uint32_t) FIU_CCU2_CANID; + cframe->DLC = (uint8_t) FIU_CCU2_DLC; + cframe->IDE = (uint8_t) FIU_CCU2_IDE; + return FIU_CCU2_CANID; +} + +#else + +uint32_t Pack_FIU_CCU2_candb(FIU_CCU2_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(FIU_CCU2_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->FIU_TargetTempRL_Val_ro = (uint8_t) CANDB_FIU_TargetTempRL_Val_ro_toS(_m->FIU_TargetTempRL_Val_phys); + _m->FIU_TargetTempRR_Val_ro = (uint8_t) CANDB_FIU_TargetTempRR_Val_ro_toS(_m->FIU_TargetTempRR_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->FIU_TargetTempRL_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorRL_Req & (0x07U)) << 5U) ); + _d[1] |= (uint8_t) ( (_m->FIU_TargetTempRR_Val_ro & (0x1FU)) | ((_m->FIU_FootTempCorRR_Req & (0x07U)) << 5U) ); + _d[2] |= (uint8_t) ( (_m->FIU_CCmodeRL_Req & (0x03U)) | ((_m->FIU_AirDirectionRL_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionRL_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionRL_Foot_Req & (0x03U)) << 6U) ); + _d[3] |= (uint8_t) ( (_m->FIU_CCmodeRR_Req & (0x03U)) | ((_m->FIU_AirDirectionRR_Def_Req & (0x03U)) << 2U) | ((_m->FIU_AirDirectionRR_Face_Req & (0x03U)) << 4U) | ((_m->FIU_AirDirectionRR_Foot_Req & (0x03U)) << 6U) ); + _d[4] |= (uint8_t) ( (_m->FIU_BlowerSpeedRL_Req & (0x0FU)) | ((_m->FIU_BlowerSpeedRR_Req & (0x0FU)) << 4U) ); + _d[5] |= (uint8_t) ( (_m->FIU_CCautoModeRL_Req & (0x07U)) | ((_m->FIU_CCautoModeRR_Req & (0x07U)) << 3U) ); + _d[6] |= (uint8_t) ( (_m->FIU_DeflectorSwRLB_Req & (0x07U)) | ((_m->FIU_DeflectorSwFCL_Req & (0x07U)) << 3U) | ((_m->FIU_ACrearOFF_Req & (0x03U)) << 6U) ); + _d[7] |= (uint8_t) ( (_m->FIU_DeflectorSwFCR_Req & (0x07U)) | ((_m->FIU_DeflectorSwRRB_Req & (0x07U)) << 3U) | ((_m->FIU_RearZoneSync_Req & (0x03U)) << 6U) ); + + *_len = (uint8_t) FIU_CCU2_DLC; + *_ide = (uint8_t) FIU_CCU2_IDE; + return FIU_CCU2_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_FIU_CCU3_candb(FIU_CCU3_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->FIU_Aroma_Req = (uint8_t) ( (_d[0] & (0x03U)) ); + _m->FIU_AromaIntens_Req = (uint8_t) ( ((_d[0] >> 2U) & (0x03U)) ); + _m->FIU_Rest_Req = (uint8_t) ( ((_d[0] >> 4U) & (0x03U)) ); + _m->FIU_Ionization_Req = (uint8_t) ( ((_d[0] >> 6U) & (0x03U)) ); + _m->FIU_RLfootBlowDis_Req = (uint8_t) ( (_d[1] & (0x03U)) ); + _m->FIU_RRfootBlowDis_Req = (uint8_t) ( ((_d[1] >> 2U) & (0x03U)) ); + _m->FIU_ACmax_Req = (uint8_t) ( ((_d[1] >> 4U) & (0x03U)) ); + _m->FIU_Defrost_Req = (uint8_t) ( ((_d[1] >> 6U) & (0x03U)) ); + _m->FIU_Ultraviolet_Req = (uint8_t) ( (_d[2] & (0x03U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < FIU_CCU3_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_FIU_CCU3_candb(&_m->mon1, FIU_CCU3_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return FIU_CCU3_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_FIU_CCU3_candb(FIU_CCU3_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(FIU_CCU3_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( (_m->FIU_Aroma_Req & (0x03U)) | ((_m->FIU_AromaIntens_Req & (0x03U)) << 2U) | ((_m->FIU_Rest_Req & (0x03U)) << 4U) | ((_m->FIU_Ionization_Req & (0x03U)) << 6U) ); + cframe->Data[1] |= (uint8_t) ( (_m->FIU_RLfootBlowDis_Req & (0x03U)) | ((_m->FIU_RRfootBlowDis_Req & (0x03U)) << 2U) | ((_m->FIU_ACmax_Req & (0x03U)) << 4U) | ((_m->FIU_Defrost_Req & (0x03U)) << 6U) ); + cframe->Data[2] |= (uint8_t) ( (_m->FIU_Ultraviolet_Req & (0x03U)) ); + + cframe->MsgId = (uint32_t) FIU_CCU3_CANID; + cframe->DLC = (uint8_t) FIU_CCU3_DLC; + cframe->IDE = (uint8_t) FIU_CCU3_IDE; + return FIU_CCU3_CANID; +} + +#else + +uint32_t Pack_FIU_CCU3_candb(FIU_CCU3_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(FIU_CCU3_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( (_m->FIU_Aroma_Req & (0x03U)) | ((_m->FIU_AromaIntens_Req & (0x03U)) << 2U) | ((_m->FIU_Rest_Req & (0x03U)) << 4U) | ((_m->FIU_Ionization_Req & (0x03U)) << 6U) ); + _d[1] |= (uint8_t) ( (_m->FIU_RLfootBlowDis_Req & (0x03U)) | ((_m->FIU_RRfootBlowDis_Req & (0x03U)) << 2U) | ((_m->FIU_ACmax_Req & (0x03U)) << 4U) | ((_m->FIU_Defrost_Req & (0x03U)) << 6U) ); + _d[2] |= (uint8_t) ( (_m->FIU_Ultraviolet_Req & (0x03U)) ); + + *_len = (uint8_t) FIU_CCU3_DLC; + *_ide = (uint8_t) FIU_CCU3_IDE; + return FIU_CCU3_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_Diag_To_CCU_candb(Diag_To_CCU_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->Diag_To_CCU_Sig = (uint64_t) ( ((uint64_t)(_d[0] & (0xFFU)) << 56U) | ((uint64_t)(_d[1] & (0xFFU)) << 48U) | ((uint64_t)(_d[2] & (0xFFU)) << 40U) | ((uint64_t)(_d[3] & (0xFFU)) << 32U) | ((_d[4] & (0xFFU)) << 24U) | ((_d[5] & (0xFFU)) << 16U) | ((_d[6] & (0xFFU)) << 8U) | (_d[7] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < Diag_To_CCU_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_Diag_To_CCU_candb(&_m->mon1, Diag_To_CCU_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return Diag_To_CCU_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_Diag_To_CCU_candb(Diag_To_CCU_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(Diag_To_CCU_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 56U) & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 48U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 40U) & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 32U) & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 24U) & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 16U) & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 8U) & (0xFFU)) ); + cframe->Data[7] |= (uint8_t) ( (_m->Diag_To_CCU_Sig & (0xFFU)) ); + + cframe->MsgId = (uint32_t) Diag_To_CCU_CANID; + cframe->DLC = (uint8_t) Diag_To_CCU_DLC; + cframe->IDE = (uint8_t) Diag_To_CCU_IDE; + return Diag_To_CCU_CANID; +} + +#else + +uint32_t Pack_Diag_To_CCU_candb(Diag_To_CCU_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(Diag_To_CCU_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 56U) & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 48U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 40U) & (0xFFU)) ); + _d[3] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 32U) & (0xFFU)) ); + _d[4] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 24U) & (0xFFU)) ); + _d[5] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 16U) & (0xFFU)) ); + _d[6] |= (uint8_t) ( ((_m->Diag_To_CCU_Sig >> 8U) & (0xFFU)) ); + _d[7] |= (uint8_t) ( (_m->Diag_To_CCU_Sig & (0xFFU)) ); + + *_len = (uint8_t) Diag_To_CCU_DLC; + *_ide = (uint8_t) Diag_To_CCU_IDE; + return Diag_To_CCU_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_Diag_From_CCU_candb(Diag_From_CCU_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->Diag_From_CCU_Sig = (uint64_t) ( ((uint64_t)(_d[0] & (0xFFU)) << 56U) | ((uint64_t)(_d[1] & (0xFFU)) << 48U) | ((uint64_t)(_d[2] & (0xFFU)) << 40U) | ((uint64_t)(_d[3] & (0xFFU)) << 32U) | ((_d[4] & (0xFFU)) << 24U) | ((_d[5] & (0xFFU)) << 16U) | ((_d[6] & (0xFFU)) << 8U) | (_d[7] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < Diag_From_CCU_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_Diag_From_CCU_candb(&_m->mon1, Diag_From_CCU_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return Diag_From_CCU_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_Diag_From_CCU_candb(Diag_From_CCU_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(Diag_From_CCU_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 56U) & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 48U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 40U) & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 32U) & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 24U) & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 16U) & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 8U) & (0xFFU)) ); + cframe->Data[7] |= (uint8_t) ( (_m->Diag_From_CCU_Sig & (0xFFU)) ); + + cframe->MsgId = (uint32_t) Diag_From_CCU_CANID; + cframe->DLC = (uint8_t) Diag_From_CCU_DLC; + cframe->IDE = (uint8_t) Diag_From_CCU_IDE; + return Diag_From_CCU_CANID; +} + +#else + +uint32_t Pack_Diag_From_CCU_candb(Diag_From_CCU_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(Diag_From_CCU_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 56U) & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 48U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 40U) & (0xFFU)) ); + _d[3] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 32U) & (0xFFU)) ); + _d[4] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 24U) & (0xFFU)) ); + _d[5] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 16U) & (0xFFU)) ); + _d[6] |= (uint8_t) ( ((_m->Diag_From_CCU_Sig >> 8U) & (0xFFU)) ); + _d[7] |= (uint8_t) ( (_m->Diag_From_CCU_Sig & (0xFFU)) ); + + *_len = (uint8_t) Diag_From_CCU_DLC; + *_ide = (uint8_t) Diag_From_CCU_IDE; + return Diag_From_CCU_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_Diag_Functional_candb(Diag_Functional_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->Diag_Functional_Sig = (uint64_t) ( ((uint64_t)(_d[0] & (0xFFU)) << 56U) | ((uint64_t)(_d[1] & (0xFFU)) << 48U) | ((uint64_t)(_d[2] & (0xFFU)) << 40U) | ((uint64_t)(_d[3] & (0xFFU)) << 32U) | ((_d[4] & (0xFFU)) << 24U) | ((_d[5] & (0xFFU)) << 16U) | ((_d[6] & (0xFFU)) << 8U) | (_d[7] & (0xFFU)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < Diag_Functional_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_Diag_Functional_candb(&_m->mon1, Diag_Functional_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return Diag_Functional_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_Diag_Functional_candb(Diag_Functional_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(Diag_Functional_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + + cframe->Data[0] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 56U) & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 48U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 40U) & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 32U) & (0xFFU)) ); + cframe->Data[4] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 24U) & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 16U) & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 8U) & (0xFFU)) ); + cframe->Data[7] |= (uint8_t) ( (_m->Diag_Functional_Sig & (0xFFU)) ); + + cframe->MsgId = (uint32_t) Diag_Functional_CANID; + cframe->DLC = (uint8_t) Diag_Functional_DLC; + cframe->IDE = (uint8_t) Diag_Functional_IDE; + return Diag_Functional_CANID; +} + +#else + +uint32_t Pack_Diag_Functional_candb(Diag_Functional_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(Diag_Functional_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + + _d[0] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 56U) & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 48U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 40U) & (0xFFU)) ); + _d[3] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 32U) & (0xFFU)) ); + _d[4] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 24U) & (0xFFU)) ); + _d[5] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 16U) & (0xFFU)) ); + _d[6] |= (uint8_t) ( ((_m->Diag_Functional_Sig >> 8U) & (0xFFU)) ); + _d[7] |= (uint8_t) ( (_m->Diag_Functional_Sig & (0xFFU)) ); + + *_len = (uint8_t) Diag_Functional_DLC; + *_ide = (uint8_t) Diag_Functional_IDE; + return Diag_Functional_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_HVC_01_candb(HVC_01_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->HVC_ActSpeed_Val = (uint16_t) ( ((_d[1] & (0xFFU)) << 8U) | (_d[0] & (0xFFU)) ); + _m->HVC_ActTemp_Val_ro = (uint8_t) ( (_d[2] & (0x7FU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_ActTemp_Val_phys = (int16_t) CANDB_HVC_ActTemp_Val_ro_fromS(_m->HVC_ActTemp_Val_ro); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_OvTemp_Stat = (uint8_t) ( ((_d[2] >> 7U) & (0x01U)) ); + _m->HVC_ActMode_Stat = (uint8_t) ( (_d[3] & (0x03U)) ); + _m->HVC_FaultLvl_Stat = (uint8_t) ( ((_d[3] >> 2U) & (0x03U)) ); + _m->HVC_OvSpeed_Stat = (uint8_t) ( ((_d[3] >> 4U) & (0x01U)) ); + _m->CCM2_LossStepErr_Stat = (uint8_t) ( ((_d[3] >> 5U) & (0x01U)) ); + _m->HVC_OvLoadErr_Stat = (uint8_t) ( ((_d[3] >> 6U) & (0x01U)) ); + _m->HVC_IGBTErr_Stat = (uint8_t) ( ((_d[3] >> 7U) & (0x01U)) ); + _m->HVC_ErrCode_Stat = (uint8_t) ( (_d[4] & (0xFFU)) ); + _m->HVC_PhaCurrA_Val_ro = (uint8_t) ( (_d[5] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_PhaCurrA_Val_phys = (sigfloat_t)(CANDB_HVC_PhaCurrA_Val_ro_fromS(_m->HVC_PhaCurrA_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_ActCurr_Val_ro = (uint8_t) ( (_d[6] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_ActCurr_Val_phys = (sigfloat_t)(CANDB_HVC_ActCurr_Val_ro_fromS(_m->HVC_ActCurr_Val_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->HVC_ActVolt_Val_ro = (uint8_t) ( (_d[7] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_ActVolt_Val_phys = (uint16_t) CANDB_HVC_ActVolt_Val_ro_fromS(_m->HVC_ActVolt_Val_ro); +#endif // CANDB_USE_SIGFLOAT + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < HVC_01_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_HVC_01_candb(&_m->mon1, HVC_01_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return HVC_01_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_HVC_01_candb(HVC_01_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(HVC_01_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_ActTemp_Val_ro = (uint8_t) CANDB_HVC_ActTemp_Val_ro_toS(_m->HVC_ActTemp_Val_phys); + _m->HVC_PhaCurrA_Val_ro = (uint8_t) CANDB_HVC_PhaCurrA_Val_ro_toS(_m->HVC_PhaCurrA_Val_phys); + _m->HVC_ActCurr_Val_ro = (uint8_t) CANDB_HVC_ActCurr_Val_ro_toS(_m->HVC_ActCurr_Val_phys); + _m->HVC_ActVolt_Val_ro = (uint8_t) CANDB_HVC_ActVolt_Val_ro_toS(_m->HVC_ActVolt_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->HVC_ActSpeed_Val & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->HVC_ActSpeed_Val >> 8U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( (_m->HVC_ActTemp_Val_ro & (0x7FU)) | ((_m->HVC_OvTemp_Stat & (0x01U)) << 7U) ); + cframe->Data[3] |= (uint8_t) ( (_m->HVC_ActMode_Stat & (0x03U)) | ((_m->HVC_FaultLvl_Stat & (0x03U)) << 2U) | ((_m->HVC_OvSpeed_Stat & (0x01U)) << 4U) | ((_m->CCM2_LossStepErr_Stat & (0x01U)) << 5U) | ((_m->HVC_OvLoadErr_Stat & (0x01U)) << 6U) | ((_m->HVC_IGBTErr_Stat & (0x01U)) << 7U) ); + cframe->Data[4] |= (uint8_t) ( (_m->HVC_ErrCode_Stat & (0xFFU)) ); + cframe->Data[5] |= (uint8_t) ( (_m->HVC_PhaCurrA_Val_ro & (0xFFU)) ); + cframe->Data[6] |= (uint8_t) ( (_m->HVC_ActCurr_Val_ro & (0xFFU)) ); + cframe->Data[7] |= (uint8_t) ( (_m->HVC_ActVolt_Val_ro & (0xFFU)) ); + + cframe->MsgId = (uint32_t) HVC_01_CANID; + cframe->DLC = (uint8_t) HVC_01_DLC; + cframe->IDE = (uint8_t) HVC_01_IDE; + return HVC_01_CANID; +} + +#else + +uint32_t Pack_HVC_01_candb(HVC_01_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(HVC_01_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->HVC_ActTemp_Val_ro = (uint8_t) CANDB_HVC_ActTemp_Val_ro_toS(_m->HVC_ActTemp_Val_phys); + _m->HVC_PhaCurrA_Val_ro = (uint8_t) CANDB_HVC_PhaCurrA_Val_ro_toS(_m->HVC_PhaCurrA_Val_phys); + _m->HVC_ActCurr_Val_ro = (uint8_t) CANDB_HVC_ActCurr_Val_ro_toS(_m->HVC_ActCurr_Val_phys); + _m->HVC_ActVolt_Val_ro = (uint8_t) CANDB_HVC_ActVolt_Val_ro_toS(_m->HVC_ActVolt_Val_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->HVC_ActSpeed_Val & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->HVC_ActSpeed_Val >> 8U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( (_m->HVC_ActTemp_Val_ro & (0x7FU)) | ((_m->HVC_OvTemp_Stat & (0x01U)) << 7U) ); + _d[3] |= (uint8_t) ( (_m->HVC_ActMode_Stat & (0x03U)) | ((_m->HVC_FaultLvl_Stat & (0x03U)) << 2U) | ((_m->HVC_OvSpeed_Stat & (0x01U)) << 4U) | ((_m->CCM2_LossStepErr_Stat & (0x01U)) << 5U) | ((_m->HVC_OvLoadErr_Stat & (0x01U)) << 6U) | ((_m->HVC_IGBTErr_Stat & (0x01U)) << 7U) ); + _d[4] |= (uint8_t) ( (_m->HVC_ErrCode_Stat & (0xFFU)) ); + _d[5] |= (uint8_t) ( (_m->HVC_PhaCurrA_Val_ro & (0xFFU)) ); + _d[6] |= (uint8_t) ( (_m->HVC_ActCurr_Val_ro & (0xFFU)) ); + _d[7] |= (uint8_t) ( (_m->HVC_ActVolt_Val_ro & (0xFFU)) ); + + *_len = (uint8_t) HVC_01_DLC; + *_ide = (uint8_t) HVC_01_IDE; + return HVC_01_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_AC_Ctrl_candb(CCU_AC_Ctrl_t* _m, const uint8_t* _d, uint8_t dlc_) +{ + (void)dlc_; + _m->CCU_VCU_ACSpeedReq = (uint16_t) ( ((_d[1] & (0xFFU)) << 8U) | (_d[0] & (0xFFU)) ); + _m->CCU_ACMaxPowerConsumptionAllow_ro = (uint8_t) ( (_d[2] & (0xFFU)) ); +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_ACMaxPowerConsumptionAllow_phys = (sigfloat_t)(CANDB_CCU_ACMaxPowerConsumptionAllow_ro_fromS(_m->CCU_ACMaxPowerConsumptionAllow_ro)); +#endif // CANDB_USE_SIGFLOAT + + _m->CCU_VCU_AC_WorkReq = (uint8_t) ( (_d[3] & (0x01U)) ); + +#ifdef CANDB_USE_DIAG_MONITORS + _m->mon1.dlc_error = (dlc_ < CCU_AC_Ctrl_DLC); + _m->mon1.last_cycle = GetSystemTick(); + _m->mon1.frame_cnt++; + + FMon_CCU_AC_Ctrl_candb(&_m->mon1, CCU_AC_Ctrl_CANID); +#endif // CANDB_USE_DIAG_MONITORS + + return CCU_AC_Ctrl_CANID; +} + +#ifdef CANDB_USE_CANSTRUCT + +uint32_t Pack_CCU_AC_Ctrl_candb(CCU_AC_Ctrl_t* _m, __CoderDbcCanFrame_t__* cframe) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_AC_Ctrl_DLC); cframe->Data[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_ACMaxPowerConsumptionAllow_ro = (uint8_t) CANDB_CCU_ACMaxPowerConsumptionAllow_ro_toS(_m->CCU_ACMaxPowerConsumptionAllow_phys); +#endif // CANDB_USE_SIGFLOAT + + cframe->Data[0] |= (uint8_t) ( (_m->CCU_VCU_ACSpeedReq & (0xFFU)) ); + cframe->Data[1] |= (uint8_t) ( ((_m->CCU_VCU_ACSpeedReq >> 8U) & (0xFFU)) ); + cframe->Data[2] |= (uint8_t) ( (_m->CCU_ACMaxPowerConsumptionAllow_ro & (0xFFU)) ); + cframe->Data[3] |= (uint8_t) ( (_m->CCU_VCU_AC_WorkReq & (0x01U)) ); + + cframe->MsgId = (uint32_t) CCU_AC_Ctrl_CANID; + cframe->DLC = (uint8_t) CCU_AC_Ctrl_DLC; + cframe->IDE = (uint8_t) CCU_AC_Ctrl_IDE; + return CCU_AC_Ctrl_CANID; +} + +#else + +uint32_t Pack_CCU_AC_Ctrl_candb(CCU_AC_Ctrl_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide) +{ + uint8_t i; for (i = 0u; i < CANDB_VALIDATE_DLC(CCU_AC_Ctrl_DLC); _d[i++] = CANDB_INITIAL_BYTE_VALUE); + +#ifdef CANDB_USE_SIGFLOAT + _m->CCU_ACMaxPowerConsumptionAllow_ro = (uint8_t) CANDB_CCU_ACMaxPowerConsumptionAllow_ro_toS(_m->CCU_ACMaxPowerConsumptionAllow_phys); +#endif // CANDB_USE_SIGFLOAT + + _d[0] |= (uint8_t) ( (_m->CCU_VCU_ACSpeedReq & (0xFFU)) ); + _d[1] |= (uint8_t) ( ((_m->CCU_VCU_ACSpeedReq >> 8U) & (0xFFU)) ); + _d[2] |= (uint8_t) ( (_m->CCU_ACMaxPowerConsumptionAllow_ro & (0xFFU)) ); + _d[3] |= (uint8_t) ( (_m->CCU_VCU_AC_WorkReq & (0x01U)) ); + + *_len = (uint8_t) CCU_AC_Ctrl_DLC; + *_ide = (uint8_t) CCU_AC_Ctrl_IDE; + return CCU_AC_Ctrl_CANID; +} + +#endif // CANDB_USE_CANSTRUCT + diff --git a/lib/candb.h b/lib/candb.h new file mode 100644 index 0000000..7d70a08 --- /dev/null +++ b/lib/candb.h @@ -0,0 +1,9464 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +// DBC file version +#define VER_CANDB_MAJ (0U) +#define VER_CANDB_MIN (0U) + +// include current dbc-driver compilation config +#include "candb-config.h" + +#ifdef CANDB_USE_DIAG_MONITORS +// This file must define: +// base monitor struct +#include "canmonitorutil.h" + +#endif // CANDB_USE_DIAG_MONITORS + + +// DLC maximum value which is used as the limit for frame's data buffer size. +// Client can set its own value (not sure why) in driver-config +// or can test it on some limit specified by application +// e.g.: static_assert(TESTDB_MAX_DLC_VALUE <= APPLICATION_FRAME_DATA_SIZE, "Max DLC value in the driver is too big") +#ifndef CANDB_MAX_DLC_VALUE +// The value which was found out by generator (real max value) +#define CANDB_MAX_DLC_VALUE 8U +#endif + +// The limit is used for setting frame's data bytes +#define CANDB_VALIDATE_DLC(msgDlc) (((msgDlc) <= (CANDB_MAX_DLC_VALUE)) ? (msgDlc) : (CANDB_MAX_DLC_VALUE)) + +// Initial byte value to be filles in data bytes of the frame before pack signals +// User can define its own custom value in driver-config file +#ifndef CANDB_INITIAL_BYTE_VALUE +#define CANDB_INITIAL_BYTE_VALUE 0U +#endif + + +// def @ESC_04 CAN Message (256 0x100) +#define ESC_04_IDE (0U) +#define ESC_04_DLC (8U) +#define ESC_04_CANID (0x100U) +#define ESC_04_CYC (20U) +// signal: @ESC_VehicleSpeed_ro +#define CANDB_ESC_VehicleSpeed_ro_CovFactor (0.01) +#define CANDB_ESC_VehicleSpeed_ro_toS(x) ( (uint16_t) (((x) - (0.0)) / (0.01)) ) +#define CANDB_ESC_VehicleSpeed_ro_fromS(x) ( (((x) * (0.01)) + (0.0)) ) + +// Value tables for @ESC_VehicleSpeed_ValueError signal + +#ifndef ESC_VehicleSpeed_ValueError_ESC_04_Invalid_value_in_vehicle_speed_signal +#define ESC_VehicleSpeed_ValueError_ESC_04_Invalid_value_in_vehicle_speed_signal (1) +#endif + +#ifndef ESC_VehicleSpeed_ValueError_ESC_04_Valid_value_in_vehicle_speed_signal +#define ESC_VehicleSpeed_ValueError_ESC_04_Valid_value_in_vehicle_speed_signal (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Calculated vehicle speed value + uint16_t ESC_VehicleSpeed_ro; // Bits=16 Factor= 0.01 Unit:'km/h' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t ESC_VehicleSpeed_phys; +#endif // CANDB_USE_SIGFLOAT + + // Indicates if the signal vehicleSpeed has valid value + // 1 : "Invalid value in vehicle speed signal" + // 0 : "Valid value in vehicle speed signal" + uint8_t ESC_VehicleSpeed_ValueError : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t ESC_04_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t ESC_04_CS; // Bits= 8 + +#else + + // Calculated vehicle speed value + uint16_t ESC_VehicleSpeed_ro; // Bits=16 Factor= 0.01 Unit:'km/h' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t ESC_VehicleSpeed_phys; +#endif // CANDB_USE_SIGFLOAT + + // Indicates if the signal vehicleSpeed has valid value + // 1 : "Invalid value in vehicle speed signal" + // 0 : "Valid value in vehicle speed signal" + uint8_t ESC_VehicleSpeed_ValueError; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t ESC_04_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t ESC_04_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} ESC_04_t; + +// def @EMS_Veh CAN Message (336 0x150) +#define EMS_Veh_IDE (0U) +#define EMS_Veh_DLC (8U) +#define EMS_Veh_CANID (0x150U) +#define EMS_Veh_CYC (100U) +// signal: @EMS_nICEngineSpeed3_Val_ro +#define CANDB_EMS_nICEngineSpeed3_Val_ro_CovFactor (0.25) +#define CANDB_EMS_nICEngineSpeed3_Val_ro_toS(x) ( (uint16_t) (((x) - (0.0)) / (0.25)) ) +#define CANDB_EMS_nICEngineSpeed3_Val_ro_fromS(x) ( (((x) * (0.25)) + (0.0)) ) +// signal: @EMS_EngCoolTemp_Val_ro +#define CANDB_EMS_EngCoolTemp_Val_ro_CovFactor (1) +#define CANDB_EMS_EngCoolTemp_Val_ro_toS(x) ( (uint8_t) ((x) - (-40)) ) +#define CANDB_EMS_EngCoolTemp_Val_ro_fromS(x) ( ((x) + (-40)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Internal combustion engine: Engine speed + uint16_t EMS_nICEngineSpeed3_Val_ro; // Bits=16 Factor= 0.25 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t EMS_nICEngineSpeed3_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Engine coolant temperature + uint8_t EMS_EngCoolTemp_Val_ro; // Bits= 8 Offset= -40 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int16_t EMS_EngCoolTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + +#else + + // Internal combustion engine: Engine speed + uint16_t EMS_nICEngineSpeed3_Val_ro; // Bits=16 Factor= 0.25 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t EMS_nICEngineSpeed3_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Engine coolant temperature + uint8_t EMS_EngCoolTemp_Val_ro; // Bits= 8 Offset= -40 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int16_t EMS_EngCoolTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} EMS_Veh_t; + +// def @BCM_Powertrain CAN Message (338 0x152) +#define BCM_Powertrain_IDE (0U) +#define BCM_Powertrain_DLC (6U) +#define BCM_Powertrain_CANID (0x152U) +#define BCM_Powertrain_CYC (10U) +// signal: @BCM_AmbTempRaw_ro +#define CANDB_BCM_AmbTempRaw_ro_CovFactor (0.01) +#define CANDB_BCM_AmbTempRaw_ro_toS(x) ( (uint16_t) (((x) - (-40.0)) / (0.01)) ) +#define CANDB_BCM_AmbTempRaw_ro_fromS(x) ( (((x) * (0.01)) + (-40.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Averaged ambient temperature RAW value + uint16_t BCM_AmbTempRaw_ro; // Bits=16 Offset= -40.0 Factor= 0.01 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BCM_AmbTempRaw_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t BCM_Powertrain_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t BCM_Powertrain_CS; // Bits= 8 + +#else + + // Averaged ambient temperature RAW value + uint16_t BCM_AmbTempRaw_ro; // Bits=16 Offset= -40.0 Factor= 0.01 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BCM_AmbTempRaw_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t BCM_Powertrain_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t BCM_Powertrain_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} BCM_Powertrain_t; + +// def @EMS_Veh_02 CAN Message (339 0x153) +#define EMS_Veh_02_IDE (0U) +#define EMS_Veh_02_DLC (3U) +#define EMS_Veh_02_CANID (0x153U) +#define EMS_Veh_02_CYC (20U) +// signal: @BMS_ActualTemp_Val_ro +#define CANDB_BMS_ActualTemp_Val_ro_CovFactor (0.5) +#define CANDB_BMS_ActualTemp_Val_ro_toS(x) ( (uint8_t) (((x) - (-40.0)) / (0.5)) ) +#define CANDB_BMS_ActualTemp_Val_ro_fromS(x) ( (((x) * (0.5)) + (-40.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Actual battery temperature + uint8_t BMS_ActualTemp_Val_ro; // Bits= 8 Offset= -40.0 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BMS_ActualTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t EMS_Veh_02_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t EMS_Veh_02_CS; // Bits= 8 + +#else + + // Actual battery temperature + uint8_t BMS_ActualTemp_Val_ro; // Bits= 8 Offset= -40.0 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BMS_ActualTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t EMS_Veh_02_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t EMS_Veh_02_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} EMS_Veh_02_t; + +// def @BCM_EEM CAN Message (343 0x157) +#define BCM_EEM_IDE (0U) +#define BCM_EEM_DLC (8U) +#define BCM_EEM_CANID (0x157U) +#define BCM_EEM_CYC (100U) + +// Value tables for @BCM_EEM_StPowMgn signal + +#ifndef BCM_EEM_StPowMgn_BCM_EEM_LVbattery_no_power_source +#define BCM_EEM_StPowMgn_BCM_EEM_LVbattery_no_power_source (5) +#endif + +#ifndef BCM_EEM_StPowMgn_BCM_EEM_LVbattery_discharging_fast +#define BCM_EEM_StPowMgn_BCM_EEM_LVbattery_discharging_fast (4) +#endif + +#ifndef BCM_EEM_StPowMgn_BCM_EEM_LVbattery_discharging_slow +#define BCM_EEM_StPowMgn_BCM_EEM_LVbattery_discharging_slow (3) +#endif + +#ifndef BCM_EEM_StPowMgn_BCM_EEM_LVbattery_not_charging +#define BCM_EEM_StPowMgn_BCM_EEM_LVbattery_not_charging (2) +#endif + +#ifndef BCM_EEM_StPowMgn_BCM_EEM_LVbattery_charging_slow +#define BCM_EEM_StPowMgn_BCM_EEM_LVbattery_charging_slow (1) +#endif + +#ifndef BCM_EEM_StPowMgn_BCM_EEM_LVbattery_charged +#define BCM_EEM_StPowMgn_BCM_EEM_LVbattery_charged (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // PM state for consumer deactivation + // 5 : "LV-battery no power source" + // 4 : "LV-battery discharging fast" + // 3 : "LV-battery discharging slow" + // 2 : "LV-battery not charging" + // 1 : "LV-battery charging slow" + // 0 : "LV-battery charged" + uint8_t BCM_EEM_StPowMgn : 3; // Bits= 3 + + // Rolling Counter [0 - 15] + uint8_t BCM_EEM_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t BCM_EEM_CS; // Bits= 8 + +#else + + // PM state for consumer deactivation + // 5 : "LV-battery no power source" + // 4 : "LV-battery discharging fast" + // 3 : "LV-battery discharging slow" + // 2 : "LV-battery not charging" + // 1 : "LV-battery charging slow" + // 0 : "LV-battery charged" + uint8_t BCM_EEM_StPowMgn; // Bits= 3 + + // Rolling Counter [0 - 15] + uint8_t BCM_EEM_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t BCM_EEM_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} BCM_EEM_t; + +// def @DMFR_Msg1 CAN Message (579 0x243) +#define DMFR_Msg1_IDE (0U) +#define DMFR_Msg1_DLC (4U) +#define DMFR_Msg1_CANID (0x243U) +#define DMFR_Msg1_CYC (50U) + +// Value tables for @DMFR_MirrorHeating_Status signal + +#ifndef DMFR_MirrorHeating_Status_DMFR_Msg1_Fault +#define DMFR_MirrorHeating_Status_DMFR_Msg1_Fault (3) +#endif + +#ifndef DMFR_MirrorHeating_Status_DMFR_Msg1_Heating_off +#define DMFR_MirrorHeating_Status_DMFR_Msg1_Heating_off (2) +#endif + +#ifndef DMFR_MirrorHeating_Status_DMFR_Msg1_Heating_on +#define DMFR_MirrorHeating_Status_DMFR_Msg1_Heating_on (1) +#endif + +#ifndef DMFR_MirrorHeating_Status_DMFR_Msg1_Unknown +#define DMFR_MirrorHeating_Status_DMFR_Msg1_Unknown (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // FR mirror heating status + // 3 : "Fault" + // 2 : "Heating off" + // 1 : "Heating on" + // 0 : "Unknown" + uint8_t DMFR_MirrorHeating_Status : 2; // Bits= 2 + +#else + + // FR mirror heating status + // 3 : "Fault" + // 2 : "Heating off" + // 1 : "Heating on" + // 0 : "Unknown" + uint8_t DMFR_MirrorHeating_Status; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} DMFR_Msg1_t; + +// def @DMFL_Msg1 CAN Message (580 0x244) +#define DMFL_Msg1_IDE (0U) +#define DMFL_Msg1_DLC (8U) +#define DMFL_Msg1_CANID (0x244U) +#define DMFL_Msg1_CYC (50U) + +// Value tables for @DMFL_MirrorHeating_Status signal + +#ifndef DMFL_MirrorHeating_Status_DMFL_Msg1_Fault +#define DMFL_MirrorHeating_Status_DMFL_Msg1_Fault (3) +#endif + +#ifndef DMFL_MirrorHeating_Status_DMFL_Msg1_Heating_off +#define DMFL_MirrorHeating_Status_DMFL_Msg1_Heating_off (2) +#endif + +#ifndef DMFL_MirrorHeating_Status_DMFL_Msg1_Heating_on +#define DMFL_MirrorHeating_Status_DMFL_Msg1_Heating_on (1) +#endif + +#ifndef DMFL_MirrorHeating_Status_DMFL_Msg1_Unknown +#define DMFL_MirrorHeating_Status_DMFL_Msg1_Unknown (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // FL mirror heating status + // 3 : "Fault" + // 2 : "Heating off" + // 1 : "Heating on" + // 0 : "Unknown" + uint8_t DMFL_MirrorHeating_Status : 2; // Bits= 2 + +#else + + // FL mirror heating status + // 3 : "Fault" + // 2 : "Heating off" + // 1 : "Heating on" + // 0 : "Unknown" + uint8_t DMFL_MirrorHeating_Status; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} DMFL_Msg1_t; + +// The DLC and Layout must be as in UMP_1 because PTG is receive this message +// def @TM_Stat CAN Message (583 0x247) +#define TM_Stat_IDE (0U) +#define TM_Stat_DLC (4U) +#define TM_Stat_CANID (0x247U) +#define TM_Stat_CYC (50U) + +// Value tables for @TM_RearWindowHeating_Stat signal + +#ifndef TM_RearWindowHeating_Stat_TM_Stat_Heating_ON +#define TM_RearWindowHeating_Stat_TM_Stat_Heating_ON (1) +#endif + +#ifndef TM_RearWindowHeating_Stat_TM_Stat_Heating_OFF +#define TM_RearWindowHeating_Stat_TM_Stat_Heating_OFF (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // State of rear window heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t TM_RearWindowHeating_Stat : 1; // Bits= 1 + +#else + + // State of rear window heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t TM_RearWindowHeating_Stat; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} TM_Stat_t; + +// def @TM_CP CAN Message (588 0x24c) +#define TM_CP_IDE (0U) +#define TM_CP_DLC (8U) +#define TM_CP_CANID (0x24cU) +#define TM_CP_CYC (100U) + +// Value tables for @CCPF_AutoButtonR_Stat signal + +#ifndef CCPF_AutoButtonR_Stat_TM_CP_Button_hold_pressed +#define CCPF_AutoButtonR_Stat_TM_CP_Button_hold_pressed (2) +#endif + +#ifndef CCPF_AutoButtonR_Stat_TM_CP_Button_Pressed +#define CCPF_AutoButtonR_Stat_TM_CP_Button_Pressed (1) +#endif + +#ifndef CCPF_AutoButtonR_Stat_TM_CP_Button_Released +#define CCPF_AutoButtonR_Stat_TM_CP_Button_Released (0) +#endif + + +// Value tables for @CCPR_AutoButtonL_Stat signal + +#ifndef CCPR_AutoButtonL_Stat_TM_CP_Button_hold_pressed +#define CCPR_AutoButtonL_Stat_TM_CP_Button_hold_pressed (2) +#endif + +#ifndef CCPR_AutoButtonL_Stat_TM_CP_Button_pressed +#define CCPR_AutoButtonL_Stat_TM_CP_Button_pressed (1) +#endif + +#ifndef CCPR_AutoButtonL_Stat_TM_CP_Button_released +#define CCPR_AutoButtonL_Stat_TM_CP_Button_released (0) +#endif + + +// Value tables for @CCPR_AutoButtonR_Stat signal + +#ifndef CCPR_AutoButtonR_Stat_TM_CP_Button_hold_pressed +#define CCPR_AutoButtonR_Stat_TM_CP_Button_hold_pressed (2) +#endif + +#ifndef CCPR_AutoButtonR_Stat_TM_CP_Button_pressed +#define CCPR_AutoButtonR_Stat_TM_CP_Button_pressed (1) +#endif + +#ifndef CCPR_AutoButtonR_Stat_TM_CP_Button_released +#define CCPR_AutoButtonR_Stat_TM_CP_Button_released (0) +#endif + + +// Value tables for @CCPF_DefButton_Stat signal + +#ifndef CCPF_DefButton_Stat_TM_CP_Button_hold_pressed +#define CCPF_DefButton_Stat_TM_CP_Button_hold_pressed (2) +#endif + +#ifndef CCPF_DefButton_Stat_TM_CP_Button_pressed +#define CCPF_DefButton_Stat_TM_CP_Button_pressed (1) +#endif + +#ifndef CCPF_DefButton_Stat_TM_CP_Button_released +#define CCPF_DefButton_Stat_TM_CP_Button_released (0) +#endif + + +// Value tables for @CCPF_TempToggleR_Stat signal + +#ifndef CCPF_TempToggleR_Stat_TM_CP_Toggle_hold_lowered_ +#define CCPF_TempToggleR_Stat_TM_CP_Toggle_hold_lowered_ (4) +#endif + +#ifndef CCPF_TempToggleR_Stat_TM_CP_Toggle_hold_raised_ +#define CCPF_TempToggleR_Stat_TM_CP_Toggle_hold_raised_ (3) +#endif + +#ifndef CCPF_TempToggleR_Stat_TM_CP_Toggle_lowered +#define CCPF_TempToggleR_Stat_TM_CP_Toggle_lowered (2) +#endif + +#ifndef CCPF_TempToggleR_Stat_TM_CP_Toggle_raised +#define CCPF_TempToggleR_Stat_TM_CP_Toggle_raised (1) +#endif + +#ifndef CCPF_TempToggleR_Stat_TM_CP_Toggle_released +#define CCPF_TempToggleR_Stat_TM_CP_Toggle_released (0) +#endif + + +// Value tables for @CCPF_TempToggleL_Stat signal + +#ifndef CCPF_TempToggleL_Stat_TM_CP_Toggle_hold_lowered_ +#define CCPF_TempToggleL_Stat_TM_CP_Toggle_hold_lowered_ (4) +#endif + +#ifndef CCPF_TempToggleL_Stat_TM_CP_Toggle_hold_raised_ +#define CCPF_TempToggleL_Stat_TM_CP_Toggle_hold_raised_ (3) +#endif + +#ifndef CCPF_TempToggleL_Stat_TM_CP_Toggle_lowered +#define CCPF_TempToggleL_Stat_TM_CP_Toggle_lowered (2) +#endif + +#ifndef CCPF_TempToggleL_Stat_TM_CP_Toggle_raised +#define CCPF_TempToggleL_Stat_TM_CP_Toggle_raised (1) +#endif + +#ifndef CCPF_TempToggleL_Stat_TM_CP_Toggle_released +#define CCPF_TempToggleL_Stat_TM_CP_Toggle_released (0) +#endif + + +// Value tables for @CCPF_AutoButtonL_Stat signal + +#ifndef CCPF_AutoButtonL_Stat_TM_CP_Button_hold_pressed +#define CCPF_AutoButtonL_Stat_TM_CP_Button_hold_pressed (2) +#endif + +#ifndef CCPF_AutoButtonL_Stat_TM_CP_Button_pressed +#define CCPF_AutoButtonL_Stat_TM_CP_Button_pressed (1) +#endif + +#ifndef CCPF_AutoButtonL_Stat_TM_CP_Button_released +#define CCPF_AutoButtonL_Stat_TM_CP_Button_released (0) +#endif + + +// Value tables for @CCPR_TempToggleR_Stat signal + +#ifndef CCPR_TempToggleR_Stat_TM_CP_Toggle_hold_lowered_ +#define CCPR_TempToggleR_Stat_TM_CP_Toggle_hold_lowered_ (4) +#endif + +#ifndef CCPR_TempToggleR_Stat_TM_CP_Toggle_hold_raised_ +#define CCPR_TempToggleR_Stat_TM_CP_Toggle_hold_raised_ (3) +#endif + +#ifndef CCPR_TempToggleR_Stat_TM_CP_Toggle_lowered +#define CCPR_TempToggleR_Stat_TM_CP_Toggle_lowered (2) +#endif + +#ifndef CCPR_TempToggleR_Stat_TM_CP_Toggle_raised +#define CCPR_TempToggleR_Stat_TM_CP_Toggle_raised (1) +#endif + +#ifndef CCPR_TempToggleR_Stat_TM_CP_Toggle_released +#define CCPR_TempToggleR_Stat_TM_CP_Toggle_released (0) +#endif + + +// Value tables for @CCPR_TempToggleL_Stat signal + +#ifndef CCPR_TempToggleL_Stat_TM_CP_Toggle_hold_lowered_ +#define CCPR_TempToggleL_Stat_TM_CP_Toggle_hold_lowered_ (4) +#endif + +#ifndef CCPR_TempToggleL_Stat_TM_CP_Toggle_hold_raised_ +#define CCPR_TempToggleL_Stat_TM_CP_Toggle_hold_raised_ (3) +#endif + +#ifndef CCPR_TempToggleL_Stat_TM_CP_Toggle_lowered +#define CCPR_TempToggleL_Stat_TM_CP_Toggle_lowered (2) +#endif + +#ifndef CCPR_TempToggleL_Stat_TM_CP_Toggle_raised +#define CCPR_TempToggleL_Stat_TM_CP_Toggle_raised (1) +#endif + +#ifndef CCPR_TempToggleL_Stat_TM_CP_Toggle_released +#define CCPR_TempToggleL_Stat_TM_CP_Toggle_released (0) +#endif + + +// Value tables for @CCPF_RecButton_Stat signal + +#ifndef CCPF_RecButton_Stat_TM_CP_Button_hold_pressed +#define CCPF_RecButton_Stat_TM_CP_Button_hold_pressed (2) +#endif + +#ifndef CCPF_RecButton_Stat_TM_CP_Button_pressed +#define CCPF_RecButton_Stat_TM_CP_Button_pressed (1) +#endif + +#ifndef CCPF_RecButton_Stat_TM_CP_Button_released +#define CCPF_RecButton_Stat_TM_CP_Button_released (0) +#endif + + +// Value tables for @CCPF_AcMaxButton_Stat signal + +#ifndef CCPF_AcMaxButton_Stat_TM_CP_Button_hold_pressed_ +#define CCPF_AcMaxButton_Stat_TM_CP_Button_hold_pressed_ (2) +#endif + +#ifndef CCPF_AcMaxButton_Stat_TM_CP_Button_pressed +#define CCPF_AcMaxButton_Stat_TM_CP_Button_pressed (1) +#endif + +#ifndef CCPF_AcMaxButton_Stat_TM_CP_Button_released +#define CCPF_AcMaxButton_Stat_TM_CP_Button_released (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Front climate panel right AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button Pressed" + // 0 : "Button Released" + uint8_t CCPF_AutoButtonR_Stat : 2; // Bits= 2 + + // Rear climate panel left AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPR_AutoButtonL_Stat : 2; // Bits= 2 + + // Rear climate panel right AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPR_AutoButtonR_Stat : 2; // Bits= 2 + + // Front climate panel DEFROST button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_DefButton_Stat : 2; // Bits= 2 + + // Front climate panel right TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPF_TempToggleR_Stat : 3; // Bits= 3 + + // Front climate panel left TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPF_TempToggleL_Stat : 3; // Bits= 3 + + // Front climate panel left AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_AutoButtonL_Stat : 2; // Bits= 2 + + // Rear climate panel right TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPR_TempToggleR_Stat : 3; // Bits= 3 + + // Rear climate panel left TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPR_TempToggleL_Stat : 3; // Bits= 3 + + // Front climate panel RECIRCULATION button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_RecButton_Stat : 2; // Bits= 2 + + // Front climate panel AC MAX button status + // 2 : "Button hold pressed " + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_AcMaxButton_Stat : 2; // Bits= 2 + +#else + + // Front climate panel right AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button Pressed" + // 0 : "Button Released" + uint8_t CCPF_AutoButtonR_Stat; // Bits= 2 + + // Rear climate panel left AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPR_AutoButtonL_Stat; // Bits= 2 + + // Rear climate panel right AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPR_AutoButtonR_Stat; // Bits= 2 + + // Front climate panel DEFROST button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_DefButton_Stat; // Bits= 2 + + // Front climate panel right TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPF_TempToggleR_Stat; // Bits= 3 + + // Front climate panel left TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPF_TempToggleL_Stat; // Bits= 3 + + // Front climate panel left AUTO button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_AutoButtonL_Stat; // Bits= 2 + + // Rear climate panel right TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPR_TempToggleR_Stat; // Bits= 3 + + // Rear climate panel left TEMPERATURE toggle status + // 4 : "Toggle hold lowered " + // 3 : "Toggle hold raised " + // 2 : "Toggle lowered" + // 1 : "Toggle raised" + // 0 : "Toggle released" + uint8_t CCPR_TempToggleL_Stat; // Bits= 3 + + // Front climate panel RECIRCULATION button status + // 2 : "Button hold pressed" + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_RecButton_Stat; // Bits= 2 + + // Front climate panel AC MAX button status + // 2 : "Button hold pressed " + // 1 : "Button pressed" + // 0 : "Button released" + uint8_t CCPF_AcMaxButton_Stat; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} TM_CP_t; + +// def @HVC_CCU_Status_Msg CAN Message (602 0x25a) +#define HVC_CCU_Status_Msg_IDE (0U) +#define HVC_CCU_Status_Msg_DLC (3U) +#define HVC_CCU_Status_Msg_CANID (0x25aU) +#define HVC_CCU_Status_Msg_CYC (200U) +// signal: @HVC_eCompActSpeed_Val_ro +#define CANDB_HVC_eCompActSpeed_Val_ro_CovFactor (50) +#define CANDB_HVC_eCompActSpeed_Val_ro_toS(x) ( (uint8_t) ((x) / (50)) ) +#define CANDB_HVC_eCompActSpeed_Val_ro_fromS(x) ( ((x) * (50)) ) + +// Value tables for @HVC_eComp_Stat signal + +#ifndef HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_FailueSNA +#define HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_FailueSNA (4) +#endif + +#ifndef HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_init +#define HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_init (3) +#endif + +#ifndef HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_off +#define HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_off (2) +#endif + +#ifndef HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_on +#define HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_on (1) +#endif + +#ifndef HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_standby +#define HVC_eComp_Stat_HVC_CCU_Status_Msg_HVC_standby (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Compressor speed: + // 0xFF = Fault + uint8_t HVC_eCompActSpeed_Val_ro; // Bits= 8 Factor= 50 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_eCompActSpeed_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Compressor status: + // 0x0 = HVC standby + // 0x1 = Compressor ON / LIMIT/ Pre-heating + // 0x2 = Compressor OFF + // 0x3 = Init + // 0x4 = Failure/SNA + // 4 : "HVC Failue/SNA" + // 3 : "HVC init" + // 2 : "HVC off" + // 1 : "HVC on" + // 0 : "HVC standby" + uint8_t HVC_eComp_Stat : 3; // Bits= 3 + + // Rolling Counter [0 - 15] + uint8_t HVC_CCU_Status_RC : 4; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t HVC_CCU_Status_CS; // Bits= 8 + +#else + + // Compressor speed: + // 0xFF = Fault + uint8_t HVC_eCompActSpeed_Val_ro; // Bits= 8 Factor= 50 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_eCompActSpeed_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Compressor status: + // 0x0 = HVC standby + // 0x1 = Compressor ON / LIMIT/ Pre-heating + // 0x2 = Compressor OFF + // 0x3 = Init + // 0x4 = Failure/SNA + // 4 : "HVC Failue/SNA" + // 3 : "HVC init" + // 2 : "HVC off" + // 1 : "HVC on" + // 0 : "HVC standby" + uint8_t HVC_eComp_Stat; // Bits= 3 + + // Rolling Counter [0 - 15] + uint8_t HVC_CCU_Status_RC; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t HVC_CCU_Status_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} HVC_CCU_Status_Msg_t; + +// def @BCM_VEH_STATE CAN Message (640 0x280) +#define BCM_VEH_STATE_IDE (0U) +#define BCM_VEH_STATE_DLC (8U) +#define BCM_VEH_STATE_CANID (0x280U) +#define BCM_VEH_STATE_CYC (50U) + +// Value tables for @BCM_T15_Stat signal + +#ifndef BCM_T15_Stat_BCM_VEH_STATE_Terminal_active +#define BCM_T15_Stat_BCM_VEH_STATE_Terminal_active (1) +#endif + +#ifndef BCM_T15_Stat_BCM_VEH_STATE_Terminal_inactive +#define BCM_T15_Stat_BCM_VEH_STATE_Terminal_inactive (0) +#endif + + +// Value tables for @BCM_T30d_Stat signal + +#ifndef BCM_T30d_Stat_BCM_VEH_STATE_Terminal_active +#define BCM_T30d_Stat_BCM_VEH_STATE_Terminal_active (1) +#endif + +#ifndef BCM_T30d_Stat_BCM_VEH_STATE_Terminal_inactive +#define BCM_T30d_Stat_BCM_VEH_STATE_Terminal_inactive (0) +#endif + + +// Value tables for @BCM_T30i_Stat signal + +#ifndef BCM_T30i_Stat_BCM_VEH_STATE_Terminal_active +#define BCM_T30i_Stat_BCM_VEH_STATE_Terminal_active (1) +#endif + +#ifndef BCM_T30i_Stat_BCM_VEH_STATE_Terminal_inactive +#define BCM_T30i_Stat_BCM_VEH_STATE_Terminal_inactive (0) +#endif + + +// Value tables for @StealthModeEn signal + +#ifndef StealthModeEn_BCM_VEH_STATE_Stealth_Mode_enable +#define StealthModeEn_BCM_VEH_STATE_Stealth_Mode_enable (1) +#endif + +#ifndef StealthModeEn_BCM_VEH_STATE_Stealth_Mode_disable +#define StealthModeEn_BCM_VEH_STATE_Stealth_Mode_disable (0) +#endif + + +// Value tables for @BCM_CCTerm_Stat signal + +#ifndef BCM_CCTerm_Stat_BCM_VEH_STATE_Terminal_on +#define BCM_CCTerm_Stat_BCM_VEH_STATE_Terminal_on (1) +#endif + +#ifndef BCM_CCTerm_Stat_BCM_VEH_STATE_Terminal_off +#define BCM_CCTerm_Stat_BCM_VEH_STATE_Terminal_off (0) +#endif + + +// Value tables for @BCM_T30i_DisableWarning signal + +#ifndef BCM_T30i_DisableWarning_BCM_VEH_STATE_Warning_Active +#define BCM_T30i_DisableWarning_BCM_VEH_STATE_Warning_Active (1) +#endif + +#ifndef BCM_T30i_DisableWarning_BCM_VEH_STATE_No_Warning +#define BCM_T30i_DisableWarning_BCM_VEH_STATE_No_Warning (0) +#endif + + +// Value tables for @BCM_T30d_DisableWarning signal + +#ifndef BCM_T30d_DisableWarning_BCM_VEH_STATE_Warning_Active +#define BCM_T30d_DisableWarning_BCM_VEH_STATE_Warning_Active (1) +#endif + +#ifndef BCM_T30d_DisableWarning_BCM_VEH_STATE_No_Warning +#define BCM_T30d_DisableWarning_BCM_VEH_STATE_No_Warning (0) +#endif + +// signal: @BCM_IndFadingTime_Req_ro +#define CANDB_BCM_IndFadingTime_Req_ro_CovFactor (0.1) +#define CANDB_BCM_IndFadingTime_Req_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_BCM_IndFadingTime_Req_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) + +// Value tables for @BCM_CCTermDisableWarning signal + +#ifndef BCM_CCTermDisableWarning_BCM_VEH_STATE_Warning_Active +#define BCM_CCTermDisableWarning_BCM_VEH_STATE_Warning_Active (1) +#endif + +#ifndef BCM_CCTermDisableWarning_BCM_VEH_STATE_No_Warning +#define BCM_CCTermDisableWarning_BCM_VEH_STATE_No_Warning (0) +#endif + + +// Value tables for @BCM_VehicleMode_Stat signal + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_RemoteStart_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_RemoteStart_Mode (6) +#endif + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_Service_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_Service_Mode (5) +#endif + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_Drive_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_Drive_Mode (4) +#endif + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_Ignition_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_Ignition_Mode (3) +#endif + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_StandBy_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_StandBy_Mode (2) +#endif + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_PreHeating_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_PreHeating_Mode (1) +#endif + +#ifndef BCM_VehicleMode_Stat_BCM_VEH_STATE_Sleep_Mode +#define BCM_VehicleMode_Stat_BCM_VEH_STATE_Sleep_Mode (0) +#endif + + +// Value tables for @BCM_SwIndIntens_Stat signal + +#ifndef BCM_SwIndIntens_Stat_BCM_VEH_STATE_Low_level +#define BCM_SwIndIntens_Stat_BCM_VEH_STATE_Low_level (1) +#endif + +#ifndef BCM_SwIndIntens_Stat_BCM_VEH_STATE_Hight_level +#define BCM_SwIndIntens_Stat_BCM_VEH_STATE_Hight_level (0) +#endif + + +// Value tables for @BCM_Vehicle_DrvMode signal + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved (6) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved (5) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Offroad +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Offroad (4) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved (3) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Range +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Range (2) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Dynamic +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Dynamic (1) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Comfort +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Comfort (0) +#endif + +#ifndef BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved +#define BCM_Vehicle_DrvMode_BCM_VEH_STATE_Reserved (7) +#endif + +// signal: @BCM_LVBatteryVoltage_ro +#define CANDB_BCM_LVBatteryVoltage_ro_CovFactor (0.075) +#define CANDB_BCM_LVBatteryVoltage_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.075)) ) +#define CANDB_BCM_LVBatteryVoltage_ro_fromS(x) ( (((x) * (0.075)) + (0.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Terminal T15 state + // 1 : "Terminal active" + // 0 : "Terminal inactive" + uint8_t BCM_T15_Stat : 1; // Bits= 1 + + // State of T30d terminal + // 1 : "Terminal active" + // 0 : "Terminal inactive" + uint8_t BCM_T30d_Stat : 1; // Bits= 1 + + // State of T30i terminal + // 1 : "Terminal active" + // 0 : "Terminal inactive" + uint8_t BCM_T30i_Stat : 1; // Bits= 1 + + // Indicates that the Stealth mode is required: + // $0 = Stealth mode disable + // $1 = Stealth mode enable + // 1 : "Stealth Mode enable" + // 0 : "Stealth Mode disable" + uint8_t StealthModeEn : 1; // Bits= 1 + + // Terminal to power climate system + // 1 : "Terminal on" + // 0 : "Terminal off" + uint8_t BCM_CCTerm_Stat : 1; // Bits= 1 + + // $0 = No Warning + // $1 = Warning Active + // 1 : "Warning Active" + // 0 : "No Warning" + uint8_t BCM_T30i_DisableWarning : 1; // Bits= 1 + + // T30d terminal warning status signal + // 3 sec before T30d off + // 1 : "Warning Active" + // 0 : "No Warning" + uint8_t BCM_T30d_DisableWarning : 1; // Bits= 1 + + // The timer for smoothly change switches intensity, when day detected. + uint8_t BCM_IndFadingTime_Req_ro : 5; // Bits= 5 Factor= 0.1 Unit:'s' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BCM_IndFadingTime_Req_phys; +#endif // CANDB_USE_SIGFLOAT + + // Indicates if CC terminal will be disconnected soon + // 1 : "Warning Active" + // 0 : "No Warning" + uint8_t BCM_CCTermDisableWarning : 1; // Bits= 1 + + // Current vehicle state according Terminal concept + // 6 : "RemoteStart_Mode" + // 5 : "Service_Mode" + // 4 : "Drive_Mode" + // 3 : "Ignition_Mode" + // 2 : "StandBy_Mode" + // 1 : "PreHeating_Mode" + // 0 : "Sleep_Mode" + uint8_t BCM_VehicleMode_Stat : 4; // Bits= 4 + + // Switches indicator intensity level + // 1 : "Low level" + // 0 : "Hight level" + uint8_t BCM_SwIndIntens_Stat : 1; // Bits= 1 + + // Vehicle drive mode, set by user + // 6 : "Reserved" + // 5 : "Reserved" + // 4 : "Offroad" + // 3 : "Reserved" + // 2 : "Range" + // 1 : "Dynamic" + // 0 : "Comfort" + // 7 : "Reserved" + uint8_t BCM_Vehicle_DrvMode : 3; // Bits= 3 + + // Indicates the battery voltage. Measurement from the Battery sensor + uint8_t BCM_LVBatteryVoltage_ro; // Bits= 8 Factor= 0.075 Unit:'V' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BCM_LVBatteryVoltage_phys; +#endif // CANDB_USE_SIGFLOAT + +#else + + // Terminal T15 state + // 1 : "Terminal active" + // 0 : "Terminal inactive" + uint8_t BCM_T15_Stat; // Bits= 1 + + // State of T30d terminal + // 1 : "Terminal active" + // 0 : "Terminal inactive" + uint8_t BCM_T30d_Stat; // Bits= 1 + + // State of T30i terminal + // 1 : "Terminal active" + // 0 : "Terminal inactive" + uint8_t BCM_T30i_Stat; // Bits= 1 + + // Indicates that the Stealth mode is required: + // $0 = Stealth mode disable + // $1 = Stealth mode enable + // 1 : "Stealth Mode enable" + // 0 : "Stealth Mode disable" + uint8_t StealthModeEn; // Bits= 1 + + // Terminal to power climate system + // 1 : "Terminal on" + // 0 : "Terminal off" + uint8_t BCM_CCTerm_Stat; // Bits= 1 + + // $0 = No Warning + // $1 = Warning Active + // 1 : "Warning Active" + // 0 : "No Warning" + uint8_t BCM_T30i_DisableWarning; // Bits= 1 + + // T30d terminal warning status signal + // 3 sec before T30d off + // 1 : "Warning Active" + // 0 : "No Warning" + uint8_t BCM_T30d_DisableWarning; // Bits= 1 + + // The timer for smoothly change switches intensity, when day detected. + uint8_t BCM_IndFadingTime_Req_ro; // Bits= 5 Factor= 0.1 Unit:'s' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BCM_IndFadingTime_Req_phys; +#endif // CANDB_USE_SIGFLOAT + + // Indicates if CC terminal will be disconnected soon + // 1 : "Warning Active" + // 0 : "No Warning" + uint8_t BCM_CCTermDisableWarning; // Bits= 1 + + // Current vehicle state according Terminal concept + // 6 : "RemoteStart_Mode" + // 5 : "Service_Mode" + // 4 : "Drive_Mode" + // 3 : "Ignition_Mode" + // 2 : "StandBy_Mode" + // 1 : "PreHeating_Mode" + // 0 : "Sleep_Mode" + uint8_t BCM_VehicleMode_Stat; // Bits= 4 + + // Switches indicator intensity level + // 1 : "Low level" + // 0 : "Hight level" + uint8_t BCM_SwIndIntens_Stat; // Bits= 1 + + // Vehicle drive mode, set by user + // 6 : "Reserved" + // 5 : "Reserved" + // 4 : "Offroad" + // 3 : "Reserved" + // 2 : "Range" + // 1 : "Dynamic" + // 0 : "Comfort" + // 7 : "Reserved" + uint8_t BCM_Vehicle_DrvMode; // Bits= 3 + + // Indicates the battery voltage. Measurement from the Battery sensor + uint8_t BCM_LVBatteryVoltage_ro; // Bits= 8 Factor= 0.075 Unit:'V' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t BCM_LVBatteryVoltage_phys; +#endif // CANDB_USE_SIGFLOAT + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} BCM_VEH_STATE_t; + +// def @EMS_HVC_Req_Msg CAN Message (664 0x298) +#define EMS_HVC_Req_Msg_IDE (0U) +#define EMS_HVC_Req_Msg_DLC (3U) +#define EMS_HVC_Req_Msg_CANID (0x298U) +#define EMS_HVC_Req_Msg_CYC (200U) + +// Value tables for @EMS_eCompChiller_Req signal + +#ifndef EMS_eCompChiller_Req_EMS_HVC_Req_Msg_Chiller_activation_request +#define EMS_eCompChiller_Req_EMS_HVC_Req_Msg_Chiller_activation_request (1) +#endif + +#ifndef EMS_eCompChiller_Req_EMS_HVC_Req_Msg_No_request +#define EMS_eCompChiller_Req_EMS_HVC_Req_Msg_No_request (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // 1 : "Chiller activation request" + // 0 : "No request" + uint8_t EMS_eCompChiller_Req : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t EMS_HVC_Req_RC : 4; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t EMS_HVC_Req_CS; // Bits= 8 + +#else + + // 1 : "Chiller activation request" + // 0 : "No request" + uint8_t EMS_eCompChiller_Req; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t EMS_HVC_Req_RC; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t EMS_HVC_Req_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} EMS_HVC_Req_Msg_t; + +// def @HVC_Err_Status_Msg CAN Message (773 0x305) +#define HVC_Err_Status_Msg_IDE (0U) +#define HVC_Err_Status_Msg_DLC (8U) +#define HVC_Err_Status_Msg_CANID (0x305U) +#define HVC_Err_Status_Msg_CYC (100U) +// signal: @HVC_CompSpeed_Val_ro +#define CANDB_HVC_CompSpeed_Val_ro_CovFactor (50) +#define CANDB_HVC_CompSpeed_Val_ro_toS(x) ( (uint8_t) ((x) / (50)) ) +#define CANDB_HVC_CompSpeed_Val_ro_fromS(x) ( ((x) * (50)) ) + +// Value tables for @HVC_Comp_Stat signal + +#ifndef HVC_Comp_Stat_HVC_Err_Status_Msg_COMP_FAULT +#define HVC_Comp_Stat_HVC_Err_Status_Msg_COMP_FAULT (3) +#endif + +#ifndef HVC_Comp_Stat_HVC_Err_Status_Msg_POWER_LIMIT +#define HVC_Comp_Stat_HVC_Err_Status_Msg_POWER_LIMIT (2) +#endif + +#ifndef HVC_Comp_Stat_HVC_Err_Status_Msg_COMP_ON +#define HVC_Comp_Stat_HVC_Err_Status_Msg_COMP_ON (1) +#endif + +#ifndef HVC_Comp_Stat_HVC_Err_Status_Msg_COMP_OFF +#define HVC_Comp_Stat_HVC_Err_Status_Msg_COMP_OFF (0) +#endif + +// signal: @HVC_CompInputV_Val_ro +#define CANDB_HVC_CompInputV_Val_ro_CovFactor (2) +#define CANDB_HVC_CompInputV_Val_ro_toS(x) ( (uint8_t) ((x) / (2)) ) +#define CANDB_HVC_CompInputV_Val_ro_fromS(x) ( ((x) * (2)) ) +// signal: @HVC_CompInputC_Val_ro +#define CANDB_HVC_CompInputC_Val_ro_CovFactor (0.5) +#define CANDB_HVC_CompInputC_Val_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.5)) ) +#define CANDB_HVC_CompInputC_Val_ro_fromS(x) ( (((x) * (0.5)) + (0.0)) ) +// signal: @HVC_CompInvTemp_Val_ro +#define CANDB_HVC_CompInvTemp_Val_ro_CovFactor (1) +#define CANDB_HVC_CompInvTemp_Val_ro_toS(x) ( (uint8_t) ((x) - (-50)) ) +#define CANDB_HVC_CompInvTemp_Val_ro_fromS(x) ( ((x) + (-50)) ) +// signal: @HVC_CompPhaseC_Val_ro +#define CANDB_HVC_CompPhaseC_Val_ro_CovFactor (0.5) +#define CANDB_HVC_CompPhaseC_Val_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.5)) ) +#define CANDB_HVC_CompPhaseC_Val_ro_fromS(x) ( (((x) * (0.5)) + (0.0)) ) + +// Value tables for @HVC_CompUV_Stat signal + +#ifndef HVC_CompUV_Stat_HVC_Err_Status_Msg_True +#define HVC_CompUV_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompUV_Stat_HVC_Err_Status_Msg_False +#define HVC_CompUV_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompOV_Stat signal + +#ifndef HVC_CompOV_Stat_HVC_Err_Status_Msg_True +#define HVC_CompOV_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompOV_Stat_HVC_Err_Status_Msg_False +#define HVC_CompOV_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompOvHeat_Stat signal + +#ifndef HVC_CompOvHeat_Stat_HVC_Err_Status_Msg_True +#define HVC_CompOvHeat_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompOvHeat_Stat_HVC_Err_Status_Msg_False +#define HVC_CompOvHeat_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompOvTorque_Stat signal + +#ifndef HVC_CompOvTorque_Stat_HVC_Err_Status_Msg_True +#define HVC_CompOvTorque_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompOvTorque_Stat_HVC_Err_Status_Msg_False +#define HVC_CompOvTorque_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompLowVoltErr_Stat signal + +#ifndef HVC_CompLowVoltErr_Stat_HVC_Err_Status_Msg_True +#define HVC_CompLowVoltErr_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompLowVoltErr_Stat_HVC_Err_Status_Msg_False +#define HVC_CompLowVoltErr_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompComErr_Stat signal + +#ifndef HVC_CompComErr_Stat_HVC_Err_Status_Msg_True +#define HVC_CompComErr_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompComErr_Stat_HVC_Err_Status_Msg_False +#define HVC_CompComErr_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompTempSensErr_Stat signal + +#ifndef HVC_CompTempSensErr_Stat_HVC_Err_Status_Msg_True +#define HVC_CompTempSensErr_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompTempSensErr_Stat_HVC_Err_Status_Msg_False +#define HVC_CompTempSensErr_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompCurrSensErr_Stat signal + +#ifndef HVC_CompCurrSensErr_Stat_HVC_Err_Status_Msg_True +#define HVC_CompCurrSensErr_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompCurrSensErr_Stat_HVC_Err_Status_Msg_False +#define HVC_CompCurrSensErr_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompCurrShortCirc_Stat signal + +#ifndef HVC_CompCurrShortCirc_Stat_HVC_Err_Status_Msg_True +#define HVC_CompCurrShortCirc_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompCurrShortCirc_Stat_HVC_Err_Status_Msg_False +#define HVC_CompCurrShortCirc_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompInPowSupply_Stat signal + +#ifndef HVC_CompInPowSupply_Stat_HVC_Err_Status_Msg_True +#define HVC_CompInPowSupply_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompInPowSupply_Stat_HVC_Err_Status_Msg_False +#define HVC_CompInPowSupply_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompTorqueStallErr_Stat signal + +#ifndef HVC_CompTorqueStallErr_Stat_HVC_Err_Status_Msg_True +#define HVC_CompTorqueStallErr_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompTorqueStallErr_Stat_HVC_Err_Status_Msg_False +#define HVC_CompTorqueStallErr_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +// Value tables for @HVC_CompVoltSensErr_Stat signal + +#ifndef HVC_CompVoltSensErr_Stat_HVC_Err_Status_Msg_True +#define HVC_CompVoltSensErr_Stat_HVC_Err_Status_Msg_True (1) +#endif + +#ifndef HVC_CompVoltSensErr_Stat_HVC_Err_Status_Msg_False +#define HVC_CompVoltSensErr_Stat_HVC_Err_Status_Msg_False (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // High voltage compressor speed in revolutions per minute + // $FF = Signal Not Available + uint8_t HVC_CompSpeed_Val_ro; // Bits= 8 Factor= 50 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_CompSpeed_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor status: + // $0 = Compressor off + // $1 = Compressor on + // $2 = Power limit + // $3 = Compressor failure / Signal Not Available + // 3 : "COMP_FAULT" + // 2 : "POWER_LIMIT" + // 1 : "COMP_ON" + // 0 : "COMP_OFF" + uint8_t HVC_Comp_Stat : 2; // Bits= 2 + + // Reserved space in the HVC_State message: 6 bits + uint8_t HVC_Reserved01 : 6; // Bits= 6 + + // High voltage compressor input voltage: + // 0xFF = Fault/SNA + uint8_t HVC_CompInputV_Val_ro; // Bits= 8 Factor= 2 Unit:'V' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_CompInputV_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor input current: + // 0xFF = Fault/SNA + uint8_t HVC_CompInputC_Val_ro; // Bits= 8 Factor= 0.5 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_CompInputC_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor inverter temperature: + // 0xFF = Fault/SNA + uint8_t HVC_CompInvTemp_Val_ro; // Bits= 8 Offset= -50 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int16_t HVC_CompInvTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor motor phase current: + // 0xFF = Fault/SNA + uint8_t HVC_CompPhaseC_Val_ro; // Bits= 8 Factor= 0.5 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_CompPhaseC_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor under voltage detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompUV_Stat : 1; // Bits= 1 + + // High voltage compressor over voltage detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompOV_Stat : 1; // Bits= 1 + + // High voltage compressor over heat detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompOvHeat_Stat : 1; // Bits= 1 + + // High voltage compressor over torque detected. (overload) + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompOvTorque_Stat : 1; // Bits= 1 + + // High voltage compressor low voltage error detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompLowVoltErr_Stat : 1; // Bits= 1 + + // High voltage compressor communication error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompComErr_Stat : 1; // Bits= 1 + + // Reserved space in the HVC_State message: 2 bits + uint8_t HVC_Reserved02 : 2; // Bits= 2 + + // High voltage compressor temperature sensor error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompTempSensErr_Stat : 1; // Bits= 1 + + // High voltage compressor current sensor error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompCurrSensErr_Stat : 1; // Bits= 1 + + // High voltage compressor current short-circuit detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompCurrShortCirc_Stat : 1; // Bits= 1 + + // High voltage compressor in power supply detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompInPowSupply_Stat : 1; // Bits= 1 + + // High voltage compressor torque stall detected. (overload (stall)) + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompTorqueStallErr_Stat : 1; // Bits= 1 + + // High voltage compressor voltage sensor error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompVoltSensErr_Stat : 1; // Bits= 1 + + // Reserved space in the HVC_State message: 2 bits + uint8_t HVC_Reserved03 : 2; // Bits= 2 + +#else + + // High voltage compressor speed in revolutions per minute + // $FF = Signal Not Available + uint8_t HVC_CompSpeed_Val_ro; // Bits= 8 Factor= 50 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_CompSpeed_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor status: + // $0 = Compressor off + // $1 = Compressor on + // $2 = Power limit + // $3 = Compressor failure / Signal Not Available + // 3 : "COMP_FAULT" + // 2 : "POWER_LIMIT" + // 1 : "COMP_ON" + // 0 : "COMP_OFF" + uint8_t HVC_Comp_Stat; // Bits= 2 + + // Reserved space in the HVC_State message: 6 bits + uint8_t HVC_Reserved01; // Bits= 6 + + // High voltage compressor input voltage: + // 0xFF = Fault/SNA + uint8_t HVC_CompInputV_Val_ro; // Bits= 8 Factor= 2 Unit:'V' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_CompInputV_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor input current: + // 0xFF = Fault/SNA + uint8_t HVC_CompInputC_Val_ro; // Bits= 8 Factor= 0.5 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_CompInputC_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor inverter temperature: + // 0xFF = Fault/SNA + uint8_t HVC_CompInvTemp_Val_ro; // Bits= 8 Offset= -50 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int16_t HVC_CompInvTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor motor phase current: + // 0xFF = Fault/SNA + uint8_t HVC_CompPhaseC_Val_ro; // Bits= 8 Factor= 0.5 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_CompPhaseC_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // High voltage compressor under voltage detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompUV_Stat; // Bits= 1 + + // High voltage compressor over voltage detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompOV_Stat; // Bits= 1 + + // High voltage compressor over heat detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompOvHeat_Stat; // Bits= 1 + + // High voltage compressor over torque detected. (overload) + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompOvTorque_Stat; // Bits= 1 + + // High voltage compressor low voltage error detected + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompLowVoltErr_Stat; // Bits= 1 + + // High voltage compressor communication error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompComErr_Stat; // Bits= 1 + + // Reserved space in the HVC_State message: 2 bits + uint8_t HVC_Reserved02; // Bits= 2 + + // High voltage compressor temperature sensor error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompTempSensErr_Stat; // Bits= 1 + + // High voltage compressor current sensor error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompCurrSensErr_Stat; // Bits= 1 + + // High voltage compressor current short-circuit detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompCurrShortCirc_Stat; // Bits= 1 + + // High voltage compressor in power supply detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompInPowSupply_Stat; // Bits= 1 + + // High voltage compressor torque stall detected. (overload (stall)) + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompTorqueStallErr_Stat; // Bits= 1 + + // High voltage compressor voltage sensor error detected. + // 1 : "True" + // 0 : "False" + uint8_t HVC_CompVoltSensErr_Stat; // Bits= 1 + + // Reserved space in the HVC_State message: 2 bits + uint8_t HVC_Reserved03; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} HVC_Err_Status_Msg_t; + +// def @CCU_HVC_Req_Msg CAN Message (784 0x310) +#define CCU_HVC_Req_Msg_IDE (0U) +#define CCU_HVC_Req_Msg_DLC (3U) +#define CCU_HVC_Req_Msg_CANID (0x310U) +#define CCU_HVC_Req_Msg_CYC (200U) +// signal: @CCU_eCompSpeedReq_Val_ro +#define CANDB_CCU_eCompSpeedReq_Val_ro_CovFactor (50) +#define CANDB_CCU_eCompSpeedReq_Val_ro_toS(x) ( (uint8_t) ((x) / (50)) ) +#define CANDB_CCU_eCompSpeedReq_Val_ro_fromS(x) ( ((x) * (50)) ) + +// Value tables for @CCU_eCompReq_Stat signal + +#ifndef CCU_eCompReq_Stat_CCU_HVC_Req_Msg_Request +#define CCU_eCompReq_Stat_CCU_HVC_Req_Msg_Request (1) +#endif + +#ifndef CCU_eCompReq_Stat_CCU_HVC_Req_Msg_Stop_request +#define CCU_eCompReq_Stat_CCU_HVC_Req_Msg_Stop_request (0) +#endif + + +// Value tables for @CCU_LowTempValve_Req signal + +#ifndef CCU_LowTempValve_Req_CCU_HVC_Req_Msg_Open_Valve_request +#define CCU_LowTempValve_Req_CCU_HVC_Req_Msg_Open_Valve_request (2) +#endif + +#ifndef CCU_LowTempValve_Req_CCU_HVC_Req_Msg_Close_Valve_request +#define CCU_LowTempValve_Req_CCU_HVC_Req_Msg_Close_Valve_request (1) +#endif + +#ifndef CCU_LowTempValve_Req_CCU_HVC_Req_Msg_No_request +#define CCU_LowTempValve_Req_CCU_HVC_Req_Msg_No_request (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Compressor target speed: + // 0xFF = Fault value + uint8_t CCU_eCompSpeedReq_Val_ro; // Bits= 8 Factor= 50 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t CCU_eCompSpeedReq_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Request to activate air conditioner compressor + // 1 : "Request" + // 0 : "Stop request" + uint8_t CCU_eCompReq_Stat : 1; // Bits= 1 + + // request to EMS for closing the low temperature circuit valve + // 2 : "Open Valve request" + // 1 : "Close Valve request" + // 0 : "No request" + uint8_t CCU_LowTempValve_Req : 2; // Bits= 2 + + // Rolling Counter [0 - 15] + uint8_t CCU_HVC_Req_RC : 4; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t CCU_HVC_Req_CS; // Bits= 8 + +#else + + // Compressor target speed: + // 0xFF = Fault value + uint8_t CCU_eCompSpeedReq_Val_ro; // Bits= 8 Factor= 50 Unit:'rpm' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t CCU_eCompSpeedReq_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Request to activate air conditioner compressor + // 1 : "Request" + // 0 : "Stop request" + uint8_t CCU_eCompReq_Stat; // Bits= 1 + + // request to EMS for closing the low temperature circuit valve + // 2 : "Open Valve request" + // 1 : "Close Valve request" + // 0 : "No request" + uint8_t CCU_LowTempValve_Req; // Bits= 2 + + // Rolling Counter [0 - 15] + uint8_t CCU_HVC_Req_RC; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t CCU_HVC_Req_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_HVC_Req_Msg_t; + +// def @CCU_Stat1 CAN Message (785 0x311) +#define CCU_Stat1_IDE (0U) +#define CCU_Stat1_DLC (8U) +#define CCU_Stat1_CANID (0x311U) +#define CCU_Stat1_CYC (100U) + +// Value tables for @CCU_ModeFL_Stat signal + +#ifndef CCU_ModeFL_Stat_CCU_Stat1_Semiauto_mode_is_active +#define CCU_ModeFL_Stat_CCU_Stat1_Semiauto_mode_is_active (2) +#endif + +#ifndef CCU_ModeFL_Stat_CCU_Stat1_Auto_mode_is_active +#define CCU_ModeFL_Stat_CCU_Stat1_Auto_mode_is_active (1) +#endif + +#ifndef CCU_ModeFL_Stat_CCU_Stat1_Manual_mode_is_active +#define CCU_ModeFL_Stat_CCU_Stat1_Manual_mode_is_active (0) +#endif + + +// Value tables for @CCU_ModeFR_Stat signal + +#ifndef CCU_ModeFR_Stat_CCU_Stat1_Semiauto_mode_is_active +#define CCU_ModeFR_Stat_CCU_Stat1_Semiauto_mode_is_active (2) +#endif + +#ifndef CCU_ModeFR_Stat_CCU_Stat1_Auto_mode_is_active +#define CCU_ModeFR_Stat_CCU_Stat1_Auto_mode_is_active (1) +#endif + +#ifndef CCU_ModeFR_Stat_CCU_Stat1_Manual_mode_is_active +#define CCU_ModeFR_Stat_CCU_Stat1_Manual_mode_is_active (0) +#endif + + +// Value tables for @CCU_ModeRL_Stat signal + +#ifndef CCU_ModeRL_Stat_CCU_Stat1_Semiauto_mode_is_active +#define CCU_ModeRL_Stat_CCU_Stat1_Semiauto_mode_is_active (2) +#endif + +#ifndef CCU_ModeRL_Stat_CCU_Stat1_Auto_mode_is_active +#define CCU_ModeRL_Stat_CCU_Stat1_Auto_mode_is_active (1) +#endif + +#ifndef CCU_ModeRL_Stat_CCU_Stat1_Manual_mode_is_active +#define CCU_ModeRL_Stat_CCU_Stat1_Manual_mode_is_active (0) +#endif + + +// Value tables for @CCU_ModeRR_Stat signal + +#ifndef CCU_ModeRR_Stat_CCU_Stat1_Semiauto_mode_is_active +#define CCU_ModeRR_Stat_CCU_Stat1_Semiauto_mode_is_active (2) +#endif + +#ifndef CCU_ModeRR_Stat_CCU_Stat1_Auto_mode_is_active +#define CCU_ModeRR_Stat_CCU_Stat1_Auto_mode_is_active (1) +#endif + +#ifndef CCU_ModeRR_Stat_CCU_Stat1_Manual_mode_is_active +#define CCU_ModeRR_Stat_CCU_Stat1_Manual_mode_is_active (0) +#endif + + +// Value tables for @CCU_AutoModeFL_Stat signal + +#ifndef CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_5_is_active +#define CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_5_is_active (5) +#endif + +#ifndef CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_4_is_active +#define CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_4_is_active (4) +#endif + +#ifndef CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_3_is_active +#define CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_3_is_active (3) +#endif + +#ifndef CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_2_is_active +#define CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_2_is_active (2) +#endif + +#ifndef CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_1_is_active +#define CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_1_is_active (1) +#endif + +#ifndef CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_is_inactive +#define CCU_AutoModeFL_Stat_CCU_Stat1_Auto_mode_is_inactive (0) +#endif + + +// Value tables for @CCU_AutoModeFR_Stat signal + +#ifndef CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_5_is_active +#define CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_5_is_active (5) +#endif + +#ifndef CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_4_is_active +#define CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_4_is_active (4) +#endif + +#ifndef CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_3_is_active +#define CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_3_is_active (3) +#endif + +#ifndef CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_2_is_active +#define CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_2_is_active (2) +#endif + +#ifndef CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_1_is_active +#define CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_1_is_active (1) +#endif + +#ifndef CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_is_inactive +#define CCU_AutoModeFR_Stat_CCU_Stat1_Auto_mode_is_inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionRL_Face_Stat signal + +#ifndef CCU_AirDirectionRL_Face_Stat_CCU_Stat1_Active +#define CCU_AirDirectionRL_Face_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionRL_Face_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionRL_Face_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionRL_Foot_Stat signal + +#ifndef CCU_AirDirectionRL_Foot_Stat_CCU_Stat1_Active +#define CCU_AirDirectionRL_Foot_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionRL_Foot_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionRL_Foot_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AutoModeRL_Stat signal + +#ifndef CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_5_is_active +#define CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_5_is_active (5) +#endif + +#ifndef CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_4_is_active +#define CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_4_is_active (4) +#endif + +#ifndef CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_3_is_active +#define CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_3_is_active (3) +#endif + +#ifndef CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_2_is_active +#define CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_2_is_active (2) +#endif + +#ifndef CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_1_is_active +#define CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_1_is_active (1) +#endif + +#ifndef CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_is_inactive +#define CCU_AutoModeRL_Stat_CCU_Stat1_Auto_mode_is_inactive (0) +#endif + + +// Value tables for @CCU_AutoModeRR_Stat signal + +#ifndef CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_5_is_active +#define CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_5_is_active (5) +#endif + +#ifndef CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_4_is_active +#define CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_4_is_active (4) +#endif + +#ifndef CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_3_is_active +#define CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_3_is_active (3) +#endif + +#ifndef CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_2_is_active +#define CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_2_is_active (2) +#endif + +#ifndef CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_1_is_active +#define CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_1_is_active (1) +#endif + +#ifndef CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_is_inactive +#define CCU_AutoModeRR_Stat_CCU_Stat1_Auto_mode_is_inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionRR_Face_Stat signal + +#ifndef CCU_AirDirectionRR_Face_Stat_CCU_Stat1_Active +#define CCU_AirDirectionRR_Face_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionRR_Face_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionRR_Face_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionRR_Foot_Stat signal + +#ifndef CCU_AirDirectionRR_Foot_Stat_CCU_Stat1_Active +#define CCU_AirDirectionRR_Foot_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionRR_Foot_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionRR_Foot_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionFL_Def_Stat signal + +#ifndef CCU_AirDirectionFL_Def_Stat_CCU_Stat1_Active +#define CCU_AirDirectionFL_Def_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionFL_Def_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionFL_Def_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionFL_Face_Stat signal + +#ifndef CCU_AirDirectionFL_Face_Stat_CCU_Stat1_Active +#define CCU_AirDirectionFL_Face_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionFL_Face_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionFL_Face_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionFL_Foot_Stat signal + +#ifndef CCU_AirDirectionFL_Foot_Stat_CCU_Stat1_Active +#define CCU_AirDirectionFL_Foot_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionFL_Foot_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionFL_Foot_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionFR_Def_Stat signal + +#ifndef CCU_AirDirectionFR_Def_Stat_CCU_Stat1_Active +#define CCU_AirDirectionFR_Def_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionFR_Def_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionFR_Def_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionFR_Face_Stat signal + +#ifndef CCU_AirDirectionFR_Face_Stat_CCU_Stat1_Active +#define CCU_AirDirectionFR_Face_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionFR_Face_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionFR_Face_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_AirDirectionFR_Foot_Stat signal + +#ifndef CCU_AirDirectionFR_Foot_Stat_CCU_Stat1_Active +#define CCU_AirDirectionFR_Foot_Stat_CCU_Stat1_Active (1) +#endif + +#ifndef CCU_AirDirectionFR_Foot_Stat_CCU_Stat1_Inactive +#define CCU_AirDirectionFR_Foot_Stat_CCU_Stat1_Inactive (0) +#endif + + +// Value tables for @CCU_Recirculation_Stat signal + +#ifndef CCU_Recirculation_Stat_CCU_Stat1_Auto_recirculation_mode +#define CCU_Recirculation_Stat_CCU_Stat1_Auto_recirculation_mode (2) +#endif + +#ifndef CCU_Recirculation_Stat_CCU_Stat1_Recirculation_mode_Rec_on +#define CCU_Recirculation_Stat_CCU_Stat1_Recirculation_mode_Rec_on (1) +#endif + +#ifndef CCU_Recirculation_Stat_CCU_Stat1_Fresh_air_mode_Rec_off +#define CCU_Recirculation_Stat_CCU_Stat1_Fresh_air_mode_Rec_off (0) +#endif + + +// Value tables for @CCU_BlowerSpeedFL_Stat signal + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (7) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (6) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (5) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (4) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (3) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (2) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1__step (1) +#endif + +#ifndef CCU_BlowerSpeedFL_Stat_CCU_Stat1_Blower_off +#define CCU_BlowerSpeedFL_Stat_CCU_Stat1_Blower_off (0) +#endif + +// signal: @CCU_TargetTempFL_Stat_ro +#define CANDB_CCU_TargetTempFL_Stat_ro_CovFactor (0.5) +#define CANDB_CCU_TargetTempFL_Stat_ro_toS(x) ( (uint8_t) (((x) - (16.0)) / (0.5)) ) +#define CANDB_CCU_TargetTempFL_Stat_ro_fromS(x) ( (((x) * (0.5)) + (16.0)) ) + +// Value tables for @CCU_BlowerSpeedFR_Stat signal + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (7) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (6) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (5) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (4) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (3) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (2) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1__step (1) +#endif + +#ifndef CCU_BlowerSpeedFR_Stat_CCU_Stat1_Blower_off +#define CCU_BlowerSpeedFR_Stat_CCU_Stat1_Blower_off (0) +#endif + +// signal: @CCU_TargetTempFR_Stat_ro +#define CANDB_CCU_TargetTempFR_Stat_ro_CovFactor (0.5) +#define CANDB_CCU_TargetTempFR_Stat_ro_toS(x) ( (uint8_t) (((x) - (16.0)) / (0.5)) ) +#define CANDB_CCU_TargetTempFR_Stat_ro_fromS(x) ( (((x) * (0.5)) + (16.0)) ) + +// Value tables for @CCU_BlowerSpeedRL_Stat signal + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (7) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (6) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (5) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (4) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (3) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (2) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1__step (1) +#endif + +#ifndef CCU_BlowerSpeedRL_Stat_CCU_Stat1_Blower_off +#define CCU_BlowerSpeedRL_Stat_CCU_Stat1_Blower_off (0) +#endif + +// signal: @CCU_TargetTempRR_Stat_ro +#define CANDB_CCU_TargetTempRR_Stat_ro_CovFactor (0.5) +#define CANDB_CCU_TargetTempRR_Stat_ro_toS(x) ( (uint8_t) (((x) - (16.0)) / (0.5)) ) +#define CANDB_CCU_TargetTempRR_Stat_ro_fromS(x) ( (((x) * (0.5)) + (16.0)) ) + +// Value tables for @CCU_BlowerSpeedRR_Stat signal + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (7) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (6) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (5) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (4) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (3) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (2) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1__step +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1__step (1) +#endif + +#ifndef CCU_BlowerSpeedRR_Stat_CCU_Stat1_Blower_off +#define CCU_BlowerSpeedRR_Stat_CCU_Stat1_Blower_off (0) +#endif + +// signal: @CCU_TargetTempRL_Stat_ro +#define CANDB_CCU_TargetTempRL_Stat_ro_CovFactor (0.5) +#define CANDB_CCU_TargetTempRL_Stat_ro_toS(x) ( (uint8_t) (((x) - (16.0)) / (0.5)) ) +#define CANDB_CCU_TargetTempRL_Stat_ro_fromS(x) ( (((x) * (0.5)) + (16.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Climate control mode for front left zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeFL_Stat : 2; // Bits= 2 + + // Climate control mode for front right zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeFR_Stat : 2; // Bits= 2 + + // Climate control mode for rear left zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeRL_Stat : 2; // Bits= 2 + + // Climate control mode for rear right zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeRR_Stat : 2; // Bits= 2 + + // Climate control auto mode for front left zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeFL_Stat : 3; // Bits= 3 + + // Climate control auto mode for front right zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeFR_Stat : 3; // Bits= 3 + + // Airflow direction mode for rear left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRL_Face_Stat : 1; // Bits= 1 + + // Airflow direction mode for rear left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRL_Foot_Stat : 1; // Bits= 1 + + // Climate control auto mode for rear left zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeRL_Stat : 3; // Bits= 3 + + // Climate control auto mode for rear right zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeRR_Stat : 3; // Bits= 3 + + // Airflow direction mode for rear right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRR_Face_Stat : 1; // Bits= 1 + + // Airflow direction mode for rear right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRR_Foot_Stat : 1; // Bits= 1 + + // Airflow direction mode for front left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFL_Def_Stat : 1; // Bits= 1 + + // Airflow direction mode for front left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFL_Face_Stat : 1; // Bits= 1 + + // Airflow direction mode for front left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFL_Foot_Stat : 1; // Bits= 1 + + // Airflow direction mode for front right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFR_Def_Stat : 1; // Bits= 1 + + // Airflow direction mode for front right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFR_Face_Stat : 1; // Bits= 1 + + // Airflow direction mode for front right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFR_Foot_Stat : 1; // Bits= 1 + + // Recirculation mode status + // 2 : "Auto recirculation mode" + // 1 : "Recirculation mode (Rec on)" + // 0 : "Fresh air mode (Rec off)" + uint8_t CCU_Recirculation_Stat : 2; // Bits= 2 + + // Blower speed for front left zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedFL_Stat : 3; // Bits= 3 + + // Target temperature for front left zone status + uint8_t CCU_TargetTempFL_Stat_ro : 5; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempFL_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Blower speed for front right zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedFR_Stat : 3; // Bits= 3 + + // Target temperature for front right zone status + uint8_t CCU_TargetTempFR_Stat_ro : 5; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempFR_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Blower speed for rear left zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedRL_Stat : 3; // Bits= 3 + + // Target temperature for rear right zone status + uint8_t CCU_TargetTempRR_Stat_ro : 5; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempRR_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Blower speed for rear right zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedRR_Stat : 3; // Bits= 3 + + // Target temperature for rear left zone status + uint8_t CCU_TargetTempRL_Stat_ro : 5; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempRL_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + +#else + + // Climate control mode for front left zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeFL_Stat; // Bits= 2 + + // Climate control mode for front right zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeFR_Stat; // Bits= 2 + + // Climate control mode for rear left zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeRL_Stat; // Bits= 2 + + // Climate control mode for rear right zone status + // 2 : "Semi-auto mode is active" + // 1 : "Auto mode is active" + // 0 : "Manual mode is active" + uint8_t CCU_ModeRR_Stat; // Bits= 2 + + // Climate control auto mode for front left zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeFL_Stat; // Bits= 3 + + // Climate control auto mode for front right zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeFR_Stat; // Bits= 3 + + // Airflow direction mode for rear left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRL_Face_Stat; // Bits= 1 + + // Airflow direction mode for rear left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRL_Foot_Stat; // Bits= 1 + + // Climate control auto mode for rear left zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeRL_Stat; // Bits= 3 + + // Climate control auto mode for rear right zone status + // 5 : "Auto mode 5 is active" + // 4 : "Auto mode 4 is active" + // 3 : "Auto mode 3 is active" + // 2 : "Auto mode 2 is active" + // 1 : "Auto mode 1 is active" + // 0 : "Auto mode is inactive" + uint8_t CCU_AutoModeRR_Stat; // Bits= 3 + + // Airflow direction mode for rear right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRR_Face_Stat; // Bits= 1 + + // Airflow direction mode for rear right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionRR_Foot_Stat; // Bits= 1 + + // Airflow direction mode for front left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFL_Def_Stat; // Bits= 1 + + // Airflow direction mode for front left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFL_Face_Stat; // Bits= 1 + + // Airflow direction mode for front left zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFL_Foot_Stat; // Bits= 1 + + // Airflow direction mode for front right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFR_Def_Stat; // Bits= 1 + + // Airflow direction mode for front right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFR_Face_Stat; // Bits= 1 + + // Airflow direction mode for front right zone status + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_AirDirectionFR_Foot_Stat; // Bits= 1 + + // Recirculation mode status + // 2 : "Auto recirculation mode" + // 1 : "Recirculation mode (Rec on)" + // 0 : "Fresh air mode (Rec off)" + uint8_t CCU_Recirculation_Stat; // Bits= 2 + + // Blower speed for front left zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedFL_Stat; // Bits= 3 + + // Target temperature for front left zone status + uint8_t CCU_TargetTempFL_Stat_ro; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempFL_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Blower speed for front right zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedFR_Stat; // Bits= 3 + + // Target temperature for front right zone status + uint8_t CCU_TargetTempFR_Stat_ro; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempFR_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Blower speed for rear left zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedRL_Stat; // Bits= 3 + + // Target temperature for rear right zone status + uint8_t CCU_TargetTempRR_Stat_ro; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempRR_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Blower speed for rear right zone status + // 7 : "7 step" + // 6 : "6 step" + // 5 : "5 step" + // 4 : "4 step" + // 3 : "3 step" + // 2 : "2 step" + // 1 : "1 step" + // 0 : "Blower off" + uint8_t CCU_BlowerSpeedRR_Stat; // Bits= 3 + + // Target temperature for rear left zone status + uint8_t CCU_TargetTempRL_Stat_ro; // Bits= 5 Offset= 16.0 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_TargetTempRL_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Stat1_t; + +// def @CCU_Stat2 CAN Message (786 0x312) +#define CCU_Stat2_IDE (0U) +#define CCU_Stat2_DLC (6U) +#define CCU_Stat2_CANID (0x312U) +#define CCU_Stat2_CYC (100U) + +// Value tables for @CCU_AromaCartridgeSw_Stat signal + +#ifndef CCU_AromaCartridgeSw_Stat_CCU_Stat2_Cartridge_extracted +#define CCU_AromaCartridgeSw_Stat_CCU_Stat2_Cartridge_extracted (1) +#endif + +#ifndef CCU_AromaCartridgeSw_Stat_CCU_Stat2_artridge_installed +#define CCU_AromaCartridgeSw_Stat_CCU_Stat2_artridge_installed (0) +#endif + + +// Value tables for @CCU_FrontZoneSync_Stat signal + +#ifndef CCU_FrontZoneSync_Stat_CCU_Stat2_Sync_on +#define CCU_FrontZoneSync_Stat_CCU_Stat2_Sync_on (1) +#endif + +#ifndef CCU_FrontZoneSync_Stat_CCU_Stat2_Sync_off +#define CCU_FrontZoneSync_Stat_CCU_Stat2_Sync_off (0) +#endif + + +// Value tables for @CCU_RearZoneSync_Stat signal + +#ifndef CCU_RearZoneSync_Stat_CCU_Stat2_Sync_on +#define CCU_RearZoneSync_Stat_CCU_Stat2_Sync_on (1) +#endif + +#ifndef CCU_RearZoneSync_Stat_CCU_Stat2_Sync_off +#define CCU_RearZoneSync_Stat_CCU_Stat2_Sync_off (0) +#endif + + +// Value tables for @CCU_AllZoneSync_Stat signal + +#ifndef CCU_AllZoneSync_Stat_CCU_Stat2_Sync_on +#define CCU_AllZoneSync_Stat_CCU_Stat2_Sync_on (1) +#endif + +#ifndef CCU_AllZoneSync_Stat_CCU_Stat2_Sync_off +#define CCU_AllZoneSync_Stat_CCU_Stat2_Sync_off (0) +#endif + + +// Value tables for @CCU_ACfront_Stat signal + +#ifndef CCU_ACfront_Stat_CCU_Stat2_AC_front_on +#define CCU_ACfront_Stat_CCU_Stat2_AC_front_on (1) +#endif + +#ifndef CCU_ACfront_Stat_CCU_Stat2_AC_front_off +#define CCU_ACfront_Stat_CCU_Stat2_AC_front_off (0) +#endif + + +// Value tables for @CCU_ACrear_Stat signal + +#ifndef CCU_ACrear_Stat_CCU_Stat2_AC_rear_on +#define CCU_ACrear_Stat_CCU_Stat2_AC_rear_on (1) +#endif + +#ifndef CCU_ACrear_Stat_CCU_Stat2_AC_rear_off +#define CCU_ACrear_Stat_CCU_Stat2_AC_rear_off (0) +#endif + + +// Value tables for @CCU_ACmaxF_Stat signal + +#ifndef CCU_ACmaxF_Stat_CCU_Stat2_AC_MAX_on +#define CCU_ACmaxF_Stat_CCU_Stat2_AC_MAX_on (1) +#endif + +#ifndef CCU_ACmaxF_Stat_CCU_Stat2_AC_MAX_off +#define CCU_ACmaxF_Stat_CCU_Stat2_AC_MAX_off (0) +#endif + + +// Value tables for @CCU_ACmaxR_Stat signal + +#ifndef CCU_ACmaxR_Stat_CCU_Stat2_AC_MAX_on +#define CCU_ACmaxR_Stat_CCU_Stat2_AC_MAX_on (1) +#endif + +#ifndef CCU_ACmaxR_Stat_CCU_Stat2_AC_MAX_off +#define CCU_ACmaxR_Stat_CCU_Stat2_AC_MAX_off (0) +#endif + + +// Value tables for @CCU_Defrost_Stat signal + +#ifndef CCU_Defrost_Stat_CCU_Stat2_Defrost_is_active +#define CCU_Defrost_Stat_CCU_Stat2_Defrost_is_active (1) +#endif + +#ifndef CCU_Defrost_Stat_CCU_Stat2_Defrost_is_inactive +#define CCU_Defrost_Stat_CCU_Stat2_Defrost_is_inactive (0) +#endif + + +// Value tables for @CCU_Ionization_Stat signal + +#ifndef CCU_Ionization_Stat_CCU_Stat2_Ionizer_is_on +#define CCU_Ionization_Stat_CCU_Stat2_Ionizer_is_on (1) +#endif + +#ifndef CCU_Ionization_Stat_CCU_Stat2_Ionizer_is_off +#define CCU_Ionization_Stat_CCU_Stat2_Ionizer_is_off (0) +#endif + + +// Value tables for @CCU_FootTempCorFL_Stat signal + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (6) +#endif + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (5) +#endif + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (4) +#endif + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (3) +#endif + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (2) +#endif + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (1) +#endif + +#ifndef CCU_FootTempCorFL_Stat_CCU_Stat2__step +#define CCU_FootTempCorFL_Stat_CCU_Stat2__step (0) +#endif + + +// Value tables for @CCU_FootTempCorFR_Stat signal + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (6) +#endif + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (5) +#endif + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (4) +#endif + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (3) +#endif + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (2) +#endif + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (1) +#endif + +#ifndef CCU_FootTempCorFR_Stat_CCU_Stat2__step +#define CCU_FootTempCorFR_Stat_CCU_Stat2__step (0) +#endif + + +// Value tables for @CCU_AromaIntens_Stat signal + +#ifndef CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_mode_3_step +#define CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_mode_3_step (3) +#endif + +#ifndef CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_mode_2_step +#define CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_mode_2_step (2) +#endif + +#ifndef CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_mode_1_step +#define CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_mode_1_step (1) +#endif + +#ifndef CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_off +#define CCU_AromaIntens_Stat_CCU_Stat2_Aromatization_off (0) +#endif + + +// Value tables for @CCU_FootTempCorRL_Stat signal + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (6) +#endif + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (5) +#endif + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (4) +#endif + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (3) +#endif + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (2) +#endif + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (1) +#endif + +#ifndef CCU_FootTempCorRL_Stat_CCU_Stat2__step +#define CCU_FootTempCorRL_Stat_CCU_Stat2__step (0) +#endif + + +// Value tables for @CCU_FootTempCorRR_Stat signal + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (6) +#endif + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (5) +#endif + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (4) +#endif + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (3) +#endif + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (2) +#endif + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (1) +#endif + +#ifndef CCU_FootTempCorRR_Stat_CCU_Stat2__step +#define CCU_FootTempCorRR_Stat_CCU_Stat2__step (0) +#endif + + +// Value tables for @CCU_DeflectorSwDL_Stat signal + +#ifndef CCU_DeflectorSwDL_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwDL_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwDL_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwDL_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwDL_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwDL_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwDL_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwDL_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwDR_Stat signal + +#ifndef CCU_DeflectorSwDR_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwDR_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwDR_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwDR_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwDR_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwDR_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwDR_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwDR_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwFPL_Stat signal + +#ifndef CCU_DeflectorSwFPL_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwFPL_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwFPL_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwFPL_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwFPL_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwFPL_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwFPL_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwFPL_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwFPR_Stat signal + +#ifndef CCU_DeflectorSwFPR_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwFPR_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwFPR_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwFPR_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwFPR_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwFPR_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwFPR_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwFPR_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwFCL_Stat signal + +#ifndef CCU_DeflectorSwFCL_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwFCL_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwFCL_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwFCL_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwFCL_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwFCL_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwFCL_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwFCL_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwFCR_Stat signal + +#ifndef CCU_DeflectorSwFCR_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwFCR_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwFCR_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwFCR_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwFCR_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwFCR_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwFCR_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwFCR_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwRLB_Stat signal + +#ifndef CCU_DeflectorSwRLB_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwRLB_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwRLB_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwRLB_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwRLB_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwRLB_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwRLB_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwRLB_Stat_CCU_Stat2_No_LED (0) +#endif + + +// Value tables for @CCU_DeflectorSwRRB_Stat signal + +#ifndef CCU_DeflectorSwRRB_Stat_CCU_Stat2_LED_3_step +#define CCU_DeflectorSwRRB_Stat_CCU_Stat2_LED_3_step (3) +#endif + +#ifndef CCU_DeflectorSwRRB_Stat_CCU_Stat2_LED_2_step +#define CCU_DeflectorSwRRB_Stat_CCU_Stat2_LED_2_step (2) +#endif + +#ifndef CCU_DeflectorSwRRB_Stat_CCU_Stat2_LED_1_step +#define CCU_DeflectorSwRRB_Stat_CCU_Stat2_LED_1_step (1) +#endif + +#ifndef CCU_DeflectorSwRRB_Stat_CCU_Stat2_No_LED +#define CCU_DeflectorSwRRB_Stat_CCU_Stat2_No_LED (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Cartridge switch status from aromatization system + // 1 : "Cartridge extracted" + // 0 : "�artridge installed" + uint8_t CCU_AromaCartridgeSw_Stat : 1; // Bits= 1 + + // Front climate zones synchronization status + // 1 : "Sync on" + // 0 : "Sync off" + uint8_t CCU_FrontZoneSync_Stat : 1; // Bits= 1 + + // Rear climate zones synchronization status + // 1 : "Sync on" + // 0 : "Sync off" + uint8_t CCU_RearZoneSync_Stat : 1; // Bits= 1 + + // All climate zones synchronization status + // 1 : "Sync on" + // 0 : "Sync off" + uint8_t CCU_AllZoneSync_Stat : 1; // Bits= 1 + + // Air conditioner front status + // 1 : "AC front on" + // 0 : "AC front off" + uint8_t CCU_ACfront_Stat : 1; // Bits= 1 + + // Air conditioner rear status + // 1 : "AC rear on" + // 0 : "AC rear off" + uint8_t CCU_ACrear_Stat : 1; // Bits= 1 + + // AC MAX mode for front zone status + // 1 : "AC MAX on" + // 0 : "AC MAX off" + uint8_t CCU_ACmaxF_Stat : 1; // Bits= 1 + + // AC MAX mode for rear zone status + // 1 : "AC MAX on" + // 0 : "AC MAX off" + uint8_t CCU_ACmaxR_Stat : 1; // Bits= 1 + + // Defrost mode status + // 1 : "Defrost is active" + // 0 : "Defrost is inactive" + uint8_t CCU_Defrost_Stat : 1; // Bits= 1 + + // Ionization system mode status + // 1 : "Ionizer is on" + // 0 : "Ionizer is off" + uint8_t CCU_Ionization_Stat : 1; // Bits= 1 + + // Footwell temperature correction for front left zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorFL_Stat : 3; // Bits= 3 + + // Footwell temperature correction for front right zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorFR_Stat : 3; // Bits= 3 + + // Aromatization intensity status + // 3 : "Aromatization mode 3 step" + // 2 : "Aromatization mode 2 step" + // 1 : "Aromatization mode 1 step" + // 0 : "Aromatization off" + uint8_t CCU_AromaIntens_Stat : 2; // Bits= 2 + + // Footwell temperature correction for rear left zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorRL_Stat : 3; // Bits= 3 + + // Footwell temperature correction for rear right zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorRR_Stat : 3; // Bits= 3 + + // Deflector driver left status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwDL_Stat : 2; // Bits= 2 + + // Deflector driver right status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwDR_Stat : 2; // Bits= 2 + + // Deflector front passenger left status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFPL_Stat : 2; // Bits= 2 + + // Deflector front passenger right status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFPR_Stat : 2; // Bits= 2 + + // Deflector front console left status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFCL_Stat : 2; // Bits= 2 + + // Deflector front console right status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFCR_Stat : 2; // Bits= 2 + + // Deflector rear left in B-pillar status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwRLB_Stat : 2; // Bits= 2 + + // Deflector rear right in B-pillar status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwRRB_Stat : 2; // Bits= 2 + +#else + + // Cartridge switch status from aromatization system + // 1 : "Cartridge extracted" + // 0 : "�artridge installed" + uint8_t CCU_AromaCartridgeSw_Stat; // Bits= 1 + + // Front climate zones synchronization status + // 1 : "Sync on" + // 0 : "Sync off" + uint8_t CCU_FrontZoneSync_Stat; // Bits= 1 + + // Rear climate zones synchronization status + // 1 : "Sync on" + // 0 : "Sync off" + uint8_t CCU_RearZoneSync_Stat; // Bits= 1 + + // All climate zones synchronization status + // 1 : "Sync on" + // 0 : "Sync off" + uint8_t CCU_AllZoneSync_Stat; // Bits= 1 + + // Air conditioner front status + // 1 : "AC front on" + // 0 : "AC front off" + uint8_t CCU_ACfront_Stat; // Bits= 1 + + // Air conditioner rear status + // 1 : "AC rear on" + // 0 : "AC rear off" + uint8_t CCU_ACrear_Stat; // Bits= 1 + + // AC MAX mode for front zone status + // 1 : "AC MAX on" + // 0 : "AC MAX off" + uint8_t CCU_ACmaxF_Stat; // Bits= 1 + + // AC MAX mode for rear zone status + // 1 : "AC MAX on" + // 0 : "AC MAX off" + uint8_t CCU_ACmaxR_Stat; // Bits= 1 + + // Defrost mode status + // 1 : "Defrost is active" + // 0 : "Defrost is inactive" + uint8_t CCU_Defrost_Stat; // Bits= 1 + + // Ionization system mode status + // 1 : "Ionizer is on" + // 0 : "Ionizer is off" + uint8_t CCU_Ionization_Stat; // Bits= 1 + + // Footwell temperature correction for front left zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorFL_Stat; // Bits= 3 + + // Footwell temperature correction for front right zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorFR_Stat; // Bits= 3 + + // Aromatization intensity status + // 3 : "Aromatization mode 3 step" + // 2 : "Aromatization mode 2 step" + // 1 : "Aromatization mode 1 step" + // 0 : "Aromatization off" + uint8_t CCU_AromaIntens_Stat; // Bits= 2 + + // Footwell temperature correction for rear left zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorRL_Stat; // Bits= 3 + + // Footwell temperature correction for rear right zone status + // 6 : "+3 step" + // 5 : "+2 step" + // 4 : "+1 step" + // 3 : "0 step" + // 2 : "-1 step" + // 1 : "-2 step" + // 0 : "-3 step" + uint8_t CCU_FootTempCorRR_Stat; // Bits= 3 + + // Deflector driver left status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwDL_Stat; // Bits= 2 + + // Deflector driver right status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwDR_Stat; // Bits= 2 + + // Deflector front passenger left status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFPL_Stat; // Bits= 2 + + // Deflector front passenger right status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFPR_Stat; // Bits= 2 + + // Deflector front console left status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFCL_Stat; // Bits= 2 + + // Deflector front console right status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwFCR_Stat; // Bits= 2 + + // Deflector rear left in B-pillar status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwRLB_Stat; // Bits= 2 + + // Deflector rear right in B-pillar status + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No LED" + uint8_t CCU_DeflectorSwRRB_Stat; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Stat2_t; + +// def @CCU_Requests CAN Message (787 0x313) +#define CCU_Requests_IDE (0U) +#define CCU_Requests_DLC (1U) +#define CCU_Requests_CANID (0x313U) +#define CCU_Requests_CYC (200U) + +// Value tables for @CCU_CarpetHeatFL_Req signal + +#ifndef CCU_CarpetHeatFL_Req_CCU_Requests_Carpet_heating_requested +#define CCU_CarpetHeatFL_Req_CCU_Requests_Carpet_heating_requested (1) +#endif + +#ifndef CCU_CarpetHeatFL_Req_CCU_Requests_Carpet_heating_not_requested +#define CCU_CarpetHeatFL_Req_CCU_Requests_Carpet_heating_not_requested (0) +#endif + + +// Value tables for @CCU_CarpetHeatFR_Req signal + +#ifndef CCU_CarpetHeatFR_Req_CCU_Requests_Carpet_heating_requested +#define CCU_CarpetHeatFR_Req_CCU_Requests_Carpet_heating_requested (1) +#endif + +#ifndef CCU_CarpetHeatFR_Req_CCU_Requests_Carpet_heating_not_requested +#define CCU_CarpetHeatFR_Req_CCU_Requests_Carpet_heating_not_requested (0) +#endif + + +// Value tables for @CCU_CarpetHeatRL_Req signal + +#ifndef CCU_CarpetHeatRL_Req_CCU_Requests_Carpet_heating_requested +#define CCU_CarpetHeatRL_Req_CCU_Requests_Carpet_heating_requested (1) +#endif + +#ifndef CCU_CarpetHeatRL_Req_CCU_Requests_Carpet_heating_not_requested +#define CCU_CarpetHeatRL_Req_CCU_Requests_Carpet_heating_not_requested (0) +#endif + + +// Value tables for @CCU_CarpetHeatRR_Req signal + +#ifndef CCU_CarpetHeatRR_Req_CCU_Requests_Carpet_heating_requested +#define CCU_CarpetHeatRR_Req_CCU_Requests_Carpet_heating_requested (1) +#endif + +#ifndef CCU_CarpetHeatRR_Req_CCU_Requests_Carpet_heating_not_requested +#define CCU_CarpetHeatRR_Req_CCU_Requests_Carpet_heating_not_requested (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Carpet heating request for front left zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatFL_Req : 1; // Bits= 1 + + // Carpet heating request for front right zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatFR_Req : 1; // Bits= 1 + + // Carpet heating request for rear left zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatRL_Req : 1; // Bits= 1 + + // Carpet heating request for rear right zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatRR_Req : 1; // Bits= 1 + +#else + + // Carpet heating request for front left zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatFL_Req; // Bits= 1 + + // Carpet heating request for front right zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatFR_Req; // Bits= 1 + + // Carpet heating request for rear left zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatRL_Req; // Bits= 1 + + // Carpet heating request for rear right zone + // 1 : "Carpet heating requested" + // 0 : "Carpet heating not requested" + uint8_t CCU_CarpetHeatRR_Req; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Requests_t; + +// def @CCU_Stat3 CAN Message (788 0x314) +#define CCU_Stat3_IDE (0U) +#define CCU_Stat3_DLC (4U) +#define CCU_Stat3_CANID (0x314U) +#define CCU_Stat3_CYC (250U) +// signal: @CCU_AromaCartridgeCapacity_Stat_ro +#define CANDB_CCU_AromaCartridgeCapacity_Stat_ro_CovFactor (10) +#define CANDB_CCU_AromaCartridgeCapacity_Stat_ro_toS(x) ( (uint8_t) ((x) / (10)) ) +#define CANDB_CCU_AromaCartridgeCapacity_Stat_ro_fromS(x) ( ((x) * (10)) ) + +// Value tables for @CCU_AromaCartridgeFlavor_Stat signal + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_16 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_16 (15) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_15 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_15 (14) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_14 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_14 (13) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_13 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_13 (12) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_12 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_12 (11) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_11 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_11 (10) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_10 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_10 (9) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_9 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_9 (8) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_8 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_8 (7) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_7 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_7 (6) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_6 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_6 (5) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_5 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_5 (4) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_4 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_4 (3) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_3 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_3 (2) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_2 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_2 (1) +#endif + +#ifndef CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_1 +#define CCU_AromaCartridgeFlavor_Stat_CCU_Stat3_Flavor_1 (0) +#endif + + +// Value tables for @CCU_AromaFaultReason_Stat signal + +#ifndef CCU_AromaFaultReason_Stat_CCU_Stat3_Communication_or_hardware_error +#define CCU_AromaFaultReason_Stat_CCU_Stat3_Communication_or_hardware_error (5) +#endif + +#ifndef CCU_AromaFaultReason_Stat_CCU_Stat3_Selected_cartridge_ejected_or_empty +#define CCU_AromaFaultReason_Stat_CCU_Stat3_Selected_cartridge_ejected_or_empty (4) +#endif + +#ifndef CCU_AromaFaultReason_Stat_CCU_Stat3_Front_HVAC_fan_speed_too_fast +#define CCU_AromaFaultReason_Stat_CCU_Stat3_Front_HVAC_fan_speed_too_fast (3) +#endif + +#ifndef CCU_AromaFaultReason_Stat_CCU_Stat3_Front_HVAC_fan_speed_too_low +#define CCU_AromaFaultReason_Stat_CCU_Stat3_Front_HVAC_fan_speed_too_low (2) +#endif + +#ifndef CCU_AromaFaultReason_Stat_CCU_Stat3_Front_HVAC_fan_off +#define CCU_AromaFaultReason_Stat_CCU_Stat3_Front_HVAC_fan_off (1) +#endif + +#ifndef CCU_AromaFaultReason_Stat_CCU_Stat3_No_fault +#define CCU_AromaFaultReason_Stat_CCU_Stat3_No_fault (0) +#endif + + +// Value tables for @CCU_RLfootBlowDis_Stat signal + +#ifndef CCU_RLfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_disabled_limitation_ON +#define CCU_RLfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_disabled_limitation_ON (1) +#endif + +#ifndef CCU_RLfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_enabled_limitation_OFF +#define CCU_RLfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_enabled_limitation_OFF (0) +#endif + + +// Value tables for @CCU_RRfootBlowDis_Stat signal + +#ifndef CCU_RRfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_disabled_limitation_ON +#define CCU_RRfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_disabled_limitation_ON (1) +#endif + +#ifndef CCU_RRfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_enabled_limitation_OFF +#define CCU_RRfootBlowDis_Stat_CCU_Stat3_Rear_footwell_blowing_enabled_limitation_OFF (0) +#endif + + +// Value tables for @CCU_RestMode2_Stat signal + +#ifndef CCU_RestMode2_Stat_CCU_Stat3_Inactive +#define CCU_RestMode2_Stat_CCU_Stat3_Inactive (3) +#endif + +#ifndef CCU_RestMode2_Stat_CCU_Stat3_Active +#define CCU_RestMode2_Stat_CCU_Stat3_Active (2) +#endif + +#ifndef CCU_RestMode2_Stat_CCU_Stat3_Standby +#define CCU_RestMode2_Stat_CCU_Stat3_Standby (1) +#endif + +#ifndef CCU_RestMode2_Stat_CCU_Stat3_Not_requested +#define CCU_RestMode2_Stat_CCU_Stat3_Not_requested (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Aroma cartridge capacity status + uint8_t CCU_AromaCartridgeCapacity_Stat_ro : 4; // Bits= 4 Factor= 10 + +#ifdef CANDB_USE_SIGFLOAT + uint8_t CCU_AromaCartridgeCapacity_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Aroma cartridge flavor status + // 15 : "Flavor 16" + // 14 : "Flavor 15" + // 13 : "Flavor 14" + // 12 : "Flavor 13" + // 11 : "Flavor 12" + // 10 : "Flavor 11" + // 9 : "Flavor 10" + // 8 : "Flavor 9" + // 7 : "Flavor 8" + // 6 : "Flavor 7" + // 5 : "Flavor 6" + // 4 : "Flavor 5" + // 3 : "Flavor 4" + // 2 : "Flavor 3" + // 1 : "Flavor 2" + // 0 : "Flavor 1" + uint8_t CCU_AromaCartridgeFlavor_Stat : 4; // Bits= 4 + + // The reason why the aromatization system does not turn on + // 5 : "Communication or hardware error" + // 4 : "Selected cartridge ejected or empty" + // 3 : "Front HVAC fan speed too fast" + // 2 : "Front HVAC fan speed too low" + // 1 : "Front HVAC fan off" + // 0 : "No fault" + uint8_t CCU_AromaFaultReason_Stat : 3; // Bits= 3 + + // Rear left passenger footwell blowing disable status (summer mode) + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 0 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t CCU_RLfootBlowDis_Stat : 1; // Bits= 1 + + // Rear right passenger footwell blowing disable status (summer mode) + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 0 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t CCU_RRfootBlowDis_Stat : 1; // Bits= 1 + + // CCU REST mode status + // 3 : "Inactive" + // 2 : "Active" + // 1 : "Standby" + // 0 : "Not requested" + uint8_t CCU_RestMode2_Stat : 2; // Bits= 2 + +#else + + // Aroma cartridge capacity status + uint8_t CCU_AromaCartridgeCapacity_Stat_ro; // Bits= 4 Factor= 10 + +#ifdef CANDB_USE_SIGFLOAT + uint8_t CCU_AromaCartridgeCapacity_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Aroma cartridge flavor status + // 15 : "Flavor 16" + // 14 : "Flavor 15" + // 13 : "Flavor 14" + // 12 : "Flavor 13" + // 11 : "Flavor 12" + // 10 : "Flavor 11" + // 9 : "Flavor 10" + // 8 : "Flavor 9" + // 7 : "Flavor 8" + // 6 : "Flavor 7" + // 5 : "Flavor 6" + // 4 : "Flavor 5" + // 3 : "Flavor 4" + // 2 : "Flavor 3" + // 1 : "Flavor 2" + // 0 : "Flavor 1" + uint8_t CCU_AromaCartridgeFlavor_Stat; // Bits= 4 + + // The reason why the aromatization system does not turn on + // 5 : "Communication or hardware error" + // 4 : "Selected cartridge ejected or empty" + // 3 : "Front HVAC fan speed too fast" + // 2 : "Front HVAC fan speed too low" + // 1 : "Front HVAC fan off" + // 0 : "No fault" + uint8_t CCU_AromaFaultReason_Stat; // Bits= 3 + + // Rear left passenger footwell blowing disable status (summer mode) + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 0 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t CCU_RLfootBlowDis_Stat; // Bits= 1 + + // Rear right passenger footwell blowing disable status (summer mode) + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 0 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t CCU_RRfootBlowDis_Stat; // Bits= 1 + + // CCU REST mode status + // 3 : "Inactive" + // 2 : "Active" + // 1 : "Standby" + // 0 : "Not requested" + uint8_t CCU_RestMode2_Stat; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Stat3_t; + +// def @CCU_VCU_Msg1 CAN Message (789 0x315) +#define CCU_VCU_Msg1_IDE (0U) +#define CCU_VCU_Msg1_DLC (8U) +#define CCU_VCU_Msg1_CANID (0x315U) +#define CCU_VCU_Msg1_CYC (200U) +// signal: @CCU_Sen_Pressure_ro +#define CANDB_CCU_Sen_Pressure_ro_CovFactor (0.1) +#define CANDB_CCU_Sen_Pressure_ro_toS(x) ( (uint16_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_CCU_Sen_Pressure_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) +// signal: @CCU_EvaTargetTemp_Val_ro +#define CANDB_CCU_EvaTargetTemp_Val_ro_CovFactor (0.1) +#define CANDB_CCU_EvaTargetTemp_Val_ro_toS(x) ( (int16_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_CCU_EvaTargetTemp_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) +// signal: @CCU_EvaCurrTempF_Val_ro +#define CANDB_CCU_EvaCurrTempF_Val_ro_CovFactor (0.1) +#define CANDB_CCU_EvaCurrTempF_Val_ro_toS(x) ( (int16_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_CCU_EvaCurrTempF_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) +// signal: @CCU_EvaCurrTempR_Val_ro +#define CANDB_CCU_EvaCurrTempR_Val_ro_CovFactor (0.1) +#define CANDB_CCU_EvaCurrTempR_Val_ro_toS(x) ( (int16_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_CCU_EvaCurrTempR_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // AC pressure sensor value + uint16_t CCU_Sen_Pressure_ro; // Bits=12 Factor= 0.1 Unit:'ATM' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_Sen_Pressure_phys; +#endif // CANDB_USE_SIGFLOAT + + // Evaporators target temperature =dbg_Sen_Eva_Target in LocalCCU-CAN + int16_t CCU_EvaTargetTemp_Val_ro; // [-] Bits=12 Factor= 0.1 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_EvaTargetTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Front evaporator current temperature =dbg_Sen_Eva_F in LocalCCU-CAN + int16_t CCU_EvaCurrTempF_Val_ro; // [-] Bits=12 Factor= 0.1 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_EvaCurrTempF_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rear evaporator current temperature =dbg_Sen_Eva_R in LocalCCU-CAN + int16_t CCU_EvaCurrTempR_Val_ro; // [-] Bits=12 Factor= 0.1 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_EvaCurrTempR_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Request to VCU for target temperature Liquid HVAC Heater + uint8_t CCU_LiquidHeaterTargetTemp_Req : 7; // Bits= 7 Unit:'�C' + + // Rolling Counter [0 - 15] + uint8_t CCU_VCU_Msg1_RC : 4; // Bits= 4 + +#else + + // AC pressure sensor value + uint16_t CCU_Sen_Pressure_ro; // Bits=12 Factor= 0.1 Unit:'ATM' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_Sen_Pressure_phys; +#endif // CANDB_USE_SIGFLOAT + + // Evaporators target temperature =dbg_Sen_Eva_Target in LocalCCU-CAN + int16_t CCU_EvaTargetTemp_Val_ro; // [-] Bits=12 Factor= 0.1 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_EvaTargetTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Front evaporator current temperature =dbg_Sen_Eva_F in LocalCCU-CAN + int16_t CCU_EvaCurrTempF_Val_ro; // [-] Bits=12 Factor= 0.1 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_EvaCurrTempF_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rear evaporator current temperature =dbg_Sen_Eva_R in LocalCCU-CAN + int16_t CCU_EvaCurrTempR_Val_ro; // [-] Bits=12 Factor= 0.1 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_EvaCurrTempR_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Request to VCU for target temperature Liquid HVAC Heater + uint8_t CCU_LiquidHeaterTargetTemp_Req; // Bits= 7 Unit:'�C' + + // Rolling Counter [0 - 15] + uint8_t CCU_VCU_Msg1_RC; // Bits= 4 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_VCU_Msg1_t; + +// def @CCU_VCU_Msg2 CAN Message (790 0x316) +#define CCU_VCU_Msg2_IDE (0U) +#define CCU_VCU_Msg2_DLC (8U) +#define CCU_VCU_Msg2_CANID (0x316U) +#define CCU_VCU_Msg2_CYC (200U) + +// Value tables for @eTXV_batChiller_Err_Stat signal + +#ifndef eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_No_error +#define eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_No_error (0) +#endif + +#ifndef eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_break +#define eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_break (1) +#endif + +#ifndef eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_short_circuit +#define eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_short_circuit (2) +#endif + +#ifndef eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_Component_malfunction +#define eTXV_batChiller_Err_Stat_CCU_VCU_Msg2_Component_malfunction (3) +#endif + +// signal: @eTXV_batChiller_Pressure_Val_ro +#define CANDB_eTXV_batChiller_Pressure_Val_ro_CovFactor (0.1) +#define CANDB_eTXV_batChiller_Pressure_Val_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_eTXV_batChiller_Pressure_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) +// signal: @eTXV_batChiller_Temp_Val_ro +#define CANDB_eTXV_batChiller_Temp_Val_ro_CovFactor (1) +#define CANDB_eTXV_batChiller_Temp_Val_ro_toS(x) ( (uint8_t) ((x) - (-40)) ) +#define CANDB_eTXV_batChiller_Temp_Val_ro_fromS(x) ( ((x) + (-40)) ) + +// Value tables for @eTXV_eeChiller_Err_Stat signal + +#ifndef eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_No_error +#define eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_No_error (0) +#endif + +#ifndef eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_break +#define eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_break (1) +#endif + +#ifndef eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_short_circuit +#define eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_Supply_chain_short_circuit (2) +#endif + +#ifndef eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_Component_malfunction +#define eTXV_eeChiller_Err_Stat_CCU_VCU_Msg2_Component_malfunction (3) +#endif + +// signal: @eTXV_eeChiller_Pressure_Val_ro +#define CANDB_eTXV_eeChiller_Pressure_Val_ro_CovFactor (0.1) +#define CANDB_eTXV_eeChiller_Pressure_Val_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_eTXV_eeChiller_Pressure_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) +// signal: @eTXV_eeChiller_Temp_Val_ro +#define CANDB_eTXV_eeChiller_Temp_Val_ro_CovFactor (1) +#define CANDB_eTXV_eeChiller_Temp_Val_ro_toS(x) ( (uint8_t) ((x) - (-40)) ) +#define CANDB_eTXV_eeChiller_Temp_Val_ro_fromS(x) ( ((x) + (-40)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Battery chiller eTXV position status + uint8_t eTXV_batChiller_Pos_Stat : 7; // Bits= 7 Unit:'%' + + // Battery chiller eTXV error status + // 0 : "No error" + // 1 : "Supply chain break" + // 2 : "Supply chain short circuit" + // 3 : "Component malfunction" + uint8_t eTXV_batChiller_Err_Stat : 2; // Bits= 2 + + // Battery chiller eTXV pressure value + uint8_t eTXV_batChiller_Pressure_Val_ro : 6; // Bits= 6 Factor= 0.1 Unit:'MPaG' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t eTXV_batChiller_Pressure_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Battery chiller eTXV temperature value + uint8_t eTXV_batChiller_Temp_Val_ro : 7; // Bits= 7 Offset= -40 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int8_t eTXV_batChiller_Temp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Electrical components chiller eTXV position status + uint8_t eTXV_eeChiller_Pos_Stat : 7; // Bits= 7 Unit:'%' + + // Electrical components eTXV error status + // 0 : "No error" + // 1 : "Supply chain break" + // 2 : "Supply chain short circuit" + // 3 : "Component malfunction" + uint8_t eTXV_eeChiller_Err_Stat : 2; // Bits= 2 + + // Electrical components eTXV pressure value + uint8_t eTXV_eeChiller_Pressure_Val_ro : 6; // Bits= 6 Factor= 0.1 Unit:'MPaG' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t eTXV_eeChiller_Pressure_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Electrical components eTXV temperature value + uint8_t eTXV_eeChiller_Temp_Val_ro : 7; // Bits= 7 Offset= -40 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int8_t eTXV_eeChiller_Temp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t CCU_VCU_Msg2_RC : 4; // Bits= 4 + +#else + + // Battery chiller eTXV position status + uint8_t eTXV_batChiller_Pos_Stat; // Bits= 7 Unit:'%' + + // Battery chiller eTXV error status + // 0 : "No error" + // 1 : "Supply chain break" + // 2 : "Supply chain short circuit" + // 3 : "Component malfunction" + uint8_t eTXV_batChiller_Err_Stat; // Bits= 2 + + // Battery chiller eTXV pressure value + uint8_t eTXV_batChiller_Pressure_Val_ro; // Bits= 6 Factor= 0.1 Unit:'MPaG' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t eTXV_batChiller_Pressure_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Battery chiller eTXV temperature value + uint8_t eTXV_batChiller_Temp_Val_ro; // Bits= 7 Offset= -40 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int8_t eTXV_batChiller_Temp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Electrical components chiller eTXV position status + uint8_t eTXV_eeChiller_Pos_Stat; // Bits= 7 Unit:'%' + + // Electrical components eTXV error status + // 0 : "No error" + // 1 : "Supply chain break" + // 2 : "Supply chain short circuit" + // 3 : "Component malfunction" + uint8_t eTXV_eeChiller_Err_Stat; // Bits= 2 + + // Electrical components eTXV pressure value + uint8_t eTXV_eeChiller_Pressure_Val_ro; // Bits= 6 Factor= 0.1 Unit:'MPaG' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t eTXV_eeChiller_Pressure_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Electrical components eTXV temperature value + uint8_t eTXV_eeChiller_Temp_Val_ro; // Bits= 7 Offset= -40 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int8_t eTXV_eeChiller_Temp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t CCU_VCU_Msg2_RC; // Bits= 4 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_VCU_Msg2_t; + +// def @BCM_CLIMATIC_DATA CAN Message (869 0x365) +#define BCM_CLIMATIC_DATA_IDE (0U) +#define BCM_CLIMATIC_DATA_DLC (6U) +#define BCM_CLIMATIC_DATA_CANID (0x365U) +#define BCM_CLIMATIC_DATA_CYC (250U) +// signal: @SolarSensRightVal_ro +#define CANDB_SolarSensRightVal_ro_CovFactor (4.01575) +#define CANDB_SolarSensRightVal_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (4.01575)) ) +#define CANDB_SolarSensRightVal_ro_fromS(x) ( (((x) * (4.01575)) + (0.0)) ) + +// Value tables for @FrontWindowHeating_Status signal + +#ifndef FrontWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_ON +#define FrontWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_ON (1) +#endif + +#ifndef FrontWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_OFF +#define FrontWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_OFF (0) +#endif + + +// Value tables for @RearWindowHeating_Status signal + +#ifndef RearWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_ON +#define RearWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_ON (1) +#endif + +#ifndef RearWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_OFF +#define RearWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_OFF (0) +#endif + +// signal: @SolarSensLeftVal_ro +#define CANDB_SolarSensLeftVal_ro_CovFactor (4.01575) +#define CANDB_SolarSensLeftVal_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (4.01575)) ) +#define CANDB_SolarSensLeftVal_ro_fromS(x) ( (((x) * (4.01575)) + (0.0)) ) + +// Value tables for @SideWindowHeating_Status signal + +#ifndef SideWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_ON +#define SideWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_ON (1) +#endif + +#ifndef SideWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_OFF +#define SideWindowHeating_Status_BCM_CLIMATIC_DATA_Heating_OFF (0) +#endif + + +// Value tables for @BCM_SideWindowType_Stat signal + +#ifndef BCM_SideWindowType_Stat_BCM_CLIMATIC_DATA_Side_window_heaters_present +#define BCM_SideWindowType_Stat_BCM_CLIMATIC_DATA_Side_window_heaters_present (1) +#endif + +#ifndef BCM_SideWindowType_Stat_BCM_CLIMATIC_DATA_Side_window_heaters_not_present +#define BCM_SideWindowType_Stat_BCM_CLIMATIC_DATA_Side_window_heaters_not_present (0) +#endif + + +// Value tables for @BCM_WindowWashingSt signal + +#ifndef BCM_WindowWashingSt_BCM_CLIMATIC_DATA_Window_Washing_On +#define BCM_WindowWashingSt_BCM_CLIMATIC_DATA_Window_Washing_On (1) +#endif + +#ifndef BCM_WindowWashingSt_BCM_CLIMATIC_DATA_Window_Washing_Off +#define BCM_WindowWashingSt_BCM_CLIMATIC_DATA_Window_Washing_Off (0) +#endif + + +// Value tables for @BCM_GloveBox_Stat signal + +#ifndef BCM_GloveBox_Stat_BCM_CLIMATIC_DATA_Glove_box_opened +#define BCM_GloveBox_Stat_BCM_CLIMATIC_DATA_Glove_box_opened (1) +#endif + +#ifndef BCM_GloveBox_Stat_BCM_CLIMATIC_DATA_Glove_box_closed +#define BCM_GloveBox_Stat_BCM_CLIMATIC_DATA_Glove_box_closed (0) +#endif + +// signal: @WindshieldTemp_ro +#define CANDB_WindshieldTemp_ro_CovFactor (0.5) +#define CANDB_WindshieldTemp_ro_toS(x) ( (uint8_t) (((x) - (-40.0)) / (0.5)) ) +#define CANDB_WindshieldTemp_ro_fromS(x) ( (((x) * (0.5)) + (-40.0)) ) +// signal: @WindshieldHumidity_ro +#define CANDB_WindshieldHumidity_ro_CovFactor (0.5) +#define CANDB_WindshieldHumidity_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.5)) ) +#define CANDB_WindshieldHumidity_ro_fromS(x) ( (((x) * (0.5)) + (0.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Solar radiation value from right sensor + uint8_t SolarSensRightVal_ro; // Bits= 8 Factor= 4.01575 Unit:'W/qm' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t SolarSensRightVal_phys; +#endif // CANDB_USE_SIGFLOAT + + // State of front window heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t FrontWindowHeating_Status : 1; // Bits= 1 + + // State of rear window heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t RearWindowHeating_Status : 1; // Bits= 1 + + // Solar radiation value from left sensor + uint8_t SolarSensLeftVal_ro; // Bits= 8 Factor= 4.01575 Unit:'W/qm' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t SolarSensLeftVal_phys; +#endif // CANDB_USE_SIGFLOAT + + // State of side windows heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t SideWindowHeating_Status : 1; // Bits= 1 + + // Indicates side window heaters installed on vehicle or not + // 1 : "Side window heaters present" + // 0 : "Side window heaters not present" + uint8_t BCM_SideWindowType_Stat : 1; // Bits= 1 + + // Indicates the window washer status + // 1 : "Window Washing On" + // 0 : "Window Washing Off" + uint8_t BCM_WindowWashingSt : 1; // Bits= 1 + + // Current state of glove box (open or closed) + // 1 : "Glove box opened" + // 0 : "Glove box closed" + uint8_t BCM_GloveBox_Stat : 1; // Bits= 1 + + // Temperature of front windshield zone + uint8_t WindshieldTemp_ro; // Bits= 8 Offset= -40.0 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t WindshieldTemp_phys; +#endif // CANDB_USE_SIGFLOAT + + // Level of humidity in front windshield zone + uint8_t WindshieldHumidity_ro; // Bits= 8 Factor= 0.5 Unit:'%' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t WindshieldHumidity_phys; +#endif // CANDB_USE_SIGFLOAT + +#else + + // Solar radiation value from right sensor + uint8_t SolarSensRightVal_ro; // Bits= 8 Factor= 4.01575 Unit:'W/qm' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t SolarSensRightVal_phys; +#endif // CANDB_USE_SIGFLOAT + + // State of front window heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t FrontWindowHeating_Status; // Bits= 1 + + // State of rear window heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t RearWindowHeating_Status; // Bits= 1 + + // Solar radiation value from left sensor + uint8_t SolarSensLeftVal_ro; // Bits= 8 Factor= 4.01575 Unit:'W/qm' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t SolarSensLeftVal_phys; +#endif // CANDB_USE_SIGFLOAT + + // State of side windows heating + // 1 : "Heating ON" + // 0 : "Heating OFF" + uint8_t SideWindowHeating_Status; // Bits= 1 + + // Indicates side window heaters installed on vehicle or not + // 1 : "Side window heaters present" + // 0 : "Side window heaters not present" + uint8_t BCM_SideWindowType_Stat; // Bits= 1 + + // Indicates the window washer status + // 1 : "Window Washing On" + // 0 : "Window Washing Off" + uint8_t BCM_WindowWashingSt; // Bits= 1 + + // Current state of glove box (open or closed) + // 1 : "Glove box opened" + // 0 : "Glove box closed" + uint8_t BCM_GloveBox_Stat; // Bits= 1 + + // Temperature of front windshield zone + uint8_t WindshieldTemp_ro; // Bits= 8 Offset= -40.0 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t WindshieldTemp_phys; +#endif // CANDB_USE_SIGFLOAT + + // Level of humidity in front windshield zone + uint8_t WindshieldHumidity_ro; // Bits= 8 Factor= 0.5 Unit:'%' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t WindshieldHumidity_phys; +#endif // CANDB_USE_SIGFLOAT + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} BCM_CLIMATIC_DATA_t; + +// def @CCU_Msg1 CAN Message (896 0x380) +#define CCU_Msg1_IDE (0U) +#define CCU_Msg1_DLC (8U) +#define CCU_Msg1_CANID (0x380U) +#define CCU_Msg1_CYC (250U) + +// Value tables for @CCU_MirrorHeating_Req signal + +#ifndef CCU_MirrorHeating_Req_CCU_Msg1_Error +#define CCU_MirrorHeating_Req_CCU_Msg1_Error (3) +#endif + +#ifndef CCU_MirrorHeating_Req_CCU_Msg1_Heating_off_requested +#define CCU_MirrorHeating_Req_CCU_Msg1_Heating_off_requested (2) +#endif + +#ifndef CCU_MirrorHeating_Req_CCU_Msg1_Heating_on_requested +#define CCU_MirrorHeating_Req_CCU_Msg1_Heating_on_requested (1) +#endif + +#ifndef CCU_MirrorHeating_Req_CCU_Msg1_Unknown +#define CCU_MirrorHeating_Req_CCU_Msg1_Unknown (0) +#endif + + +// Value tables for @CCU_RecirculationLed_Cmd signal + +#ifndef CCU_RecirculationLed_Cmd_CCU_Msg1_On +#define CCU_RecirculationLed_Cmd_CCU_Msg1_On (1) +#endif + +#ifndef CCU_RecirculationLed_Cmd_CCU_Msg1_Off +#define CCU_RecirculationLed_Cmd_CCU_Msg1_Off (0) +#endif + + +// Value tables for @CCU_DefrostLed_Req signal + +#ifndef CCU_DefrostLed_Req_CCU_Msg1_On +#define CCU_DefrostLed_Req_CCU_Msg1_On (1) +#endif + +#ifndef CCU_DefrostLed_Req_CCU_Msg1_Off +#define CCU_DefrostLed_Req_CCU_Msg1_Off (0) +#endif + + +// Value tables for @CCU_SideWindowHeating_Req signal + +#ifndef CCU_SideWindowHeating_Req_CCU_Msg1_Error +#define CCU_SideWindowHeating_Req_CCU_Msg1_Error (3) +#endif + +#ifndef CCU_SideWindowHeating_Req_CCU_Msg1_Heating_off_requested +#define CCU_SideWindowHeating_Req_CCU_Msg1_Heating_off_requested (2) +#endif + +#ifndef CCU_SideWindowHeating_Req_CCU_Msg1_Heating_on_requested +#define CCU_SideWindowHeating_Req_CCU_Msg1_Heating_on_requested (1) +#endif + +#ifndef CCU_SideWindowHeating_Req_CCU_Msg1_Unknown +#define CCU_SideWindowHeating_Req_CCU_Msg1_Unknown (0) +#endif + + +// Value tables for @CCU_RearWindowHeating_Req signal + +#ifndef CCU_RearWindowHeating_Req_CCU_Msg1_Error +#define CCU_RearWindowHeating_Req_CCU_Msg1_Error (3) +#endif + +#ifndef CCU_RearWindowHeating_Req_CCU_Msg1_Heating_off_requested +#define CCU_RearWindowHeating_Req_CCU_Msg1_Heating_off_requested (2) +#endif + +#ifndef CCU_RearWindowHeating_Req_CCU_Msg1_Heating_on_requested +#define CCU_RearWindowHeating_Req_CCU_Msg1_Heating_on_requested (1) +#endif + +#ifndef CCU_RearWindowHeating_Req_CCU_Msg1_Unknown +#define CCU_RearWindowHeating_Req_CCU_Msg1_Unknown (0) +#endif + + +// Value tables for @CCU_FrontWindowHeating_Req signal + +#ifndef CCU_FrontWindowHeating_Req_CCU_Msg1_Error +#define CCU_FrontWindowHeating_Req_CCU_Msg1_Error (3) +#endif + +#ifndef CCU_FrontWindowHeating_Req_CCU_Msg1_Heating_off_requested +#define CCU_FrontWindowHeating_Req_CCU_Msg1_Heating_off_requested (2) +#endif + +#ifndef CCU_FrontWindowHeating_Req_CCU_Msg1_Heating_on_requested +#define CCU_FrontWindowHeating_Req_CCU_Msg1_Heating_on_requested (1) +#endif + +#ifndef CCU_FrontWindowHeating_Req_CCU_Msg1_Unknown +#define CCU_FrontWindowHeating_Req_CCU_Msg1_Unknown (0) +#endif + + +// Value tables for @CCU_EmergAirCleaning_Stat signal + +#ifndef CCU_EmergAirCleaning_Stat_CCU_Msg1_Active +#define CCU_EmergAirCleaning_Stat_CCU_Msg1_Active (1) +#endif + +#ifndef CCU_EmergAirCleaning_Stat_CCU_Msg1_Incative +#define CCU_EmergAirCleaning_Stat_CCU_Msg1_Incative (0) +#endif + + +// Value tables for @CCU_FireExtinguishSys_Stat signal + +#ifndef CCU_FireExtinguishSys_Stat_CCU_Msg1_Active +#define CCU_FireExtinguishSys_Stat_CCU_Msg1_Active (1) +#endif + +#ifndef CCU_FireExtinguishSys_Stat_CCU_Msg1_Inactive +#define CCU_FireExtinguishSys_Stat_CCU_Msg1_Inactive (0) +#endif + + +// Value tables for @CCU_FLAutoPsngrLed_Cmd signal + +#ifndef CCU_FLAutoPsngrLed_Cmd_CCU_Msg1_On +#define CCU_FLAutoPsngrLed_Cmd_CCU_Msg1_On (1) +#endif + +#ifndef CCU_FLAutoPsngrLed_Cmd_CCU_Msg1_Off +#define CCU_FLAutoPsngrLed_Cmd_CCU_Msg1_Off (0) +#endif + + +// Value tables for @CCU_FRAutoPsngrLed_Cmd signal + +#ifndef CCU_FRAutoPsngrLed_Cmd_CCU_Msg1_On +#define CCU_FRAutoPsngrLed_Cmd_CCU_Msg1_On (1) +#endif + +#ifndef CCU_FRAutoPsngrLed_Cmd_CCU_Msg1_Off +#define CCU_FRAutoPsngrLed_Cmd_CCU_Msg1_Off (0) +#endif + + +// Value tables for @CCU_RLAutoPsngrLed_Cmd signal + +#ifndef CCU_RLAutoPsngrLed_Cmd_CCU_Msg1_On +#define CCU_RLAutoPsngrLed_Cmd_CCU_Msg1_On (1) +#endif + +#ifndef CCU_RLAutoPsngrLed_Cmd_CCU_Msg1_Off +#define CCU_RLAutoPsngrLed_Cmd_CCU_Msg1_Off (0) +#endif + + +// Value tables for @CCU_RRAutoPsngrLed_Cmd signal + +#ifndef CCU_RRAutoPsngrLed_Cmd_CCU_Msg1_On +#define CCU_RRAutoPsngrLed_Cmd_CCU_Msg1_On (1) +#endif + +#ifndef CCU_RRAutoPsngrLed_Cmd_CCU_Msg1_Off +#define CCU_RRAutoPsngrLed_Cmd_CCU_Msg1_Off (0) +#endif + + +// Value tables for @CCU_AC_MaxLed_Cmd signal + +#ifndef CCU_AC_MaxLed_Cmd_CCU_Msg1_On +#define CCU_AC_MaxLed_Cmd_CCU_Msg1_On (1) +#endif + +#ifndef CCU_AC_MaxLed_Cmd_CCU_Msg1_Off +#define CCU_AC_MaxLed_Cmd_CCU_Msg1_Off (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Request to activate mirrors heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_MirrorHeating_Req : 2; // Bits= 2 + + // Air recirculation LED indicator command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_RecirculationLed_Cmd : 1; // Bits= 1 + + // Defrost function LED indicator on/off request + // 1 : "On" + // 0 : "Off" + uint8_t CCU_DefrostLed_Req : 1; // Bits= 1 + + // Request to activate side windows heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_SideWindowHeating_Req : 2; // Bits= 2 + + // Request to activate rear window heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_RearWindowHeating_Req : 2; // Bits= 2 + + // Request to activate front window heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_FrontWindowHeating_Req : 2; // Bits= 2 + + // Status of emergency air cleaning system + // 1 : "Active" + // 0 : "Incative" + uint8_t CCU_EmergAirCleaning_Stat : 1; // Bits= 1 + + // Status of fire extinguishing system + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_FireExtinguishSys_Stat : 1; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_FLAutoPsngrLed_Cmd : 1; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_FRAutoPsngrLed_Cmd : 1; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_RLAutoPsngrLed_Cmd : 1; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_RRAutoPsngrLed_Cmd : 1; // Bits= 1 + + // LED indicator command in CCPF when automatic Coditioner with max power is Active + // 1 : "On" + // 0 : "Off" + uint8_t CCU_AC_MaxLed_Cmd : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t CCU_MSG1_RC : 4; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t CCU_MSG1_CS; // Bits= 8 + +#else + + // Request to activate mirrors heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_MirrorHeating_Req; // Bits= 2 + + // Air recirculation LED indicator command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_RecirculationLed_Cmd; // Bits= 1 + + // Defrost function LED indicator on/off request + // 1 : "On" + // 0 : "Off" + uint8_t CCU_DefrostLed_Req; // Bits= 1 + + // Request to activate side windows heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_SideWindowHeating_Req; // Bits= 2 + + // Request to activate rear window heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_RearWindowHeating_Req; // Bits= 2 + + // Request to activate front window heating + // 3 : "Error" + // 2 : "Heating off requested" + // 1 : "Heating on requested" + // 0 : "Unknown" + uint8_t CCU_FrontWindowHeating_Req; // Bits= 2 + + // Status of emergency air cleaning system + // 1 : "Active" + // 0 : "Incative" + uint8_t CCU_EmergAirCleaning_Stat; // Bits= 1 + + // Status of fire extinguishing system + // 1 : "Active" + // 0 : "Inactive" + uint8_t CCU_FireExtinguishSys_Stat; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_FLAutoPsngrLed_Cmd; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_FRAutoPsngrLed_Cmd; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_RLAutoPsngrLed_Cmd; // Bits= 1 + + // Automate climate control On/Off LED command + // 1 : "On" + // 0 : "Off" + uint8_t CCU_RRAutoPsngrLed_Cmd; // Bits= 1 + + // LED indicator command in CCPF when automatic Coditioner with max power is Active + // 1 : "On" + // 0 : "Off" + uint8_t CCU_AC_MaxLed_Cmd; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t CCU_MSG1_RC; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t CCU_MSG1_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Msg1_t; + +// def @VCU_CCU_Req CAN Message (925 0x39d) +#define VCU_CCU_Req_IDE (0U) +#define VCU_CCU_Req_DLC (4U) +#define VCU_CCU_Req_CANID (0x39dU) +#define VCU_CCU_Req_CYC (200U) +// signal: @VCU_LiquidHeaterCurrentTemp_Stat_ro +#define CANDB_VCU_LiquidHeaterCurrentTemp_Stat_ro_CovFactor (0.5) +#define CANDB_VCU_LiquidHeaterCurrentTemp_Stat_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.5)) ) +#define CANDB_VCU_LiquidHeaterCurrentTemp_Stat_ro_fromS(x) ( (((x) * (0.5)) + (0.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + uint8_t VCU_eTXV_batChiller_Pos_Req : 7; // Bits= 7 Unit:'%' + + uint8_t VCU_eTXV_eeChiller_Pos_Req : 7; // Bits= 7 Unit:'%' + + // Status from VCU about current temperature Liquid HVAC Heater + uint8_t VCU_LiquidHeaterCurrentTemp_Stat_ro; // Bits= 8 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t VCU_LiquidHeaterCurrentTemp_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t VCU_CCU_Req_RC : 4; // Bits= 4 + +#else + + uint8_t VCU_eTXV_batChiller_Pos_Req; // Bits= 7 Unit:'%' + + uint8_t VCU_eTXV_eeChiller_Pos_Req; // Bits= 7 Unit:'%' + + // Status from VCU about current temperature Liquid HVAC Heater + uint8_t VCU_LiquidHeaterCurrentTemp_Stat_ro; // Bits= 8 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t VCU_LiquidHeaterCurrentTemp_Stat_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t VCU_CCU_Req_RC; // Bits= 4 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} VCU_CCU_Req_t; + +// def @ESC_08 CAN Message (961 0x3c1) +#define ESC_08_IDE (0U) +#define ESC_08_DLC (5U) +#define ESC_08_CANID (0x3c1U) +#define ESC_08_CYC (500U) +// signal: @ESC_Mileage_Val_ro +#define CANDB_ESC_Mileage_Val_ro_CovFactor (0.1) +#define CANDB_ESC_Mileage_Val_ro_toS(x) ( (uint32_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_ESC_Mileage_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Mileage/ odometer signal to provide vehicle mileage information. + // 0x7FFFFFF = Error + uint32_t ESC_Mileage_Val_ro; // Bits=27 Factor= 0.1 Unit:'km' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t ESC_Mileage_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t ESC_08_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t ESC_08_CS; // Bits= 8 + +#else + + // Mileage/ odometer signal to provide vehicle mileage information. + // 0x7FFFFFF = Error + uint32_t ESC_Mileage_Val_ro; // Bits=27 Factor= 0.1 Unit:'km' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t ESC_Mileage_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t ESC_08_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t ESC_08_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} ESC_08_t; + +// def @SMFL_status CAN Message (1232 0x4d0) +#define SMFL_status_IDE (0U) +#define SMFL_status_DLC (8U) +#define SMFL_status_CANID (0x4d0U) +#define SMFL_status_CYC (250U) + +// Value tables for @SMFL_CarpetHeat_Stat signal + +#ifndef SMFL_CarpetHeat_Stat_SMFL_status_Carpet_heating_is_active +#define SMFL_CarpetHeat_Stat_SMFL_status_Carpet_heating_is_active (1) +#endif + +#ifndef SMFL_CarpetHeat_Stat_SMFL_status_Carpet_heating_is_inactive +#define SMFL_CarpetHeat_Stat_SMFL_status_Carpet_heating_is_inactive (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Carpet heating status for front left zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMFL_CarpetHeat_Stat : 1; // Bits= 1 + +#else + + // Carpet heating status for front left zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMFL_CarpetHeat_Stat; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} SMFL_status_t; + +// def @SMFR_status CAN Message (1233 0x4d1) +#define SMFR_status_IDE (0U) +#define SMFR_status_DLC (8U) +#define SMFR_status_CANID (0x4d1U) +#define SMFR_status_CYC (250U) + +// Value tables for @SMFR_CarpetHeat_Stat signal + +#ifndef SMFR_CarpetHeat_Stat_SMFR_status_Carpet_heating_is_active +#define SMFR_CarpetHeat_Stat_SMFR_status_Carpet_heating_is_active (1) +#endif + +#ifndef SMFR_CarpetHeat_Stat_SMFR_status_Carpet_heating_is_inactive +#define SMFR_CarpetHeat_Stat_SMFR_status_Carpet_heating_is_inactive (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Carpet heating status for front right zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMFR_CarpetHeat_Stat : 1; // Bits= 1 + +#else + + // Carpet heating status for front right zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMFR_CarpetHeat_Stat; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} SMFR_status_t; + +// def @SMRL_status CAN Message (1234 0x4d2) +#define SMRL_status_IDE (0U) +#define SMRL_status_DLC (8U) +#define SMRL_status_CANID (0x4d2U) +#define SMRL_status_CYC (250U) + +// Value tables for @SMRL_CarpetHeat_Stat signal + +#ifndef SMRL_CarpetHeat_Stat_SMRL_status_Carpet_heating_is_active +#define SMRL_CarpetHeat_Stat_SMRL_status_Carpet_heating_is_active (1) +#endif + +#ifndef SMRL_CarpetHeat_Stat_SMRL_status_Carpet_heating_is_inactive +#define SMRL_CarpetHeat_Stat_SMRL_status_Carpet_heating_is_inactive (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Carpet heating status for rear left zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMRL_CarpetHeat_Stat : 1; // Bits= 1 + +#else + + // Carpet heating status for rear left zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMRL_CarpetHeat_Stat; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} SMRL_status_t; + +// def @SMRR_status CAN Message (1235 0x4d3) +#define SMRR_status_IDE (0U) +#define SMRR_status_DLC (8U) +#define SMRR_status_CANID (0x4d3U) +#define SMRR_status_CYC (250U) + +// Value tables for @SMRR_CarpetHeat_Stat signal + +#ifndef SMRR_CarpetHeat_Stat_SMRR_status_Carpet_heating_is_active +#define SMRR_CarpetHeat_Stat_SMRR_status_Carpet_heating_is_active (1) +#endif + +#ifndef SMRR_CarpetHeat_Stat_SMRR_status_Carpet_heating_is_inactive +#define SMRR_CarpetHeat_Stat_SMRR_status_Carpet_heating_is_inactive (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Carpet heating status for rear right zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMRR_CarpetHeat_Stat : 1; // Bits= 1 + +#else + + // Carpet heating status for rear right zone + // 1 : "Carpet heating is active" + // 0 : "Carpet heating is inactive" + uint8_t SMRR_CarpetHeat_Stat; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} SMRR_status_t; + +// def @CCU_Errors CAN Message (1278 0x4fe) +#define CCU_Errors_IDE (0U) +#define CCU_Errors_DLC (4U) +#define CCU_Errors_CANID (0x4feU) +#define CCU_Errors_CYC (1000U) + +// Value tables for @CCU_IncarTempErrF_Stat signal + +#ifndef CCU_IncarTempErrF_Stat_CCU_Errors_Error +#define CCU_IncarTempErrF_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_IncarTempErrF_Stat_CCU_Errors_No_error +#define CCU_IncarTempErrF_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_IncarTempErrR_Stat signal + +#ifndef CCU_IncarTempErrR_Stat_CCU_Errors_Error +#define CCU_IncarTempErrR_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_IncarTempErrR_Stat_CCU_Errors_No_error +#define CCU_IncarTempErrR_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_DuctTempSenErrF_Stat signal + +#ifndef CCU_DuctTempSenErrF_Stat_CCU_Errors_Error +#define CCU_DuctTempSenErrF_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_DuctTempSenErrF_Stat_CCU_Errors_No_error +#define CCU_DuctTempSenErrF_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_DuctTempSenErrR_Stat signal + +#ifndef CCU_DuctTempSenErrR_Stat_CCU_Errors_Error +#define CCU_DuctTempSenErrR_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_DuctTempSenErrR_Stat_CCU_Errors_No_error +#define CCU_DuctTempSenErrR_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_EvaTempSenErrF_Stat signal + +#ifndef CCU_EvaTempSenErrF_Stat_CCU_Errors_Error +#define CCU_EvaTempSenErrF_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_EvaTempSenErrF_Stat_CCU_Errors_No_error +#define CCU_EvaTempSenErrF_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_EvaTempSenErrR_Stat signal + +#ifndef CCU_EvaTempSenErrR_Stat_CCU_Errors_Error +#define CCU_EvaTempSenErrR_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_EvaTempSenErrR_Stat_CCU_Errors_No_error +#define CCU_EvaTempSenErrR_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_DeflectorSwErrF_Stat signal + +#ifndef CCU_DeflectorSwErrF_Stat_CCU_Errors_Error +#define CCU_DeflectorSwErrF_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_DeflectorSwErrF_Stat_CCU_Errors_No_error +#define CCU_DeflectorSwErrF_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_DeflectorSwErrR_Stat signal + +#ifndef CCU_DeflectorSwErrR_Stat_CCU_Errors_Error +#define CCU_DeflectorSwErrR_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_DeflectorSwErrR_Stat_CCU_Errors_No_error +#define CCU_DeflectorSwErrR_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_PressSenErr_Stat signal + +#ifndef CCU_PressSenErr_Stat_CCU_Errors_Error +#define CCU_PressSenErr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_PressSenErr_Stat_CCU_Errors_No_error +#define CCU_PressSenErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_AmbienTemptSenErr_Stat signal + +#ifndef CCU_AmbienTemptSenErr_Stat_CCU_Errors_Error +#define CCU_AmbienTemptSenErr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_AmbienTemptSenErr_Stat_CCU_Errors_No_error +#define CCU_AmbienTemptSenErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_SealingValveErr_Stat signal + +#ifndef CCU_SealingValveErr_Stat_CCU_Errors_Error +#define CCU_SealingValveErr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_SealingValveErr_Stat_CCU_Errors_No_error +#define CCU_SealingValveErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_ETXVerr_Stat signal + +#ifndef CCU_ETXVerr_Stat_CCU_Errors_Error +#define CCU_ETXVerr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_ETXVerr_Stat_CCU_Errors_No_error +#define CCU_ETXVerr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_HVACfanOrTXVerrF_Stat signal + +#ifndef CCU_HVACfanOrTXVerrF_Stat_CCU_Errors_Error +#define CCU_HVACfanOrTXVerrF_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_HVACfanOrTXVerrF_Stat_CCU_Errors_No_error +#define CCU_HVACfanOrTXVerrF_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_HVACfanOrTXVerrR_Stat signal + +#ifndef CCU_HVACfanOrTXVerrR_Stat_CCU_Errors_Error +#define CCU_HVACfanOrTXVerrR_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_HVACfanOrTXVerrR_Stat_CCU_Errors_No_error +#define CCU_HVACfanOrTXVerrR_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_ActuatorErrF_Stat signal + +#ifndef CCU_ActuatorErrF_Stat_CCU_Errors_Error +#define CCU_ActuatorErrF_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_ActuatorErrF_Stat_CCU_Errors_No_error +#define CCU_ActuatorErrF_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_ActuatorErrR_Stat signal + +#ifndef CCU_ActuatorErrR_Stat_CCU_Errors_Error +#define CCU_ActuatorErrR_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_ActuatorErrR_Stat_CCU_Errors_No_error +#define CCU_ActuatorErrR_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_UltravioletErr_Stat signal + +#ifndef CCU_UltravioletErr_Stat_CCU_Errors_Component_malfunction +#define CCU_UltravioletErr_Stat_CCU_Errors_Component_malfunction (3) +#endif + +#ifndef CCU_UltravioletErr_Stat_CCU_Errors_Supply_chain_short_circuit +#define CCU_UltravioletErr_Stat_CCU_Errors_Supply_chain_short_circuit (2) +#endif + +#ifndef CCU_UltravioletErr_Stat_CCU_Errors_Supply_chain_break +#define CCU_UltravioletErr_Stat_CCU_Errors_Supply_chain_break (1) +#endif + +#ifndef CCU_UltravioletErr_Stat_CCU_Errors_No_error +#define CCU_UltravioletErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_VinRecordErr_Stat signal + +#ifndef CCU_VinRecordErr_Stat_CCU_Errors_Error +#define CCU_VinRecordErr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_VinRecordErr_Stat_CCU_Errors_No_error +#define CCU_VinRecordErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_AirQualSenErr_Stat signal + +#ifndef CCU_AirQualSenErr_Stat_CCU_Errors_Component_malfunction +#define CCU_AirQualSenErr_Stat_CCU_Errors_Component_malfunction (4) +#endif + +#ifndef CCU_AirQualSenErr_Stat_CCU_Errors_Communication_error +#define CCU_AirQualSenErr_Stat_CCU_Errors_Communication_error (3) +#endif + +#ifndef CCU_AirQualSenErr_Stat_CCU_Errors_Supply_chain_short_circuit +#define CCU_AirQualSenErr_Stat_CCU_Errors_Supply_chain_short_circuit (2) +#endif + +#ifndef CCU_AirQualSenErr_Stat_CCU_Errors_Supply_chain_break +#define CCU_AirQualSenErr_Stat_CCU_Errors_Supply_chain_break (1) +#endif + +#ifndef CCU_AirQualSenErr_Stat_CCU_Errors_No_error +#define CCU_AirQualSenErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_CommErr_Stat signal + +#ifndef CCU_CommErr_Stat_CCU_Errors_Error +#define CCU_CommErr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_CommErr_Stat_CCU_Errors_No_error +#define CCU_CommErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_TWVerr_Stat signal + +#ifndef CCU_TWVerr_Stat_CCU_Errors_Error +#define CCU_TWVerr_Stat_CCU_Errors_Error (1) +#endif + +#ifndef CCU_TWVerr_Stat_CCU_Errors_No_error +#define CCU_TWVerr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_IonizationErr_Stat signal + +#ifndef CCU_IonizationErr_Stat_CCU_Errors_Component_malfunction +#define CCU_IonizationErr_Stat_CCU_Errors_Component_malfunction (4) +#endif + +#ifndef CCU_IonizationErr_Stat_CCU_Errors_Communication_error +#define CCU_IonizationErr_Stat_CCU_Errors_Communication_error (3) +#endif + +#ifndef CCU_IonizationErr_Stat_CCU_Errors_Supply_chain_short_circuit +#define CCU_IonizationErr_Stat_CCU_Errors_Supply_chain_short_circuit (2) +#endif + +#ifndef CCU_IonizationErr_Stat_CCU_Errors_Supply_chain_break +#define CCU_IonizationErr_Stat_CCU_Errors_Supply_chain_break (1) +#endif + +#ifndef CCU_IonizationErr_Stat_CCU_Errors_No_error +#define CCU_IonizationErr_Stat_CCU_Errors_No_error (0) +#endif + + +// Value tables for @CCU_AromaErr_Stat signal + +#ifndef CCU_AromaErr_Stat_CCU_Errors_Component_malfunction +#define CCU_AromaErr_Stat_CCU_Errors_Component_malfunction (4) +#endif + +#ifndef CCU_AromaErr_Stat_CCU_Errors_Communication_error +#define CCU_AromaErr_Stat_CCU_Errors_Communication_error (3) +#endif + +#ifndef CCU_AromaErr_Stat_CCU_Errors_Supply_chain_short_circuit +#define CCU_AromaErr_Stat_CCU_Errors_Supply_chain_short_circuit (2) +#endif + +#ifndef CCU_AromaErr_Stat_CCU_Errors_Supply_chain_break +#define CCU_AromaErr_Stat_CCU_Errors_Supply_chain_break (1) +#endif + +#ifndef CCU_AromaErr_Stat_CCU_Errors_No_error +#define CCU_AromaErr_Stat_CCU_Errors_No_error (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Incar temperature sensors for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_IncarTempErrF_Stat : 1; // Bits= 1 + + // Incar temperature sensors for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_IncarTempErrR_Stat : 1; // Bits= 1 + + // Duct temperature sensors for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DuctTempSenErrF_Stat : 1; // Bits= 1 + + // Duct temperature sensors for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DuctTempSenErrR_Stat : 1; // Bits= 1 + + // Evaporator temperature sensor for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_EvaTempSenErrF_Stat : 1; // Bits= 1 + + // Evaporator temperature sensor for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_EvaTempSenErrR_Stat : 1; // Bits= 1 + + // Deflectors for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DeflectorSwErrF_Stat : 1; // Bits= 1 + + // Deflectors for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DeflectorSwErrR_Stat : 1; // Bits= 1 + + // Pressure sensors error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_PressSenErr_Stat : 1; // Bits= 1 + + // Ambient temperature sensor error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_AmbienTemptSenErr_Stat : 1; // Bits= 1 + + // Sealing valve error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_SealingValveErr_Stat : 1; // Bits= 1 + + // ETXV error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_ETXVerr_Stat : 1; // Bits= 1 + + // HVAC fan or TXV for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_HVACfanOrTXVerrF_Stat : 1; // Bits= 1 + + // HVAC fan or TXV for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_HVACfanOrTXVerrR_Stat : 1; // Bits= 1 + + // Actuators for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_ActuatorErrF_Stat : 1; // Bits= 1 + + // Actuators for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_ActuatorErrR_Stat : 1; // Bits= 1 + + // Ultraviolet system error status + // 3 : "Component malfunction" + // 2 : "Supply chain short circuit + + // 1 : "Supply chain break + + // 0 : "No error" + uint8_t CCU_UltravioletErr_Stat : 2; // Bits= 2 + + // CCU VIN record error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_VinRecordErr_Stat : 1; // Bits= 1 + + // Air quality sensor error status + // 4 : "Component malfunction" + // 3 : "Communication error" + // 2 : "Supply chain short circuit" + // 1 : "Supply chain break" + // 0 : "No error" + uint8_t CCU_AirQualSenErr_Stat : 3; // Bits= 3 + + // CCU communication error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_CommErr_Stat : 1; // Bits= 1 + + // Two-way valve error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_TWVerr_Stat : 1; // Bits= 1 + + // Ionization system error status + // 4 : "Component malfunction" + // 3 : "Communication error + + // 2 : "Supply chain short circuit + + // 1 : "Supply chain break + + // 0 : "No error" + uint8_t CCU_IonizationErr_Stat : 3; // Bits= 3 + + // Aromatization system error status + // 4 : "Component malfunction" + // 3 : "Communication error + + // 2 : "Supply chain short circuit + + // 1 : "Supply chain break + + // 0 : "No error" + uint8_t CCU_AromaErr_Stat : 3; // Bits= 3 + +#else + + // Incar temperature sensors for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_IncarTempErrF_Stat; // Bits= 1 + + // Incar temperature sensors for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_IncarTempErrR_Stat; // Bits= 1 + + // Duct temperature sensors for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DuctTempSenErrF_Stat; // Bits= 1 + + // Duct temperature sensors for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DuctTempSenErrR_Stat; // Bits= 1 + + // Evaporator temperature sensor for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_EvaTempSenErrF_Stat; // Bits= 1 + + // Evaporator temperature sensor for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_EvaTempSenErrR_Stat; // Bits= 1 + + // Deflectors for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DeflectorSwErrF_Stat; // Bits= 1 + + // Deflectors for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_DeflectorSwErrR_Stat; // Bits= 1 + + // Pressure sensors error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_PressSenErr_Stat; // Bits= 1 + + // Ambient temperature sensor error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_AmbienTemptSenErr_Stat; // Bits= 1 + + // Sealing valve error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_SealingValveErr_Stat; // Bits= 1 + + // ETXV error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_ETXVerr_Stat; // Bits= 1 + + // HVAC fan or TXV for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_HVACfanOrTXVerrF_Stat; // Bits= 1 + + // HVAC fan or TXV for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_HVACfanOrTXVerrR_Stat; // Bits= 1 + + // Actuators for front zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_ActuatorErrF_Stat; // Bits= 1 + + // Actuators for rear zone error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_ActuatorErrR_Stat; // Bits= 1 + + // Ultraviolet system error status + // 3 : "Component malfunction" + // 2 : "Supply chain short circuit + + // 1 : "Supply chain break + + // 0 : "No error" + uint8_t CCU_UltravioletErr_Stat; // Bits= 2 + + // CCU VIN record error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_VinRecordErr_Stat; // Bits= 1 + + // Air quality sensor error status + // 4 : "Component malfunction" + // 3 : "Communication error" + // 2 : "Supply chain short circuit" + // 1 : "Supply chain break" + // 0 : "No error" + uint8_t CCU_AirQualSenErr_Stat; // Bits= 3 + + // CCU communication error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_CommErr_Stat; // Bits= 1 + + // Two-way valve error status + // 1 : "Error" + // 0 : "No error" + uint8_t CCU_TWVerr_Stat; // Bits= 1 + + // Ionization system error status + // 4 : "Component malfunction" + // 3 : "Communication error + + // 2 : "Supply chain short circuit + + // 1 : "Supply chain break + + // 0 : "No error" + uint8_t CCU_IonizationErr_Stat; // Bits= 3 + + // Aromatization system error status + // 4 : "Component malfunction" + // 3 : "Communication error + + // 2 : "Supply chain short circuit + + // 1 : "Supply chain break + + // 0 : "No error" + uint8_t CCU_AromaErr_Stat; // Bits= 3 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Errors_t; + +// def @CCU_Msg3 CAN Message (1281 0x501) +#define CCU_Msg3_IDE (0U) +#define CCU_Msg3_DLC (5U) +#define CCU_Msg3_CANID (0x501U) +#define CCU_Msg3_CYC (500U) + +// Value tables for @CCU_FAN_Req signal + +#ifndef CCU_FAN_Req_CCU_Msg3_Error +#define CCU_FAN_Req_CCU_Msg3_Error (127) +#endif + + +// Value tables for @CCU_RestMode_Stat signal + +#ifndef CCU_RestMode_Stat_CCU_Msg3_Inactive +#define CCU_RestMode_Stat_CCU_Msg3_Inactive (3) +#endif + +#ifndef CCU_RestMode_Stat_CCU_Msg3_Active +#define CCU_RestMode_Stat_CCU_Msg3_Active (2) +#endif + +#ifndef CCU_RestMode_Stat_CCU_Msg3_Standby +#define CCU_RestMode_Stat_CCU_Msg3_Standby (1) +#endif + +#ifndef CCU_RestMode_Stat_CCU_Msg3_Not_requested +#define CCU_RestMode_Stat_CCU_Msg3_Not_requested (0) +#endif + +// signal: @CCU_IncarTempSum_Val_ro +#define CANDB_CCU_IncarTempSum_Val_ro_CovFactor (0.5) +#define CANDB_CCU_IncarTempSum_Val_ro_toS(x) ( (uint8_t) (((x) - (-50.0)) / (0.5)) ) +#define CANDB_CCU_IncarTempSum_Val_ro_fromS(x) ( (((x) * (0.5)) + (-50.0)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Indicates the requested FAN speed from CCU system. + // 127 : "Error" + uint8_t CCU_FAN_Req : 7; // Bits= 7 Unit:'%' + + // CCU REST mode status + // 3 : "Inactive" + // 2 : "Active" + // 1 : "Standby" + // 0 : "Not requested" + uint8_t CCU_RestMode_Stat : 2; // Bits= 2 + + // Arithmetic mean air temperature inside the car + uint8_t CCU_IncarTempSum_Val_ro; // Bits= 8 Offset= -50.0 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_IncarTempSum_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t CCU_MSG3_RC : 4; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t CCU_MSG3_CS; // Bits= 8 + +#else + + // Indicates the requested FAN speed from CCU system. + // 127 : "Error" + uint8_t CCU_FAN_Req; // Bits= 7 Unit:'%' + + // CCU REST mode status + // 3 : "Inactive" + // 2 : "Active" + // 1 : "Standby" + // 0 : "Not requested" + uint8_t CCU_RestMode_Stat; // Bits= 2 + + // Arithmetic mean air temperature inside the car + uint8_t CCU_IncarTempSum_Val_ro; // Bits= 8 Offset= -50.0 Factor= 0.5 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_IncarTempSum_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Rolling Counter [0 - 15] + uint8_t CCU_MSG3_RC; // Bits= 4 + + // Checksum XOR8 of the data field this message + // Checksum computed as per XOR algorithm: + // Byte 1 XOR byte 2 .... XOR byte n-1. (n = packet length.) + uint8_t CCU_MSG3_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_Msg3_t; + +// def @SDM_Cmd CAN Message (1295 0x50f) +#define SDM_Cmd_IDE (0U) +#define SDM_Cmd_DLC (5U) +#define SDM_Cmd_CANID (0x50fU) + +// Value tables for @SDM_Aroma_Req signal + +#ifndef SDM_Aroma_Req_SDM_Cmd_No_change +#define SDM_Aroma_Req_SDM_Cmd_No_change (0) +#endif + +#ifndef SDM_Aroma_Req_SDM_Cmd_Aromatization_on +#define SDM_Aroma_Req_SDM_Cmd_Aromatization_on (1) +#endif + +#ifndef SDM_Aroma_Req_SDM_Cmd_Aromatization_off +#define SDM_Aroma_Req_SDM_Cmd_Aromatization_off (2) +#endif + + +// Value tables for @SDM_AromaIntens_Req signal + +#ifndef SDM_AromaIntens_Req_SDM_Cmd_Aromatization_mode_3_step +#define SDM_AromaIntens_Req_SDM_Cmd_Aromatization_mode_3_step (3) +#endif + +#ifndef SDM_AromaIntens_Req_SDM_Cmd_Aromatization_mode_2_step +#define SDM_AromaIntens_Req_SDM_Cmd_Aromatization_mode_2_step (2) +#endif + +#ifndef SDM_AromaIntens_Req_SDM_Cmd_Aromatization_mode_1_step +#define SDM_AromaIntens_Req_SDM_Cmd_Aromatization_mode_1_step (1) +#endif + +#ifndef SDM_AromaIntens_Req_SDM_Cmd_No_change +#define SDM_AromaIntens_Req_SDM_Cmd_No_change (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Aromatization activation request + // 0 : "No change" + // 1 : "Aromatization on" + // 2 : "Aromatization off" + uint8_t SDM_Aroma_Req : 2; // Bits= 2 + + // Aromatization intensity set request + // 3 : "Aromatization mode 3 step" + // 2 : "Aromatization mode 2 step" + // 1 : "Aromatization mode 1 step" + // 0 : "No change" + uint8_t SDM_AromaIntens_Req : 2; // Bits= 2 + +#else + + // Aromatization activation request + // 0 : "No change" + // 1 : "Aromatization on" + // 2 : "Aromatization off" + uint8_t SDM_Aroma_Req; // Bits= 2 + + // Aromatization intensity set request + // 3 : "Aromatization mode 3 step" + // 2 : "Aromatization mode 2 step" + // 1 : "Aromatization mode 1 step" + // 0 : "No change" + uint8_t SDM_AromaIntens_Req; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} SDM_Cmd_t; + +// VIN Code structure: +// e.g: XKN412300H1000027 +// XKN: code WMI +// 412300: vehicle model +// H: Vehicle production year +// 1: assembling at NAMI +// 6 last characters: serial number. +// REMARK: In case of VIN programming has failed, all characters will be = '0' +// def @VEH_VIN CAN Message (1306 0x51a) +#define VEH_VIN_IDE (0U) +#define VEH_VIN_DLC (8U) +#define VEH_VIN_CANID (0x51aU) +#define VEH_VIN_CYC (5000U) + +// Value tables for @VIN_Addressing signal + +#ifndef VIN_Addressing_VEH_VIN_VIN_Part_3 +#define VIN_Addressing_VEH_VIN_VIN_Part_3 (2) +#endif + +#ifndef VIN_Addressing_VEH_VIN_VIN_Part_2 +#define VIN_Addressing_VEH_VIN_VIN_Part_2 (1) +#endif + +#ifndef VIN_Addressing_VEH_VIN_VIN_Part_1 +#define VIN_Addressing_VEH_VIN_VIN_Part_1 (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Addresses the VIN Part: + // 0x0 = Addresses VIN part 1 + // 0x1 = Addresses VIN part 2 + // 0x2 = Addresses VIN part 3 + // 2 : "VIN Part 3" + // 1 : "VIN Part 2" + // 0 : "VIN Part 1" + // MULTIPLEX master signal + uint8_t VIN_Addressing : 2; // Bits= 2 + + // VIN character 1 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char1; // Bits= 8 + + // VIN character 8 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char8; // Bits= 8 + + // VIN character 15 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char15; // Bits= 8 + + // VIN character 16 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char16; // Bits= 8 + + // VIN character 2 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char2; // Bits= 8 + + // VIN character 9 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char9; // Bits= 8 + + // VIN character 10 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char10; // Bits= 8 + + // VIN character 17 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char17; // Bits= 8 + + // VIN character 3 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char3; // Bits= 8 + + // VIN character 4 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char4; // Bits= 8 + + // VIN character 11 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char11; // Bits= 8 + + // VIN character 12 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char12; // Bits= 8 + + // VIN character 5 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char5; // Bits= 8 + + // VIN character 6 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char6; // Bits= 8 + + // VIN character 13 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char13; // Bits= 8 + + // VIN character 7 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char7; // Bits= 8 + + // VIN character 14 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char14; // Bits= 8 + +#else + + // Addresses the VIN Part: + // 0x0 = Addresses VIN part 1 + // 0x1 = Addresses VIN part 2 + // 0x2 = Addresses VIN part 3 + // 2 : "VIN Part 3" + // 1 : "VIN Part 2" + // 0 : "VIN Part 1" + // MULTIPLEX master signal + uint8_t VIN_Addressing; // Bits= 2 + + // VIN character 1 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char1; // Bits= 8 + + // VIN character 8 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char8; // Bits= 8 + + // VIN character 15 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char15; // Bits= 8 + + // VIN character 16 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char16; // Bits= 8 + + // VIN character 2 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char2; // Bits= 8 + + // VIN character 9 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char9; // Bits= 8 + + // VIN character 10 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char10; // Bits= 8 + + // VIN character 17 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char17; // Bits= 8 + + // VIN character 3 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char3; // Bits= 8 + + // VIN character 4 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char4; // Bits= 8 + + // VIN character 11 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char11; // Bits= 8 + + // VIN character 12 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char12; // Bits= 8 + + // VIN character 5 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char5; // Bits= 8 + + // VIN character 6 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char6; // Bits= 8 + + // VIN character 13 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char13; // Bits= 8 + + // VIN character 7 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char7; // Bits= 8 + + // VIN character 14 + // REMARK: + // In case of VIN programming has failed, character will be = '0' + // multiplex variable + uint8_t VIN_Char14; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} VEH_VIN_t; + +// def @OCUFL_MSG CAN Message (1313 0x521) +#define OCUFL_MSG_IDE (0U) +#define OCUFL_MSG_DLC (2U) +#define OCUFL_MSG_CANID (0x521U) +#define OCUFL_MSG_CYC (1000U) + +// Value tables for @OCUFL_OccupantWeight_Stat signal + +#ifndef OCUFL_OccupantWeight_Stat_OCUFL_MSG_Large_Occupant +#define OCUFL_OccupantWeight_Stat_OCUFL_MSG_Large_Occupant (3) +#endif + +#ifndef OCUFL_OccupantWeight_Stat_OCUFL_MSG_Small_Occupant +#define OCUFL_OccupantWeight_Stat_OCUFL_MSG_Small_Occupant (2) +#endif + +#ifndef OCUFL_OccupantWeight_Stat_OCUFL_MSG_Child_Seat +#define OCUFL_OccupantWeight_Stat_OCUFL_MSG_Child_Seat (1) +#endif + +#ifndef OCUFL_OccupantWeight_Stat_OCUFL_MSG_Empty +#define OCUFL_OccupantWeight_Stat_OCUFL_MSG_Empty (0) +#endif + + +// Value tables for @OCUFL_SeatOccupied_Stat signal + +#ifndef OCUFL_SeatOccupied_Stat_OCUFL_MSG_Occupied +#define OCUFL_SeatOccupied_Stat_OCUFL_MSG_Occupied (1) +#endif + +#ifndef OCUFL_SeatOccupied_Stat_OCUFL_MSG_Not_Occupied +#define OCUFL_SeatOccupied_Stat_OCUFL_MSG_Not_Occupied (0) +#endif + + +// Value tables for @OCUFL_SensorError_Stat signal + +#ifndef OCUFL_SensorError_Stat_OCUFL_MSG_Error +#define OCUFL_SensorError_Stat_OCUFL_MSG_Error (1) +#endif + +#ifndef OCUFL_SensorError_Stat_OCUFL_MSG_No_error +#define OCUFL_SensorError_Stat_OCUFL_MSG_No_error (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Front left seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCUFL_OccupantWeight_Stat : 2; // Bits= 2 + + // Front Left seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSFL_SeatOccupied OCSFL_OccupantWeight OCSFL status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCUFL_SeatOccupied_Stat : 1; // Bits= 1 + + // Front Left seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCUFL_SensorError_Stat : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCUFL_MSG_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCUFL_MSG_CS; // Bits= 8 + +#else + + // Front left seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCUFL_OccupantWeight_Stat; // Bits= 2 + + // Front Left seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSFL_SeatOccupied OCSFL_OccupantWeight OCSFL status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCUFL_SeatOccupied_Stat; // Bits= 1 + + // Front Left seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCUFL_SensorError_Stat; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCUFL_MSG_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCUFL_MSG_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} OCUFL_MSG_t; + +// def @OCUFR_MSG CAN Message (1314 0x522) +#define OCUFR_MSG_IDE (0U) +#define OCUFR_MSG_DLC (2U) +#define OCUFR_MSG_CANID (0x522U) +#define OCUFR_MSG_CYC (1000U) + +// Value tables for @OCUFR_OccupantWeight_Stat signal + +#ifndef OCUFR_OccupantWeight_Stat_OCUFR_MSG_Large_Occupant +#define OCUFR_OccupantWeight_Stat_OCUFR_MSG_Large_Occupant (3) +#endif + +#ifndef OCUFR_OccupantWeight_Stat_OCUFR_MSG_Small_Occupant +#define OCUFR_OccupantWeight_Stat_OCUFR_MSG_Small_Occupant (2) +#endif + +#ifndef OCUFR_OccupantWeight_Stat_OCUFR_MSG_Child_Seat +#define OCUFR_OccupantWeight_Stat_OCUFR_MSG_Child_Seat (1) +#endif + +#ifndef OCUFR_OccupantWeight_Stat_OCUFR_MSG_Empty +#define OCUFR_OccupantWeight_Stat_OCUFR_MSG_Empty (0) +#endif + + +// Value tables for @OCUFR_SeatOccupied_Stat signal + +#ifndef OCUFR_SeatOccupied_Stat_OCUFR_MSG_Occupied +#define OCUFR_SeatOccupied_Stat_OCUFR_MSG_Occupied (1) +#endif + +#ifndef OCUFR_SeatOccupied_Stat_OCUFR_MSG_Not_Occupied +#define OCUFR_SeatOccupied_Stat_OCUFR_MSG_Not_Occupied (0) +#endif + + +// Value tables for @OCUFR_SensorError_Stat signal + +#ifndef OCUFR_SensorError_Stat_OCUFR_MSG_Error +#define OCUFR_SensorError_Stat_OCUFR_MSG_Error (1) +#endif + +#ifndef OCUFR_SensorError_Stat_OCUFR_MSG_No_error +#define OCUFR_SensorError_Stat_OCUFR_MSG_No_error (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Front right seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCUFR_OccupantWeight_Stat : 2; // Bits= 2 + + // Front Right seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSFR_SeatOccupied OCSFR_OccupantWeight OCSFR status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCUFR_SeatOccupied_Stat : 1; // Bits= 1 + + // Front Right seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCUFR_SensorError_Stat : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCUFR_MSG_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCUFR_MSG_CS; // Bits= 8 + +#else + + // Front right seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCUFR_OccupantWeight_Stat; // Bits= 2 + + // Front Right seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSFR_SeatOccupied OCSFR_OccupantWeight OCSFR status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCUFR_SeatOccupied_Stat; // Bits= 1 + + // Front Right seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCUFR_SensorError_Stat; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCUFR_MSG_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCUFR_MSG_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} OCUFR_MSG_t; + +// def @OCURL_MSG CAN Message (1315 0x523) +#define OCURL_MSG_IDE (0U) +#define OCURL_MSG_DLC (2U) +#define OCURL_MSG_CANID (0x523U) +#define OCURL_MSG_CYC (1000U) + +// Value tables for @OCURL_OccupantWeight_Stat signal + +#ifndef OCURL_OccupantWeight_Stat_OCURL_MSG_Large_Occupant +#define OCURL_OccupantWeight_Stat_OCURL_MSG_Large_Occupant (3) +#endif + +#ifndef OCURL_OccupantWeight_Stat_OCURL_MSG_Small_Occupant +#define OCURL_OccupantWeight_Stat_OCURL_MSG_Small_Occupant (2) +#endif + +#ifndef OCURL_OccupantWeight_Stat_OCURL_MSG_Child_Seat +#define OCURL_OccupantWeight_Stat_OCURL_MSG_Child_Seat (1) +#endif + +#ifndef OCURL_OccupantWeight_Stat_OCURL_MSG_Empty +#define OCURL_OccupantWeight_Stat_OCURL_MSG_Empty (0) +#endif + + +// Value tables for @OCURL_SeatOccupied_Stat signal + +#ifndef OCURL_SeatOccupied_Stat_OCURL_MSG_Occupied +#define OCURL_SeatOccupied_Stat_OCURL_MSG_Occupied (1) +#endif + +#ifndef OCURL_SeatOccupied_Stat_OCURL_MSG_Not_Occupied +#define OCURL_SeatOccupied_Stat_OCURL_MSG_Not_Occupied (0) +#endif + + +// Value tables for @OCURL_SensorError_Stat signal + +#ifndef OCURL_SensorError_Stat_OCURL_MSG_Error +#define OCURL_SensorError_Stat_OCURL_MSG_Error (1) +#endif + +#ifndef OCURL_SensorError_Stat_OCURL_MSG_No_error +#define OCURL_SensorError_Stat_OCURL_MSG_No_error (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Rear left seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCURL_OccupantWeight_Stat : 2; // Bits= 2 + + // Rear Left seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSRL_SeatOccupied OCSRL_OccupantWeight OCSRL status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCURL_SeatOccupied_Stat : 1; // Bits= 1 + + // Rear Left seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCURL_SensorError_Stat : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCURL_MSG_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCURL_MSG_CS; // Bits= 8 + +#else + + // Rear left seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCURL_OccupantWeight_Stat; // Bits= 2 + + // Rear Left seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSRL_SeatOccupied OCSRL_OccupantWeight OCSRL status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCURL_SeatOccupied_Stat; // Bits= 1 + + // Rear Left seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCURL_SensorError_Stat; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCURL_MSG_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCURL_MSG_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} OCURL_MSG_t; + +// def @OCURR_MSG CAN Message (1316 0x524) +#define OCURR_MSG_IDE (0U) +#define OCURR_MSG_DLC (2U) +#define OCURR_MSG_CANID (0x524U) +#define OCURR_MSG_CYC (1000U) + +// Value tables for @OCURR_OccupantWeight_Stat signal + +#ifndef OCURR_OccupantWeight_Stat_OCURR_MSG_Large_Occupant +#define OCURR_OccupantWeight_Stat_OCURR_MSG_Large_Occupant (3) +#endif + +#ifndef OCURR_OccupantWeight_Stat_OCURR_MSG_Small_Occupant +#define OCURR_OccupantWeight_Stat_OCURR_MSG_Small_Occupant (2) +#endif + +#ifndef OCURR_OccupantWeight_Stat_OCURR_MSG_Child_Seat +#define OCURR_OccupantWeight_Stat_OCURR_MSG_Child_Seat (1) +#endif + +#ifndef OCURR_OccupantWeight_Stat_OCURR_MSG_Empty +#define OCURR_OccupantWeight_Stat_OCURR_MSG_Empty (0) +#endif + + +// Value tables for @OCURR_SeatOccupied_Stat signal + +#ifndef OCURR_SeatOccupied_Stat_OCURR_MSG_Occupied +#define OCURR_SeatOccupied_Stat_OCURR_MSG_Occupied (1) +#endif + +#ifndef OCURR_SeatOccupied_Stat_OCURR_MSG_Not_Occupied +#define OCURR_SeatOccupied_Stat_OCURR_MSG_Not_Occupied (0) +#endif + + +// Value tables for @OCURR_SensorError_Stat signal + +#ifndef OCURR_SensorError_Stat_OCURR_MSG_Error +#define OCURR_SensorError_Stat_OCURR_MSG_Error (1) +#endif + +#ifndef OCURR_SensorError_Stat_OCURR_MSG_No_error +#define OCURR_SensorError_Stat_OCURR_MSG_No_error (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Rear right seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCURR_OccupantWeight_Stat : 2; // Bits= 2 + + // Rear Right seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSRR_SeatOccupied OCSRR_OccupantWeight OCSRR status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCURR_SeatOccupied_Stat : 1; // Bits= 1 + + // Rear Right seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCURR_SensorError_Stat : 1; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCURR_MSG_RC : 4; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCURR_MSG_CS; // Bits= 8 + +#else + + // Rear right seat weight threshold indication. + // $0 = Reserved + // $1 = Child Seat + // $2 = Small Occupant + // $3 = Large Occupant + // 3 : "Large Occupant" + // 2 : "Small Occupant" + // 1 : "Child Seat" + // 0 : "Empty" + uint8_t OCURR_OccupantWeight_Stat; // Bits= 2 + + // Rear Right seat occupied indication. + // $0 = Not Occupied + // $1 = Occupied + // OCSRR_SeatOccupied OCSRR_OccupantWeight OCSRR status + // 0x00 0x00 Empty + // 0x01 + // 1 : "Occupied" + // 0 : "Not Occupied" + uint8_t OCURR_SeatOccupied_Stat; // Bits= 1 + + // Rear Right seat mat sensor fault indication. + // This bit shall remain latched for the duration of the current ignition cycle. + // $0 = No Error + // $1 = Error Detected + // 1 : "Error" + // 0 : "No error" + uint8_t OCURR_SensorError_Stat; // Bits= 1 + + // Rolling Counter [0 - 15] + uint8_t OCURR_MSG_RC; // Bits= 4 + + // Checksum CRC8 SAE J1850 of the data field this message + uint8_t OCURR_MSG_CS; // Bits= 8 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} OCURR_MSG_t; + +// Dividing wall status +// def @DW_STATE CAN Message (1417 0x589) +#define DW_STATE_IDE (0U) +#define DW_STATE_DLC (4U) +#define DW_STATE_CANID (0x589U) +#define DW_STATE_CYC (100U) + +// Value tables for @DW_GlassPosition_Stat signal + +#ifndef DW_GlassPosition_Stat_DW_STATE_Reserved +#define DW_GlassPosition_Stat_DW_STATE_Reserved (3) +#endif + +#ifndef DW_GlassPosition_Stat_DW_STATE_Glass_down_position +#define DW_GlassPosition_Stat_DW_STATE_Glass_down_position (2) +#endif + +#ifndef DW_GlassPosition_Stat_DW_STATE_Glass_up_position +#define DW_GlassPosition_Stat_DW_STATE_Glass_up_position (1) +#endif + +#ifndef DW_GlassPosition_Stat_DW_STATE_Glass_position_not_applicable +#define DW_GlassPosition_Stat_DW_STATE_Glass_position_not_applicable (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Current partition state + // 3 : "Reserved" + // 2 : "Glass down position" + // 1 : "Glass up position" + // 0 : "Glass position not applicable" + uint8_t DW_GlassPosition_Stat : 2; // Bits= 2 + +#else + + // Current partition state + // 3 : "Reserved" + // 2 : "Glass down position" + // 1 : "Glass up position" + // 0 : "Glass position not applicable" + uint8_t DW_GlassPosition_Stat; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} DW_STATE_t; + +// def @FIU_CCU1 CAN Message (1441 0x5a1) +#define FIU_CCU1_IDE (0U) +#define FIU_CCU1_DLC (8U) +#define FIU_CCU1_CANID (0x5a1U) +// signal: @FIU_TargetTempFL_Val_ro +#define CANDB_FIU_TargetTempFL_Val_ro_CovFactor (0.5) +#define CANDB_FIU_TargetTempFL_Val_ro_toS(x) ( (uint8_t) (((x) - (15.5)) / (0.5)) ) +#define CANDB_FIU_TargetTempFL_Val_ro_fromS(x) ( (((x) * (0.5)) + (15.5)) ) + +// Value tables for @FIU_FootTempCorFL_Req signal + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1_No_change +#define FIU_FootTempCorFL_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1__step +#define FIU_FootTempCorFL_Req_FIU_CCU1__step (1) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1__step +#define FIU_FootTempCorFL_Req_FIU_CCU1__step (2) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1__step +#define FIU_FootTempCorFL_Req_FIU_CCU1__step (3) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1_ +#define FIU_FootTempCorFL_Req_FIU_CCU1_ (4) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1__step +#define FIU_FootTempCorFL_Req_FIU_CCU1__step (5) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1__step +#define FIU_FootTempCorFL_Req_FIU_CCU1__step (6) +#endif + +#ifndef FIU_FootTempCorFL_Req_FIU_CCU1__step +#define FIU_FootTempCorFL_Req_FIU_CCU1__step (7) +#endif + +// signal: @FIU_TargetTempFR_Val_ro +#define CANDB_FIU_TargetTempFR_Val_ro_CovFactor (0.5) +#define CANDB_FIU_TargetTempFR_Val_ro_toS(x) ( (uint8_t) (((x) - (15.5)) / (0.5)) ) +#define CANDB_FIU_TargetTempFR_Val_ro_fromS(x) ( (((x) * (0.5)) + (15.5)) ) + +// Value tables for @FIU_FootTempCorFR_Req signal + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1_No_change +#define FIU_FootTempCorFR_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1__step +#define FIU_FootTempCorFR_Req_FIU_CCU1__step (1) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1__step +#define FIU_FootTempCorFR_Req_FIU_CCU1__step (2) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1__step +#define FIU_FootTempCorFR_Req_FIU_CCU1__step (3) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1_ +#define FIU_FootTempCorFR_Req_FIU_CCU1_ (4) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1__step +#define FIU_FootTempCorFR_Req_FIU_CCU1__step (5) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1__step +#define FIU_FootTempCorFR_Req_FIU_CCU1__step (6) +#endif + +#ifndef FIU_FootTempCorFR_Req_FIU_CCU1__step +#define FIU_FootTempCorFR_Req_FIU_CCU1__step (7) +#endif + + +// Value tables for @FIU_CCmodeFL_Req signal + +#ifndef FIU_CCmodeFL_Req_FIU_CCU1_No_change +#define FIU_CCmodeFL_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_CCmodeFL_Req_FIU_CCU1_Manual_mode_requested +#define FIU_CCmodeFL_Req_FIU_CCU1_Manual_mode_requested (1) +#endif + +#ifndef FIU_CCmodeFL_Req_FIU_CCU1_Auto_mode_requested +#define FIU_CCmodeFL_Req_FIU_CCU1_Auto_mode_requested (2) +#endif + + +// Value tables for @FIU_AirDirectionFL_Def_Req signal + +#ifndef FIU_AirDirectionFL_Def_Req_FIU_CCU1_No_change +#define FIU_AirDirectionFL_Def_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_AirDirectionFL_Def_Req_FIU_CCU1_Active +#define FIU_AirDirectionFL_Def_Req_FIU_CCU1_Active (1) +#endif + +#ifndef FIU_AirDirectionFL_Def_Req_FIU_CCU1_Inactive +#define FIU_AirDirectionFL_Def_Req_FIU_CCU1_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionFL_Face_Req signal + +#ifndef FIU_AirDirectionFL_Face_Req_FIU_CCU1_No_change +#define FIU_AirDirectionFL_Face_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_AirDirectionFL_Face_Req_FIU_CCU1_Active +#define FIU_AirDirectionFL_Face_Req_FIU_CCU1_Active (1) +#endif + +#ifndef FIU_AirDirectionFL_Face_Req_FIU_CCU1_Inactive +#define FIU_AirDirectionFL_Face_Req_FIU_CCU1_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionFL_Foot_Req signal + +#ifndef FIU_AirDirectionFL_Foot_Req_FIU_CCU1_No_change +#define FIU_AirDirectionFL_Foot_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_AirDirectionFL_Foot_Req_FIU_CCU1_Active +#define FIU_AirDirectionFL_Foot_Req_FIU_CCU1_Active (1) +#endif + +#ifndef FIU_AirDirectionFL_Foot_Req_FIU_CCU1_Inactive +#define FIU_AirDirectionFL_Foot_Req_FIU_CCU1_Inactive (2) +#endif + + +// Value tables for @FIU_CCmodeFR_Req signal + +#ifndef FIU_CCmodeFR_Req_FIU_CCU1_No_change +#define FIU_CCmodeFR_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_CCmodeFR_Req_FIU_CCU1_Manual_mode_requested +#define FIU_CCmodeFR_Req_FIU_CCU1_Manual_mode_requested (1) +#endif + +#ifndef FIU_CCmodeFR_Req_FIU_CCU1_Auto_mode_requested +#define FIU_CCmodeFR_Req_FIU_CCU1_Auto_mode_requested (2) +#endif + + +// Value tables for @FIU_AirDirectionFR_Def_Req signal + +#ifndef FIU_AirDirectionFR_Def_Req_FIU_CCU1_No_change +#define FIU_AirDirectionFR_Def_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_AirDirectionFR_Def_Req_FIU_CCU1_Active +#define FIU_AirDirectionFR_Def_Req_FIU_CCU1_Active (1) +#endif + +#ifndef FIU_AirDirectionFR_Def_Req_FIU_CCU1_Inactive +#define FIU_AirDirectionFR_Def_Req_FIU_CCU1_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionFR_Face_Req signal + +#ifndef FIU_AirDirectionFR_Face_Req_FIU_CCU1_No_change +#define FIU_AirDirectionFR_Face_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_AirDirectionFR_Face_Req_FIU_CCU1_Active +#define FIU_AirDirectionFR_Face_Req_FIU_CCU1_Active (1) +#endif + +#ifndef FIU_AirDirectionFR_Face_Req_FIU_CCU1_Inactive +#define FIU_AirDirectionFR_Face_Req_FIU_CCU1_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionFR_Foot_Req signal + +#ifndef FIU_AirDirectionFR_Foot_Req_FIU_CCU1_No_change +#define FIU_AirDirectionFR_Foot_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_AirDirectionFR_Foot_Req_FIU_CCU1_Active +#define FIU_AirDirectionFR_Foot_Req_FIU_CCU1_Active (1) +#endif + +#ifndef FIU_AirDirectionFR_Foot_Req_FIU_CCU1_Inactive +#define FIU_AirDirectionFR_Foot_Req_FIU_CCU1_Inactive (2) +#endif + + +// Value tables for @FIU_BlowerSpeedFL_Req signal + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1_No_change +#define FIU_BlowerSpeedFL_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (1) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (2) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (3) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (4) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (5) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (6) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFL_Req_FIU_CCU1__step (7) +#endif + +#ifndef FIU_BlowerSpeedFL_Req_FIU_CCU1_Blower_off +#define FIU_BlowerSpeedFL_Req_FIU_CCU1_Blower_off (8) +#endif + + +// Value tables for @FIU_BlowerSpeedFR_Req signal + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1_No_change +#define FIU_BlowerSpeedFR_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (1) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (2) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (3) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (4) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (5) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (6) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1__step +#define FIU_BlowerSpeedFR_Req_FIU_CCU1__step (7) +#endif + +#ifndef FIU_BlowerSpeedFR_Req_FIU_CCU1_Blower_off +#define FIU_BlowerSpeedFR_Req_FIU_CCU1_Blower_off (8) +#endif + + +// Value tables for @FIU_CCautoModeFL_Req signal + +#ifndef FIU_CCautoModeFL_Req_FIU_CCU1_No_change +#define FIU_CCautoModeFL_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_1_requested +#define FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_1_requested (1) +#endif + +#ifndef FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_2_requested +#define FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_2_requested (2) +#endif + +#ifndef FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_3_requested +#define FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_3_requested (3) +#endif + +#ifndef FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_4_requested +#define FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_4_requested (4) +#endif + +#ifndef FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_5_requested +#define FIU_CCautoModeFL_Req_FIU_CCU1_Auto_mode_5_requested (5) +#endif + + +// Value tables for @FIU_CCautoModeFR_Req signal + +#ifndef FIU_CCautoModeFR_Req_FIU_CCU1_No_change +#define FIU_CCautoModeFR_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_1_requested +#define FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_1_requested (1) +#endif + +#ifndef FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_2_requested +#define FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_2_requested (2) +#endif + +#ifndef FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_3_requested +#define FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_3_requested (3) +#endif + +#ifndef FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_4_requested +#define FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_4_requested (4) +#endif + +#ifndef FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_5_requested +#define FIU_CCautoModeFR_Req_FIU_CCU1_Auto_mode_5_requested (5) +#endif + + +// Value tables for @FIU_Recirculation_Req signal + +#ifndef FIU_Recirculation_Req_FIU_CCU1_No_change +#define FIU_Recirculation_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_Recirculation_Req_FIU_CCU1_Recirculation_mode_Rec_on +#define FIU_Recirculation_Req_FIU_CCU1_Recirculation_mode_Rec_on (1) +#endif + +#ifndef FIU_Recirculation_Req_FIU_CCU1_Fresh_air_mode_Rec_off +#define FIU_Recirculation_Req_FIU_CCU1_Fresh_air_mode_Rec_off (2) +#endif + +#ifndef FIU_Recirculation_Req_FIU_CCU1_Auto_recirculation_mode +#define FIU_Recirculation_Req_FIU_CCU1_Auto_recirculation_mode (3) +#endif + + +// Value tables for @FIU_DeflectorSwDL_Req signal + +#ifndef FIU_DeflectorSwDL_Req_FIU_CCU1_No_LED +#define FIU_DeflectorSwDL_Req_FIU_CCU1_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwDL_Req_FIU_CCU1_LED_3_step +#define FIU_DeflectorSwDL_Req_FIU_CCU1_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwDL_Req_FIU_CCU1_LED_2_step +#define FIU_DeflectorSwDL_Req_FIU_CCU1_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwDL_Req_FIU_CCU1_LED_1_step +#define FIU_DeflectorSwDL_Req_FIU_CCU1_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwDL_Req_FIU_CCU1_No_change +#define FIU_DeflectorSwDL_Req_FIU_CCU1_No_change (0) +#endif + + +// Value tables for @FIU_DeflectorSwDR_Req signal + +#ifndef FIU_DeflectorSwDR_Req_FIU_CCU1_No_LED +#define FIU_DeflectorSwDR_Req_FIU_CCU1_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwDR_Req_FIU_CCU1_LED_3_step +#define FIU_DeflectorSwDR_Req_FIU_CCU1_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwDR_Req_FIU_CCU1_LED_2_step +#define FIU_DeflectorSwDR_Req_FIU_CCU1_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwDR_Req_FIU_CCU1_LED_1_step +#define FIU_DeflectorSwDR_Req_FIU_CCU1_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwDR_Req_FIU_CCU1_No_change +#define FIU_DeflectorSwDR_Req_FIU_CCU1_No_change (0) +#endif + + +// Value tables for @FIU_ACfrontOFF_Req signal + +#ifndef FIU_ACfrontOFF_Req_FIU_CCU1_No_change +#define FIU_ACfrontOFF_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_ACfrontOFF_Req_FIU_CCU1_AC_front_ON +#define FIU_ACfrontOFF_Req_FIU_CCU1_AC_front_ON (1) +#endif + +#ifndef FIU_ACfrontOFF_Req_FIU_CCU1_AC_front_OFF +#define FIU_ACfrontOFF_Req_FIU_CCU1_AC_front_OFF (2) +#endif + + +// Value tables for @FIU_DeflectorSwFPL_Req signal + +#ifndef FIU_DeflectorSwFPL_Req_FIU_CCU1_No_LED +#define FIU_DeflectorSwFPL_Req_FIU_CCU1_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwFPL_Req_FIU_CCU1_LED_3_step +#define FIU_DeflectorSwFPL_Req_FIU_CCU1_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwFPL_Req_FIU_CCU1_LED_2_step +#define FIU_DeflectorSwFPL_Req_FIU_CCU1_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwFPL_Req_FIU_CCU1_LED_1_step +#define FIU_DeflectorSwFPL_Req_FIU_CCU1_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwFPL_Req_FIU_CCU1_No_change +#define FIU_DeflectorSwFPL_Req_FIU_CCU1_No_change (0) +#endif + + +// Value tables for @FIU_DeflectorSwFPR_Req signal + +#ifndef FIU_DeflectorSwFPR_Req_FIU_CCU1_No_LED +#define FIU_DeflectorSwFPR_Req_FIU_CCU1_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwFPR_Req_FIU_CCU1_LED_3_step +#define FIU_DeflectorSwFPR_Req_FIU_CCU1_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwFPR_Req_FIU_CCU1_LED_2_step +#define FIU_DeflectorSwFPR_Req_FIU_CCU1_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwFPR_Req_FIU_CCU1_LED_1_step +#define FIU_DeflectorSwFPR_Req_FIU_CCU1_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwFPR_Req_FIU_CCU1_No_change +#define FIU_DeflectorSwFPR_Req_FIU_CCU1_No_change (0) +#endif + + +// Value tables for @FIU_FrontZoneSync_Req signal + +#ifndef FIU_FrontZoneSync_Req_FIU_CCU1_No_change +#define FIU_FrontZoneSync_Req_FIU_CCU1_No_change (0) +#endif + +#ifndef FIU_FrontZoneSync_Req_FIU_CCU1_Sync_front +#define FIU_FrontZoneSync_Req_FIU_CCU1_Sync_front (1) +#endif + +#ifndef FIU_FrontZoneSync_Req_FIU_CCU1_Sync_all +#define FIU_FrontZoneSync_Req_FIU_CCU1_Sync_all (2) +#endif + +#ifndef FIU_FrontZoneSync_Req_FIU_CCU1_Sync_off +#define FIU_FrontZoneSync_Req_FIU_CCU1_Sync_off (3) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Target temperature for front left zone value + uint8_t FIU_TargetTempFL_Val_ro : 5; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempFL_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for front left zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorFL_Req : 3; // Bits= 3 + + // Target temperature for front right zone value + uint8_t FIU_TargetTempFR_Val_ro : 5; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempFR_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for front right zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorFR_Req : 3; // Bits= 3 + + // Climate control mode for front left zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeFL_Req : 2; // Bits= 2 + + // Airflow direction mode for front left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFL_Def_Req : 2; // Bits= 2 + + // Airflow direction mode for front left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFL_Face_Req : 2; // Bits= 2 + + // Airflow direction mode for front left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFL_Foot_Req : 2; // Bits= 2 + + // Climate control mode for front right zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeFR_Req : 2; // Bits= 2 + + // Airflow direction mode for front right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFR_Def_Req : 2; // Bits= 2 + + // Airflow direction mode for front right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFR_Face_Req : 2; // Bits= 2 + + // Airflow direction mode for front right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFR_Foot_Req : 2; // Bits= 2 + + // Blower speed for front left zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedFL_Req : 4; // Bits= 4 + + // Blower speed for front right zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedFR_Req : 4; // Bits= 4 + + // Climate control auto mode for front left zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeFL_Req : 3; // Bits= 3 + + // Climate control auto mode for front right zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeFR_Req : 3; // Bits= 3 + + // Recirculation mode requested + // 0 : "No change" + // 1 : "Recirculation mode (Rec on)" + // 2 : "Fresh air mode (Rec off)" + // 3 : "Auto recirculation mode" + uint8_t FIU_Recirculation_Req : 2; // Bits= 2 + + // Deflector driver left request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwDL_Req : 3; // Bits= 3 + + // Deflector driver right request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwDR_Req : 3; // Bits= 3 + + // Air conditioner OFF front request + // 0 : "No change" + // 1 : "AC front ON" + // 2 : "AC front OFF" + uint8_t FIU_ACfrontOFF_Req : 2; // Bits= 2 + + // Deflector front passenger left request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFPL_Req : 3; // Bits= 3 + + // Deflector front passenger right request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFPR_Req : 3; // Bits= 3 + + // Front climate zones synchronization on/off request + // 0 : "No change" + // 1 : "Sync front" + // 2 : "Sync all" + // 3 : "Sync off" + uint8_t FIU_FrontZoneSync_Req : 2; // Bits= 2 + +#else + + // Target temperature for front left zone value + uint8_t FIU_TargetTempFL_Val_ro; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempFL_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for front left zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorFL_Req; // Bits= 3 + + // Target temperature for front right zone value + uint8_t FIU_TargetTempFR_Val_ro; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempFR_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for front right zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorFR_Req; // Bits= 3 + + // Climate control mode for front left zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeFL_Req; // Bits= 2 + + // Airflow direction mode for front left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFL_Def_Req; // Bits= 2 + + // Airflow direction mode for front left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFL_Face_Req; // Bits= 2 + + // Airflow direction mode for front left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFL_Foot_Req; // Bits= 2 + + // Climate control mode for front right zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeFR_Req; // Bits= 2 + + // Airflow direction mode for front right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFR_Def_Req; // Bits= 2 + + // Airflow direction mode for front right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFR_Face_Req; // Bits= 2 + + // Airflow direction mode for front right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionFR_Foot_Req; // Bits= 2 + + // Blower speed for front left zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedFL_Req; // Bits= 4 + + // Blower speed for front right zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedFR_Req; // Bits= 4 + + // Climate control auto mode for front left zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeFL_Req; // Bits= 3 + + // Climate control auto mode for front right zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeFR_Req; // Bits= 3 + + // Recirculation mode requested + // 0 : "No change" + // 1 : "Recirculation mode (Rec on)" + // 2 : "Fresh air mode (Rec off)" + // 3 : "Auto recirculation mode" + uint8_t FIU_Recirculation_Req; // Bits= 2 + + // Deflector driver left request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwDL_Req; // Bits= 3 + + // Deflector driver right request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwDR_Req; // Bits= 3 + + // Air conditioner OFF front request + // 0 : "No change" + // 1 : "AC front ON" + // 2 : "AC front OFF" + uint8_t FIU_ACfrontOFF_Req; // Bits= 2 + + // Deflector front passenger left request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFPL_Req; // Bits= 3 + + // Deflector front passenger right request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFPR_Req; // Bits= 3 + + // Front climate zones synchronization on/off request + // 0 : "No change" + // 1 : "Sync front" + // 2 : "Sync all" + // 3 : "Sync off" + uint8_t FIU_FrontZoneSync_Req; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} FIU_CCU1_t; + +// def @FIU_CCU2 CAN Message (1442 0x5a2) +#define FIU_CCU2_IDE (0U) +#define FIU_CCU2_DLC (8U) +#define FIU_CCU2_CANID (0x5a2U) +// signal: @FIU_TargetTempRL_Val_ro +#define CANDB_FIU_TargetTempRL_Val_ro_CovFactor (0.5) +#define CANDB_FIU_TargetTempRL_Val_ro_toS(x) ( (uint8_t) (((x) - (15.5)) / (0.5)) ) +#define CANDB_FIU_TargetTempRL_Val_ro_fromS(x) ( (((x) * (0.5)) + (15.5)) ) + +// Value tables for @FIU_FootTempCorRL_Req signal + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2_No_change +#define FIU_FootTempCorRL_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2__step +#define FIU_FootTempCorRL_Req_FIU_CCU2__step (1) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2__step +#define FIU_FootTempCorRL_Req_FIU_CCU2__step (2) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2__step +#define FIU_FootTempCorRL_Req_FIU_CCU2__step (3) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2_ +#define FIU_FootTempCorRL_Req_FIU_CCU2_ (4) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2__step +#define FIU_FootTempCorRL_Req_FIU_CCU2__step (5) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2__step +#define FIU_FootTempCorRL_Req_FIU_CCU2__step (6) +#endif + +#ifndef FIU_FootTempCorRL_Req_FIU_CCU2__step +#define FIU_FootTempCorRL_Req_FIU_CCU2__step (7) +#endif + +// signal: @FIU_TargetTempRR_Val_ro +#define CANDB_FIU_TargetTempRR_Val_ro_CovFactor (0.5) +#define CANDB_FIU_TargetTempRR_Val_ro_toS(x) ( (uint8_t) (((x) - (15.5)) / (0.5)) ) +#define CANDB_FIU_TargetTempRR_Val_ro_fromS(x) ( (((x) * (0.5)) + (15.5)) ) + +// Value tables for @FIU_FootTempCorRR_Req signal + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2_No_change +#define FIU_FootTempCorRR_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2__step +#define FIU_FootTempCorRR_Req_FIU_CCU2__step (1) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2__step +#define FIU_FootTempCorRR_Req_FIU_CCU2__step (2) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2__step +#define FIU_FootTempCorRR_Req_FIU_CCU2__step (3) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2_ +#define FIU_FootTempCorRR_Req_FIU_CCU2_ (4) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2__step +#define FIU_FootTempCorRR_Req_FIU_CCU2__step (5) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2__step +#define FIU_FootTempCorRR_Req_FIU_CCU2__step (6) +#endif + +#ifndef FIU_FootTempCorRR_Req_FIU_CCU2__step +#define FIU_FootTempCorRR_Req_FIU_CCU2__step (7) +#endif + + +// Value tables for @FIU_CCmodeRL_Req signal + +#ifndef FIU_CCmodeRL_Req_FIU_CCU2_No_change +#define FIU_CCmodeRL_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_CCmodeRL_Req_FIU_CCU2_Manual_mode_requested +#define FIU_CCmodeRL_Req_FIU_CCU2_Manual_mode_requested (1) +#endif + +#ifndef FIU_CCmodeRL_Req_FIU_CCU2_Auto_mode_requested +#define FIU_CCmodeRL_Req_FIU_CCU2_Auto_mode_requested (2) +#endif + + +// Value tables for @FIU_AirDirectionRL_Def_Req signal + +#ifndef FIU_AirDirectionRL_Def_Req_FIU_CCU2_No_change +#define FIU_AirDirectionRL_Def_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_AirDirectionRL_Def_Req_FIU_CCU2_Active +#define FIU_AirDirectionRL_Def_Req_FIU_CCU2_Active (1) +#endif + +#ifndef FIU_AirDirectionRL_Def_Req_FIU_CCU2_Inactive +#define FIU_AirDirectionRL_Def_Req_FIU_CCU2_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionRL_Face_Req signal + +#ifndef FIU_AirDirectionRL_Face_Req_FIU_CCU2_No_change +#define FIU_AirDirectionRL_Face_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_AirDirectionRL_Face_Req_FIU_CCU2_Active +#define FIU_AirDirectionRL_Face_Req_FIU_CCU2_Active (1) +#endif + +#ifndef FIU_AirDirectionRL_Face_Req_FIU_CCU2_Inactive +#define FIU_AirDirectionRL_Face_Req_FIU_CCU2_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionRL_Foot_Req signal + +#ifndef FIU_AirDirectionRL_Foot_Req_FIU_CCU2_No_change +#define FIU_AirDirectionRL_Foot_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_AirDirectionRL_Foot_Req_FIU_CCU2_Active +#define FIU_AirDirectionRL_Foot_Req_FIU_CCU2_Active (1) +#endif + +#ifndef FIU_AirDirectionRL_Foot_Req_FIU_CCU2_Inactive +#define FIU_AirDirectionRL_Foot_Req_FIU_CCU2_Inactive (2) +#endif + + +// Value tables for @FIU_CCmodeRR_Req signal + +#ifndef FIU_CCmodeRR_Req_FIU_CCU2_No_change +#define FIU_CCmodeRR_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_CCmodeRR_Req_FIU_CCU2_Manual_mode_requested +#define FIU_CCmodeRR_Req_FIU_CCU2_Manual_mode_requested (1) +#endif + +#ifndef FIU_CCmodeRR_Req_FIU_CCU2_Auto_mode_requested +#define FIU_CCmodeRR_Req_FIU_CCU2_Auto_mode_requested (2) +#endif + + +// Value tables for @FIU_AirDirectionRR_Def_Req signal + +#ifndef FIU_AirDirectionRR_Def_Req_FIU_CCU2_No_change +#define FIU_AirDirectionRR_Def_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_AirDirectionRR_Def_Req_FIU_CCU2_Active +#define FIU_AirDirectionRR_Def_Req_FIU_CCU2_Active (1) +#endif + +#ifndef FIU_AirDirectionRR_Def_Req_FIU_CCU2_Inactive +#define FIU_AirDirectionRR_Def_Req_FIU_CCU2_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionRR_Face_Req signal + +#ifndef FIU_AirDirectionRR_Face_Req_FIU_CCU2_No_change +#define FIU_AirDirectionRR_Face_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_AirDirectionRR_Face_Req_FIU_CCU2_Active +#define FIU_AirDirectionRR_Face_Req_FIU_CCU2_Active (1) +#endif + +#ifndef FIU_AirDirectionRR_Face_Req_FIU_CCU2_Inactive +#define FIU_AirDirectionRR_Face_Req_FIU_CCU2_Inactive (2) +#endif + + +// Value tables for @FIU_AirDirectionRR_Foot_Req signal + +#ifndef FIU_AirDirectionRR_Foot_Req_FIU_CCU2_No_change +#define FIU_AirDirectionRR_Foot_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_AirDirectionRR_Foot_Req_FIU_CCU2_Active +#define FIU_AirDirectionRR_Foot_Req_FIU_CCU2_Active (1) +#endif + +#ifndef FIU_AirDirectionRR_Foot_Req_FIU_CCU2_Inactive +#define FIU_AirDirectionRR_Foot_Req_FIU_CCU2_Inactive (2) +#endif + + +// Value tables for @FIU_BlowerSpeedRL_Req signal + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2_No_change +#define FIU_BlowerSpeedRL_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (1) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (2) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (3) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (4) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (5) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (6) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRL_Req_FIU_CCU2__step (7) +#endif + +#ifndef FIU_BlowerSpeedRL_Req_FIU_CCU2_Blower_off +#define FIU_BlowerSpeedRL_Req_FIU_CCU2_Blower_off (8) +#endif + + +// Value tables for @FIU_BlowerSpeedRR_Req signal + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2_No_change +#define FIU_BlowerSpeedRR_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (1) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (2) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (3) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (4) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (5) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (6) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2__step +#define FIU_BlowerSpeedRR_Req_FIU_CCU2__step (7) +#endif + +#ifndef FIU_BlowerSpeedRR_Req_FIU_CCU2_Blower_off +#define FIU_BlowerSpeedRR_Req_FIU_CCU2_Blower_off (8) +#endif + + +// Value tables for @FIU_CCautoModeRL_Req signal + +#ifndef FIU_CCautoModeRL_Req_FIU_CCU2_No_change +#define FIU_CCautoModeRL_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_1_requested +#define FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_1_requested (1) +#endif + +#ifndef FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_2_requested +#define FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_2_requested (2) +#endif + +#ifndef FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_3_requested +#define FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_3_requested (3) +#endif + +#ifndef FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_4_requested +#define FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_4_requested (4) +#endif + +#ifndef FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_5_requested +#define FIU_CCautoModeRL_Req_FIU_CCU2_Auto_mode_5_requested (5) +#endif + + +// Value tables for @FIU_CCautoModeRR_Req signal + +#ifndef FIU_CCautoModeRR_Req_FIU_CCU2_No_change +#define FIU_CCautoModeRR_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_1_requested +#define FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_1_requested (1) +#endif + +#ifndef FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_2_requested +#define FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_2_requested (2) +#endif + +#ifndef FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_3_requested +#define FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_3_requested (3) +#endif + +#ifndef FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_4_requested +#define FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_4_requested (4) +#endif + +#ifndef FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_5_requested +#define FIU_CCautoModeRR_Req_FIU_CCU2_Auto_mode_5_requested (5) +#endif + + +// Value tables for @FIU_DeflectorSwRLB_Req signal + +#ifndef FIU_DeflectorSwRLB_Req_FIU_CCU2_No_LED +#define FIU_DeflectorSwRLB_Req_FIU_CCU2_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwRLB_Req_FIU_CCU2_LED_3_step +#define FIU_DeflectorSwRLB_Req_FIU_CCU2_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwRLB_Req_FIU_CCU2_LED_2_step +#define FIU_DeflectorSwRLB_Req_FIU_CCU2_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwRLB_Req_FIU_CCU2_LED_1_step +#define FIU_DeflectorSwRLB_Req_FIU_CCU2_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwRLB_Req_FIU_CCU2_No_change +#define FIU_DeflectorSwRLB_Req_FIU_CCU2_No_change (0) +#endif + + +// Value tables for @FIU_DeflectorSwFCL_Req signal + +#ifndef FIU_DeflectorSwFCL_Req_FIU_CCU2_No_LED +#define FIU_DeflectorSwFCL_Req_FIU_CCU2_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwFCL_Req_FIU_CCU2_LED_3_step +#define FIU_DeflectorSwFCL_Req_FIU_CCU2_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwFCL_Req_FIU_CCU2_LED_2_step +#define FIU_DeflectorSwFCL_Req_FIU_CCU2_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwFCL_Req_FIU_CCU2_LED_1_step +#define FIU_DeflectorSwFCL_Req_FIU_CCU2_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwFCL_Req_FIU_CCU2_No_change +#define FIU_DeflectorSwFCL_Req_FIU_CCU2_No_change (0) +#endif + + +// Value tables for @FIU_ACrearOFF_Req signal + +#ifndef FIU_ACrearOFF_Req_FIU_CCU2_No_change +#define FIU_ACrearOFF_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_ACrearOFF_Req_FIU_CCU2_AC_front_ON +#define FIU_ACrearOFF_Req_FIU_CCU2_AC_front_ON (1) +#endif + +#ifndef FIU_ACrearOFF_Req_FIU_CCU2_AC_front_OFF +#define FIU_ACrearOFF_Req_FIU_CCU2_AC_front_OFF (2) +#endif + + +// Value tables for @FIU_DeflectorSwFCR_Req signal + +#ifndef FIU_DeflectorSwFCR_Req_FIU_CCU2_No_LED +#define FIU_DeflectorSwFCR_Req_FIU_CCU2_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwFCR_Req_FIU_CCU2_LED_3_step +#define FIU_DeflectorSwFCR_Req_FIU_CCU2_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwFCR_Req_FIU_CCU2_LED_2_step +#define FIU_DeflectorSwFCR_Req_FIU_CCU2_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwFCR_Req_FIU_CCU2_LED_1_step +#define FIU_DeflectorSwFCR_Req_FIU_CCU2_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwFCR_Req_FIU_CCU2_No_change +#define FIU_DeflectorSwFCR_Req_FIU_CCU2_No_change (0) +#endif + + +// Value tables for @FIU_DeflectorSwRRB_Req signal + +#ifndef FIU_DeflectorSwRRB_Req_FIU_CCU2_No_LED +#define FIU_DeflectorSwRRB_Req_FIU_CCU2_No_LED (4) +#endif + +#ifndef FIU_DeflectorSwRRB_Req_FIU_CCU2_LED_3_step +#define FIU_DeflectorSwRRB_Req_FIU_CCU2_LED_3_step (3) +#endif + +#ifndef FIU_DeflectorSwRRB_Req_FIU_CCU2_LED_2_step +#define FIU_DeflectorSwRRB_Req_FIU_CCU2_LED_2_step (2) +#endif + +#ifndef FIU_DeflectorSwRRB_Req_FIU_CCU2_LED_1_step +#define FIU_DeflectorSwRRB_Req_FIU_CCU2_LED_1_step (1) +#endif + +#ifndef FIU_DeflectorSwRRB_Req_FIU_CCU2_No_change +#define FIU_DeflectorSwRRB_Req_FIU_CCU2_No_change (0) +#endif + + +// Value tables for @FIU_RearZoneSync_Req signal + +#ifndef FIU_RearZoneSync_Req_FIU_CCU2_No_change +#define FIU_RearZoneSync_Req_FIU_CCU2_No_change (0) +#endif + +#ifndef FIU_RearZoneSync_Req_FIU_CCU2_Sync_rear +#define FIU_RearZoneSync_Req_FIU_CCU2_Sync_rear (1) +#endif + +#ifndef FIU_RearZoneSync_Req_FIU_CCU2_Sync_off +#define FIU_RearZoneSync_Req_FIU_CCU2_Sync_off (2) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Target temperature for rear left zone value + uint8_t FIU_TargetTempRL_Val_ro : 5; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempRL_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for rear left zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorRL_Req : 3; // Bits= 3 + + // Target temperature for rear right zone value + uint8_t FIU_TargetTempRR_Val_ro : 5; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempRR_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for rear right zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorRR_Req : 3; // Bits= 3 + + // Climate control mode for rear left zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeRL_Req : 2; // Bits= 2 + + // Airflow direction mode for rear left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRL_Def_Req : 2; // Bits= 2 + + // Airflow direction mode for rear left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRL_Face_Req : 2; // Bits= 2 + + // Airflow direction mode for rear left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRL_Foot_Req : 2; // Bits= 2 + + // Climate control mode for rear right zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeRR_Req : 2; // Bits= 2 + + // Airflow direction mode for rear right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRR_Def_Req : 2; // Bits= 2 + + // Airflow direction mode for rear right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRR_Face_Req : 2; // Bits= 2 + + // Airflow direction mode for rear right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRR_Foot_Req : 2; // Bits= 2 + + // Blower speed for rear left zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedRL_Req : 4; // Bits= 4 + + // Blower speed for rear right zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedRR_Req : 4; // Bits= 4 + + // Climate control auto mode for rear left zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeRL_Req : 3; // Bits= 3 + + // Climate control auto mode for rear right zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeRR_Req : 3; // Bits= 3 + + // Deflector rear left in B-pillar request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwRLB_Req : 3; // Bits= 3 + + // Deflector front console left request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFCL_Req : 3; // Bits= 3 + + // Air conditioner OFF rear request + // 0 : "No change" + // 1 : "AC front ON" + // 2 : "AC front OFF" + uint8_t FIU_ACrearOFF_Req : 2; // Bits= 2 + + // Deflector front console right request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFCR_Req : 3; // Bits= 3 + + // Deflector rear right in B-pillar request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwRRB_Req : 3; // Bits= 3 + + // Rear climate zones synchronization on/off request + // 0 : "No change" + // 1 : "Sync rear" + // 2 : "Sync off" + uint8_t FIU_RearZoneSync_Req : 2; // Bits= 2 + +#else + + // Target temperature for rear left zone value + uint8_t FIU_TargetTempRL_Val_ro; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempRL_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for rear left zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorRL_Req; // Bits= 3 + + // Target temperature for rear right zone value + uint8_t FIU_TargetTempRR_Val_ro; // Bits= 5 Offset= 15.5 Factor= 0.5 + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t FIU_TargetTempRR_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // Footwell temperature correction for rear right zone request + // 0 : "No change" + // 1 : "-3 step" + // 2 : "-2 step" + // 3 : "-1 step" + // 4 : "0" + // 5 : "+1 step" + // 6 : "+2 step" + // 7 : "+3 step" + uint8_t FIU_FootTempCorRR_Req; // Bits= 3 + + // Climate control mode for rear left zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeRL_Req; // Bits= 2 + + // Airflow direction mode for rear left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRL_Def_Req; // Bits= 2 + + // Airflow direction mode for rear left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRL_Face_Req; // Bits= 2 + + // Airflow direction mode for rear left zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRL_Foot_Req; // Bits= 2 + + // Climate control mode for rear right zone request + // 0 : "No change" + // 1 : "Manual mode requested" + // 2 : "Auto mode requested" + uint8_t FIU_CCmodeRR_Req; // Bits= 2 + + // Airflow direction mode for rear right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRR_Def_Req; // Bits= 2 + + // Airflow direction mode for rear right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRR_Face_Req; // Bits= 2 + + // Airflow direction mode for rear right zone request + // 0 : "No change" + // 1 : "Active" + // 2 : "Inactive" + uint8_t FIU_AirDirectionRR_Foot_Req; // Bits= 2 + + // Blower speed for rear left zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedRL_Req; // Bits= 4 + + // Blower speed for rear right zone request + // 0 : "No change" + // 1 : "1 step" + // 2 : "2 step" + // 3 : "3 step" + // 4 : "4 step" + // 5 : "5 step" + // 6 : "6 step" + // 7 : "7 step" + // 8 : "Blower off" + uint8_t FIU_BlowerSpeedRR_Req; // Bits= 4 + + // Climate control auto mode for rear left zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeRL_Req; // Bits= 3 + + // Climate control auto mode for rear right zone request + // 0 : "No change" + // 1 : "Auto mode 1 requested" + // 2 : "Auto mode 2 requested" + // 3 : "Auto mode 3 requested" + // 4 : "Auto mode 4 requested" + // 5 : "Auto mode 5 requested" + uint8_t FIU_CCautoModeRR_Req; // Bits= 3 + + // Deflector rear left in B-pillar request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwRLB_Req; // Bits= 3 + + // Deflector front console left request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFCL_Req; // Bits= 3 + + // Air conditioner OFF rear request + // 0 : "No change" + // 1 : "AC front ON" + // 2 : "AC front OFF" + uint8_t FIU_ACrearOFF_Req; // Bits= 2 + + // Deflector front console right request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwFCR_Req; // Bits= 3 + + // Deflector rear right in B-pillar request + // 4 : "No LED" + // 3 : "LED 3 step" + // 2 : "LED 2 step" + // 1 : "LED 1 step" + // 0 : "No change" + uint8_t FIU_DeflectorSwRRB_Req; // Bits= 3 + + // Rear climate zones synchronization on/off request + // 0 : "No change" + // 1 : "Sync rear" + // 2 : "Sync off" + uint8_t FIU_RearZoneSync_Req; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} FIU_CCU2_t; + +// def @FIU_CCU3 CAN Message (1443 0x5a3) +#define FIU_CCU3_IDE (0U) +#define FIU_CCU3_DLC (3U) +#define FIU_CCU3_CANID (0x5a3U) + +// Value tables for @FIU_Aroma_Req signal + +#ifndef FIU_Aroma_Req_FIU_CCU3_No_change +#define FIU_Aroma_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_Aroma_Req_FIU_CCU3_Aromatization_on +#define FIU_Aroma_Req_FIU_CCU3_Aromatization_on (1) +#endif + +#ifndef FIU_Aroma_Req_FIU_CCU3_Aromatization_off +#define FIU_Aroma_Req_FIU_CCU3_Aromatization_off (2) +#endif + + +// Value tables for @FIU_AromaIntens_Req signal + +#ifndef FIU_AromaIntens_Req_FIU_CCU3_No_change +#define FIU_AromaIntens_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_AromaIntens_Req_FIU_CCU3_Aromatization_mode_1_step +#define FIU_AromaIntens_Req_FIU_CCU3_Aromatization_mode_1_step (1) +#endif + +#ifndef FIU_AromaIntens_Req_FIU_CCU3_Aromatization_mode_2_step +#define FIU_AromaIntens_Req_FIU_CCU3_Aromatization_mode_2_step (2) +#endif + +#ifndef FIU_AromaIntens_Req_FIU_CCU3_Aromatization_mode_3_step +#define FIU_AromaIntens_Req_FIU_CCU3_Aromatization_mode_3_step (3) +#endif + + +// Value tables for @FIU_Rest_Req signal + +#ifndef FIU_Rest_Req_FIU_CCU3_No_change +#define FIU_Rest_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_Rest_Req_FIU_CCU3_Rest_mode_requested +#define FIU_Rest_Req_FIU_CCU3_Rest_mode_requested (1) +#endif + +#ifndef FIU_Rest_Req_FIU_CCU3_Rest_mode_not_requested +#define FIU_Rest_Req_FIU_CCU3_Rest_mode_not_requested (2) +#endif + + +// Value tables for @FIU_Ionization_Req signal + +#ifndef FIU_Ionization_Req_FIU_CCU3_Ionization_off +#define FIU_Ionization_Req_FIU_CCU3_Ionization_off (2) +#endif + +#ifndef FIU_Ionization_Req_FIU_CCU3_Ionization_on +#define FIU_Ionization_Req_FIU_CCU3_Ionization_on (1) +#endif + +#ifndef FIU_Ionization_Req_FIU_CCU3_No_change +#define FIU_Ionization_Req_FIU_CCU3_No_change (0) +#endif + + +// Value tables for @FIU_RLfootBlowDis_Req signal + +#ifndef FIU_RLfootBlowDis_Req_FIU_CCU3_No_change +#define FIU_RLfootBlowDis_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_RLfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_disabled_limitation_ON +#define FIU_RLfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_disabled_limitation_ON (1) +#endif + +#ifndef FIU_RLfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_enabled_limitation_OFF +#define FIU_RLfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_enabled_limitation_OFF (2) +#endif + + +// Value tables for @FIU_RRfootBlowDis_Req signal + +#ifndef FIU_RRfootBlowDis_Req_FIU_CCU3_No_change +#define FIU_RRfootBlowDis_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_RRfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_disabled_limitation_ON +#define FIU_RRfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_disabled_limitation_ON (1) +#endif + +#ifndef FIU_RRfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_enabled_limitation_OFF +#define FIU_RRfootBlowDis_Req_FIU_CCU3_Rear_footwell_blowing_enabled_limitation_OFF (2) +#endif + + +// Value tables for @FIU_ACmax_Req signal + +#ifndef FIU_ACmax_Req_FIU_CCU3_No_change +#define FIU_ACmax_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_ACmax_Req_FIU_CCU3_AC_MAX_on +#define FIU_ACmax_Req_FIU_CCU3_AC_MAX_on (1) +#endif + +#ifndef FIU_ACmax_Req_FIU_CCU3_AC_MAX_off +#define FIU_ACmax_Req_FIU_CCU3_AC_MAX_off (2) +#endif + + +// Value tables for @FIU_Defrost_Req signal + +#ifndef FIU_Defrost_Req_FIU_CCU3_No_change +#define FIU_Defrost_Req_FIU_CCU3_No_change (0) +#endif + +#ifndef FIU_Defrost_Req_FIU_CCU3_Defrost_on +#define FIU_Defrost_Req_FIU_CCU3_Defrost_on (1) +#endif + +#ifndef FIU_Defrost_Req_FIU_CCU3_Defrost_off +#define FIU_Defrost_Req_FIU_CCU3_Defrost_off (2) +#endif + + +// Value tables for @FIU_Ultraviolet_Req signal + +#ifndef FIU_Ultraviolet_Req_FIU_CCU3_Ultraviolet_off +#define FIU_Ultraviolet_Req_FIU_CCU3_Ultraviolet_off (2) +#endif + +#ifndef FIU_Ultraviolet_Req_FIU_CCU3_Ultraviolet_on +#define FIU_Ultraviolet_Req_FIU_CCU3_Ultraviolet_on (1) +#endif + +#ifndef FIU_Ultraviolet_Req_FIU_CCU3_No_change +#define FIU_Ultraviolet_Req_FIU_CCU3_No_change (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Aromatization system request + // 0 : "No change" + // 1 : "Aromatization on" + // 2 : "Aromatization off" + uint8_t FIU_Aroma_Req : 2; // Bits= 2 + + // Aromatization intensity request + // 0 : "No change" + // 1 : "Aromatization mode 1 step" + // 2 : "Aromatization mode 2 step" + // 3 : "Aromatization mode 3 step" + uint8_t FIU_AromaIntens_Req : 2; // Bits= 2 + + // Rest mode request + // 0 : "No change" + // 1 : "Rest mode requested" + // 2 : "Rest mode not requested" + uint8_t FIU_Rest_Req : 2; // Bits= 2 + + // Ionization system request + // 2 : "Ionization off" + // 1 : "Ionization on" + // 0 : "No change" + uint8_t FIU_Ionization_Req : 2; // Bits= 2 + + // Rear left passenger footwell blowing disable request (summer mode) + // 0 : "No change" + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 2 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t FIU_RLfootBlowDis_Req : 2; // Bits= 2 + + // Rear right passenger footwell blowing disable request (summer mode) + // 0 : "No change" + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 2 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t FIU_RRfootBlowDis_Req : 2; // Bits= 2 + + // AC max mode request + // 0 : "No change" + // 1 : "AC MAX on" + // 2 : "AC MAX off" + uint8_t FIU_ACmax_Req : 2; // Bits= 2 + + // Defrost max mode request + // 0 : "No change" + // 1 : "Defrost on" + // 2 : "Defrost off" + uint8_t FIU_Defrost_Req : 2; // Bits= 2 + + // Ultraviolet system mode request + // 2 : "Ultraviolet off" + // 1 : "Ultraviolet on" + // 0 : "No change" + uint8_t FIU_Ultraviolet_Req : 2; // Bits= 2 + +#else + + // Aromatization system request + // 0 : "No change" + // 1 : "Aromatization on" + // 2 : "Aromatization off" + uint8_t FIU_Aroma_Req; // Bits= 2 + + // Aromatization intensity request + // 0 : "No change" + // 1 : "Aromatization mode 1 step" + // 2 : "Aromatization mode 2 step" + // 3 : "Aromatization mode 3 step" + uint8_t FIU_AromaIntens_Req; // Bits= 2 + + // Rest mode request + // 0 : "No change" + // 1 : "Rest mode requested" + // 2 : "Rest mode not requested" + uint8_t FIU_Rest_Req; // Bits= 2 + + // Ionization system request + // 2 : "Ionization off" + // 1 : "Ionization on" + // 0 : "No change" + uint8_t FIU_Ionization_Req; // Bits= 2 + + // Rear left passenger footwell blowing disable request (summer mode) + // 0 : "No change" + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 2 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t FIU_RLfootBlowDis_Req; // Bits= 2 + + // Rear right passenger footwell blowing disable request (summer mode) + // 0 : "No change" + // 1 : "Rear footwell blowing disabled (limitation ON)" + // 2 : "Rear footwell blowing enabled (limitation OFF)" + uint8_t FIU_RRfootBlowDis_Req; // Bits= 2 + + // AC max mode request + // 0 : "No change" + // 1 : "AC MAX on" + // 2 : "AC MAX off" + uint8_t FIU_ACmax_Req; // Bits= 2 + + // Defrost max mode request + // 0 : "No change" + // 1 : "Defrost on" + // 2 : "Defrost off" + uint8_t FIU_Defrost_Req; // Bits= 2 + + // Ultraviolet system mode request + // 2 : "Ultraviolet off" + // 1 : "Ultraviolet on" + // 0 : "No change" + uint8_t FIU_Ultraviolet_Req; // Bits= 2 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} FIU_CCU3_t; + +// Diagnostic message +// def @Diag_To_CCU CAN Message (1963 0x7ab) +#define Diag_To_CCU_IDE (0U) +#define Diag_To_CCU_DLC (8U) +#define Diag_To_CCU_CANID (0x7abU) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Diagnostic signal + uint64_t Diag_To_CCU_Sig; // Bits=64 + +#else + + // Diagnostic signal + uint64_t Diag_To_CCU_Sig; // Bits=64 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} Diag_To_CCU_t; + +// Diagnostic message +// def @Diag_From_CCU CAN Message (1979 0x7bb) +#define Diag_From_CCU_IDE (0U) +#define Diag_From_CCU_DLC (8U) +#define Diag_From_CCU_CANID (0x7bbU) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Diagnostic signal + uint64_t Diag_From_CCU_Sig; // Bits=64 + +#else + + // Diagnostic signal + uint64_t Diag_From_CCU_Sig; // Bits=64 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} Diag_From_CCU_t; + +// Diagnostic message +// def @Diag_Functional CAN Message (2015 0x7df) +#define Diag_Functional_IDE (0U) +#define Diag_Functional_DLC (8U) +#define Diag_Functional_CANID (0x7dfU) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // Diagnostic signal + uint64_t Diag_Functional_Sig; // Bits=64 + +#else + + // Diagnostic signal + uint64_t Diag_Functional_Sig; // Bits=64 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} Diag_Functional_t; + +// def @HVC_01 CAN Message (419395865 0x18ff7919) +#define HVC_01_IDE (1U) +#define HVC_01_DLC (8U) +#define HVC_01_CANID (0x18ff7919U) +#define HVC_01_CYC (100U) + +// Value tables for @HVC_ActSpeed_Val signal + +#ifndef HVC_ActSpeed_Val_HVC_01_Invalid +#define HVC_ActSpeed_Val_HVC_01_Invalid (65535) +#endif + +// signal: @HVC_ActTemp_Val_ro +#define CANDB_HVC_ActTemp_Val_ro_CovFactor (2) +#define CANDB_HVC_ActTemp_Val_ro_toS(x) ( (uint8_t) (((x) - (-40)) / (2)) ) +#define CANDB_HVC_ActTemp_Val_ro_fromS(x) ( (((x) * (2)) + (-40)) ) + +// Value tables for @HVC_OvTemp_Stat signal + +#ifndef HVC_OvTemp_Stat_HVC_01_Fault +#define HVC_OvTemp_Stat_HVC_01_Fault (1) +#endif + +#ifndef HVC_OvTemp_Stat_HVC_01_Normal +#define HVC_OvTemp_Stat_HVC_01_Normal (0) +#endif + + +// Value tables for @HVC_ActMode_Stat signal + +#ifndef HVC_ActMode_Stat_HVC_01_Error +#define HVC_ActMode_Stat_HVC_01_Error (2) +#endif + +#ifndef HVC_ActMode_Stat_HVC_01_Active +#define HVC_ActMode_Stat_HVC_01_Active (1) +#endif + +#ifndef HVC_ActMode_Stat_HVC_01_Standby +#define HVC_ActMode_Stat_HVC_01_Standby (0) +#endif + + +// Value tables for @HVC_FaultLvl_Stat signal + +#ifndef HVC_FaultLvl_Stat_HVC_01_Level_3_failure +#define HVC_FaultLvl_Stat_HVC_01_Level_3_failure (3) +#endif + +#ifndef HVC_FaultLvl_Stat_HVC_01_Level_2_failure +#define HVC_FaultLvl_Stat_HVC_01_Level_2_failure (2) +#endif + +#ifndef HVC_FaultLvl_Stat_HVC_01_Level_1_failure +#define HVC_FaultLvl_Stat_HVC_01_Level_1_failure (1) +#endif + +#ifndef HVC_FaultLvl_Stat_HVC_01_No_trouble +#define HVC_FaultLvl_Stat_HVC_01_No_trouble (0) +#endif + + +// Value tables for @HVC_OvSpeed_Stat signal + +#ifndef HVC_OvSpeed_Stat_HVC_01_Fault +#define HVC_OvSpeed_Stat_HVC_01_Fault (1) +#endif + +#ifndef HVC_OvSpeed_Stat_HVC_01_Normal +#define HVC_OvSpeed_Stat_HVC_01_Normal (0) +#endif + + +// Value tables for @CCM2_LossStepErr_Stat signal + +#ifndef CCM2_LossStepErr_Stat_HVC_01_Fault +#define CCM2_LossStepErr_Stat_HVC_01_Fault (1) +#endif + +#ifndef CCM2_LossStepErr_Stat_HVC_01_Normal +#define CCM2_LossStepErr_Stat_HVC_01_Normal (0) +#endif + + +// Value tables for @HVC_OvLoadErr_Stat signal + +#ifndef HVC_OvLoadErr_Stat_HVC_01_Fault +#define HVC_OvLoadErr_Stat_HVC_01_Fault (1) +#endif + +#ifndef HVC_OvLoadErr_Stat_HVC_01_Normal +#define HVC_OvLoadErr_Stat_HVC_01_Normal (0) +#endif + + +// Value tables for @HVC_IGBTErr_Stat signal + +#ifndef HVC_IGBTErr_Stat_HVC_01_Fault +#define HVC_IGBTErr_Stat_HVC_01_Fault (1) +#endif + +#ifndef HVC_IGBTErr_Stat_HVC_01_Normal +#define HVC_IGBTErr_Stat_HVC_01_Normal (0) +#endif + + +// Value tables for @HVC_ErrCode_Stat signal + +#ifndef HVC_ErrCode_Stat_HVC_01_Over_Temperature_Drop_speed +#define HVC_ErrCode_Stat_HVC_01_Over_Temperature_Drop_speed (132) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Over_Temperature +#define HVC_ErrCode_Stat_HVC_01_Over_Temperature (131) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_ADC_Error +#define HVC_ErrCode_Stat_HVC_01_ADC_Error (130) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Speed_Error +#define HVC_ErrCode_Stat_HVC_01_Speed_Error (129) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Over_power_Drop_Frequency +#define HVC_ErrCode_Stat_HVC_01_Over_power_Drop_Frequency (128) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Over_current_Drop_Frequeney +#define HVC_ErrCode_Stat_HVC_01_Over_current_Drop_Frequeney (64) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Communication_Error +#define HVC_ErrCode_Stat_HVC_01_Communication_Error (32) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Standby_Under_Voltage +#define HVC_ErrCode_Stat_HVC_01_Standby_Under_Voltage (16) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Standby_Over_Voltage +#define HVC_ErrCode_Stat_HVC_01_Standby_Over_Voltage (8) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Under_Voltage +#define HVC_ErrCode_Stat_HVC_01_Under_Voltage (4) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Over_Voltage +#define HVC_ErrCode_Stat_HVC_01_Over_Voltage (2) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_Over_current +#define HVC_ErrCode_Stat_HVC_01_Over_current (1) +#endif + +#ifndef HVC_ErrCode_Stat_HVC_01_No_error +#define HVC_ErrCode_Stat_HVC_01_No_error (0) +#endif + +// signal: @HVC_PhaCurrA_Val_ro +#define CANDB_HVC_PhaCurrA_Val_ro_CovFactor (0.16) +#define CANDB_HVC_PhaCurrA_Val_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.16)) ) +#define CANDB_HVC_PhaCurrA_Val_ro_fromS(x) ( (((x) * (0.16)) + (0.0)) ) +// signal: @HVC_ActCurr_Val_ro +#define CANDB_HVC_ActCurr_Val_ro_CovFactor (0.1) +#define CANDB_HVC_ActCurr_Val_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_HVC_ActCurr_Val_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) +// signal: @HVC_ActVolt_Val_ro +#define CANDB_HVC_ActVolt_Val_ro_CovFactor (4) +#define CANDB_HVC_ActVolt_Val_ro_toS(x) ( (uint8_t) ((x) / (4)) ) +#define CANDB_HVC_ActVolt_Val_ro_fromS(x) ( ((x) * (4)) ) + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // ACActualSpeed + // AC actual speed + // 65535 : "Invalid" + uint16_t HVC_ActSpeed_Val; // Bits=16 Unit:'rpm' + + // EACTemp + // controller temperature + uint8_t HVC_ActTemp_Val_ro : 7; // Bits= 7 Offset= -40 Factor= 2 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int16_t HVC_ActTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // CCM2_OverTempErr + // over temperature fault + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_OvTemp_Stat : 1; // Bits= 1 + + // AC_WorkSt + // AC working status + // 2 : "Error" + // 1 : "Active" + // 0 : "Standby" + uint8_t HVC_ActMode_Stat : 2; // Bits= 2 + + // AC_FaultLevel + // Compressor failure class + // 3 : "Level 3 failure" + // 2 : "Level 2 failure" + // 1 : "Level 1 failure" + // 0 : "No trouble" + uint8_t HVC_FaultLvl_Stat : 2; // Bits= 2 + + // CCM2_OverSpeedErr + // Abnormal speed fault + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_OvSpeed_Stat : 1; // Bits= 1 + + // CCM2_LossStepErr + // out of sync failure + // 1 : "Fault" + // 0 : "Normal" + uint8_t CCM2_LossStepErr_Stat : 1; // Bits= 1 + + // CCM2_OverLoadError + // overload fault + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_OvLoadErr_Stat : 1; // Bits= 1 + + // IGBTErr + // Power tube failure + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_IGBTErr_Stat : 1; // Bits= 1 + + // AC_ErrorCode + // AC fault code + // 132 : "Over Temperature Drop speed" + // 131 : "Over Temperature" + // 130 : "ADC Error" + // 129 : "Speed Error" + // 128 : "Over power Drop Frequency" + // 64 : "Over current Drop Frequeney" + // 32 : "Communication Error" + // 16 : "Standby Under Voltage" + // 8 : "Standby Over Voltage" + // 4 : "Under Voltage" + // 2 : "Over Voltage" + // 1 : "Over current" + // 0 : "No error" + uint8_t HVC_ErrCode_Stat; // Bits= 8 + + // AC_PhaCur_A + // phase current + uint8_t HVC_PhaCurrA_Val_ro; // Bits= 8 Factor= 0.16 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_PhaCurrA_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // AC_Current + // AC current + uint8_t HVC_ActCurr_Val_ro; // Bits= 8 Factor= 0.1 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_ActCurr_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // AC_Voltage + // AC voltage + uint8_t HVC_ActVolt_Val_ro; // Bits= 8 Factor= 4 Unit:'V' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_ActVolt_Val_phys; +#endif // CANDB_USE_SIGFLOAT + +#else + + // ACActualSpeed + // AC actual speed + // 65535 : "Invalid" + uint16_t HVC_ActSpeed_Val; // Bits=16 Unit:'rpm' + + // EACTemp + // controller temperature + uint8_t HVC_ActTemp_Val_ro; // Bits= 7 Offset= -40 Factor= 2 Unit:'�C' + +#ifdef CANDB_USE_SIGFLOAT + int16_t HVC_ActTemp_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // CCM2_OverTempErr + // over temperature fault + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_OvTemp_Stat; // Bits= 1 + + // AC_WorkSt + // AC working status + // 2 : "Error" + // 1 : "Active" + // 0 : "Standby" + uint8_t HVC_ActMode_Stat; // Bits= 2 + + // AC_FaultLevel + // Compressor failure class + // 3 : "Level 3 failure" + // 2 : "Level 2 failure" + // 1 : "Level 1 failure" + // 0 : "No trouble" + uint8_t HVC_FaultLvl_Stat; // Bits= 2 + + // CCM2_OverSpeedErr + // Abnormal speed fault + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_OvSpeed_Stat; // Bits= 1 + + // CCM2_LossStepErr + // out of sync failure + // 1 : "Fault" + // 0 : "Normal" + uint8_t CCM2_LossStepErr_Stat; // Bits= 1 + + // CCM2_OverLoadError + // overload fault + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_OvLoadErr_Stat; // Bits= 1 + + // IGBTErr + // Power tube failure + // 1 : "Fault" + // 0 : "Normal" + uint8_t HVC_IGBTErr_Stat; // Bits= 1 + + // AC_ErrorCode + // AC fault code + // 132 : "Over Temperature Drop speed" + // 131 : "Over Temperature" + // 130 : "ADC Error" + // 129 : "Speed Error" + // 128 : "Over power Drop Frequency" + // 64 : "Over current Drop Frequeney" + // 32 : "Communication Error" + // 16 : "Standby Under Voltage" + // 8 : "Standby Over Voltage" + // 4 : "Under Voltage" + // 2 : "Over Voltage" + // 1 : "Over current" + // 0 : "No error" + uint8_t HVC_ErrCode_Stat; // Bits= 8 + + // AC_PhaCur_A + // phase current + uint8_t HVC_PhaCurrA_Val_ro; // Bits= 8 Factor= 0.16 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_PhaCurrA_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // AC_Current + // AC current + uint8_t HVC_ActCurr_Val_ro; // Bits= 8 Factor= 0.1 Unit:'A' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t HVC_ActCurr_Val_phys; +#endif // CANDB_USE_SIGFLOAT + + // AC_Voltage + // AC voltage + uint8_t HVC_ActVolt_Val_ro; // Bits= 8 Factor= 4 Unit:'V' + +#ifdef CANDB_USE_SIGFLOAT + uint16_t HVC_ActVolt_Val_phys; +#endif // CANDB_USE_SIGFLOAT + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} HVC_01_t; + +// def @CCU_AC_Ctrl CAN Message (419426816 0x18fff200) +#define CCU_AC_Ctrl_IDE (1U) +#define CCU_AC_Ctrl_DLC (8U) +#define CCU_AC_Ctrl_CANID (0x18fff200U) +#define CCU_AC_Ctrl_CYC (100U) + +// Value tables for @CCU_VCU_ACSpeedReq signal + +#ifndef CCU_VCU_ACSpeedReq_CCU_AC_Ctrl_Invalid +#define CCU_VCU_ACSpeedReq_CCU_AC_Ctrl_Invalid (65535) +#endif + +// signal: @CCU_ACMaxPowerConsumptionAllow_ro +#define CANDB_CCU_ACMaxPowerConsumptionAllow_ro_CovFactor (0.1) +#define CANDB_CCU_ACMaxPowerConsumptionAllow_ro_toS(x) ( (uint8_t) (((x) - (0.0)) / (0.1)) ) +#define CANDB_CCU_ACMaxPowerConsumptionAllow_ro_fromS(x) ( (((x) * (0.1)) + (0.0)) ) + +// Value tables for @CCU_VCU_AC_WorkReq signal + +#ifndef CCU_VCU_AC_WorkReq_CCU_AC_Ctrl_Active +#define CCU_VCU_AC_WorkReq_CCU_AC_Ctrl_Active (1) +#endif + +#ifndef CCU_VCU_AC_WorkReq_CCU_AC_Ctrl_Standby +#define CCU_VCU_AC_WorkReq_CCU_AC_Ctrl_Standby (0) +#endif + + +typedef struct +{ +#ifdef CANDB_USE_BITS_SIGNAL + + // 65535 : "Invalid" + uint16_t CCU_VCU_ACSpeedReq; // Bits=16 Unit:'rpm' + + uint8_t CCU_ACMaxPowerConsumptionAllow_ro; // Bits= 8 Factor= 0.1 Unit:'kW' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_ACMaxPowerConsumptionAllow_phys; +#endif // CANDB_USE_SIGFLOAT + + // 1 : "Active" + // 0 : "Standby" + uint8_t CCU_VCU_AC_WorkReq : 1; // Bits= 1 + +#else + + // 65535 : "Invalid" + uint16_t CCU_VCU_ACSpeedReq; // Bits=16 Unit:'rpm' + + uint8_t CCU_ACMaxPowerConsumptionAllow_ro; // Bits= 8 Factor= 0.1 Unit:'kW' + +#ifdef CANDB_USE_SIGFLOAT + sigfloat_t CCU_ACMaxPowerConsumptionAllow_phys; +#endif // CANDB_USE_SIGFLOAT + + // 1 : "Active" + // 0 : "Standby" + uint8_t CCU_VCU_AC_WorkReq; // Bits= 1 + +#endif // CANDB_USE_BITS_SIGNAL + +#ifdef CANDB_USE_DIAG_MONITORS + + FrameMonitor_t mon1; + +#endif // CANDB_USE_DIAG_MONITORS + +} CCU_AC_Ctrl_t; + +// Function signatures + +uint32_t Unpack_ESC_04_candb(ESC_04_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_ESC_04_candb(ESC_04_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_ESC_04_candb(ESC_04_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_EMS_Veh_candb(EMS_Veh_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_EMS_Veh_candb(EMS_Veh_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_EMS_Veh_candb(EMS_Veh_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_Powertrain_candb(BCM_Powertrain_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_BCM_Powertrain_candb(BCM_Powertrain_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_BCM_Powertrain_candb(BCM_Powertrain_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_EMS_Veh_02_candb(EMS_Veh_02_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_EMS_Veh_02_candb(EMS_Veh_02_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_EMS_Veh_02_candb(EMS_Veh_02_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_EEM_candb(BCM_EEM_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_BCM_EEM_candb(BCM_EEM_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_BCM_EEM_candb(BCM_EEM_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_DMFR_Msg1_candb(DMFR_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_DMFR_Msg1_candb(DMFR_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_DMFR_Msg1_candb(DMFR_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_DMFL_Msg1_candb(DMFL_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_DMFL_Msg1_candb(DMFL_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_DMFL_Msg1_candb(DMFL_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_TM_Stat_candb(TM_Stat_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_TM_Stat_candb(TM_Stat_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_TM_Stat_candb(TM_Stat_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_TM_CP_candb(TM_CP_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_TM_CP_candb(TM_CP_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_TM_CP_candb(TM_CP_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_HVC_CCU_Status_Msg_candb(HVC_CCU_Status_Msg_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_HVC_CCU_Status_Msg_candb(HVC_CCU_Status_Msg_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_HVC_CCU_Status_Msg_candb(HVC_CCU_Status_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_VEH_STATE_candb(BCM_VEH_STATE_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_BCM_VEH_STATE_candb(BCM_VEH_STATE_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_BCM_VEH_STATE_candb(BCM_VEH_STATE_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_EMS_HVC_Req_Msg_candb(EMS_HVC_Req_Msg_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_EMS_HVC_Req_Msg_candb(EMS_HVC_Req_Msg_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_EMS_HVC_Req_Msg_candb(EMS_HVC_Req_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_HVC_Err_Status_Msg_candb(HVC_Err_Status_Msg_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_HVC_Err_Status_Msg_candb(HVC_Err_Status_Msg_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_HVC_Err_Status_Msg_candb(HVC_Err_Status_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_HVC_Req_Msg_candb(CCU_HVC_Req_Msg_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_HVC_Req_Msg_candb(CCU_HVC_Req_Msg_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_HVC_Req_Msg_candb(CCU_HVC_Req_Msg_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Stat1_candb(CCU_Stat1_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Stat1_candb(CCU_Stat1_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Stat1_candb(CCU_Stat1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Stat2_candb(CCU_Stat2_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Stat2_candb(CCU_Stat2_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Stat2_candb(CCU_Stat2_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Requests_candb(CCU_Requests_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Requests_candb(CCU_Requests_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Requests_candb(CCU_Requests_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Stat3_candb(CCU_Stat3_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Stat3_candb(CCU_Stat3_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Stat3_candb(CCU_Stat3_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_VCU_Msg1_candb(CCU_VCU_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_VCU_Msg1_candb(CCU_VCU_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_VCU_Msg1_candb(CCU_VCU_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_VCU_Msg2_candb(CCU_VCU_Msg2_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_VCU_Msg2_candb(CCU_VCU_Msg2_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_VCU_Msg2_candb(CCU_VCU_Msg2_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_BCM_CLIMATIC_DATA_candb(BCM_CLIMATIC_DATA_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_BCM_CLIMATIC_DATA_candb(BCM_CLIMATIC_DATA_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_BCM_CLIMATIC_DATA_candb(BCM_CLIMATIC_DATA_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Msg1_candb(CCU_Msg1_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Msg1_candb(CCU_Msg1_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Msg1_candb(CCU_Msg1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_VCU_CCU_Req_candb(VCU_CCU_Req_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_VCU_CCU_Req_candb(VCU_CCU_Req_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_VCU_CCU_Req_candb(VCU_CCU_Req_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_ESC_08_candb(ESC_08_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_ESC_08_candb(ESC_08_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_ESC_08_candb(ESC_08_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMFL_status_candb(SMFL_status_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_SMFL_status_candb(SMFL_status_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_SMFL_status_candb(SMFL_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMFR_status_candb(SMFR_status_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_SMFR_status_candb(SMFR_status_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_SMFR_status_candb(SMFR_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMRL_status_candb(SMRL_status_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_SMRL_status_candb(SMRL_status_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_SMRL_status_candb(SMRL_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SMRR_status_candb(SMRR_status_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_SMRR_status_candb(SMRR_status_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_SMRR_status_candb(SMRR_status_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Errors_candb(CCU_Errors_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Errors_candb(CCU_Errors_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Errors_candb(CCU_Errors_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_Msg3_candb(CCU_Msg3_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_Msg3_candb(CCU_Msg3_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_Msg3_candb(CCU_Msg3_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_SDM_Cmd_candb(SDM_Cmd_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_SDM_Cmd_candb(SDM_Cmd_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_SDM_Cmd_candb(SDM_Cmd_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_VEH_VIN_candb(VEH_VIN_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_VEH_VIN_candb(VEH_VIN_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_VEH_VIN_candb(VEH_VIN_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCUFL_MSG_candb(OCUFL_MSG_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_OCUFL_MSG_candb(OCUFL_MSG_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_OCUFL_MSG_candb(OCUFL_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCUFR_MSG_candb(OCUFR_MSG_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_OCUFR_MSG_candb(OCUFR_MSG_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_OCUFR_MSG_candb(OCUFR_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCURL_MSG_candb(OCURL_MSG_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_OCURL_MSG_candb(OCURL_MSG_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_OCURL_MSG_candb(OCURL_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_OCURR_MSG_candb(OCURR_MSG_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_OCURR_MSG_candb(OCURR_MSG_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_OCURR_MSG_candb(OCURR_MSG_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_DW_STATE_candb(DW_STATE_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_DW_STATE_candb(DW_STATE_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_DW_STATE_candb(DW_STATE_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_FIU_CCU1_candb(FIU_CCU1_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_FIU_CCU1_candb(FIU_CCU1_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_FIU_CCU1_candb(FIU_CCU1_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_FIU_CCU2_candb(FIU_CCU2_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_FIU_CCU2_candb(FIU_CCU2_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_FIU_CCU2_candb(FIU_CCU2_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_FIU_CCU3_candb(FIU_CCU3_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_FIU_CCU3_candb(FIU_CCU3_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_FIU_CCU3_candb(FIU_CCU3_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_Diag_To_CCU_candb(Diag_To_CCU_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_Diag_To_CCU_candb(Diag_To_CCU_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_Diag_To_CCU_candb(Diag_To_CCU_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_Diag_From_CCU_candb(Diag_From_CCU_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_Diag_From_CCU_candb(Diag_From_CCU_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_Diag_From_CCU_candb(Diag_From_CCU_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_Diag_Functional_candb(Diag_Functional_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_Diag_Functional_candb(Diag_Functional_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_Diag_Functional_candb(Diag_Functional_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_HVC_01_candb(HVC_01_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_HVC_01_candb(HVC_01_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_HVC_01_candb(HVC_01_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +uint32_t Unpack_CCU_AC_Ctrl_candb(CCU_AC_Ctrl_t* _m, const uint8_t* _d, uint8_t dlc_); +#ifdef CANDB_USE_CANSTRUCT +uint32_t Pack_CCU_AC_Ctrl_candb(CCU_AC_Ctrl_t* _m, __CoderDbcCanFrame_t__* cframe); +#else +uint32_t Pack_CCU_AC_Ctrl_candb(CCU_AC_Ctrl_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide); +#endif // CANDB_USE_CANSTRUCT + +#ifdef __cplusplus +} +#endif diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..35ce3f4 --- /dev/null +++ b/modular.json @@ -0,0 +1,15 @@ +{ + "cmake": { + "inc_dirs": [ + "inc", + "butl", + "conf", + "lib" + ], + "srcs": [ + "butl/**.c", + "lib/**.c", + "usr/**.c" + ] + } +} \ No newline at end of file diff --git a/usr/candb-fmon.c b/usr/candb-fmon.c new file mode 100644 index 0000000..fe43317 --- /dev/null +++ b/usr/candb-fmon.c @@ -0,0 +1,294 @@ +// Generator version : v3.1 +// DBC filename : CCU.dbc +#include "candb-fmon.h" + +#ifdef CANDB_USE_DIAG_MONITORS + +/* +Put the monitor function content here, keep in mind - +next generation will completely clear all manually added code (!) +*/ + +#ifdef CANDB_USE_MONO_FMON + +void _FMon_MONO_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +#else + +void _FMon_ESC_04_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_EMS_Veh_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_BCM_Powertrain_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_EMS_Veh_02_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_BCM_EEM_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_DMFR_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_DMFL_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_TM_Stat_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_TM_CP_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_HVC_CCU_Status_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_BCM_VEH_STATE_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_EMS_HVC_Req_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_HVC_Err_Status_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_HVC_Req_Msg_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Stat1_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Stat2_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Requests_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Stat3_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_VCU_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_VCU_Msg2_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_BCM_CLIMATIC_DATA_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Msg1_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_VCU_CCU_Req_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_ESC_08_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_SMFL_status_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_SMFR_status_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_SMRL_status_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_SMRR_status_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Errors_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_Msg3_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_SDM_Cmd_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_VEH_VIN_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_OCUFL_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_OCUFR_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_OCURL_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_OCURR_MSG_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_DW_STATE_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_FIU_CCU1_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_FIU_CCU2_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_FIU_CCU3_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_Diag_To_CCU_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_Diag_From_CCU_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_Diag_Functional_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_HVC_01_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +void _FMon_CCU_AC_Ctrl_candb(FrameMonitor_t* _mon, uint32_t msgid) +{ + (void)_mon; + (void)msgid; +} + +#endif // CANDB_USE_MONO_FMON + +#endif // CANDB_USE_DIAG_MONITORS