Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_can_messages.h
Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 
11 #ifndef TAF_CAN_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_CAN_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_can_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_CAN_MSG_SIZE
18 
19 // Define the message type for communicating between client and server
20 typedef struct __attribute__((packed))
21 {
22  uint32_t id;
23  uint8_t buffer[_MAX_MSG_SIZE];
24 }
26 
27 #define _MSGID_taf_can_CreateCanInf 0
28 #define _MSGID_taf_can_SetFilter 1
29 #define _MSGID_taf_can_EnableLoopback 2
30 #define _MSGID_taf_can_DisableLoopback 3
31 #define _MSGID_taf_can_EnableRcvOwnMsg 4
32 #define _MSGID_taf_can_DisableRcvOwnMsg 5
33 #define _MSGID_taf_can_IsFdSupported 6
34 #define _MSGID_taf_can_EnableFdFrame 7
35 #define _MSGID_taf_can_GetFdStatus 8
36 #define _MSGID_taf_can_AddCanEventHandler 9
37 #define _MSGID_taf_can_RemoveCanEventHandler 10
38 #define _MSGID_taf_can_CreateCanFrame 11
39 #define _MSGID_taf_can_SetPayload 12
40 #define _MSGID_taf_can_SetFrameType 13
41 #define _MSGID_taf_can_SendFrame 14
42 #define _MSGID_taf_can_DeleteCanInf 15
43 #define _MSGID_taf_can_DeleteCanFrame 16
44 
45 
46 // Define type-safe pack/unpack functions for all enums, including included types
47 
48 static inline bool taf_can_PackInfProtocol
49 (
50  uint8_t **bufferPtr,
52 )
53 {
54  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
55 }
56 
57 static inline bool taf_can_UnpackInfProtocol
58 (
59  uint8_t **bufferPtr,
60  taf_can_InfProtocol_t* valuePtr
61 )
62 {
63  bool result;
64  uint32_t value = 0;
65  result = le_pack_UnpackUint32(bufferPtr, &value);
66  if (result)
67  {
68  *valuePtr = (taf_can_InfProtocol_t)value;
69  }
70  return result;
71 }
72 
73 static inline bool taf_can_PackFrameType
74 (
75  uint8_t **bufferPtr,
77 )
78 {
79  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
80 }
81 
82 static inline bool taf_can_UnpackFrameType
83 (
84  uint8_t **bufferPtr,
85  taf_can_FrameType_t* valuePtr
86 )
87 {
88  bool result;
89  uint32_t value = 0;
90  result = le_pack_UnpackUint32(bufferPtr, &value);
91  if (result)
92  {
93  *valuePtr = (taf_can_FrameType_t)value;
94  }
95  return result;
96 }
97 
98 // Define pack/unpack functions for all structures, including included types
99 
100 
101 #endif // TAF_CAN_MESSAGES_H_INCLUDE_GUARD
#define _MAX_MSG_SIZE
Definition: taf_can_messages.h:17
static bool taf_can_UnpackFrameType(uint8_t **bufferPtr, taf_can_FrameType_t *valuePtr)
Definition: taf_can_messages.h:83
struct __attribute__((packed))
Definition: taf_can_messages.h:20
_Message_t
Definition: taf_can_messages.h:25
static bool taf_can_PackFrameType(uint8_t **bufferPtr, taf_can_FrameType_t value)
Definition: taf_can_messages.h:74
static bool taf_can_UnpackInfProtocol(uint8_t **bufferPtr, taf_can_InfProtocol_t *valuePtr)
Definition: taf_can_messages.h:58
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
taf_can_InfProtocol_t
Definition: taf_can_common.h:40
static bool taf_can_PackInfProtocol(uint8_t **bufferPtr, taf_can_InfProtocol_t value)
Definition: taf_can_messages.h:49
taf_can_FrameType_t
Definition: taf_can_common.h:55
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205