Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_diagDataID_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_DIAGDATAID_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_DIAGDATAID_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_diagDataID_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_DIAGDATAID_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_diagDataID_GetService 0
28 #define _MSGID_taf_diagDataID_AddRxReadDIDMsgHandler 1
29 #define _MSGID_taf_diagDataID_RemoveRxReadDIDMsgHandler 2
30 #define _MSGID_taf_diagDataID_SendReadDIDResp 3
31 #define _MSGID_taf_diagDataID_AddRxWriteDIDMsgHandler 4
32 #define _MSGID_taf_diagDataID_RemoveRxWriteDIDMsgHandler 5
33 #define _MSGID_taf_diagDataID_GetWriteDataRecord 6
34 #define _MSGID_taf_diagDataID_SendWriteDIDResp 7
35 #define _MSGID_taf_diagDataID_RemoveSvc 8
36 
37 
38 // Define type-safe pack/unpack functions for all enums, including included types
39 
40 static inline bool taf_diagDataID_PackReadDIDErrorCode
41 (
42  uint8_t **bufferPtr,
44 )
45 {
46  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
47 }
48 
50 (
51  uint8_t **bufferPtr,
53 )
54 {
55  bool result;
56  uint32_t value = 0;
57  result = le_pack_UnpackUint32(bufferPtr, &value);
58  if (result)
59  {
60  *valuePtr = (taf_diagDataID_ReadDIDErrorCode_t)value;
61  }
62  return result;
63 }
64 
65 static inline bool taf_diagDataID_PackWriteDIDErrorCode
66 (
67  uint8_t **bufferPtr,
69 )
70 {
71  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
72 }
73 
75 (
76  uint8_t **bufferPtr,
78 )
79 {
80  bool result;
81  uint32_t value = 0;
82  result = le_pack_UnpackUint32(bufferPtr, &value);
83  if (result)
84  {
85  *valuePtr = (taf_diagDataID_WriteDIDErrorCode_t)value;
86  }
87  return result;
88 }
89 
90 // Define pack/unpack functions for all structures, including included types
91 
92 
93 #endif // TAF_DIAGDATAID_MESSAGES_H_INCLUDE_GUARD
static bool taf_diagDataID_UnpackReadDIDErrorCode(uint8_t **bufferPtr, taf_diagDataID_ReadDIDErrorCode_t *valuePtr)
Definition: taf_diagDataID_messages.h:50
taf_diagDataID_ReadDIDErrorCode_t
Definition: taf_diagDataID_common.h:50
static bool taf_diagDataID_UnpackWriteDIDErrorCode(uint8_t **bufferPtr, taf_diagDataID_WriteDIDErrorCode_t *valuePtr)
Definition: taf_diagDataID_messages.h:75
taf_diagDataID_WriteDIDErrorCode_t
Definition: taf_diagDataID_common.h:69
#define _MAX_MSG_SIZE
Definition: taf_diagDataID_messages.h:17
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
_Message_t
Definition: taf_diagDataID_messages.h:25
static bool taf_diagDataID_PackWriteDIDErrorCode(uint8_t **bufferPtr, taf_diagDataID_WriteDIDErrorCode_t value)
Definition: taf_diagDataID_messages.h:66
static bool taf_diagDataID_PackReadDIDErrorCode(uint8_t **bufferPtr, taf_diagDataID_ReadDIDErrorCode_t value)
Definition: taf_diagDataID_messages.h:41
struct __attribute__((packed))
Definition: taf_diagDataID_messages.h:20
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205