// Generator version : v3.1
// Generation time   : 2024.12.27 15:27:04
// DBC filename      : DMK-RP-77A.dbc
#pragma once

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

// DBC file version
#define VER_CANMATRIX_MAJ (0U)
#define VER_CANMATRIX_MIN (0U)

// include current dbc-driver compilation config
#include "canmatrix-config.h"

#ifdef CANMATRIX_USE_DIAG_MONITORS
// This file must define:
// base monitor struct
#include "canmonitorutil.h"

#endif // CANMATRIX_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 CANMATRIX_MAX_DLC_VALUE
// The value which was found out by generator (real max value)
#define CANMATRIX_MAX_DLC_VALUE 8U
#endif

// The limit is used for setting frame's data bytes
#define CANMATRIX_VALIDATE_DLC(msgDlc) (((msgDlc) <= (CANMATRIX_MAX_DLC_VALUE)) ? (msgDlc) : (CANMATRIX_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 CANMATRIX_INITIAL_BYTE_VALUE
#define CANMATRIX_INITIAL_BYTE_VALUE 0U
#endif


// def @BCM_HEAT CAN Message (1008 0x3f0)
#define BCM_HEAT_IDE (0U)
#define BCM_HEAT_DLC (8U)
#define BCM_HEAT_CANID (0x3f0U)
#define BCM_HEAT_CYC (100U)

typedef struct
{
#ifdef CANMATRIX_USE_BITS_SIGNAL

  uint8_t BCM_HEATCTL;                       //      Bits= 8

#else

  uint8_t BCM_HEATCTL;                       //      Bits= 8

#endif // CANMATRIX_USE_BITS_SIGNAL

#ifdef CANMATRIX_USE_DIAG_MONITORS

  FrameMonitor_t mon1;

#endif // CANMATRIX_USE_DIAG_MONITORS

} BCM_HEAT_t;

// def @MFS_HOD CAN Message (1009 0x3f1)
#define MFS_HOD_IDE (0U)
#define MFS_HOD_DLC (8U)
#define MFS_HOD_CANID (0x3f1U)
#define MFS_HOD_CYC (10U)

typedef struct
{
#ifdef CANMATRIX_USE_BITS_SIGNAL

  uint16_t MFS_HOD_RAW;                      //      Bits=16

  uint16_t MFS_HOD_baseline;                 //      Bits=16

  uint16_t MFS_HOD_DIFF;                     //      Bits=16

  uint8_t MFS_HOD_TEMP;                      //      Bits= 8

  uint8_t MFS_HOD_HANDING : 1;               //      Bits= 1

  uint8_t MFS_HOD_HEATING : 1;               //      Bits= 1

#else

  uint16_t MFS_HOD_RAW;                      //      Bits=16

  uint16_t MFS_HOD_baseline;                 //      Bits=16

  uint16_t MFS_HOD_DIFF;                     //      Bits=16

  uint8_t MFS_HOD_TEMP;                      //      Bits= 8

  uint8_t MFS_HOD_HANDING;                   //      Bits= 1

  uint8_t MFS_HOD_HEATING;                   //      Bits= 1

#endif // CANMATRIX_USE_BITS_SIGNAL

#ifdef CANMATRIX_USE_DIAG_MONITORS

  FrameMonitor_t mon1;

#endif // CANMATRIX_USE_DIAG_MONITORS

} MFS_HOD_t;

// def @MFS_KEY CAN Message (1024 0x400)
#define MFS_KEY_IDE (0U)
#define MFS_KEY_DLC (8U)
#define MFS_KEY_CANID (0x400U)
#define MFS_KEY_CYC (10U)

// Value tables for @MFS_MENU signal

#ifndef MFS_MENU_MFS_KEY_PRESSED
#define MFS_MENU_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_MENU_MFS_KEY_NOT_PRESS
#define MFS_MENU_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_360 signal

#ifndef MFS_KEY_360_MFS_KEY_PRESSED
#define MFS_KEY_360_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_360_MFS_KEY_NOT_PRESS
#define MFS_KEY_360_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_ADAS signal

#ifndef MFS_KEY_ADAS_MFS_KEY_PRESSED
#define MFS_KEY_ADAS_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_ADAS_MFS_KEY_NOT_PRESS
#define MFS_KEY_ADAS_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_RST signal

#ifndef MFS_KEY_RST_MFS_KEY_PRESSED
#define MFS_KEY_RST_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_RST_MFS_KEY_NOT_PRESS
#define MFS_KEY_RST_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_SET signal

#ifndef MFS_KEY_SET_MFS_KEY_PRESSED
#define MFS_KEY_SET_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_SET_MFS_KEY_NOT_PRESS
#define MFS_KEY_SET_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_DistReduce signal

#ifndef MFS_KEY_DistReduce_MFS_KEY_PRESSED
#define MFS_KEY_DistReduce_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_DistReduce_MFS_KEY_NOT_PRESS
#define MFS_KEY_DistReduce_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_DistIncrease signal

#ifndef MFS_KEY_DistIncrease_MFS_KEY_PRESSED
#define MFS_KEY_DistIncrease_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_DistIncrease_MFS_KEY_NOT_PRESS
#define MFS_KEY_DistIncrease_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_LEFT signal

#ifndef MFS_KEY_LEFT_MFS_KEY_PRESSED
#define MFS_KEY_LEFT_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_LEFT_MFS_KEY_NOT_PRESS
#define MFS_KEY_LEFT_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_OK signal

#ifndef MFS_KEY_OK_MFS_KEY_PRESSED
#define MFS_KEY_OK_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_OK_MFS_KEY_NOT_PRESS
#define MFS_KEY_OK_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_RIGHT signal

#ifndef MFS_KEY_RIGHT_MFS_KEY_PRESSED
#define MFS_KEY_RIGHT_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_RIGHT_MFS_KEY_NOT_PRESS
#define MFS_KEY_RIGHT_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_VOICE signal

#ifndef MFS_KEY_VOICE_MFS_KEY_PRESSED
#define MFS_KEY_VOICE_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_VOICE_MFS_KEY_NOT_PRESS
#define MFS_KEY_VOICE_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_PHONE signal

#ifndef MFS_KEY_PHONE_MFS_KEY_PRESSED
#define MFS_KEY_PHONE_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_PHONE_MFS_KEY_NOT_PRESS
#define MFS_KEY_PHONE_MFS_KEY_NOT_PRESS (0)
#endif


// Value tables for @MFS_KEY_RETURN signal

#ifndef MFS_KEY_RETURN_MFS_KEY_PRESSED
#define MFS_KEY_RETURN_MFS_KEY_PRESSED (1)
#endif

#ifndef MFS_KEY_RETURN_MFS_KEY_NOT_PRESS
#define MFS_KEY_RETURN_MFS_KEY_NOT_PRESS (0)
#endif


typedef struct
{
#ifdef CANMATRIX_USE_BITS_SIGNAL

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_MENU : 1;                      //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_360 : 1;                   //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_ADAS : 1;                  //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_RST : 1;                   //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_SET : 1;                   //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_DistReduce : 1;            //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_DistIncrease : 1;          //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_LEFT : 1;                  //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_OK : 1;                    //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_RIGHT : 1;                 //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_VOICE : 1;                 //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_PHONE : 1;                 //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_RETURN : 1;                //      Bits= 1

  uint8_t MFS_ENCODER : 2;                   //      Bits= 2

  uint8_t MFS_KEY_RollDownCnt : 4;           //      Bits= 4

  uint8_t MFS_RollUpCnt : 4;                 //      Bits= 4

#else

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_MENU;                          //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_360;                       //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_ADAS;                      //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_RST;                       //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_SET;                       //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_DistReduce;                //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_DistIncrease;              //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_LEFT;                      //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_OK;                        //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_RIGHT;                     //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_VOICE;                     //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_PHONE;                     //      Bits= 1

  //  1 : "PRESSED"
  //  0 : "NOT_PRESS"
  uint8_t MFS_KEY_RETURN;                    //      Bits= 1

  uint8_t MFS_ENCODER;                       //      Bits= 2

  uint8_t MFS_KEY_RollDownCnt;               //      Bits= 4

  uint8_t MFS_RollUpCnt;                     //      Bits= 4

#endif // CANMATRIX_USE_BITS_SIGNAL

#ifdef CANMATRIX_USE_DIAG_MONITORS

  FrameMonitor_t mon1;

#endif // CANMATRIX_USE_DIAG_MONITORS

} MFS_KEY_t;

// Function signatures

uint32_t Unpack_BCM_HEAT_CANmatrix(BCM_HEAT_t* _m, const uint8_t* _d, uint8_t dlc_);
#ifdef CANMATRIX_USE_CANSTRUCT
uint32_t Pack_BCM_HEAT_CANmatrix(BCM_HEAT_t* _m, __CoderDbcCanFrame_t__* cframe);
#else
uint32_t Pack_BCM_HEAT_CANmatrix(BCM_HEAT_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide);
#endif // CANMATRIX_USE_CANSTRUCT

uint32_t Unpack_MFS_HOD_CANmatrix(MFS_HOD_t* _m, const uint8_t* _d, uint8_t dlc_);
#ifdef CANMATRIX_USE_CANSTRUCT
uint32_t Pack_MFS_HOD_CANmatrix(MFS_HOD_t* _m, __CoderDbcCanFrame_t__* cframe);
#else
uint32_t Pack_MFS_HOD_CANmatrix(MFS_HOD_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide);
#endif // CANMATRIX_USE_CANSTRUCT

uint32_t Unpack_MFS_KEY_CANmatrix(MFS_KEY_t* _m, const uint8_t* _d, uint8_t dlc_);
#ifdef CANMATRIX_USE_CANSTRUCT
uint32_t Pack_MFS_KEY_CANmatrix(MFS_KEY_t* _m, __CoderDbcCanFrame_t__* cframe);
#else
uint32_t Pack_MFS_KEY_CANmatrix(MFS_KEY_t* _m, uint8_t* _d, uint8_t* _len, uint8_t* _ide);
#endif // CANMATRIX_USE_CANSTRUCT

#ifdef __cplusplus
}
#endif
