Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_diagReset_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_DIAGRESET_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_DIAGRESET_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_diagReset_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_DIAGRESET_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_diagReset_GetService 0
28 #define _MSGID_taf_diagReset_AddRxMsgHandler 1
29 #define _MSGID_taf_diagReset_RemoveRxMsgHandler 2
30 #define _MSGID_taf_diagReset_SendResp 3
31 #define _MSGID_taf_diagReset_RemoveSvc 4
32 
33 
34 // Define type-safe pack/unpack functions for all enums, including included types
35 
36 static inline bool taf_diagReset_PackType
37 (
38  uint8_t **bufferPtr,
40 )
41 {
42  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
43 }
44 
45 static inline bool taf_diagReset_UnpackType
46 (
47  uint8_t **bufferPtr,
48  taf_diagReset_Type_t* valuePtr
49 )
50 {
51  bool result;
52  uint32_t value = 0;
53  result = le_pack_UnpackUint32(bufferPtr, &value);
54  if (result)
55  {
56  *valuePtr = (taf_diagReset_Type_t)value;
57  }
58  return result;
59 }
60 
61 static inline bool taf_diagReset_PackErrorCode
62 (
63  uint8_t **bufferPtr,
65 )
66 {
67  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
68 }
69 
70 static inline bool taf_diagReset_UnpackErrorCode
71 (
72  uint8_t **bufferPtr,
74 )
75 {
76  bool result;
77  uint32_t value = 0;
78  result = le_pack_UnpackUint32(bufferPtr, &value);
79  if (result)
80  {
81  *valuePtr = (taf_diagReset_ErrorCode_t)value;
82  }
83  return result;
84 }
85 
86 // Define pack/unpack functions for all structures, including included types
87 
88 
89 #endif // TAF_DIAGRESET_MESSAGES_H_INCLUDE_GUARD
static bool taf_diagReset_UnpackType(uint8_t **bufferPtr, taf_diagReset_Type_t *valuePtr)
Definition: taf_diagReset_messages.h:46
_Message_t
Definition: taf_diagReset_messages.h:25
taf_diagReset_Type_t
Definition: taf_diagReset_common.h:29
static bool taf_diagReset_PackType(uint8_t **bufferPtr, taf_diagReset_Type_t value)
Definition: taf_diagReset_messages.h:37
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
#define _MAX_MSG_SIZE
Definition: taf_diagReset_messages.h:17
struct __attribute__((packed))
Definition: taf_diagReset_messages.h:20
static bool taf_diagReset_UnpackErrorCode(uint8_t **bufferPtr, taf_diagReset_ErrorCode_t *valuePtr)
Definition: taf_diagReset_messages.h:71
static bool taf_diagReset_PackErrorCode(uint8_t **bufferPtr, taf_diagReset_ErrorCode_t value)
Definition: taf_diagReset_messages.h:62
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205
taf_diagReset_ErrorCode_t
Definition: taf_diagReset_common.h:52