
/* -------------------------------- Includes -------------------------------- */
#include ".\OsekCom.h"
#include <stddef.h>                     // Defines NULL
#include <stdbool.h>                    // Defines true
#include <stdlib.h>                     // Defines EXIT_FAILURE
#include "definitions.h"                // SYS function prototypes
#include "Std_Types.h"
#include "DiagnosticL/FicOsek/FicOsekCom.h"
#include   "FunctionState.h"
/* -------------------------------- Defines --------------------------------- */

#define CAN_CALC_STD_ID(id) ((uint32_t)(id))

/* ID in Target Process format of frames with static ID */
#define ID_TP_FRM_SWTLPRIVATEDHUCANFR06 (CAN_CALC_STD_ID(0x34U))
#define ID_TP_FRM_SWTLPRIVATEDHUCANFR05 (CAN_CALC_STD_ID(0x378U))
#define ID_TP_FRM_SWTLPRIVATEDHUCANFR04 (CAN_CALC_STD_ID(0x374U))
#define ID_TP_FRM_SWTLPRIVATEDHUCANFR03 (CAN_CALC_STD_ID(0x370U))
#define ID_TP_FRM_SWTLPRIVATEDHUCANFR02 (CAN_CALC_STD_ID(0x305U))
#define ID_TP_FRM_SWTLPRIVATEDHUCANFR01 (CAN_CALC_STD_ID(0x300U))
#define ID_TP_FRM_SWTLPRESSFR01 (CAN_CALC_STD_ID(0x400U))
#define ID_TP_FRM_SWTLSENSORFR01 (CAN_CALC_STD_ID(0x401U))
#define ID_TP_FRM_SWTLSENSORFR02 (CAN_CALC_STD_ID(0x402U))
#define ID_TP_FRM_SWTLSENSORFR03 (CAN_CALC_STD_ID(0x403U))
#define ID_TP_FRM_SWTLSENSORFR04 (CAN_CALC_STD_ID(0x404U))
#define ID_TP_FRM_SWTLSENSORFR05 (CAN_CALC_STD_ID(0x405U))
#define ID_TP_FRM_SWTLSENSORFR06 (CAN_CALC_STD_ID(0x406U))
#define ID_TP_FRM_SWTLSENSORFR07 (CAN_CALC_STD_ID(0x407U))
#define ID_TP_FRM_SWTLSENSORFR08 (CAN_CALC_STD_ID(0x408U))
#define ID_TP_FRM_IHUPRIVATEDHUCANFR01 (CAN_CALC_STD_ID(0x30U))
#define ID_TP_FRM_DIAG_PHYSRESP_SWTL (CAN_CALC_STD_ID(0x620U))
#define ID_TP_FRM_DIAG_PHYSREQ_SWTL (CAN_CALC_STD_ID(0x720U))
#define ID_TP_FRM_DIAG_FUNCREQ (CAN_CALC_STD_ID(0x7FFU))

/* Max length of Tx Com frames */
#define MAX_LEN_FRM_SWTLPRIVATEDHUCANFR06 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLPRIVATEDHUCANFR05 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLPRIVATEDHUCANFR04 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLPRIVATEDHUCANFR03 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLPRIVATEDHUCANFR02 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLPRIVATEDHUCANFR01 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLPRESSFR01 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR01 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR02 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR03 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR04 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR05 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR06 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR07 ((uint16_t) 8)
#define MAX_LEN_FRM_SWTLSENSORFR08 ((uint16_t) 8)
#define MAX_LEN_FRM_DIAG_PHYSRESP_SWTL ((UI_16) 8)
/* Min length of Rx frames to be able to decode each signal */
#define MIN_LEN_FRM_SIG_TWLIBRISTS_UB ((uint16_t) 3)
#define MIN_LEN_FRM_SIG_TWLIBRISTS ((uint16_t) 3)
#define MIN_LEN_FRM_SIG_SWTOFKEYTONE_UB ((uint16_t) 1)
#define MIN_LEN_FRM_SIG_SWTOFKEYTONE ((uint16_t) 1)
#define MIN_LEN_FRM_SIG_INTRBRISTS_UB ((uint16_t) 1)
#define MIN_LEN_FRM_SIG_INTRBRISTS ((uint16_t) 1)
#define MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN_UB ((uint16_t) 6)
#define MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN ((uint16_t) 6)
#define MIN_LEN_FRM_SIG_DIAGNOSTICREQSWTL ((UI_16) 1)
#define MIN_LEN_FRM_SIG_DIAGNOSTICFUNCADDRREQ ((UI_16) 1)

/* First byte of dynamic length signals */
/* First byte of dynamic length signals */
#define FB_SIG_DIAGNOSTICREQSWTL ((UI_8) 0)
#define FB_SIG_DIAGNOSTICFUNCADDRREQ ((UI_8) 0)
/* Maximum length of dynamic length signals */
#define MAX_LEN_FRM_DIAG_PHYSRESP_SWTL ((UI_16) 8)
#define MAX_LEN_SIG_DIAGNOSTICRESPSWTL ((UI_16) 8)
#define MAX_LEN_SIG_DIAGNOSTICFUNCADDRREQ ((UI_8) 8)
#define MAX_LEN_SIG_DIAGNOSTICREQSWTL ((UI_8) 8)
/* Maximum length of dynamic length signals */
#define ENDIAN_BYTE(byte, alloc_size)  (byte)

/* Macros of the TX_REQ flags */
#define SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x01))
#define RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xFE))
#define TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06() ((flag_swtl_com_tx_req0 & ((uint8_t)0x01)) == ((uint8_t) 0x01))

#define SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x02))
#define RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xFD))
#define TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01() ((flag_swtl_com_tx_req0 & ((uint8_t)0x02)) == ((uint8_t) 0x02))

#define SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x04))
#define RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xFB))
#define TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02() ((flag_swtl_com_tx_req0 & ((uint8_t)0x04)) == ((uint8_t) 0x04))

#define SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x08))
#define RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xF7))
#define TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03() ((flag_swtl_com_tx_req0 & ((uint8_t)0x08)) == ((uint8_t) 0x08))

#define SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x10))
#define RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xEF))
#define TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04() ((flag_swtl_com_tx_req0 & ((uint8_t)0x10)) == ((uint8_t) 0x10))

#define SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x20))
#define RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xDF))
#define TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05() ((flag_swtl_com_tx_req0 & ((uint8_t)0x20)) == ((uint8_t) 0x20))

#define SET_FLAG_TX_REQ_FRM_SWTLPRESSFR01() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x40))
#define RST_FLAG_TX_REQ_FRM_SWTLPRESSFR01() (flag_swtl_com_tx_req0 &= ((uint8_t) 0xBF))
#define TST_FLAG_TX_REQ_FRM_SWTLPRESSFR01() ((flag_swtl_com_tx_req0 & ((uint8_t)0x40)) == ((uint8_t) 0x40))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR01() (flag_swtl_com_tx_req0 |= ((uint8_t) 0x80))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR01() (flag_swtl_com_tx_req0 &= ((uint8_t) 0x7F))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR01() ((flag_swtl_com_tx_req0 & ((uint8_t)0x80)) == ((uint8_t) 0x80))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR02() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x01))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR02() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xFE))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR02() ((flag_swtl_com_tx_req1 & ((uint8_t)0x01)) == ((uint8_t) 0x01))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR03() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x02))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR03() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xFD))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR03() ((flag_swtl_com_tx_req1 & ((uint8_t)0x02)) == ((uint8_t) 0x02))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR04() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x04))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR04() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xFB))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR04() ((flag_swtl_com_tx_req1 & ((uint8_t)0x04)) == ((uint8_t) 0x04))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR05() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x08))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR05() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xF7))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR05() ((flag_swtl_com_tx_req1 & ((uint8_t)0x08)) == ((uint8_t) 0x08))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR06() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x10))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR06() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xEF))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR06() ((flag_swtl_com_tx_req1 & ((uint8_t)0x10)) == ((uint8_t) 0x10))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR07() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x20))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR07() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xDF))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR07() ((flag_swtl_com_tx_req1 & ((uint8_t)0x20)) == ((uint8_t) 0x20))

#define SET_FLAG_TX_REQ_FRM_SWTLSENSORFR08() (flag_swtl_com_tx_req1 |= ((uint8_t) 0x40))
#define RST_FLAG_TX_REQ_FRM_SWTLSENSORFR08() (flag_swtl_com_tx_req1 &= ((uint8_t) 0xBF))
#define TST_FLAG_TX_REQ_FRM_SWTLSENSORFR08() ((flag_swtl_com_tx_req1 & ((uint8_t)0x40)) == ((uint8_t) 0x40))


#define SET_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() (flag_swtl_com_tx_req1 |= ((UI_8) 0x80))
#define RST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() (flag_swtl_com_tx_req1 &= ((UI_8) 0x7F))
#define TST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL() ((flag_swtl_com_tx_req1 & ((UI_8)0x80)) == ((UI_8) 0x80))


/* Cancel value to cancel a timer */
#define TIMER_CANCEL ((uint16_t) 0xFFFF)

/* Declaration of period time of the periodic or mixed Tx frames */
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR06 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR06 ((uint32_t) (400))
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR05 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR05 ((uint32_t) (400))
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR04 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR04 ((uint32_t) (400))
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR03 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR03 ((uint32_t) (100))
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR02 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR02 ((uint32_t) (100))
#define OT_TX_FRM_SWTLPRIVATEDHUCANFR01 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRIVATEDHUCANFR01 ((uint32_t) (100))
#define OT_TX_FRM_SWTLPRESSFR01 ((uint32_t) (0))
#define PT_TX_FRM_SWTLPRESSFR01 ((uint32_t) (50))//todo
#define OT_TX_FRM_SWTLSENSORFR01 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR01 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR02 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR02 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR03 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR03 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR04 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR04 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR05 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR05 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR06 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR06 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR07 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR07 ((uint32_t) (50))
#define OT_TX_FRM_SWTLSENSORFR08 ((uint32_t) (0))
#define PT_TX_FRM_SWTLSENSORFR08 ((uint32_t) (50))

#define TIMER_MS_TO_TIME_RESTRICTIVE(t) ( (uint32_t) ((t)+(uint8_t)1) )
/* Declaration of deadline monitoring values for Rx signals */
#define TO_FRX_SIG_ACTVNOFSTEERWHLILLMN ((uint32_t) TIMER_MS_TO_TIME_RESTRICTIVE((uint16_t)200))
#define TO_RX_SIG_ACTVNOFSTEERWHLILLMN  ((uint32_t) TIMER_MS_TO_TIME_RESTRICTIVE((uint16_t)2000))

/* Declaration of deadline monitoring values of Tx frames */
#define TO_TX_FRM_DIAG_PHYSRESP_SWTL  ((t_timer_time) TIMER_MS_TO_TIME_RESTRICTIVE((UI_16)1))

/* Macros to Set notification flags */
#define SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS() (flag_tx0 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS() (flag_tx0 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLSNSRFLTSTS() (flag_tx0 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLCMNFLTSTS() (flag_tx0 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTL_UB() (flag_tx0 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_SWTLSERNONR4() (flag_tx0 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_SWTLSERNONR3() (flag_tx0 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_SWTLSERNONR2() (flag_tx0 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_SWTLSERNONR1() (flag_tx1 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_SWTLSERNO_UB() (flag_tx1 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR4() (flag_tx1 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR3() (flag_tx1 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR2() (flag_tx1 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR1() (flag_tx1 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLENDSGN3() (flag_tx1 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLENDSGN2() (flag_tx1 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPLENDSGN1() (flag_tx2 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_SWTLPARTNOCMPL_UB() (flag_tx2 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR5() (flag_tx2 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR4() (flag_tx2 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR3() (flag_tx2 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR2() (flag_tx2 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR1() (flag_tx2 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLENDSGN3() (flag_tx2 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLENDSGN2() (flag_tx3 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_SWTLPARTNO10CMPLENDSGN1() (flag_tx3 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_SWPUPDWNSTSLE_UB() (flag_tx3 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_SWPUPDWNSTSLE() (flag_tx3 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_SWPLERISTSLE_UB() (flag_tx3 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_SWPLERISTSLE() (flag_tx3 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCRSRESUSTEERWHLTOUCHBDSTS() (flag_tx3 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCRSRESUQF1() (flag_tx3 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCRSRESU_UB() (flag_tx4 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLSTEERWHLTOUCHBDSTS() (flag_tx4 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLQF1() (flag_tx4 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLCNTR() (flag_tx4 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLCHKS() (flag_tx4 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCL_UB() (flag_tx4 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDADAS_UB() (flag_tx4 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDADAS() (flag_tx4 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_LEMFCTACTSGUP_UB() (flag_tx5 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_LEMFCTACTSGUP() (flag_tx5 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_LEMFCTACTSGRI_UB() (flag_tx5 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_LEMFCTACTSGRI() (flag_tx5 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_LEMFCTACTSGLE_UB() (flag_tx5 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_LEMFCTACTSGLE() (flag_tx5 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_LEMFCTACTSGDN_UB() (flag_tx5 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_LEMFCTACTSGDN() (flag_tx5 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_LEMFCTACTSGCE_UB() (flag_tx6 |= (uint8_t) 0x01)
#define SET_FLAG_TX_SIG_LEMFCTACTSGCE() (flag_tx6 |= (uint8_t) 0x02)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNY() (flag_tx6 |= (uint8_t) 0x04)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNX() (flag_tx6 |= (uint8_t) 0x08)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS() (flag_tx6 |= (uint8_t) 0x10)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDLECNTR() (flag_tx6 |= (uint8_t) 0x20)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDLECHKS() (flag_tx6 |= (uint8_t) 0x40)
#define SET_FLAG_TX_SIG_STEERWHLTOUCHBDLE_UB() (flag_tx6 |= (uint8_t) 0x80)
#define SET_FLAG_TX_SIG_DIAGNOSTICRESPSWTL() (flag_tx6 |= (UI_8) 0x40)
#define SET_FLAG_RX_SIG_DIAGNOSTICREQSWTL() (flag_rx0 |= (UI_8) 0x01)
#define SET_FLAG_RX_SIG_DIAGNOSTICFUNCADDRREQ() (flag_rx0 |= (UI_8) 0x02)

/* Macros of the flag of the estate of the communications */
#define SET_FLAG_OSEK_COM_INIT() (flag_st_mode |= ((uint8_t) 0x10))
#define RST_FLAG_OSEK_COM_INIT() (flag_st_mode &= ((uint8_t) 0xEF))
#define TST_FLAG_OSEK_COM_INIT() ((flag_st_mode & ((uint8_t)0x10)) == ((uint8_t) 0x10))
#define SET_FLAG_OSEK_COM_PER_TX() (flag_st_mode |= ((uint8_t) 0x20))
#define RST_FLAG_OSEK_COM_PER_TX() (flag_st_mode &= ((uint8_t) 0xDF))
#define TST_FLAG_OSEK_COM_PER_TX() ((flag_st_mode & ((uint8_t)0x20)) == ((uint8_t) 0x20))


/* ------------------------------- Data Types ------------------------------- */

/* Type to allocate data structure for managed signals */
typedef uint8_t t_alloc_sig_twlibrists_ub[1];
typedef uint8_t t_alloc_sig_twlibrists[1];
typedef uint8_t t_alloc_sig_swtofkeytone_ub[1];
typedef uint8_t t_alloc_sig_swtofkeytone[1];
typedef uint8_t t_alloc_sig_intrbrists_ub[1];
typedef uint8_t t_alloc_sig_intrbrists[1];
typedef uint8_t t_alloc_sig_actvnofsteerwhlillmn_ub[1];
typedef uint8_t t_alloc_sig_actvnofsteerwhlillmn[1];
typedef UI_8 t_alloc_sig_diagnosticreqswtl[8];
typedef UI_8 t_alloc_sig_diagnosticfuncaddrreq[8];

/* ---------------------------- Global Variables ---------------------------- */
extern uint8_t Test_frame_On;
/* Declaration of mode and state flag */
static uint8_t flag_st_mode;

/* Static length Rx Com signals internal objects declaration */
static volatile t_alloc_sig_twlibrists_ub sig_twlibrists_ub;
static volatile t_alloc_sig_twlibrists sig_twlibrists;
static volatile t_alloc_sig_swtofkeytone_ub sig_swtofkeytone_ub;
static volatile t_alloc_sig_swtofkeytone sig_swtofkeytone;
static volatile t_alloc_sig_intrbrists_ub sig_intrbrists_ub;
static volatile t_alloc_sig_intrbrists sig_intrbrists;
static volatile t_alloc_sig_actvnofsteerwhlillmn_ub sig_actvnofsteerwhlillmn_ub;
static volatile t_alloc_sig_actvnofsteerwhlillmn sig_actvnofsteerwhlillmn;
static volatile t_alloc_sig_diagnosticreqswtl sig_diagnosticreqswtl;
static volatile UI_8 sig_len_diagnosticreqswtl;
static volatile t_alloc_sig_diagnosticfuncaddrreq sig_diagnosticfuncaddrreq;
static volatile UI_8 sig_len_diagnosticfuncaddrreq;
/* Dynamic length Rx Com signals internal objects declaration */

/* Com Tx fames objects internal declaration */
static uint8_t frm_swtlprivatedhucanfr06[MAX_LEN_FRM_SWTLPRIVATEDHUCANFR06];
static uint8_t frm_swtlprivatedhucanfr05[MAX_LEN_FRM_SWTLPRIVATEDHUCANFR05];
static uint8_t frm_swtlprivatedhucanfr04[MAX_LEN_FRM_SWTLPRIVATEDHUCANFR04];
static uint8_t frm_swtlprivatedhucanfr03[MAX_LEN_FRM_SWTLPRIVATEDHUCANFR03];
static uint8_t frm_swtlprivatedhucanfr02[MAX_LEN_FRM_SWTLPRIVATEDHUCANFR02];
static uint8_t frm_swtlprivatedhucanfr01[MAX_LEN_FRM_SWTLPRIVATEDHUCANFR01];
static uint8_t frm_swtlpressfr01[MAX_LEN_FRM_SWTLPRESSFR01];
static uint8_t frm_swtlsensorfr01[MAX_LEN_FRM_SWTLSENSORFR01];
static uint8_t frm_swtlsensorfr02[MAX_LEN_FRM_SWTLSENSORFR02];
static uint8_t frm_swtlsensorfr03[MAX_LEN_FRM_SWTLSENSORFR03];
static uint8_t frm_swtlsensorfr04[MAX_LEN_FRM_SWTLSENSORFR04];
static uint8_t frm_swtlsensorfr05[MAX_LEN_FRM_SWTLSENSORFR05];
static uint8_t frm_swtlsensorfr06[MAX_LEN_FRM_SWTLSENSORFR06];
static uint8_t frm_swtlsensorfr07[MAX_LEN_FRM_SWTLSENSORFR07];
static uint8_t frm_swtlsensorfr08[MAX_LEN_FRM_SWTLSENSORFR08];
UI_8 frm_diag_physresp_swtl[MAX_LEN_FRM_DIAG_PHYSRESP_SWTL];
static UI_8 len_frm_diag_physresp_swtl;
/* Tx request flags declaration */
static volatile uint8_t flag_swtl_com_tx_req0;
static volatile uint8_t flag_swtl_com_tx_req1;

/* Com traffic flags declaration */
static volatile t_flag_value com_traffic_swtl;

/* Declaration of the periodic timers of Tx frames */
static uint32_t ptt_tx_frm_swtlprivatedhucanfr06;
static uint32_t ptt_tx_frm_swtlprivatedhucanfr05;
static uint32_t ptt_tx_frm_swtlprivatedhucanfr04;
static uint32_t ptt_tx_frm_swtlprivatedhucanfr03;
static uint32_t ptt_tx_frm_swtlprivatedhucanfr02;
static uint32_t ptt_tx_frm_swtlprivatedhucanfr01;
static uint32_t ptt_tx_frm_swtlpressfr01;
static uint32_t ptt_tx_frm_swtlsensorfr01;
static uint32_t ptt_tx_frm_swtlsensorfr02;
static uint32_t ptt_tx_frm_swtlsensorfr03;
static uint32_t ptt_tx_frm_swtlsensorfr04;
static uint32_t ptt_tx_frm_swtlsensorfr05;
static uint32_t ptt_tx_frm_swtlsensorfr06;
static uint32_t ptt_tx_frm_swtlsensorfr07;
static uint32_t ptt_tx_frm_swtlsensorfr08;
static volatile t_timer_time dmt_tx_frm_diag_physresp_swtl;
/* Declaration of deadline monitoring timers of Rx signals */
static volatile uint32_t dmt_rx_sig_actvnofsteerwhlillmn;

/* Declaration of class 2 (TxNotif) notification flags */
static volatile uint8_t flag_tx0;
static volatile uint8_t flag_tx1;
static volatile uint8_t flag_tx2;
static volatile uint8_t flag_tx3;
static volatile uint8_t flag_tx4;
static volatile uint8_t flag_tx5;
static volatile uint8_t flag_tx6;
static volatile uint8_t flag_tx7;
uint8_t flag_rx0;
/* Declaration of timer diff between last tick and current tick */
static uint32_t time_diff;


 
/* --------------------------- Routine Prototypes --------------------------- */
static void OsekComPeriodicTx(void);
static void OsekComDeadlineMonitRx(void);
static void OsekComTxReqFrmDIAG_PhysResp_SWTL(void);
/* -------------------------------- Routines -------------------------------- */
uint32_t CanBufQueryIdTp(void);
uint8_t CanBufQueryDataByte(uint8_t hdl, uint8_t index);
#define CAN_BUF_QUERY_DATA_BYTE(bhdl, byte) (CanBufQueryDataByte(bhdl, byte))
#define CAN_BUF_QUERY_DATA_LEN(HwCtl, bhdl) (CanBufQueryDataLen(HwCtl, bhdl))
UI_8 CanBufQueryDataLen(t_can_handler can_handler, t_can_buf_hdl bhdl);
/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Reception of a new frame notification callback
|  * This callback must be launched by the lower COM driver upon the reception
|    of a new frame.
|---------------------------------------------------------------------------
| Parameters description:
|  bhdl: Handler of the buffer where the received frame is stored.
/---------------------------------------------------------------------------*/
void OsekComRxNotifCallbackSWTL(t_com_buf_hdl bhdl)
{
    t_flag_value aux_com_traffic = COM_TRUE;
    uint32_t buf_idtp = CanBufQueryIdTp();
    uint8_t frm_len = 8;

    if (TST_FLAG_OSEK_COM_INIT()) {
        /* Rx Com frames with static ID */ 
        switch (buf_idtp) {
        case ID_TP_FRM_IHUPRIVATEDHUCANFR01:
            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_TWLIBRISTS_UB) {
                /* Decoding of signal sig_TwliBriSts_UB */ 
                sig_twlibrists_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,2)) >> ((uint8_t)7));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_TWLIBRISTS) {
                /* Decoding of signal sig_TwliBriSts */ 
                sig_twlibrists[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,2) & ((uint8_t)127)) >> ((uint8_t)6));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_SWTOFKEYTONE_UB) {
                /* Decoding of signal sig_SwtOfKeyTone_UB */ 
                sig_swtofkeytone_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,0) & ((uint8_t)63)) >> ((uint8_t)5));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_SWTOFKEYTONE) {
                /* Decoding of signal sig_SwtOfKeyTone */ 
                sig_swtofkeytone[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,0)) >> ((uint8_t)6));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_INTRBRISTS_UB) {
                /* Decoding of signal sig_IntrBriSts_UB */ 
                sig_intrbrists_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,0) & ((uint8_t)31)) >> ((uint8_t)4));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_INTRBRISTS) {
                /* Decoding of signal sig_IntrBriSts */ 
                sig_intrbrists[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,0) & ((uint8_t)15)));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN_UB) {
                /* Decoding of signal sig_ActvnOfSteerWhlIllmn_UB */ 
                sig_actvnofsteerwhlillmn_ub[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,5) & ((uint8_t)7)) >> ((uint8_t)2));
            }
            else {
                /* Do nothing */
            }

            /* Test of the minimum Rx frames length required to decode the signal */
            if (frm_len >= MIN_LEN_FRM_SIG_ACTVNOFSTEERWHLILLMN) {
                /* Reset of the deadline monitoring timer */
                dmt_rx_sig_actvnofsteerwhlillmn = 0;
                /* Decoding of signal sig_ActvnOfSteerWhlIllmn */ 
                sig_actvnofsteerwhlillmn[0] = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,5) & ((uint8_t)15)) >> ((uint8_t)3));
                /* Rx notification callback */
                IhuPrivateDHUCanFr01_CALLBACK();
            }
            else {
                /* Do nothing */
            }

            break;
	 case ID_TP_FRM_DIAG_PHYSREQ_SWTL:
              /* Test of the minimum Rx frames length required to decode the signal */
		
		   
                if (frm_len >= MIN_LEN_FRM_SIG_DIAGNOSTICREQSWTL) {
                    /* Decoding of signal sig_DiagnosticReqSWTL */ 
                    sig_diagnosticreqswtl[0]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,0));
                    sig_diagnosticreqswtl[1]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,1));
                    sig_diagnosticreqswtl[2]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,2));
                    sig_diagnosticreqswtl[3]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,3));
                    sig_diagnosticreqswtl[4]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,4));
                    sig_diagnosticreqswtl[5]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,5));
                    sig_diagnosticreqswtl[6]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,6));
                    sig_diagnosticreqswtl[7]  = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,7)));
                    /* Length calculation of signal sig_DiagnosticReqPRNDL */ 
                    sig_len_diagnosticreqswtl = frm_len - FB_SIG_DIAGNOSTICREQSWTL;
 					
                    /* Set of the Rx notification flag */
                    SET_FLAG_RX_SIG_DIAGNOSTICREQSWTL();
                }
                else {
                    /* Do nothing */
                }
            break;
	 case ID_TP_FRM_DIAG_FUNCREQ:
                /* Test of the minimum Rx frames length required to decode the signal */
                if (frm_len >= MIN_LEN_FRM_SIG_DIAGNOSTICFUNCADDRREQ) {
                    /* Decoding of signal sig_DiagnosticFuncAddrReq */ 
                    sig_diagnosticfuncaddrreq[0]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,0));
                    sig_diagnosticfuncaddrreq[1]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,1));
                    sig_diagnosticfuncaddrreq[2]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,2));
                    sig_diagnosticfuncaddrreq[3]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,3));
                    sig_diagnosticfuncaddrreq[4]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,4));
                    sig_diagnosticfuncaddrreq[5]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,5));
                    sig_diagnosticfuncaddrreq[6]  = (CAN_BUF_QUERY_DATA_BYTE(bhdl,6));
                    sig_diagnosticfuncaddrreq[7]  = ((CAN_BUF_QUERY_DATA_BYTE(bhdl,7)));
                    /* Length calculation of signal sig_DiagnosticFuncAddrReq */ 
                    sig_len_diagnosticfuncaddrreq = frm_len - FB_SIG_DIAGNOSTICFUNCADDRREQ;
                    /* Set of the Rx notification flag */
                    SET_FLAG_RX_SIG_DIAGNOSTICFUNCADDRREQ();
                }
                else {
                    /* Do nothing */
                }

                break;			
        default:
            /* Reset com traffic flag */
            aux_com_traffic = COM_FALSE;
            break;
        }
    }
    else {
        /* Do nothing */
    }
    /* Com traffic flag */
    if ((com_traffic_swtl == COM_FALSE) && (aux_com_traffic == COM_TRUE)) {
        com_traffic_swtl = COM_TRUE;
    }
}

void CanTx(t_can_handler can_handler, bool notif, uint32_t idtp, uint16_t len, t_can_data can_data);
/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Available transmission buffer notification callback
|  * This callback must be launched by the lower COM driver upon a transmission
|    buffer will become available after requesting one to perform a transmission. 
|---------------------------------------------------------------------------
| Parameters description:
|  return: TRUE in case that after current transmission lower COM driver should
|          call again this callback to transmit a new frame.
|          FALSE otherwise.
/---------------------------------------------------------------------------*/
bool OsekComTxReqCallbackSWTL(void)
{
    /* Check of the Tx request flag */
    if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06()) {
        /* Transmission of the frame SwtlPrivateDHUCanFr06*/
        if(Fuction_State != Function_State_C)
            {
        CanTx(0, true, ID_TP_FRM_SWTLPRIVATEDHUCANFR06, MAX_LEN_FRM_SWTLPRIVATEDHUCANFR06, frm_swtlprivatedhucanfr06);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01()) {
        /* Transmission of the frame SwtlPrivateDHUCanFr01 */
        if(Fuction_State != Function_State_C)
            {
        CanTx(0, true, ID_TP_FRM_SWTLPRIVATEDHUCANFR01, MAX_LEN_FRM_SWTLPRIVATEDHUCANFR01, frm_swtlprivatedhucanfr01);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02()) {
        /* Transmission of the frame SwtlPrivateDHUCanFr02 */
        if(Fuction_State != Function_State_C)
            {
        CanTx(0, true, ID_TP_FRM_SWTLPRIVATEDHUCANFR02, MAX_LEN_FRM_SWTLPRIVATEDHUCANFR02, frm_swtlprivatedhucanfr02);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03()) {
        /* Transmission of the frame SwtlPrivateDHUCanFr03 */
        if(Fuction_State != Function_State_C)
            {
        CanTx(0, true, ID_TP_FRM_SWTLPRIVATEDHUCANFR03, MAX_LEN_FRM_SWTLPRIVATEDHUCANFR03, frm_swtlprivatedhucanfr03);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04()) {
        /* Transmission of the frame SwtlPrivateDHUCanFr04 */
        if(Fuction_State != Function_State_C)
            {
        CanTx(0, true, ID_TP_FRM_SWTLPRIVATEDHUCANFR04, MAX_LEN_FRM_SWTLPRIVATEDHUCANFR04, frm_swtlprivatedhucanfr04);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05()) {
        /* Transmission of the frame SwtlPrivateDHUCanFr05 */
        if(Fuction_State != Function_State_C)
            {
        CanTx(0, true, ID_TP_FRM_SWTLPRIVATEDHUCANFR05, MAX_LEN_FRM_SWTLPRIVATEDHUCANFR05, frm_swtlprivatedhucanfr05);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLPRESSFR01()) {
        /* Transmission of the frame SwtlPressFr01 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLPRESSFR01, MAX_LEN_FRM_SWTLPRESSFR01, frm_swtlpressfr01);
        }
        RST_FLAG_TX_REQ_FRM_SWTLPRESSFR01();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR01()) {
        /* Transmission of the frame SwtlSensorFr01 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR01, MAX_LEN_FRM_SWTLSENSORFR01, frm_swtlsensorfr01);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR01();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR02()) {
        /* Transmission of the frame SwtlSensorFr02 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR02, MAX_LEN_FRM_SWTLSENSORFR02, frm_swtlsensorfr02);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR02();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR03()) {
        /* Transmission of the frame SwtlSensorFr03 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR03, MAX_LEN_FRM_SWTLSENSORFR03, frm_swtlsensorfr03);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR03();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR04()) {
        /* Transmission of the frame SwtlSensorFr04 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true,ID_TP_FRM_SWTLSENSORFR04, MAX_LEN_FRM_SWTLSENSORFR04, frm_swtlsensorfr04);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR04();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR05()) {
        /* Transmission of the frame SwtlSensorFr05 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR05, MAX_LEN_FRM_SWTLSENSORFR05, frm_swtlsensorfr05);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR05();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR06()) {
        /* Transmission of the frame SwtlSensorFr06 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR06, MAX_LEN_FRM_SWTLSENSORFR06, frm_swtlsensorfr06);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR06();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR07()) {
        /* Transmission of the frame SwtlSensorFr07 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR07, MAX_LEN_FRM_SWTLSENSORFR07, frm_swtlsensorfr07);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR07();
    }
    else if (TST_FLAG_TX_REQ_FRM_SWTLSENSORFR08()) {
        /* Transmission of the frame SwtlSensorFr08 */
        if(Fuction_State != Function_State_C)
            {
            if(Test_frame_On == 1)
        CanTx(0, true, ID_TP_FRM_SWTLSENSORFR08, MAX_LEN_FRM_SWTLSENSORFR08, frm_swtlsensorfr08);
        }
        RST_FLAG_TX_REQ_FRM_SWTLSENSORFR08();
    }
     else if(TST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL())
    {
    	 /* Transmission of the frame DIAG_PHYSRESP_SWTL */
        CanTx(0, true, ID_TP_FRM_DIAG_PHYSRESP_SWTL, MAX_LEN_FRM_DIAG_PHYSRESP_SWTL, frm_diag_physresp_swtl);
        RST_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL();
    }
    else {
        /* Do nothing */
    }

    /* return checking pending transmissions */
    return (((flag_swtl_com_tx_req0 != 0) || (flag_swtl_com_tx_req1 != 0)) ? true : false);
}

uint32_t CanBufQueryIdTp_Tx(void);
/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Frame transmission confirmation notifying callback
|  * This callback must be launched by the lower COM driver upon the completion
|    of a frame transmission for which transmission confirmation has been requested
|---------------------------------------------------------------------------
| Parameters description:
|  bhdl: Handler of the buffer where the transmitted frame is stored.
/---------------------------------------------------------------------------*/
void OsekComTxNotifCallbackSWTL(t_com_buf_hdl bhdl)
{
    //uint32_t buf_idtp = CanBufQueryIdTp_Tx();
    uint32_t buf_idtp = CanBufQueryIdTp();
    buf_idtp = ID_TP_FRM_DIAG_PHYSREQ_SWTL;

    switch (buf_idtp) {
   // case ID_TP_FRM_SWTLPRIVATEDHUCANFR01:
        /* Set of Tx the notification flag */
   //     SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNY();
        /* Set of Tx the notification flag */
   //     SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNX();
        /* Set of Tx the notification flag */
   //     SET_FLAG_TX_SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS();
        /* Set of Tx the notification flag */
   //     SET_FLAG_TX_SIG_STEERWHLTOUCHBDLECNTR();
        /* Set of Tx the notification flag */
   //     SET_FLAG_TX_SIG_STEERWHLTOUCHBDLECHKS();
        /* Set of Tx the notification flag */
    //    SET_FLAG_TX_SIG_STEERWHLTOUCHBDLE_UB();
   //     break;
    case ID_TP_FRM_SWTLPRIVATEDHUCANFR06:
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLSNSRFLTSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTLCMNFLTSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_DIAGCFAILRTOUCHPANSWTL_UB();
        break;
    case ID_TP_FRM_SWTLPRIVATEDHUCANFR05:
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLSERNONR4();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLSERNONR3();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLSERNONR2();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLSERNONR1();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLSERNO_UB();
        break;
    case ID_TP_FRM_SWTLPRIVATEDHUCANFR04:
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR4();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR3();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR2();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLNR1();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLENDSGN3();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLENDSGN2();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPLENDSGN1();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNOCMPL_UB();
        break;
    case ID_TP_FRM_SWTLPRIVATEDHUCANFR03:
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR5();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR4();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR3();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR2();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLNR1();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLENDSGN3();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLENDSGN2();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWTLPARTNO10CMPLENDSGN1();
        break;
    case ID_TP_FRM_SWTLPRIVATEDHUCANFR02:
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWPUPDWNSTSLE_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWPUPDWNSTSLE();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWPLERISTSLE_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_SWPLERISTSLE();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCRSRESUSTEERWHLTOUCHBDSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCRSRESUQF1();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCRSRESU_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLSTEERWHLTOUCHBDSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLQF1();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLCNTR();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCLCHKS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDCNCL_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDADAS_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDADAS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGUP_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGUP();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGRI_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGRI();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGLE_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGLE();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGDN_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGDN();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGCE_UB();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_LEMFCTACTSGCE();
        break;
    case ID_TP_FRM_SWTLPRIVATEDHUCANFR01:
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNY();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDLETOUCHPOSNX();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDLECNTR();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDLECHKS();
        /* Set of Tx the notification flag */
        SET_FLAG_TX_SIG_STEERWHLTOUCHBDLE_UB();
        break;
     case ID_TP_FRM_DIAG_PHYSREQ_SWTL:// //ID_TP_FRM_DIAG_PHYSRESP_SWTR  ID_TP_FRM_DIAG_FUNCREQ
     case ID_TP_FRM_DIAG_FUNCREQ:
	 SET_FLAG_TX_SIG_DIAGNOSTICRESPSWTL();
	  break;		
    default:
        /* Do nothing */
        break;
    }
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Service to initialize OsekCom stack
|
| ------------------------------------------------- --------------------------
| Parameters description:
|  app_mode: OsekCom initialization mode (See t_com_application_mode_type)
|  return: E_OK in case of no errors
|          Other (see t_status_type).
/---------------------------------------------------------------------------*/
t_status_type StartCom(t_com_application_mode_type app_mode)
{
    uint16_t ind;
    uint8_t aux[8];
    const t_application_data_ref aux_ref = &aux;

    /* Get current timer tick */

    /* Buffer initialization */
    for(ind=0; ind < (uint16_t)8; ind++){
        aux[ind]=(uint8_t)0;
    }
    /* Register of the COM mode */
    flag_st_mode = app_mode & (uint8_t)0x0F;

    /* Set of the active communications flags */
    SET_FLAG_OSEK_COM_INIT();

    /* Signals initialization to zero */
    for(ind=(uint16_t)0;ind<LAST_OSEK_COM_SIGNAL_SYMBOLIC_NAME;ind++){
        (void)InitMessage(ind,aux_ref);
    }
    /* Signals initialization to a specific value */


    /* Initialization of the Tx request flags */
    flag_swtl_com_tx_req0 = (uint8_t) 0;
    flag_swtl_com_tx_req1 = (uint8_t) 0;

    /* Initialization of the communications traffic flags */
    com_traffic_swtl = COM_FALSE;

    /* Initialization of the Rx deadline monitoring timers */
    dmt_rx_sig_actvnofsteerwhlillmn = 0;

    /* Initialization of the class 2 (TxNotif) flags */
    flag_tx0 = (uint8_t) 0;
    flag_tx1 = (uint8_t) 0;
    flag_tx2 = (uint8_t) 0;
    flag_tx3 = (uint8_t) 0;
    flag_tx4 = (uint8_t) 0;
    flag_tx5 = (uint8_t) 0;
    flag_tx6 = (uint8_t) 0;
    flag_tx7 = (uint8_t) 0;
    flag_rx0 = (UI_8) 0;

    /* Return */
    return E_OK;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
| * Service to inquiry in which mode OsekCom has been initialized.
| * If this service is called before initializing the communications stack
|   a random mode will be returned.
| ---------------------------------------------------------------------------
| Parameters description:
|  return: OsekCom initialization mode(See t_com_application_mode_type)
/ --------------------------------------------------------------------------- */
t_com_application_mode_type GetComApplicationMode(void)
{
    return ((t_com_application_mode_type)(flag_st_mode & (uint8_t)0x0F));
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
| * Service to close the OsekCom stack.
| * This service stops the transmission of periodic frames.
| * After calling this service communications could be re-established
|   calling again service StartCom.
| * This service does not change the state of any lower COM driver.
| ---------------------------------------------------------------------------
| Parameters description:
|  shtdwn_mode: OsekCom stop mode (See t_com_shutdown_mode_type)
|  return: E_OK in case of no errors
|          Other (see t_status_type).
/ --------------------------------------------------------------------------- */
t_status_type StopCom(t_com_shutdown_mode_type shtdwn_mode)
{
    /* Communications stop */
    flag_st_mode &= (uint8_t) 0x0F;
    return (E_OK);
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Service to start the transmission of periodic or mixed frames.
|  * If this service is re-executed then transmission timers will be re-started.
|---------------------------------------------------------------------------
| Parameters description:
|  return: E_OK in case of no errors
|          Other (see t_status_type).
/---------------------------------------------------------------------------*/
t_status_type StartPeriodic(void)
{
    t_status_type status=E_OK;

    if (TST_FLAG_OSEK_COM_INIT()) {
        /* Initialization of periodic or mixed tx timers */
        ptt_tx_frm_swtlprivatedhucanfr06= PT_TX_FRM_SWTLPRIVATEDHUCANFR06 - OT_TX_FRM_SWTLPRIVATEDHUCANFR06;
        ptt_tx_frm_swtlprivatedhucanfr05= PT_TX_FRM_SWTLPRIVATEDHUCANFR05 - OT_TX_FRM_SWTLPRIVATEDHUCANFR05;
        ptt_tx_frm_swtlprivatedhucanfr04= PT_TX_FRM_SWTLPRIVATEDHUCANFR04 - OT_TX_FRM_SWTLPRIVATEDHUCANFR04;
        ptt_tx_frm_swtlprivatedhucanfr03= PT_TX_FRM_SWTLPRIVATEDHUCANFR03 - OT_TX_FRM_SWTLPRIVATEDHUCANFR03;
        ptt_tx_frm_swtlprivatedhucanfr02= PT_TX_FRM_SWTLPRIVATEDHUCANFR02 - OT_TX_FRM_SWTLPRIVATEDHUCANFR02;
		ptt_tx_frm_swtlprivatedhucanfr01= PT_TX_FRM_SWTLPRIVATEDHUCANFR01 - OT_TX_FRM_SWTLPRIVATEDHUCANFR01;
        ptt_tx_frm_swtlpressfr01= PT_TX_FRM_SWTLPRESSFR01 - OT_TX_FRM_SWTLPRESSFR01;
        ptt_tx_frm_swtlsensorfr01= PT_TX_FRM_SWTLSENSORFR01 - OT_TX_FRM_SWTLSENSORFR01;
        ptt_tx_frm_swtlsensorfr02= PT_TX_FRM_SWTLSENSORFR02 - OT_TX_FRM_SWTLSENSORFR02;
        ptt_tx_frm_swtlsensorfr03= PT_TX_FRM_SWTLSENSORFR03 - OT_TX_FRM_SWTLSENSORFR03;
        ptt_tx_frm_swtlsensorfr04= PT_TX_FRM_SWTLSENSORFR04 - OT_TX_FRM_SWTLSENSORFR04;
        ptt_tx_frm_swtlsensorfr05= PT_TX_FRM_SWTLSENSORFR05 - OT_TX_FRM_SWTLSENSORFR05;
        ptt_tx_frm_swtlsensorfr06= PT_TX_FRM_SWTLSENSORFR06 - OT_TX_FRM_SWTLSENSORFR06;
        ptt_tx_frm_swtlsensorfr07= PT_TX_FRM_SWTLSENSORFR07 - OT_TX_FRM_SWTLSENSORFR07;
        ptt_tx_frm_swtlsensorfr08= PT_TX_FRM_SWTLSENSORFR08 - OT_TX_FRM_SWTLSENSORFR08;

        /* Activation of the periodic Tx management runnable */
        SET_FLAG_OSEK_COM_PER_TX();
    }
    else {
        status=E_COM_SYS_NOINIT;
    }

    return status;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Service to stop the transmission of periodic or mixed frames.
|  * To re-start the transmission of periodic or mixed frames service
|    StartPeriodic must be called.
|---------------------------------------------------------------------------
| Parameters description:
|  return: E_OK in case of no errors
|          Other (see t_status_type).
/---------------------------------------------------------------------------*/
t_status_type StopPeriodic(void)
{

    /* Deactivation of the periodic Tx management runnable */
    RST_FLAG_OSEK_COM_PER_TX();

    return E_OK;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * This service updates the application variable referenced by >data_ref< with
|    the data stored in the internal stack for the object identified by >message<.
|  * This service will reset the class 1 (RxNotif) and 3 (RxErrorNotif) flags
|    associated to >message<
|  * If >message< is an enqueued signal the service will return the data
|    stored in the internal stack (initial value / last received value / last value
|    set with InitMessage)
|    If >message< is a queued signal the service will return the first value
|    available in the queue or error if the queue is empty. (Mode not supported)
|  * The user is responsible of granting that the parameter >data_ref< 
|    points to a variable correctly allocated and compatible in size with the 
|    received signal type
|  * Usage example: 
|    t_vehicle_speed vehicle_speed;
|    (void)ReceiveMessage(SIG_VEHICLE_SPEED,&vehicle_speed); 
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal to be retrieved.
|   data_ref: Pointer to a variable where to store the requested signal. 
|   return: 
|     E_OK in case of no errors
|     E_COM_ID in case the parameter >message< is out of range or if it refers
|              to signal that is sent, dynamic length or zero-length
|     E_COM_NOMSG in case the queued signal identified by >message< is empty.
|     E_COM_LIMIT in case an overflow of the queue of the signal identified by >message<
|                 occurred since the last call to ReceiveMessage for >message<.
|                 E_COM_LIMIT indicates that at least one message has been discarded
|                 since the message queue filled. Nevertheless the service is 
|                 performed and a message is returned. The service ReceiveMessage
|                 clears the overflow condition for >message<.
|     other (see t_status_type).
/---------------------------------------------------------------------------*/
t_status_type ReceiveMessage(t_symbolic_name message,
                             t_application_data_ref data_ref)
{
    t_status_type status=E_OK;

    /* Mutual exclusive access begin */
//    SuspendAllInterrupts();
    switch (message) {
    case SIG_TWLIBRISTS_UB:
        ((uint8_t *)data_ref)[0]=sig_twlibrists_ub[0];
        break;
    case SIG_TWLIBRISTS:
        ((uint8_t *)data_ref)[0]=sig_twlibrists[0];
        break;
    case SIG_SWTOFKEYTONE_UB:
        ((uint8_t *)data_ref)[0]=sig_swtofkeytone_ub[0];
        break;
    case SIG_SWTOFKEYTONE:
        ((uint8_t *)data_ref)[0]=sig_swtofkeytone[0];
        break;
    case SIG_INTRBRISTS_UB:
        ((uint8_t *)data_ref)[0]=sig_intrbrists_ub[0];
        break;
    case SIG_INTRBRISTS:
        ((uint8_t *)data_ref)[0]=sig_intrbrists[0];
        break;
    case SIG_ACTVNOFSTEERWHLILLMN_UB:
        ((uint8_t *)data_ref)[0]=sig_actvnofsteerwhlillmn_ub[0];
        break;
    case SIG_ACTVNOFSTEERWHLILLMN:
        ((uint8_t *)data_ref)[0]=sig_actvnofsteerwhlillmn[0];
        break;
    default:
        status=E_COM_ID;
        break;
    }
    /* Mutual exclusive access end */
//    ResumeAllInterrupts();
    return status;
}

t_status_type ReceiveDynamicMessage(t_symbolic_name message,
                                    t_application_data_ref data_ref,
                                    t_length_ref length_ref) 
{
    t_status_type status=E_OK;

    /* Mutual exclusive access begin */
   // SuspendAllInterrupts();
    switch (message) {
    case SIG_DIAGNOSTICREQSWTL:
        ((UI_8 *)data_ref)[0]=sig_diagnosticreqswtl[0];
        ((UI_8 *)data_ref)[1]=sig_diagnosticreqswtl[1];
        ((UI_8 *)data_ref)[2]=sig_diagnosticreqswtl[2];
        ((UI_8 *)data_ref)[3]=sig_diagnosticreqswtl[3];
        ((UI_8 *)data_ref)[4]=sig_diagnosticreqswtl[4];
        ((UI_8 *)data_ref)[5]=sig_diagnosticreqswtl[5];
        ((UI_8 *)data_ref)[6]=sig_diagnosticreqswtl[6];
        ((UI_8 *)data_ref)[7]=sig_diagnosticreqswtl[7];
        *((UI_8 *)length_ref) = sig_len_diagnosticreqswtl;
        /* Reset class 1 (RxNotif) flag */
        ResetFlagRxSigDiagnosticReqSWTL();
        break;
    case SIG_DIAGNOSTICFUNCADDRREQ:
        ((UI_8 *)data_ref)[0]=sig_diagnosticfuncaddrreq[0];
        ((UI_8 *)data_ref)[1]=sig_diagnosticfuncaddrreq[1];
        ((UI_8 *)data_ref)[2]=sig_diagnosticfuncaddrreq[2];
        ((UI_8 *)data_ref)[3]=sig_diagnosticfuncaddrreq[3];
        ((UI_8 *)data_ref)[4]=sig_diagnosticfuncaddrreq[4];
        ((UI_8 *)data_ref)[5]=sig_diagnosticfuncaddrreq[5];
        ((UI_8 *)data_ref)[6]=sig_diagnosticfuncaddrreq[6];
        ((UI_8 *)data_ref)[7]=sig_diagnosticfuncaddrreq[7];
        *((UI_8 *)length_ref) = sig_len_diagnosticfuncaddrreq;
        /* Reset class 1 (RxNotif) flag */
        ResetFlagRxSigDiagnosticFuncAddrReq();
        break;
    default:
        status=E_COM_ID;
        break;
    }
    /* Mutual exclusive access end */
  //  ResumeAllInterrupts();
    return status;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * This service updates OsekCom internal data structure of the signal
|    identified by >message< with the data referenced by the variable
|    referenced by >data_ref< parameter.
|  * This service will reset the class 2 (TxNotif) and 4 (TxErrorNotif) flags
|    associated to >message<
|  * If >message< has the Triggered Transfer Property, the update will be
|    followed by immediate transmission of the I-PDU associated with the signal except
|    when the signal is packed into an I-PDU with Periodic Transmission Mode.
|    In this case, no transmission is initiated by the call to this service.
|  * If >message< has the Pending Transfer Property, no transmission is
|    triggered by the usage of this service.
|  * The user is responsible of granting that the parameter >data_ref< 
|    points to a variable correctly allocated and compatible in size with the 
|    transmitted signal type.
|  * Usage example: 
|    t_vehicle_speed vehicle_speed = 20;
|    (void)SendMessage(SIG_VEHICLE_SPEED,&vehicle_speed); 
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal to be transmitted.
|   data_ref: Pointer to a variable containing the data to be transmitted. 
|   return: 
|     E_OK in case of no errors
|     E_COM_ID is case the parameter >message< is out of range or if it refers
|              to a message that is received or to a dynamic-length or 
|              zero-length message.
|     other (see t_status_type).
/---------------------------------------------------------------------------*/
t_status_type SendMessage(t_symbolic_name message,
                          t_application_data_ref data_ref)
{
    t_status_type status;
    t_symbolic_name aux_msg = message & (~NODE_ID_MASK);

    /* Case when FicOsek is initialized */
    if (TST_FLAG_OSEK_COM_INIT()) {
        /* Case when message is not out of the range */
        if ((aux_msg >= FIRST_TX_STA_LEN_SIGNAL_SYMBOLIC_NAME) &&
            (aux_msg <= LAST_TX_STA_LEN_SIGNAL_SYMBOLIC_NAME)) {
            /* Mutual exclusive access begin */
//            SuspendAllInterrupts();
            /* Set of message data */
            status=InitMessage(message,data_ref);
            /* Switch for signals with Tx or TxError flags to reset */
            switch (message) {
            case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
                break;
            case SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigDiagcFailrTouchPanSWTLTouchdFltSts();
                break;
            case SIG_DIAGCFAILRTOUCHPANSWTLSNSRFLTSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigDiagcFailrTouchPanSWTLSnsrFltSts();
                break;
            case SIG_DIAGCFAILRTOUCHPANSWTLCMNFLTSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigDiagcFailrTouchPanSWTLCmnFltSts();
                break;
            case SIG_DIAGCFAILRTOUCHPANSWTL_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigDiagcFailrTouchPanSWTL_UB();
                break;
            case SIG_SWTLSERNONR4:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLSerNoNr4();
                break;
            case SIG_SWTLSERNONR3:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLSerNoNr3();
                break;
            case SIG_SWTLSERNONR2:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLSerNoNr2();
                break;
            case SIG_SWTLSERNONR1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLSerNoNr1();
                break;
            case SIG_SWTLSERNO_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLSerNo_UB();
                break;
            case SIG_SWTLPARTNOCMPLNR4:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplNr4();
                break;
            case SIG_SWTLPARTNOCMPLNR3:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplNr3();
                break;
            case SIG_SWTLPARTNOCMPLNR2:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplNr2();
                break;
            case SIG_SWTLPARTNOCMPLNR1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplNr1();
                break;
            case SIG_SWTLPARTNOCMPLENDSGN3:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplEndSgn3();
                break;
            case SIG_SWTLPARTNOCMPLENDSGN2:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplEndSgn2();
                break;
            case SIG_SWTLPARTNOCMPLENDSGN1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmplEndSgn1();
                break;
            case SIG_SWTLPARTNOCMPL_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNoCmpl_UB();
                break;
            case SIG_SWTLPARTNO10CMPLNR5:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplNr5();
                break;
            case SIG_SWTLPARTNO10CMPLNR4:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplNr4();
                break;
            case SIG_SWTLPARTNO10CMPLNR3:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplNr3();
                break;
            case SIG_SWTLPARTNO10CMPLNR2:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplNr2();
                break;
            case SIG_SWTLPARTNO10CMPLNR1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplNr1();
                break;
            case SIG_SWTLPARTNO10CMPLENDSGN3:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplEndSgn3();
                break;
            case SIG_SWTLPARTNO10CMPLENDSGN2:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplEndSgn2();
                break;
            case SIG_SWTLPARTNO10CMPLENDSGN1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSWTLPartNo10CmplEndSgn1();
                break;
            case SIG_SWPUPDWNSTSLE_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSwpUpDwnStsLe_UB();
                break;
            case SIG_SWPUPDWNSTSLE:
                /* Reset Tx notification flag */
                ResetFlagTxSigSwpUpDwnStsLe();
                break;
            case SIG_SWPLERISTSLE_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSwpLeRiStsLe_UB();
                break;
            case SIG_SWPLERISTSLE:
                /* Reset Tx notification flag */
                ResetFlagTxSigSwpLeRiStsLe();
                break;
            case SIG_STEERWHLTOUCHBDCRSRESUSTEERWHLTOUCHBDSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCrsResuSteerWhlTouchBdSts();
                break;
            case SIG_STEERWHLTOUCHBDCRSRESUQF1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCrsResuQf1();
                break;
            case SIG_STEERWHLTOUCHBDCRSRESU_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCrsResu_UB();
                break;
            case SIG_STEERWHLTOUCHBDCNCLSTEERWHLTOUCHBDSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCnclSteerWhlTouchBdSts();
                break;
            case SIG_STEERWHLTOUCHBDCNCLQF1:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCnclQf1();
                break;
            case SIG_STEERWHLTOUCHBDCNCLCNTR:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCnclCntr();
                break;
            case SIG_STEERWHLTOUCHBDCNCLCHKS:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCnclChks();
                break;
            case SIG_STEERWHLTOUCHBDCNCL_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdCncl_UB();
                break;
            case SIG_STEERWHLTOUCHBDADAS_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdADAS_UB();
                break;
            case SIG_STEERWHLTOUCHBDADAS:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdADAS();
                break;
            case SIG_LEMFCTACTSGUP_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgUp_UB();
                break;
            case SIG_LEMFCTACTSGUP:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgUp();
                break;
            case SIG_LEMFCTACTSGRI_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgRi_UB();
                break;
            case SIG_LEMFCTACTSGRI:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgRi();
                break;
            case SIG_LEMFCTACTSGLE_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgLe_UB();
                break;
            case SIG_LEMFCTACTSGLE:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgLe();
                break;
            case SIG_LEMFCTACTSGDN_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgDn_UB();
                break;
            case SIG_LEMFCTACTSGDN:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgDn();
                break;
            case SIG_LEMFCTACTSGCE_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgCe_UB();
                break;
            case SIG_LEMFCTACTSGCE:
                /* Reset Tx notification flag */
                ResetFlagTxSigLeMFctActSgCe();
                break;
            case SIG_STEERWHLTOUCHBDLETOUCHPOSNY:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdLeTouchPosnY();
                break;
            case SIG_STEERWHLTOUCHBDLETOUCHPOSNX:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdLeTouchPosnX();
                break;
            case SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdLeSteerWhlTouchBdSts();
                break;
            case SIG_STEERWHLTOUCHBDLECNTR:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdLeCntr();
                break;
            case SIG_STEERWHLTOUCHBDLECHKS:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdLeChks();
                break;
            case SIG_STEERWHLTOUCHBDLE_UB:
                /* Reset Tx notification flag */
                ResetFlagTxSigSteerWhlTouchBdLe_UB();
                break;
	    case SIG_DIAGNOSTICRESPSWTL:
		  ResetFlagTxSigDiagnosticRespSWTL();
                break;   		
            default:
                /* Do nothing */
                break;
            }
            /* Mutual exclusive access end */
//            ResumeAllInterrupts();
        }
        /* Case when message is out of the range */
        else {
            status=E_COM_ID;
        }
    }
    /* Case when FicOsek is not initialized */
    else {
        status=E_COM_SYS_NOINIT;
    }
    return status;
}

t_status_type SendDynamicMessage(t_symbolic_name message,
                                 t_application_data_ref data_ref,
                                 t_length_ref length_ref)
{
    t_status_type status;
    t_symbolic_name aux_msg = message & (~NODE_ID_MASK);
    /* Case when FicOsek is initialized */
    if (TST_FLAG_OSEK_COM_INIT()) {
        /* Case when message is not out of the range */
        if ((aux_msg >= FIRST_TX_DYN_LEN_SIGNAL_SYMBOLIC_NAME) &&
            (aux_msg <= LAST_TX_DYN_LEN_SIGNAL_SYMBOLIC_NAME)) {
            /* Mutual exclusive access begin */
           // SuspendAllInterrupts();
            /* Set of signal data */
            status=InitMessage(message,data_ref);
            /* Switch for signals */
            switch (message) {
            case SIG_DIAGNOSTICRESPSWTL:
                /* Set of signal length */
                len_frm_diag_physresp_swtl = MAX_LEN_FRM_DIAG_PHYSRESP_SWTL - MAX_LEN_SIG_DIAGNOSTICRESPSWTL + (*((UI_8 *)length_ref));
                /* Reset class 2 (TxNotif) flag */
                ResetFlagTxSigDiagnosticRespSWTL();
                /* Reset class 4 (TxErrorNotif) flag */
               // ResetFlagTxErrorSigDiagnosticRespSWTL();
                break;
            default:
                /* Do nothing */
                break;
            }
            /* Mutual exclusive access end */
            //ResumeAllInterrupts();
            /* Switch for triggered signal of direct or mixed frames */
            switch (message) {
            case SIG_DIAGNOSTICRESPSWTL:
                /* Trigger event to initiate the transmission of the frame */
                OsekComTxReqFrmDIAG_PhysResp_SWTL();
                break;
            default:
                /* Do nothing */
                break;
            }
        }
        /* Case when message is out of the range */
        else {
            status=E_COM_ID;
        }
    }
    /* Case when FicOsek is not initialized */
    else {
        status=E_COM_SYS_NOINIT;
    }
    return status;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * This service updates OsekCom internal data structure of the signal
|    identified by >message< with the data referenced by the variable
|    referenced by >data_ref<
|  * This service will not reset any class flags associated to >message<
|  * This service will not initiate any transmission.
|  * The user is responsible of granting that the parameter 'data_ref' 
|    points to an address correctly allocated and compatible in size with the 
|    transmitted signal type.
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal.
|   data_ref: Pointer to a variable containing the data. 
|   return: 
|     E_OK in case of no errors
|     E_COM_ID if the message or signal to initialize don't exist
|     Other (see t_status_type).
/---------------------------------------------------------------------------*/
t_status_type InitMessage(t_symbolic_name message,
                          t_application_data_ref data_ref)
{
    t_status_type status=E_OK;

    /* Mutual exclusive access begin */
//    SuspendAllInterrupts();
    switch (message) {
    case SIG_TWLIBRISTS_UB:
        /* Initialization of signal sig_TwliBriSts_UB */ 
        sig_twlibrists_ub[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_TWLIBRISTS:
        /* Initialization of signal sig_TwliBriSts */ 
        sig_twlibrists[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_SWTOFKEYTONE_UB:
        /* Initialization of signal sig_SwtOfKeyTone_UB */ 
        sig_swtofkeytone_ub[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_SWTOFKEYTONE:
        /* Initialization of signal sig_SwtOfKeyTone */ 
        sig_swtofkeytone[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_INTRBRISTS_UB:
        /* Initialization of signal sig_IntrBriSts_UB */ 
        sig_intrbrists_ub[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_INTRBRISTS:
        /* Initialization of signal sig_IntrBriSts */ 
        sig_intrbrists[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_ACTVNOFSTEERWHLILLMN_UB:
        /* Initialization of signal sig_ActvnOfSteerWhlIllmn_UB */ 
        sig_actvnofsteerwhlillmn_ub[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_ACTVNOFSTEERWHLILLMN:
        /* Initialization of signal sig_ActvnOfSteerWhlIllmn */ 
        sig_actvnofsteerwhlillmn[0]=((uint8_t *)data_ref)[0];
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
        /* Initial codification of the signal sig_DiagcFailrTouchPanSWTLVibrationFltSts */ 
        frm_swtlprivatedhucanfr06[0] &= (((uint8_t)0xFF) - (((uint8_t)3)));
        frm_swtlprivatedhucanfr06[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)));
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS:
        /* Initial codification of the signal sig_DiagcFailrTouchPanSWTLTouchdFltSts */ 
        frm_swtlprivatedhucanfr06[0] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)2)));
        frm_swtlprivatedhucanfr06[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)2));
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLSNSRFLTSTS:
        /* Initial codification of the signal sig_DiagcFailrTouchPanSWTLSnsrFltSts */ 
        frm_swtlprivatedhucanfr06[0] &= (((uint8_t)0xFF) - (((uint8_t)7) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr06[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)7)) << ((uint8_t)4));
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLCMNFLTSTS:
        /* Initial codification of the signal sig_DiagcFailrTouchPanSWTLCmnFltSts */ 
        frm_swtlprivatedhucanfr06[0] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)7)));
        frm_swtlprivatedhucanfr06[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)7));
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTL_UB:
        /* Initial codification of the signal sig_DiagcFailrTouchPanSWTL_UB */ 
        frm_swtlprivatedhucanfr06[1] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)7)));
        frm_swtlprivatedhucanfr06[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)7));
        break;
    case SIG_SWTLSERNONR4:
        /* Initial codification of the signal sig_SWTLSerNoNr4 */ 
        frm_swtlprivatedhucanfr05[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr05[3] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLSERNONR3:
        /* Initial codification of the signal sig_SWTLSerNoNr3 */ 
        frm_swtlprivatedhucanfr05[2] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr05[2] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLSERNONR2:
        /* Initial codification of the signal sig_SWTLSerNoNr2 */ 
        frm_swtlprivatedhucanfr05[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr05[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLSERNONR1:
        /* Initial codification of the signal sig_SWTLSerNoNr1 */ 
        frm_swtlprivatedhucanfr05[0] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr05[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLSERNO_UB:
        /* Initial codification of the signal sig_SWTLSerNo_UB */ 
        frm_swtlprivatedhucanfr05[4] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)7)));
        frm_swtlprivatedhucanfr05[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)7));
        break;
    case SIG_SWTLPARTNOCMPLNR4:
        /* Initial codification of the signal sig_SWTLPartNoCmplNr4 */ 
        frm_swtlprivatedhucanfr04[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[3] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPLNR3:
        /* Initial codification of the signal sig_SWTLPartNoCmplNr3 */ 
        frm_swtlprivatedhucanfr04[2] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[2] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPLNR2:
        /* Initial codification of the signal sig_SWTLPartNoCmplNr2 */ 
        frm_swtlprivatedhucanfr04[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPLNR1:
        /* Initial codification of the signal sig_SWTLPartNoCmplNr1 */ 
        frm_swtlprivatedhucanfr04[0] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPLENDSGN3:
        /* Initial codification of the signal sig_SWTLPartNoCmplEndSgn3 */ 
        frm_swtlprivatedhucanfr04[6] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[6] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPLENDSGN2:
        /* Initial codification of the signal sig_SWTLPartNoCmplEndSgn2 */ 
        frm_swtlprivatedhucanfr04[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[5] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPLENDSGN1:
        /* Initial codification of the signal sig_SWTLPartNoCmplEndSgn1 */ 
        frm_swtlprivatedhucanfr04[4] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr04[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNOCMPL_UB:
        /* Initial codification of the signal sig_SWTLPartNoCmpl_UB */ 
        frm_swtlprivatedhucanfr04[7] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)7)));
        frm_swtlprivatedhucanfr04[7] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)7));
        break;
    case SIG_SWTLPARTNO10CMPLNR5:
        /* Initial codification of the signal sig_SWTLPartNo10CmplNr5 */ 
        frm_swtlprivatedhucanfr03[4] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLNR4:
        /* Initial codification of the signal sig_SWTLPartNo10CmplNr4 */ 
        frm_swtlprivatedhucanfr03[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[3] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLNR3:
        /* Initial codification of the signal sig_SWTLPartNo10CmplNr3 */ 
        frm_swtlprivatedhucanfr03[2] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[2] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLNR2:
        /* Initial codification of the signal sig_SWTLPartNo10CmplNr2 */ 
        frm_swtlprivatedhucanfr03[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLNR1:
        /* Initial codification of the signal sig_SWTLPartNo10CmplNr1 */ 
        frm_swtlprivatedhucanfr03[0] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN3:
        /* Initial codification of the signal sig_SWTLPartNo10CmplEndSgn3 */ 
        frm_swtlprivatedhucanfr03[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[7] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN2:
        /* Initial codification of the signal sig_SWTLPartNo10CmplEndSgn2 */ 
        frm_swtlprivatedhucanfr03[6] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[6] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN1:
        /* Initial codification of the signal sig_SWTLPartNo10CmplEndSgn1 */ 
        frm_swtlprivatedhucanfr03[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr03[5] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_SWPUPDWNSTSLE_UB:
        /* Initial codification of the signal sig_SwpUpDwnStsLe_UB */ 
        frm_swtlprivatedhucanfr02[7] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr02[7] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)4));
        break;
    case SIG_SWPUPDWNSTSLE:
        /* Initial codification of the signal sig_SwpUpDwnStsLe */ 
        frm_swtlprivatedhucanfr02[7] &= (((uint8_t)0xFF) - (((uint8_t)7) << ((uint8_t)5)));
        frm_swtlprivatedhucanfr02[7] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)7)) << ((uint8_t)5));
        break;
    case SIG_SWPLERISTSLE_UB:
        /* Initial codification of the signal sig_SwpLeRiStsLe_UB */ 
        frm_swtlprivatedhucanfr02[4] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr02[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)4));
        break;
    case SIG_SWPLERISTSLE:
        /* Initial codification of the signal sig_SwpLeRiStsLe */ 
        frm_swtlprivatedhucanfr02[4] &= (((uint8_t)0xFF) - (((uint8_t)7) << ((uint8_t)1)));
        frm_swtlprivatedhucanfr02[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)7)) << ((uint8_t)1));
        break;
    case SIG_STEERWHLTOUCHBDCRSRESUSTEERWHLTOUCHBDSTS:
        /* Initial codification of the signal sig_SteerWhlTouchBdCrsResuSteerWhlTouchBdSts */ 
        frm_swtlprivatedhucanfr02[2] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr02[2] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)4));
        break;
    case SIG_STEERWHLTOUCHBDCRSRESUQF1:
        /* Initial codification of the signal sig_SteerWhlTouchBdCrsResuQf1 */ 
        frm_swtlprivatedhucanfr02[2] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)6)));
        frm_swtlprivatedhucanfr02[2] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)6));
        break;
    case SIG_STEERWHLTOUCHBDCRSRESU_UB:
        /* Initial codification of the signal sig_SteerWhlTouchBdCrsResu_UB */ 
        frm_swtlprivatedhucanfr02[4] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)6)));
        frm_swtlprivatedhucanfr02[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)6));
        break;
    case SIG_STEERWHLTOUCHBDCNCLSTEERWHLTOUCHBDSTS:
        /* Initial codification of the signal sig_SteerWhlTouchBdCnclSteerWhlTouchBdSts */ 
        frm_swtlprivatedhucanfr02[5] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)6)));
        frm_swtlprivatedhucanfr02[5] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)6));
        break;
    case SIG_STEERWHLTOUCHBDCNCLQF1:
        /* Initial codification of the signal sig_SteerWhlTouchBdCnclQf1 */ 
        frm_swtlprivatedhucanfr02[5] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr02[5] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)4));
        break;
    case SIG_STEERWHLTOUCHBDCNCLCNTR:
        /* Initial codification of the signal sig_SteerWhlTouchBdCnclCntr */ 
        frm_swtlprivatedhucanfr02[5] &= (((uint8_t)0xFF) - (((uint8_t)15)));
        frm_swtlprivatedhucanfr02[5] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)15)));
        break;
    case SIG_STEERWHLTOUCHBDCNCLCHKS:
        /* Initial codification of the signal sig_SteerWhlTouchBdCnclChks */ 
        frm_swtlprivatedhucanfr02[6] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr02[6] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_STEERWHLTOUCHBDCNCL_UB:
        /* Initial codification of the signal sig_SteerWhlTouchBdCncl_UB */ 
        frm_swtlprivatedhucanfr02[4] &= (((uint8_t)0xFF) - (((uint8_t)1)));
        frm_swtlprivatedhucanfr02[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)));
        break;
    case SIG_STEERWHLTOUCHBDADAS_UB:
        /* Initial codification of the signal sig_SteerWhlTouchBdADAS_UB */ 
        frm_swtlprivatedhucanfr02[4] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)7)));
        frm_swtlprivatedhucanfr02[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)7));
        break;
    case SIG_STEERWHLTOUCHBDADAS:
        /* Initial codification of the signal sig_SteerWhlTouchBdADAS */ 
        frm_swtlprivatedhucanfr02[0] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)6)));
        frm_swtlprivatedhucanfr02[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)6));
        break;
    case SIG_LEMFCTACTSGUP_UB:
        /* Initial codification of the signal sig_LeMFctActSgUp_UB */ 
        frm_swtlprivatedhucanfr02[4] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)5)));
        frm_swtlprivatedhucanfr02[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)5));
        break;
    case SIG_LEMFCTACTSGUP:
        /* Initial codification of the signal sig_LeMFctActSgUp */ 
        frm_swtlprivatedhucanfr02[1] &= (((uint8_t)0xFF) - (((uint8_t)3)));
        frm_swtlprivatedhucanfr02[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)));
        break;
    case SIG_LEMFCTACTSGRI_UB:
        /* Initial codification of the signal sig_LeMFctActSgRi_UB */ 
        frm_swtlprivatedhucanfr02[1] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)2)));
        frm_swtlprivatedhucanfr02[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)2));
        break;
    case SIG_LEMFCTACTSGRI:
        /* Initial codification of the signal sig_LeMFctActSgRi */ 
        frm_swtlprivatedhucanfr02[1] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)3)));
        frm_swtlprivatedhucanfr02[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)3));
        break;
    case SIG_LEMFCTACTSGLE_UB:
        /* Initial codification of the signal sig_LeMFctActSgLe_UB */ 
        frm_swtlprivatedhucanfr02[1] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)5)));
        frm_swtlprivatedhucanfr02[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)5));
        break;
    case SIG_LEMFCTACTSGLE:
        /* Initial codification of the signal sig_LeMFctActSgLe */ 
        frm_swtlprivatedhucanfr02[1] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)6)));
        frm_swtlprivatedhucanfr02[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)6));
        break;
    case SIG_LEMFCTACTSGDN_UB:
        /* Initial codification of the signal sig_LeMFctActSgDn_UB */ 
        frm_swtlprivatedhucanfr02[0] &= (((uint8_t)0xFF) - (((uint8_t)1)));
        frm_swtlprivatedhucanfr02[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)));
        break;
    case SIG_LEMFCTACTSGDN:
        /* Initial codification of the signal sig_LeMFctActSgDn */ 
        frm_swtlprivatedhucanfr02[0] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)1)));
        frm_swtlprivatedhucanfr02[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)1));
        break;
    case SIG_LEMFCTACTSGCE_UB:
        /* Initial codification of the signal sig_LeMFctActSgCe_UB */ 
        frm_swtlprivatedhucanfr02[0] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)3)));
        frm_swtlprivatedhucanfr02[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)3));
        break;
    case SIG_LEMFCTACTSGCE:
        /* Initial codification of the signal sig_LeMFctActSgCe */ 
        frm_swtlprivatedhucanfr02[0] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr02[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)4));
        break;
    case SIG_STEERWHLTOUCHBDLETOUCHPOSNY:
        /* Initial codification of the signal sig_SteerWhlTouchBdLeTouchPosnY */ 
        frm_swtlprivatedhucanfr01[4] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr01[4] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_STEERWHLTOUCHBDLETOUCHPOSNX:
        /* Initial codification of the signal sig_SteerWhlTouchBdLeTouchPosnX */ 
        frm_swtlprivatedhucanfr01[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr01[3] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS:
        /* Initial codification of the signal sig_SteerWhlTouchBdLeSteerWhlTouchBdSts */ 
        frm_swtlprivatedhucanfr01[1] &= (((uint8_t)0xFF) - (((uint8_t)3) << ((uint8_t)4)));
        frm_swtlprivatedhucanfr01[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)3)) << ((uint8_t)4));
        break;
    case SIG_STEERWHLTOUCHBDLECNTR:
        /* Initial codification of the signal sig_SteerWhlTouchBdLeCntr */ 
        frm_swtlprivatedhucanfr01[1] &= (((uint8_t)0xFF) - (((uint8_t)15)));
        frm_swtlprivatedhucanfr01[1] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)15)));
        break;
    case SIG_STEERWHLTOUCHBDLECHKS:
        /* Initial codification of the signal sig_SteerWhlTouchBdLeChks */ 
        frm_swtlprivatedhucanfr01[2] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlprivatedhucanfr01[2] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)255)));
        break;
    case SIG_STEERWHLTOUCHBDLE_UB:
        /* Initial codification of the signal sig_SteerWhlTouchBdLe_UB */ 
        frm_swtlprivatedhucanfr01[0] &= (((uint8_t)0xFF) - (((uint8_t)1) << ((uint8_t)2)));
        frm_swtlprivatedhucanfr01[0] |= ((((uint8_t *)data_ref)[0] & ((uint8_t)1)) << ((uint8_t)2));
        break;
    case SIG_SWTLPRESSBASELINE:
        /* Initial codification of the signal sig_SwtlPressBaseline */ 
        frm_swtlpressfr01[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlpressfr01[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlpressfr01[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlpressfr01[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLPRESSSIGNAL:
        /* Initial codification of the signal sig_SwtlPressSignal */ 
        frm_swtlpressfr01[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlpressfr01[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlpressfr01[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlpressfr01[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR1_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor1_baseline */ 
        frm_swtlsensorfr01[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr01[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr01[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr01[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR1_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor1_signal */ 
        frm_swtlsensorfr01[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr01[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr01[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr01[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR2_BASELINE:
        /* Initial codification of the signal sig_SwtLSensor2_baseline */ 
        frm_swtlsensorfr01[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr01[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr01[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr01[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR2_SINGAL:
        /* Initial codification of the signal sig_SwtLSensor2_singal */ 
        frm_swtlsensorfr01[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr01[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr01[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr01[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR3_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor3_baseline */ 
        frm_swtlsensorfr02[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr02[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr02[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr02[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR3_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor3_signal */ 
        frm_swtlsensorfr02[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr02[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr02[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr02[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR4_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor4_baseline */ 
        frm_swtlsensorfr02[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr02[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr02[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr02[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR4_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor4_signal */ 
        frm_swtlsensorfr02[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr02[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr02[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr02[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR5_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor5_baseline */ 
        frm_swtlsensorfr03[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr03[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr03[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr03[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR5_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor5_signal */ 
        frm_swtlsensorfr03[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr03[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr03[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr03[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR6_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor6_baseline */ 
        frm_swtlsensorfr03[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr03[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr03[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr03[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR6_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor6_signal */ 
        frm_swtlsensorfr03[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr03[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr03[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr03[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR7_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor7_baseline */ 
        frm_swtlsensorfr04[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr04[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr04[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr04[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR7_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor7_signal */ 
        frm_swtlsensorfr04[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr04[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr04[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr04[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR8_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor8_baseline */ 
        frm_swtlsensorfr04[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr04[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr04[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr04[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR8_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor8_signal */ 
        frm_swtlsensorfr04[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr04[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr04[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr04[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR9_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor9_baseline */ 
        frm_swtlsensorfr05[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr05[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr05[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr05[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR9_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor9_signal */ 
        frm_swtlsensorfr05[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr05[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr05[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr05[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR10_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor10_baseline */ 
        frm_swtlsensorfr05[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr05[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr05[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr05[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR10_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor10_signal */ 
        frm_swtlsensorfr05[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr05[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr05[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr05[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR11_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor11_baseline */ 
        frm_swtlsensorfr06[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr06[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr06[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr06[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR11_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor11_signal */ 
        frm_swtlsensorfr06[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr06[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr06[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr06[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR12_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor12_baseline */ 
        frm_swtlsensorfr06[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr06[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr06[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr06[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR12_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor12_signal */ 
        frm_swtlsensorfr06[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr06[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr06[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr06[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR13_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor13_baseline */ 
        frm_swtlsensorfr07[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr07[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr07[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr07[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR13_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor13_signal */ 
        frm_swtlsensorfr07[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr07[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr07[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr07[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR14_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor14_baseline */ 
        frm_swtlsensorfr07[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr07[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr07[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr07[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR14_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor14_signal */ 
        frm_swtlsensorfr07[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr07[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr07[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr07[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR15_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor15_baseline */ 
        frm_swtlsensorfr08[1] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr08[1] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr08[0] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr08[0] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR15_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor15_signal */ 
        frm_swtlsensorfr08[3] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr08[3] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr08[2] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr08[2] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR16_BASELINE:
        /* Initial codification of the signal sig_SwtLsensor16_baseline */ 
        frm_swtlsensorfr08[5] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr08[5] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr08[4] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr08[4] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
    case SIG_SWTLSENSOR16_SIGNAL:
        /* Initial codification of the signal sig_SwtLSensor16_signal */ 
        frm_swtlsensorfr08[7] &= (((uint8_t)0xFF) - (((uint8_t)255)));
        frm_swtlsensorfr08[7] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(1,2)] & ((uint8_t)255)));
        frm_swtlsensorfr08[6] &= ((uint8_t)0xFF) - ((uint8_t)255);
        frm_swtlsensorfr08[6] |= ((((uint8_t *)data_ref)[ENDIAN_BYTE(0,2)] & ((uint8_t)255)));
        break;
   case SIG_DIAGNOSTICREQSWTL:
        /* Initialization of signal sig_DiagnosticReqSWTR */ 
        sig_diagnosticreqswtl[0]=((UI_8 *)data_ref)[0];
        sig_diagnosticreqswtl[1]=((UI_8 *)data_ref)[1];
        sig_diagnosticreqswtl[2]=((UI_8 *)data_ref)[2];
        sig_diagnosticreqswtl[3]=((UI_8 *)data_ref)[3];
        sig_diagnosticreqswtl[4]=((UI_8 *)data_ref)[4];
        sig_diagnosticreqswtl[5]=((UI_8 *)data_ref)[5];
        sig_diagnosticreqswtl[6]=((UI_8 *)data_ref)[6];
        sig_diagnosticreqswtl[7]=((UI_8 *)data_ref)[7];
        sig_len_diagnosticreqswtl=MAX_LEN_SIG_DIAGNOSTICREQSWTL;
        break;
    case SIG_DIAGNOSTICFUNCADDRREQ:
        /* Initialization of signal sig_DiagnosticFuncAddrReq */ 
        sig_diagnosticfuncaddrreq[0]=((UI_8 *)data_ref)[0];
        sig_diagnosticfuncaddrreq[1]=((UI_8 *)data_ref)[1];
        sig_diagnosticfuncaddrreq[2]=((UI_8 *)data_ref)[2];
        sig_diagnosticfuncaddrreq[3]=((UI_8 *)data_ref)[3];
        sig_diagnosticfuncaddrreq[4]=((UI_8 *)data_ref)[4];
        sig_diagnosticfuncaddrreq[5]=((UI_8 *)data_ref)[5];
        sig_diagnosticfuncaddrreq[6]=((UI_8 *)data_ref)[6];
        sig_diagnosticfuncaddrreq[7]=((UI_8 *)data_ref)[7];
        sig_len_diagnosticfuncaddrreq=MAX_LEN_SIG_DIAGNOSTICFUNCADDRREQ;
        break;
   case SIG_DIAGNOSTICRESPSWTL:
        /* Initial codification of the signal sig_DiagnosticRespSWTL */ 
        frm_diag_physresp_swtl[0] &= (((UI_8)0xFF) - (((UI_8)255)));
        frm_diag_physresp_swtl[0] |= ((((UI_8 *)data_ref)[0] & ((UI_8)255)));
        frm_diag_physresp_swtl[1] = ((UI_8)0);
        frm_diag_physresp_swtl[1] |= (((UI_8 *)data_ref)[1]);
        frm_diag_physresp_swtl[2] = ((UI_8)0);
        frm_diag_physresp_swtl[2] |= (((UI_8 *)data_ref)[2]);
        frm_diag_physresp_swtl[3] = ((UI_8)0);
        frm_diag_physresp_swtl[3] |= (((UI_8 *)data_ref)[3]);
        frm_diag_physresp_swtl[4] = ((UI_8)0);
        frm_diag_physresp_swtl[4] |= (((UI_8 *)data_ref)[4]);
        frm_diag_physresp_swtl[5] = ((UI_8)0);
        frm_diag_physresp_swtl[5] |= (((UI_8 *)data_ref)[5]);
        frm_diag_physresp_swtl[6] = ((UI_8)0);
        frm_diag_physresp_swtl[6] |= (((UI_8 *)data_ref)[6]);
        frm_diag_physresp_swtl[7] &= ((UI_8)0xFF) - ((UI_8)255);
        frm_diag_physresp_swtl[7] |= ((((UI_8 *)data_ref)[7] & ((UI_8)255)));
        /* Set of signal length */ 
        len_frm_diag_physresp_swtl = MAX_LEN_FRM_DIAG_PHYSRESP_SWTL;
        break;				
    default:
        status=E_COM_ID;
        break;
    }
    /* Mutual exclusive access end */
//    ResumeAllInterrupts();
    return status;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Consult service for the flag of COM traffic.
|---------------------------------------------------------------------------
| Parameters description:
|  return: 
|     COM_FALSE if has not been detected any communication activity since
|               last clear
|     COM_TRUE  if has been detected communication activity since last clear 
/---------------------------------------------------------------------------*/
t_flag_value ReadFlagComTrafficSWTL(void)
{
    return com_traffic_swtl;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Reset service for the flag of COM traffic.
|---------------------------------------------------------------------------
| Parameters description:
/---------------------------------------------------------------------------*/
void ResetFlagComTrafficSWTL(void)
{
    com_traffic_swtl = COM_FALSE;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Consult service to retrieve the state of class 1 (RxNotif), 
|    class 3 (Rx_ErrorNotif), class 2 (TxNotif) and class 4 (Tx_ErrorNotif) flags
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal.
|   return: 
|     COM_FALSE if the flag is down
|     COM_TRUE  if the flag is up
/---------------------------------------------------------------------------*/
t_flag_value ReadFlagTxSig(t_symbolic_name message)
{
    t_flag_value result;
    switch (message) {
    case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
        result = ReadFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS:
        result = ReadFlagTxSigDiagcFailrTouchPanSWTLTouchdFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLSNSRFLTSTS:
        result = ReadFlagTxSigDiagcFailrTouchPanSWTLSnsrFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLCMNFLTSTS:
        result = ReadFlagTxSigDiagcFailrTouchPanSWTLCmnFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTL_UB:
        result = ReadFlagTxSigDiagcFailrTouchPanSWTL_UB();
        break;
    case SIG_SWTLSERNONR4:
        result = ReadFlagTxSigSWTLSerNoNr4();
        break;
    case SIG_SWTLSERNONR3:
        result = ReadFlagTxSigSWTLSerNoNr3();
        break;
    case SIG_SWTLSERNONR2:
        result = ReadFlagTxSigSWTLSerNoNr2();
        break;
    case SIG_SWTLSERNONR1:
        result = ReadFlagTxSigSWTLSerNoNr1();
        break;
    case SIG_SWTLSERNO_UB:
        result = ReadFlagTxSigSWTLSerNo_UB();
        break;
    case SIG_SWTLPARTNOCMPLNR4:
        result = ReadFlagTxSigSWTLPartNoCmplNr4();
        break;
    case SIG_SWTLPARTNOCMPLNR3:
        result = ReadFlagTxSigSWTLPartNoCmplNr3();
        break;
    case SIG_SWTLPARTNOCMPLNR2:
        result = ReadFlagTxSigSWTLPartNoCmplNr2();
        break;
    case SIG_SWTLPARTNOCMPLNR1:
        result = ReadFlagTxSigSWTLPartNoCmplNr1();
        break;
    case SIG_SWTLPARTNOCMPLENDSGN3:
        result = ReadFlagTxSigSWTLPartNoCmplEndSgn3();
        break;
    case SIG_SWTLPARTNOCMPLENDSGN2:
        result = ReadFlagTxSigSWTLPartNoCmplEndSgn2();
        break;
    case SIG_SWTLPARTNOCMPLENDSGN1:
        result = ReadFlagTxSigSWTLPartNoCmplEndSgn1();
        break;
    case SIG_SWTLPARTNOCMPL_UB:
        result = ReadFlagTxSigSWTLPartNoCmpl_UB();
        break;
    case SIG_SWTLPARTNO10CMPLNR5:
        result = ReadFlagTxSigSWTLPartNo10CmplNr5();
        break;
    case SIG_SWTLPARTNO10CMPLNR4:
        result = ReadFlagTxSigSWTLPartNo10CmplNr4();
        break;
    case SIG_SWTLPARTNO10CMPLNR3:
        result = ReadFlagTxSigSWTLPartNo10CmplNr3();
        break;
    case SIG_SWTLPARTNO10CMPLNR2:
        result = ReadFlagTxSigSWTLPartNo10CmplNr2();
        break;
    case SIG_SWTLPARTNO10CMPLNR1:
        result = ReadFlagTxSigSWTLPartNo10CmplNr1();
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN3:
        result = ReadFlagTxSigSWTLPartNo10CmplEndSgn3();
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN2:
        result = ReadFlagTxSigSWTLPartNo10CmplEndSgn2();
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN1:
        result = ReadFlagTxSigSWTLPartNo10CmplEndSgn1();
        break;
    case SIG_SWPUPDWNSTSLE_UB:
        result = ReadFlagTxSigSwpUpDwnStsLe_UB();
        break;
    case SIG_SWPUPDWNSTSLE:
        result = ReadFlagTxSigSwpUpDwnStsLe();
        break;
    case SIG_SWPLERISTSLE_UB:
        result = ReadFlagTxSigSwpLeRiStsLe_UB();
        break;
    case SIG_SWPLERISTSLE:
        result = ReadFlagTxSigSwpLeRiStsLe();
        break;
    case SIG_STEERWHLTOUCHBDCRSRESUSTEERWHLTOUCHBDSTS:
        result = ReadFlagTxSigSteerWhlTouchBdCrsResuSteerWhlTouchBdSts();
        break;
    case SIG_STEERWHLTOUCHBDCRSRESUQF1:
        result = ReadFlagTxSigSteerWhlTouchBdCrsResuQf1();
        break;
    case SIG_STEERWHLTOUCHBDCRSRESU_UB:
        result = ReadFlagTxSigSteerWhlTouchBdCrsResu_UB();
        break;
    case SIG_STEERWHLTOUCHBDCNCLSTEERWHLTOUCHBDSTS:
        result = ReadFlagTxSigSteerWhlTouchBdCnclSteerWhlTouchBdSts();
        break;
    case SIG_STEERWHLTOUCHBDCNCLQF1:
        result = ReadFlagTxSigSteerWhlTouchBdCnclQf1();
        break;
    case SIG_STEERWHLTOUCHBDCNCLCNTR:
        result = ReadFlagTxSigSteerWhlTouchBdCnclCntr();
        break;
    case SIG_STEERWHLTOUCHBDCNCLCHKS:
        result = ReadFlagTxSigSteerWhlTouchBdCnclChks();
        break;
    case SIG_STEERWHLTOUCHBDCNCL_UB:
        result = ReadFlagTxSigSteerWhlTouchBdCncl_UB();
        break;
    case SIG_STEERWHLTOUCHBDADAS_UB:
        result = ReadFlagTxSigSteerWhlTouchBdADAS_UB();
        break;
    case SIG_STEERWHLTOUCHBDADAS:
        result = ReadFlagTxSigSteerWhlTouchBdADAS();
        break;
    case SIG_LEMFCTACTSGUP_UB:
        result = ReadFlagTxSigLeMFctActSgUp_UB();
        break;
    case SIG_LEMFCTACTSGUP:
        result = ReadFlagTxSigLeMFctActSgUp();
        break;
    case SIG_LEMFCTACTSGRI_UB:
        result = ReadFlagTxSigLeMFctActSgRi_UB();
        break;
    case SIG_LEMFCTACTSGRI:
        result = ReadFlagTxSigLeMFctActSgRi();
        break;
    case SIG_LEMFCTACTSGLE_UB:
        result = ReadFlagTxSigLeMFctActSgLe_UB();
        break;
    case SIG_LEMFCTACTSGLE:
        result = ReadFlagTxSigLeMFctActSgLe();
        break;
    case SIG_LEMFCTACTSGDN_UB:
        result = ReadFlagTxSigLeMFctActSgDn_UB();
        break;
    case SIG_LEMFCTACTSGDN:
        result = ReadFlagTxSigLeMFctActSgDn();
        break;
    case SIG_LEMFCTACTSGCE_UB:
        result = ReadFlagTxSigLeMFctActSgCe_UB();
        break;
    case SIG_LEMFCTACTSGCE:
        result = ReadFlagTxSigLeMFctActSgCe();
        break;
    case SIG_STEERWHLTOUCHBDLETOUCHPOSNY:
        result = ReadFlagTxSigSteerWhlTouchBdLeTouchPosnY();
        break;
    case SIG_STEERWHLTOUCHBDLETOUCHPOSNX:
        result = ReadFlagTxSigSteerWhlTouchBdLeTouchPosnX();
        break;
    case SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS:
        result = ReadFlagTxSigSteerWhlTouchBdLeSteerWhlTouchBdSts();
        break;
    case SIG_STEERWHLTOUCHBDLECNTR:
        result = ReadFlagTxSigSteerWhlTouchBdLeCntr();
        break;
    case SIG_STEERWHLTOUCHBDLECHKS:
        result = ReadFlagTxSigSteerWhlTouchBdLeChks();
        break;
    case SIG_STEERWHLTOUCHBDLE_UB:
        result = ReadFlagTxSigSteerWhlTouchBdLe_UB();
        break;
     case SIG_DIAGNOSTICRESPSWTL:
        result = ReadFlagTxSigDiagnosticRespSWTL();
        break;  		
    default:
        result = COM_FALSE;
        break;
    }
    return result;
}

t_flag_value ReadFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts(void)
{
    return (((flag_tx0 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigDiagcFailrTouchPanSWTLTouchdFltSts(void)
{
    return (((flag_tx0 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigDiagcFailrTouchPanSWTLSnsrFltSts(void)
{
    return (((flag_tx0 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigDiagcFailrTouchPanSWTLCmnFltSts(void)
{
    return (((flag_tx0 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigDiagcFailrTouchPanSWTL_UB(void)
{
    return (((flag_tx0 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLSerNoNr4(void)
{
    return (((flag_tx0 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLSerNoNr3(void)
{
    return (((flag_tx0 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLSerNoNr2(void)
{
    return (((flag_tx0 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLSerNoNr1(void)
{
    return (((flag_tx1 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLSerNo_UB(void)
{
    return (((flag_tx1 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplNr4(void)
{
    return (((flag_tx1 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplNr3(void)
{
    return (((flag_tx1 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplNr2(void)
{
    return (((flag_tx1 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplNr1(void)
{
    return (((flag_tx1 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplEndSgn3(void)
{
    return (((flag_tx1 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplEndSgn2(void)
{
    return (((flag_tx1 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmplEndSgn1(void)
{
    return (((flag_tx2 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNoCmpl_UB(void)
{
    return (((flag_tx2 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplNr5(void)
{
    return (((flag_tx2 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplNr4(void)
{
    return (((flag_tx2 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplNr3(void)
{
    return (((flag_tx2 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplNr2(void)
{
    return (((flag_tx2 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplNr1(void)
{
    return (((flag_tx2 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplEndSgn3(void)
{
    return (((flag_tx2 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplEndSgn2(void)
{
    return (((flag_tx3 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSWTLPartNo10CmplEndSgn1(void)
{
    return (((flag_tx3 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSwpUpDwnStsLe_UB(void)
{
    return (((flag_tx3 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSwpUpDwnStsLe(void)
{
    return (((flag_tx3 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSwpLeRiStsLe_UB(void)
{
    return (((flag_tx3 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSwpLeRiStsLe(void)
{
    return (((flag_tx3 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCrsResuSteerWhlTouchBdSts(void)
{
    return (((flag_tx3 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCrsResuQf1(void)
{
    return (((flag_tx3 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCrsResu_UB(void)
{
    return (((flag_tx4 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCnclSteerWhlTouchBdSts(void)
{
    return (((flag_tx4 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCnclQf1(void)
{
    return (((flag_tx4 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCnclCntr(void)
{
    return (((flag_tx4 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCnclChks(void)
{
    return (((flag_tx4 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdCncl_UB(void)
{
    return (((flag_tx4 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdADAS_UB(void)
{
    return (((flag_tx4 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdADAS(void)
{
    return (((flag_tx4 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgUp_UB(void)
{
    return (((flag_tx5 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgUp(void)
{
    return (((flag_tx5 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgRi_UB(void)
{
    return (((flag_tx5 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgRi(void)
{
    return (((flag_tx5 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgLe_UB(void)
{
    return (((flag_tx5 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgLe(void)
{
    return (((flag_tx5 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgDn_UB(void)
{
    return (((flag_tx5 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgDn(void)
{
    return (((flag_tx5 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgCe_UB(void)
{
    return (((flag_tx6 & ((uint8_t) 0x01)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigLeMFctActSgCe(void)
{
    return (((flag_tx6 & ((uint8_t) 0x02)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdLeTouchPosnY(void)
{
    return (((flag_tx6 & ((uint8_t) 0x04)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdLeTouchPosnX(void)
{
    return (((flag_tx6 & ((uint8_t) 0x08)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdLeSteerWhlTouchBdSts(void)
{
    return (((flag_tx6 & ((uint8_t) 0x10)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdLeCntr(void)
{
    return (((flag_tx6 & ((uint8_t) 0x20)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdLeChks(void)
{
    return (((flag_tx6 & ((uint8_t) 0x40)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigSteerWhlTouchBdLe_UB(void)
{
    return (((flag_tx6 & ((uint8_t) 0x80)) > ((uint8_t) 0)) ? COM_TRUE : COM_FALSE);
}

t_flag_value ReadFlagTxSigDiagnosticRespSWTL(void)
{
    return (((flag_tx6 & ((UI_8) 0x40)) > ((UI_8) 0)) ? COM_TRUE : COM_FALSE);
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Consult service to retrieve the state of class 1 (RxNotif), 
|    class 3 (Rx_ErrorNotif), class 2 (TxNotif) and class 4 (Tx_ErrorNotif) flags
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal.
|   return: 
|     COM_FALSE if the flag is down
|     COM_TRUE  if the flag is up
/---------------------------------------------------------------------------*/
t_flag_value ReadFlagRxSig(t_symbolic_name message)
{
    t_flag_value result;
    switch (message) 
   {
    case SIG_DIAGNOSTICREQSWTL:
        result = ReadFlagRxSigDiagnosticReqSWTL();
        break;
    case SIG_DIAGNOSTICFUNCADDRREQ:
        result = ReadFlagRxSigDiagnosticFuncAddrReq();
        break;
    default:
        result = COM_FALSE;
        break;
    }
    return result;
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Reset service for the notify class 1 (RxNotif) class 3 (RxErrorNotif)
|    class 2 (TxNotif) and class 4 (TxErrorNotif)
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal.
/---------------------------------------------------------------------------*/
void ResetFlagTxSig(t_symbolic_name message)
{
    switch (message) {
    case SIG_DIAGCFAILRTOUCHPANSWTLVIBRATIONFLTSTS:
        ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLTOUCHDFLTSTS:
        ResetFlagTxSigDiagcFailrTouchPanSWTLTouchdFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLSNSRFLTSTS:
        ResetFlagTxSigDiagcFailrTouchPanSWTLSnsrFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTLCMNFLTSTS:
        ResetFlagTxSigDiagcFailrTouchPanSWTLCmnFltSts();
        break;
    case SIG_DIAGCFAILRTOUCHPANSWTL_UB:
        ResetFlagTxSigDiagcFailrTouchPanSWTL_UB();
        break;
    case SIG_SWTLSERNONR4:
        ResetFlagTxSigSWTLSerNoNr4();
        break;
    case SIG_SWTLSERNONR3:
        ResetFlagTxSigSWTLSerNoNr3();
        break;
    case SIG_SWTLSERNONR2:
        ResetFlagTxSigSWTLSerNoNr2();
        break;
    case SIG_SWTLSERNONR1:
        ResetFlagTxSigSWTLSerNoNr1();
        break;
    case SIG_SWTLSERNO_UB:
        ResetFlagTxSigSWTLSerNo_UB();
        break;
    case SIG_SWTLPARTNOCMPLNR4:
        ResetFlagTxSigSWTLPartNoCmplNr4();
        break;
    case SIG_SWTLPARTNOCMPLNR3:
        ResetFlagTxSigSWTLPartNoCmplNr3();
        break;
    case SIG_SWTLPARTNOCMPLNR2:
        ResetFlagTxSigSWTLPartNoCmplNr2();
        break;
    case SIG_SWTLPARTNOCMPLNR1:
        ResetFlagTxSigSWTLPartNoCmplNr1();
        break;
    case SIG_SWTLPARTNOCMPLENDSGN3:
        ResetFlagTxSigSWTLPartNoCmplEndSgn3();
        break;
    case SIG_SWTLPARTNOCMPLENDSGN2:
        ResetFlagTxSigSWTLPartNoCmplEndSgn2();
        break;
    case SIG_SWTLPARTNOCMPLENDSGN1:
        ResetFlagTxSigSWTLPartNoCmplEndSgn1();
        break;
    case SIG_SWTLPARTNOCMPL_UB:
        ResetFlagTxSigSWTLPartNoCmpl_UB();
        break;
    case SIG_SWTLPARTNO10CMPLNR5:
        ResetFlagTxSigSWTLPartNo10CmplNr5();
        break;
    case SIG_SWTLPARTNO10CMPLNR4:
        ResetFlagTxSigSWTLPartNo10CmplNr4();
        break;
    case SIG_SWTLPARTNO10CMPLNR3:
        ResetFlagTxSigSWTLPartNo10CmplNr3();
        break;
    case SIG_SWTLPARTNO10CMPLNR2:
        ResetFlagTxSigSWTLPartNo10CmplNr2();
        break;
    case SIG_SWTLPARTNO10CMPLNR1:
        ResetFlagTxSigSWTLPartNo10CmplNr1();
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN3:
        ResetFlagTxSigSWTLPartNo10CmplEndSgn3();
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN2:
        ResetFlagTxSigSWTLPartNo10CmplEndSgn2();
        break;
    case SIG_SWTLPARTNO10CMPLENDSGN1:
        ResetFlagTxSigSWTLPartNo10CmplEndSgn1();
        break;
    case SIG_SWPUPDWNSTSLE_UB:
        ResetFlagTxSigSwpUpDwnStsLe_UB();
        break;
    case SIG_SWPUPDWNSTSLE:
        ResetFlagTxSigSwpUpDwnStsLe();
        break;
    case SIG_SWPLERISTSLE_UB:
        ResetFlagTxSigSwpLeRiStsLe_UB();
        break;
    case SIG_SWPLERISTSLE:
        ResetFlagTxSigSwpLeRiStsLe();
        break;
    case SIG_STEERWHLTOUCHBDCRSRESUSTEERWHLTOUCHBDSTS:
        ResetFlagTxSigSteerWhlTouchBdCrsResuSteerWhlTouchBdSts();
        break;
    case SIG_STEERWHLTOUCHBDCRSRESUQF1:
        ResetFlagTxSigSteerWhlTouchBdCrsResuQf1();
        break;
    case SIG_STEERWHLTOUCHBDCRSRESU_UB:
        ResetFlagTxSigSteerWhlTouchBdCrsResu_UB();
        break;
    case SIG_STEERWHLTOUCHBDCNCLSTEERWHLTOUCHBDSTS:
        ResetFlagTxSigSteerWhlTouchBdCnclSteerWhlTouchBdSts();
        break;
    case SIG_STEERWHLTOUCHBDCNCLQF1:
        ResetFlagTxSigSteerWhlTouchBdCnclQf1();
        break;
    case SIG_STEERWHLTOUCHBDCNCLCNTR:
        ResetFlagTxSigSteerWhlTouchBdCnclCntr();
        break;
    case SIG_STEERWHLTOUCHBDCNCLCHKS:
        ResetFlagTxSigSteerWhlTouchBdCnclChks();
        break;
    case SIG_STEERWHLTOUCHBDCNCL_UB:
        ResetFlagTxSigSteerWhlTouchBdCncl_UB();
        break;
    case SIG_STEERWHLTOUCHBDADAS_UB:
        ResetFlagTxSigSteerWhlTouchBdADAS_UB();
        break;
    case SIG_STEERWHLTOUCHBDADAS:
        ResetFlagTxSigSteerWhlTouchBdADAS();
        break;
    case SIG_LEMFCTACTSGUP_UB:
        ResetFlagTxSigLeMFctActSgUp_UB();
        break;
    case SIG_LEMFCTACTSGUP:
        ResetFlagTxSigLeMFctActSgUp();
        break;
    case SIG_LEMFCTACTSGRI_UB:
        ResetFlagTxSigLeMFctActSgRi_UB();
        break;
    case SIG_LEMFCTACTSGRI:
        ResetFlagTxSigLeMFctActSgRi();
        break;
    case SIG_LEMFCTACTSGLE_UB:
        ResetFlagTxSigLeMFctActSgLe_UB();
        break;
    case SIG_LEMFCTACTSGLE:
        ResetFlagTxSigLeMFctActSgLe();
        break;
    case SIG_LEMFCTACTSGDN_UB:
        ResetFlagTxSigLeMFctActSgDn_UB();
        break;
    case SIG_LEMFCTACTSGDN:
        ResetFlagTxSigLeMFctActSgDn();
        break;
    case SIG_LEMFCTACTSGCE_UB:
        ResetFlagTxSigLeMFctActSgCe_UB();
        break;
    case SIG_LEMFCTACTSGCE:
        ResetFlagTxSigLeMFctActSgCe();
        break;
    case SIG_STEERWHLTOUCHBDLETOUCHPOSNY:
        ResetFlagTxSigSteerWhlTouchBdLeTouchPosnY();
        break;
    case SIG_STEERWHLTOUCHBDLETOUCHPOSNX:
        ResetFlagTxSigSteerWhlTouchBdLeTouchPosnX();
        break;
    case SIG_STEERWHLTOUCHBDLESTEERWHLTOUCHBDSTS:
        ResetFlagTxSigSteerWhlTouchBdLeSteerWhlTouchBdSts();
        break;
    case SIG_STEERWHLTOUCHBDLECNTR:
        ResetFlagTxSigSteerWhlTouchBdLeCntr();
        break;
    case SIG_STEERWHLTOUCHBDLECHKS:
        ResetFlagTxSigSteerWhlTouchBdLeChks();
        break;
    case SIG_STEERWHLTOUCHBDLE_UB:
        ResetFlagTxSigSteerWhlTouchBdLe_UB();
        break;
    case SIG_DIAGNOSTICRESPSWTL:
        ResetFlagTxSigDiagnosticRespSWTL();
        break;   		
    default:
        /* Do nothing */
        break;
    }
}

void ResetFlagTxSigDiagcFailrTouchPanSWTLVibrationFltSts(void)
{
    flag_tx0 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigDiagcFailrTouchPanSWTLTouchdFltSts(void)
{
    flag_tx0 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigDiagcFailrTouchPanSWTLSnsrFltSts(void)
{
    flag_tx0 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigDiagcFailrTouchPanSWTLCmnFltSts(void)
{
    flag_tx0 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigDiagcFailrTouchPanSWTL_UB(void)
{
    flag_tx0 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigSWTLSerNoNr4(void)
{
    flag_tx0 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigSWTLSerNoNr3(void)
{
    flag_tx0 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigSWTLSerNoNr2(void)
{
    flag_tx0 &= ((uint8_t) 0x7F);
}

void ResetFlagTxSigSWTLSerNoNr1(void)
{
    flag_tx1 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigSWTLSerNo_UB(void)
{
    flag_tx1 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigSWTLPartNoCmplNr4(void)
{
    flag_tx1 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigSWTLPartNoCmplNr3(void)
{
    flag_tx1 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigSWTLPartNoCmplNr2(void)
{
    flag_tx1 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigSWTLPartNoCmplNr1(void)
{
    flag_tx1 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigSWTLPartNoCmplEndSgn3(void)
{
    flag_tx1 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigSWTLPartNoCmplEndSgn2(void)
{
    flag_tx1 &= ((uint8_t) 0x7F);
}

void ResetFlagTxSigSWTLPartNoCmplEndSgn1(void)
{
    flag_tx2 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigSWTLPartNoCmpl_UB(void)
{
    flag_tx2 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigSWTLPartNo10CmplNr5(void)
{
    flag_tx2 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigSWTLPartNo10CmplNr4(void)
{
    flag_tx2 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigSWTLPartNo10CmplNr3(void)
{
    flag_tx2 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigSWTLPartNo10CmplNr2(void)
{
    flag_tx2 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigSWTLPartNo10CmplNr1(void)
{
    flag_tx2 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigSWTLPartNo10CmplEndSgn3(void)
{
    flag_tx2 &= ((uint8_t) 0x7F);
}

void ResetFlagTxSigSWTLPartNo10CmplEndSgn2(void)
{
    flag_tx3 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigSWTLPartNo10CmplEndSgn1(void)
{
    flag_tx3 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigSwpUpDwnStsLe_UB(void)
{
    flag_tx3 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigSwpUpDwnStsLe(void)
{
    flag_tx3 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigSwpLeRiStsLe_UB(void)
{
    flag_tx3 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigSwpLeRiStsLe(void)
{
    flag_tx3 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigSteerWhlTouchBdCrsResuSteerWhlTouchBdSts(void)
{
    flag_tx3 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigSteerWhlTouchBdCrsResuQf1(void)
{
    flag_tx3 &= ((uint8_t) 0x7F);
}

void ResetFlagTxSigSteerWhlTouchBdCrsResu_UB(void)
{
    flag_tx4 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigSteerWhlTouchBdCnclSteerWhlTouchBdSts(void)
{
    flag_tx4 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigSteerWhlTouchBdCnclQf1(void)
{
    flag_tx4 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigSteerWhlTouchBdCnclCntr(void)
{
    flag_tx4 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigSteerWhlTouchBdCnclChks(void)
{
    flag_tx4 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigSteerWhlTouchBdCncl_UB(void)
{
    flag_tx4 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigSteerWhlTouchBdADAS_UB(void)
{
    flag_tx4 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigSteerWhlTouchBdADAS(void)
{
    flag_tx4 &= ((uint8_t) 0x7F);
}

void ResetFlagTxSigLeMFctActSgUp_UB(void)
{
    flag_tx5 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigLeMFctActSgUp(void)
{
    flag_tx5 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigLeMFctActSgRi_UB(void)
{
    flag_tx5 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigLeMFctActSgRi(void)
{
    flag_tx5 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigLeMFctActSgLe_UB(void)
{
    flag_tx5 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigLeMFctActSgLe(void)
{
    flag_tx5 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigLeMFctActSgDn_UB(void)
{
    flag_tx5 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigLeMFctActSgDn(void)
{
    flag_tx5 &= ((uint8_t) 0x7F);
}

void ResetFlagTxSigLeMFctActSgCe_UB(void)
{
    flag_tx6 &= ((uint8_t) 0xFE);
}

void ResetFlagTxSigLeMFctActSgCe(void)
{
    flag_tx6 &= ((uint8_t) 0xFD);
}

void ResetFlagTxSigSteerWhlTouchBdLeTouchPosnY(void)
{
    flag_tx6 &= ((uint8_t) 0xFB);
}

void ResetFlagTxSigSteerWhlTouchBdLeTouchPosnX(void)
{
    flag_tx6 &= ((uint8_t) 0xF7);
}

void ResetFlagTxSigSteerWhlTouchBdLeSteerWhlTouchBdSts(void)
{
    flag_tx6 &= ((uint8_t) 0xEF);
}

void ResetFlagTxSigSteerWhlTouchBdLeCntr(void)
{
    flag_tx6 &= ((uint8_t) 0xDF);
}

void ResetFlagTxSigSteerWhlTouchBdLeChks(void)
{
    flag_tx6 &= ((uint8_t) 0xBF);
}

void ResetFlagTxSigSteerWhlTouchBdLe_UB(void)
{
    flag_tx6 &= ((uint8_t) 0x7F);
}


void ResetFlagTxSigDiagnosticRespSWTL(void)
{
    flag_tx6 &= ((UI_8) 0xBF);
}

t_flag_value ReadFlagRxSigDiagnosticReqSWTL(void)
{
    return (((flag_rx0 & ((UI_8) 0x01)) > ((UI_8) 0)) ? COM_TRUE : COM_FALSE);
}
t_flag_value ReadFlagRxSigDiagnosticFuncAddrReq(void)
{
    return (((flag_rx0 & ((UI_8) 0x02)) > ((UI_8) 0)) ? COM_TRUE : COM_FALSE);
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Reset service for the notify class 1 (RxNotif) class 3 (RxErrorNotif)
|    class 2 (TxNotif) and class 4 (TxErrorNotif)
|---------------------------------------------------------------------------
| Parameters description:
|   message: Identification of the signal.
/---------------------------------------------------------------------------*/
void ResetFlagRxSig(t_symbolic_name message)
{
    switch (message) {

    case SIG_DIAGNOSTICREQSWTL:
        ResetFlagRxSigDiagnosticReqSWTL();
        break;
    case SIG_DIAGNOSTICFUNCADDRREQ:
        ResetFlagRxSigDiagnosticFuncAddrReq();
        break;
    default:
        /* Do nothing */
        break;
    }
}


void ResetFlagRxSigDiagnosticReqSWTL(void)
{
    flag_rx0 &= ((UI_8) 0xFE);
}

void ResetFlagRxSigDiagnosticFuncAddrReq(void)
{
   flag_rx0 &= ((UI_8) 0xFD);
}
/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
|  * Main runnable of the OsekCom stack intended to be called periodically by
|    the system scheduler with a period equal to FICOSEK_COM_TASK_TICKS
|---------------------------------------------------------------------------
| Parameters description:
/---------------------------------------------------------------------------*/
void OsekComTask(void)
{
    if (TST_FLAG_OSEK_COM_INIT()) {
        /* Get timer difference since last task execution */
        time_diff = FICOSEK_COM_TASK_TICKS;

        OsekComDeadlineMonitRx();
        OsekComPeriodicTx();
    }
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
| * Runnable responsible of managing the transmission timers of periodic and
|   mixed frames.
| * The transmission timer value will be rounded down to first multiple of
|   FICOSEK_COM_TASK_TICKS
| ---------------------------------------------------------------------------
| Parameters description:
/ --------------------------------------------------------------------------- */
static void OsekComPeriodicTx(void)
{
    /* Test whether Tx of periodic frames is active */
    if (TST_FLAG_OSEK_COM_PER_TX()) {
    /* Com frames monitoring */

        /* Tx frame SwtlPrivateDHUCanFr06 end of period monitoring */
        ptt_tx_frm_swtlprivatedhucanfr06 += time_diff;
        if (ptt_tx_frm_swtlprivatedhucanfr06 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR06) {
            /* Reset timer */
            ptt_tx_frm_swtlprivatedhucanfr06 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR06();
           
            OsekComTxReqCallbackSWTL();
            
            //ResumeAllInterrupts();
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlPrivateDHUCanFr05 end of period monitoring */
        ptt_tx_frm_swtlprivatedhucanfr05 += time_diff;
        if (ptt_tx_frm_swtlprivatedhucanfr05 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR05) {
            /* Reset timer */
            ptt_tx_frm_swtlprivatedhucanfr05 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR05();
            
            OsekComTxReqCallbackSWTL();
            
            //ResumeAllInterrupts();
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlPrivateDHUCanFr04 end of period monitoring */
        ptt_tx_frm_swtlprivatedhucanfr04 += time_diff;
        if (ptt_tx_frm_swtlprivatedhucanfr04 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR04) {
            /* Reset timer */
            ptt_tx_frm_swtlprivatedhucanfr04 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR04();
            
            OsekComTxReqCallbackSWTL();
            
            //ResumeAllInterrupts();
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlPrivateDHUCanFr03 end of period monitoring */
        ptt_tx_frm_swtlprivatedhucanfr03 += time_diff;
        if (ptt_tx_frm_swtlprivatedhucanfr03 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR03) {
            /* Reset timer */
            ptt_tx_frm_swtlprivatedhucanfr03 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR03();
            
            OsekComTxReqCallbackSWTL();
            
            //ResumeAllInterrupts();
            }
        }
        else {
            /* Do nothing */
        }
#if 0
        /* Tx frame SwtlPrivateDHUCanFr02 end of period monitoring */
        ptt_tx_frm_swtlprivatedhucanfr02 += time_diff;
        if (ptt_tx_frm_swtlprivatedhucanfr02 >= PT_TX_FRM_SWTLPRIVATEDHUCANFR02) {
            /* Reset timer */
            ptt_tx_frm_swtlprivatedhucanfr02 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02();
            OsekComTxReqCallbackSWTL();
            //ResumeAllInterrupts();
        }
        else {
            /* Do nothing */
        }
#endif

        
		
		
		
		/* Tx frame SwtlPressFr01 end of period monitoring */
        ptt_tx_frm_swtlpressfr01 += time_diff;
        if (ptt_tx_frm_swtlpressfr01 >= PT_TX_FRM_SWTLPRESSFR01) {
            /* Reset timer */
            ptt_tx_frm_swtlpressfr01 = 0;            /* Tx frame */
           // SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLPRESSFR01();
            
            OsekComTxReqCallbackSWTL();
            //  CanTxRequest();
           // ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr01 end of period monitoring */
        ptt_tx_frm_swtlsensorfr01 += time_diff;
        if (ptt_tx_frm_swtlsensorfr01 >= PT_TX_FRM_SWTLSENSORFR01) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr01 = 0;            /* Tx frame */
          //  SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR01();
            
            OsekComTxReqCallbackSWTL();
         //   ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr02 end of period monitoring */
        ptt_tx_frm_swtlsensorfr02 += time_diff;
        if (ptt_tx_frm_swtlsensorfr02 >= PT_TX_FRM_SWTLSENSORFR02) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr02 = 0;            /* Tx frame */
         //   SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR02();
            
            OsekComTxReqCallbackSWTL();
         //   ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr03 end of period monitoring */
        ptt_tx_frm_swtlsensorfr03 += time_diff;
        if (ptt_tx_frm_swtlsensorfr03 >= PT_TX_FRM_SWTLSENSORFR03) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr03 = 0;            /* Tx frame */
         //   SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR03();
            
            OsekComTxReqCallbackSWTL();
          //  ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr04 end of period monitoring */
        ptt_tx_frm_swtlsensorfr04 += time_diff;
        if (ptt_tx_frm_swtlsensorfr04 >= PT_TX_FRM_SWTLSENSORFR04) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr04 = 0;            /* Tx frame */
          //  SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR04();
            
           OsekComTxReqCallbackSWTL();
           // ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr05 end of period monitoring */
        ptt_tx_frm_swtlsensorfr05 += time_diff;
        if (ptt_tx_frm_swtlsensorfr05 >= PT_TX_FRM_SWTLSENSORFR05) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr05 = 0;            /* Tx frame */
          //  SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR05();
            
           OsekComTxReqCallbackSWTL();
          //  ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr06 end of period monitoring */
        ptt_tx_frm_swtlsensorfr06 += time_diff;
        if (ptt_tx_frm_swtlsensorfr06 >= PT_TX_FRM_SWTLSENSORFR06) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr06 = 0;            /* Tx frame */
          //  SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR06();
            
           OsekComTxReqCallbackSWTL();
           // ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }

        /* Tx frame SwtlSensorFr07 end of period monitoring */
        ptt_tx_frm_swtlsensorfr07 += time_diff;
        if (ptt_tx_frm_swtlsensorfr07 >= PT_TX_FRM_SWTLSENSORFR07) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr07 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR07();
            
            OsekComTxReqCallbackSWTL();
            //ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }
#if 1
        /* Tx frame SwtlSensorFr08 end of period monitoring */
        ptt_tx_frm_swtlsensorfr08 += time_diff;
        if (ptt_tx_frm_swtlsensorfr08 >= PT_TX_FRM_SWTLSENSORFR08) {
            /* Reset timer */
            ptt_tx_frm_swtlsensorfr08 = 0;            /* Tx frame */
            //SuspendAllInterrupts();
            SET_FLAG_TX_REQ_FRM_SWTLSENSORFR08();
            
            OsekComTxReqCallbackSWTL();
            //ResumeAllInterrupts();
            
        }
        else {
            /* Do nothing */
        }
#endif
    
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
| * Runnable responsible of managing the reception time-out timers of
|   periodic and mixed frames.
| * The timer value will be rounded down to first multiple of FICOSEK_COM_TASK_TICKS
| ---------------------------------------------------------------------------
| Parameters description:
/ --------------------------------------------------------------------------- */
static void OsekComDeadlineMonitRx(void)
{
    /* Management of timers of Rx Error Signals */

    /* Increasing Timer */
    dmt_rx_sig_actvnofsteerwhlillmn += time_diff;
    /* Rx deadline case time out signal ActvnOfSteerWhlIllmn */
    if (dmt_rx_sig_actvnofsteerwhlillmn >= TO_RX_SIG_ACTVNOFSTEERWHLILLMN) {
        /* Reset monitoring timer */
        dmt_rx_sig_actvnofsteerwhlillmn = 0;
        /* RxError notification callback */
        IhuPrivateDHUCanFr01_Timeout_CALLBACK();
    }
    /* Case normal counting */
    else {
        /* Do Nothing */
    }
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
| * Routine responsible of initiating on event transmissions of direct and
|   mixed frames 
| ---------------------------------------------------------------------------
| Parameters description:
/ --------------------------------------------------------------------------- */
void OsekComTxReqFrmSwtlPrivateDHUCanFr01(void)
{
    /* Tx frame */
    SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR01();
    OsekComTxReqCallbackSWTL();
}

void OsekComTxReqFrmSwtlPrivateDHUCanFr02(void)
{
    /* Tx frame */
    SET_FLAG_TX_REQ_FRM_SWTLPRIVATEDHUCANFR02();
    OsekComTxReqCallbackSWTL();
}

/*---------------------------------------------------------------------------
| Portability:  Target platform independent
|----------------------------------------------------------------------------
| Routine description:
| * Routine responsible of initiating on event transmissions of direct and
|   mixed frames 
| ---------------------------------------------------------------------------
| Parameters description:
/ --------------------------------------------------------------------------- */
static void OsekComTxReqFrmDIAG_PhysResp_SWTL(void)
{
    /* Start of the Tx deadline monitoring timer */
    //SuspendAllInterrupts();
    if (dmt_tx_frm_diag_physresp_swtl == TIMER_CANCEL) {
        dmt_tx_frm_diag_physresp_swtl = 0;
    }
    else {
        /* Do nothing */
    }
    /* Tx frame */
    SET_FLAG_TX_REQ_FRM_DIAG_PHYSRESP_SWTL();
   // CanTxRequest(0);
    OsekComTxReqCallbackSWTL();
  //  ResumeAllInterrupts();
}

