Snapdragon® Telematics Application Framework (TelAF) Interface Specification
le_update_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 LE_UPDATE_MESSAGES_H_INCLUDE_GUARD
12 #define LE_UPDATE_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "le_update_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_LE_UPDATE_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_le_update_AddProgressHandler 0
28 #define _MSGID_le_update_RemoveProgressHandler 1
29 #define _MSGID_le_update_Start 2
30 #define _MSGID_le_update_Install 3
31 #define _MSGID_le_update_End 4
32 #define _MSGID_le_update_GetErrorCode 5
33 #define _MSGID_le_update_GetCurrentSysIndex 6
34 #define _MSGID_le_update_GetSystemHash 7
35 #define _MSGID_le_update_GetPreviousSystemIndex 8
36 
37 
38 // Define type-safe pack/unpack functions for all enums, including included types
39 
40 static inline bool le_update_PackState
41 (
42  uint8_t **bufferPtr,
43  le_update_State_t value
44 )
45 {
46  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
47 }
48 
49 static inline bool le_update_UnpackState
50 (
51  uint8_t **bufferPtr,
52  le_update_State_t* valuePtr
53 )
54 {
55  bool result;
56  uint32_t value = 0;
57  result = le_pack_UnpackUint32(bufferPtr, &value);
58  if (result)
59  {
60  *valuePtr = (le_update_State_t)value;
61  }
62  return result;
63 }
64 
65 static inline bool le_update_PackErrorCode
66 (
67  uint8_t **bufferPtr,
69 )
70 {
71  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
72 }
73 
74 static inline bool le_update_UnpackErrorCode
75 (
76  uint8_t **bufferPtr,
77  le_update_ErrorCode_t* valuePtr
78 )
79 {
80  bool result;
81  uint32_t value = 0;
82  result = le_pack_UnpackUint32(bufferPtr, &value);
83  if (result)
84  {
85  *valuePtr = (le_update_ErrorCode_t)value;
86  }
87  return result;
88 }
89 
90 // Define pack/unpack functions for all structures, including included types
91 
92 
93 #endif // LE_UPDATE_MESSAGES_H_INCLUDE_GUARD
static bool le_update_UnpackErrorCode(uint8_t **bufferPtr, le_update_ErrorCode_t *valuePtr)
Definition: le_update_messages.h:75
static bool le_update_PackErrorCode(uint8_t **bufferPtr, le_update_ErrorCode_t value)
Definition: le_update_messages.h:66
struct __attribute__((packed))
Definition: le_update_messages.h:20
le_update_State_t
Definition: le_update_common.h:39
_Message_t
Definition: le_update_messages.h:25
#define _MAX_MSG_SIZE
Definition: le_update_messages.h:17
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
static bool le_update_UnpackState(uint8_t **bufferPtr, le_update_State_t *valuePtr)
Definition: le_update_messages.h:50
static bool le_update_PackState(uint8_t **bufferPtr, le_update_State_t value)
Definition: le_update_messages.h:41
le_update_ErrorCode_t
Definition: le_update_common.h:63
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205