Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_diagDIDBackend_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_DIAGDIDBACKEND_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_DIAGDIDBACKEND_MESSAGES_H_INCLUDE_GUARD
13 
14 
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_DIAGDIDBACKEND_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_diagDIDBackend_AddReadDIDHandler 0
28 #define _MSGID_taf_diagDIDBackend_RemoveReadDIDHandler 1
29 #define _MSGID_taf_diagDIDBackend_SendReadDIDResp 2
30 #define _MSGID_taf_diagDIDBackend_AddWriteDIDHandler 3
31 #define _MSGID_taf_diagDIDBackend_RemoveWriteDIDHandler 4
32 #define _MSGID_taf_diagDIDBackend_SendWriteDIDResp 5
33 
34 
35 // Define type-safe pack/unpack functions for all enums, including included types
36 
38 (
39  uint8_t **bufferPtr,
41 )
42 {
43  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
44 }
45 
47 (
48  uint8_t **bufferPtr,
50 )
51 {
52  bool result;
53  uint32_t value = 0;
54  result = le_pack_UnpackUint32(bufferPtr, &value);
55  if (result)
56  {
57  *valuePtr = (taf_diagDIDBackend_ReadDIDErrorCode_t)value;
58  }
59  return result;
60 }
61 
63 (
64  uint8_t **bufferPtr,
66 )
67 {
68  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
69 }
70 
72 (
73  uint8_t **bufferPtr,
75 )
76 {
77  bool result;
78  uint32_t value = 0;
79  result = le_pack_UnpackUint32(bufferPtr, &value);
80  if (result)
81  {
82  *valuePtr = (taf_diagDIDBackend_WriteDIDErrorCode_t)value;
83  }
84  return result;
85 }
86 
87 // Define pack/unpack functions for all structures, including included types
88 
89 
90 #endif // TAF_DIAGDIDBACKEND_MESSAGES_H_INCLUDE_GUARD
static bool taf_diagDIDBackend_PackWriteDIDErrorCode(uint8_t **bufferPtr, taf_diagDIDBackend_WriteDIDErrorCode_t value)
Definition: taf_diagDIDBackend_messages.h:63
_Message_t
Definition: taf_diagDIDBackend_messages.h:25
taf_diagDIDBackend_ReadDIDErrorCode_t
Definition: taf_diagDIDBackend_common.h:47
struct __attribute__((packed))
Definition: taf_diagDIDBackend_messages.h:20
static bool taf_diagDIDBackend_PackReadDIDErrorCode(uint8_t **bufferPtr, taf_diagDIDBackend_ReadDIDErrorCode_t value)
Definition: taf_diagDIDBackend_messages.h:38
static bool taf_diagDIDBackend_UnpackReadDIDErrorCode(uint8_t **bufferPtr, taf_diagDIDBackend_ReadDIDErrorCode_t *valuePtr)
Definition: taf_diagDIDBackend_messages.h:47
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
taf_diagDIDBackend_WriteDIDErrorCode_t
Definition: taf_diagDIDBackend_common.h:66
#define _MAX_MSG_SIZE
Definition: taf_diagDIDBackend_messages.h:17
static bool taf_diagDIDBackend_UnpackWriteDIDErrorCode(uint8_t **bufferPtr, taf_diagDIDBackend_WriteDIDErrorCode_t *valuePtr)
Definition: taf_diagDIDBackend_messages.h:72
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205