Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_sim_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_SIM_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_SIM_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_sim_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_SIM_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_sim_AddNewStateHandler 0
28 #define _MSGID_taf_sim_RemoveNewStateHandler 1
29 #define _MSGID_taf_sim_AddAuthenticationResponseHandler 2
30 #define _MSGID_taf_sim_RemoveAuthenticationResponseHandler 3
31 #define _MSGID_taf_sim_IsPresent 4
32 #define _MSGID_taf_sim_GetState 5
33 #define _MSGID_taf_sim_IsReady 6
34 #define _MSGID_taf_sim_GetICCID 7
35 #define _MSGID_taf_sim_GetIMSI 8
36 #define _MSGID_taf_sim_GetHomeNetworkOperator 9
37 #define _MSGID_taf_sim_GetSubscriberPhoneNumber 10
38 #define _MSGID_taf_sim_GetHomeNetworkMccMnc 11
39 #define _MSGID_taf_sim_GetSelectedCard 12
40 #define _MSGID_taf_sim_SelectCard 13
41 #define _MSGID_taf_sim_EnterPIN 14
42 #define _MSGID_taf_sim_ChangePIN 15
43 #define _MSGID_taf_sim_GetRemainingPINTries 16
44 #define _MSGID_taf_sim_GetRemainingPUKTries 17
45 #define _MSGID_taf_sim_Unlock 18
46 #define _MSGID_taf_sim_Lock 19
47 #define _MSGID_taf_sim_Unblock 20
48 #define _MSGID_taf_sim_GetEID 21
49 #define _MSGID_taf_sim_SetAutomaticSelection 22
50 #define _MSGID_taf_sim_GetAutomaticSelection 23
51 #define _MSGID_taf_sim_OpenLogicalChannel 24
52 #define _MSGID_taf_sim_CloseLogicalChannel 25
53 #define _MSGID_taf_sim_SendApduOnChannel 26
54 #define _MSGID_taf_sim_SendApdu 27
55 #define _MSGID_taf_sim_SendCommand 28
56 #define _MSGID_taf_sim_LocalSwapToEmergencyCallSubscription 29
57 #define _MSGID_taf_sim_LocalSwapToCommercialSubscription 30
58 #define _MSGID_taf_sim_SetPower 31
59 #define _MSGID_taf_sim_Reset 32
60 #define _MSGID_taf_sim_IsEmergencyCallSubscriptionSelected 33
61 #define _MSGID_taf_sim_AddIccidChangeHandler 34
62 #define _MSGID_taf_sim_RemoveIccidChangeHandler 35
63 #define _MSGID_taf_sim_CreateFPLMNList 36
64 #define _MSGID_taf_sim_AddFPLMNOperator 37
65 #define _MSGID_taf_sim_GetFirstFPLMNOperator 38
66 #define _MSGID_taf_sim_GetNextFPLMNOperator 39
67 #define _MSGID_taf_sim_ReadFPLMNList 40
68 #define _MSGID_taf_sim_DeleteFPLMNList 41
69 #define _MSGID_taf_sim_WriteFPLMNList 42
70 #define _MSGID_taf_sim_GetSlotCount 43
71 
72 
73 // Define type-safe pack/unpack functions for all enums, including included types
74 
75 static inline bool taf_sim_PackStates
76 (
77  uint8_t **bufferPtr,
78  taf_sim_States_t value
79 )
80 {
81  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
82 }
83 
84 static inline bool taf_sim_UnpackStates
85 (
86  uint8_t **bufferPtr,
87  taf_sim_States_t* valuePtr
88 )
89 {
90  bool result;
91  uint32_t value = 0;
92  result = le_pack_UnpackUint32(bufferPtr, &value);
93  if (result)
94  {
95  *valuePtr = (taf_sim_States_t)value;
96  }
97  return result;
98 }
99 
100 static inline bool taf_sim_PackId
101 (
102  uint8_t **bufferPtr,
103  taf_sim_Id_t value
104 )
105 {
106  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
107 }
108 
109 static inline bool taf_sim_UnpackId
110 (
111  uint8_t **bufferPtr,
112  taf_sim_Id_t* valuePtr
113 )
114 {
115  bool result;
116  uint32_t value = 0;
117  result = le_pack_UnpackUint32(bufferPtr, &value);
118  if (result)
119  {
120  *valuePtr = (taf_sim_Id_t)value;
121  }
122  return result;
123 }
124 
125 static inline bool taf_sim_PackLockType
126 (
127  uint8_t **bufferPtr,
128  taf_sim_LockType_t value
129 )
130 {
131  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
132 }
133 
134 static inline bool taf_sim_UnpackLockType
135 (
136  uint8_t **bufferPtr,
137  taf_sim_LockType_t* valuePtr
138 )
139 {
140  bool result;
141  uint32_t value = 0;
142  result = le_pack_UnpackUint32(bufferPtr, &value);
143  if (result)
144  {
145  *valuePtr = (taf_sim_LockType_t)value;
146  }
147  return result;
148 }
149 
150 static inline bool taf_sim_PackLockResponse
151 (
152  uint8_t **bufferPtr,
154 )
155 {
156  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
157 }
158 
159 static inline bool taf_sim_UnpackLockResponse
160 (
161  uint8_t **bufferPtr,
162  taf_sim_LockResponse_t* valuePtr
163 )
164 {
165  bool result;
166  uint32_t value = 0;
167  result = le_pack_UnpackUint32(bufferPtr, &value);
168  if (result)
169  {
170  *valuePtr = (taf_sim_LockResponse_t)value;
171  }
172  return result;
173 }
174 
175 static inline bool taf_sim_PackAppType
176 (
177  uint8_t **bufferPtr,
178  taf_sim_AppType_t value
179 )
180 {
181  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
182 }
183 
184 static inline bool taf_sim_UnpackAppType
185 (
186  uint8_t **bufferPtr,
187  taf_sim_AppType_t* valuePtr
188 )
189 {
190  bool result;
191  uint32_t value = 0;
192  result = le_pack_UnpackUint32(bufferPtr, &value);
193  if (result)
194  {
195  *valuePtr = (taf_sim_AppType_t)value;
196  }
197  return result;
198 }
199 
200 static inline bool taf_sim_PackManufacturer
201 (
202  uint8_t **bufferPtr,
204 )
205 {
206  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
207 }
208 
209 static inline bool taf_sim_UnpackManufacturer
210 (
211  uint8_t **bufferPtr,
212  taf_sim_Manufacturer_t* valuePtr
213 )
214 {
215  bool result;
216  uint32_t value = 0;
217  result = le_pack_UnpackUint32(bufferPtr, &value);
218  if (result)
219  {
220  *valuePtr = (taf_sim_Manufacturer_t)value;
221  }
222  return result;
223 }
224 
225 static inline bool taf_sim_PackCommand
226 (
227  uint8_t **bufferPtr,
228  taf_sim_Command_t value
229 )
230 {
231  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
232 }
233 
234 static inline bool taf_sim_UnpackCommand
235 (
236  uint8_t **bufferPtr,
237  taf_sim_Command_t* valuePtr
238 )
239 {
240  bool result;
241  uint32_t value = 0;
242  result = le_pack_UnpackUint32(bufferPtr, &value);
243  if (result)
244  {
245  *valuePtr = (taf_sim_Command_t)value;
246  }
247  return result;
248 }
249 
250 // Define pack/unpack functions for all structures, including included types
251 
252 
253 #endif // TAF_SIM_MESSAGES_H_INCLUDE_GUARD
taf_sim_LockType_t
Definition: taf_sim_common.h:488
taf_sim_Command_t
Definition: taf_sim_common.h:574
static bool taf_sim_PackManufacturer(uint8_t **bufferPtr, taf_sim_Manufacturer_t value)
Definition: taf_sim_messages.h:201
static bool taf_sim_PackId(uint8_t **bufferPtr, taf_sim_Id_t value)
Definition: taf_sim_messages.h:101
static bool taf_sim_UnpackManufacturer(uint8_t **bufferPtr, taf_sim_Manufacturer_t *valuePtr)
Definition: taf_sim_messages.h:210
static bool taf_sim_UnpackStates(uint8_t **bufferPtr, taf_sim_States_t *valuePtr)
Definition: taf_sim_messages.h:85
static bool taf_sim_UnpackLockType(uint8_t **bufferPtr, taf_sim_LockType_t *valuePtr)
Definition: taf_sim_messages.h:135
static bool taf_sim_UnpackCommand(uint8_t **bufferPtr, taf_sim_Command_t *valuePtr)
Definition: taf_sim_messages.h:235
struct __attribute__((packed))
Definition: taf_sim_messages.h:20
#define _MAX_MSG_SIZE
Definition: taf_sim_messages.h:17
static bool taf_sim_PackStates(uint8_t **bufferPtr, taf_sim_States_t value)
Definition: taf_sim_messages.h:76
taf_sim_Manufacturer_t
Definition: taf_sim_common.h:551
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
taf_sim_LockResponse_t
Definition: taf_sim_common.h:508
static bool taf_sim_PackLockType(uint8_t **bufferPtr, taf_sim_LockType_t value)
Definition: taf_sim_messages.h:126
taf_sim_AppType_t
Definition: taf_sim_common.h:527
taf_sim_Id_t
Definition: taf_sim_common.h:465
static bool taf_sim_UnpackLockResponse(uint8_t **bufferPtr, taf_sim_LockResponse_t *valuePtr)
Definition: taf_sim_messages.h:160
taf_sim_States_t
Definition: taf_sim_common.h:418
static bool taf_sim_PackAppType(uint8_t **bufferPtr, taf_sim_AppType_t value)
Definition: taf_sim_messages.h:176
_Message_t
Definition: taf_sim_messages.h:25
static bool taf_sim_UnpackId(uint8_t **bufferPtr, taf_sim_Id_t *valuePtr)
Definition: taf_sim_messages.h:110
static bool taf_sim_PackCommand(uint8_t **bufferPtr, taf_sim_Command_t value)
Definition: taf_sim_messages.h:226
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205
static bool taf_sim_UnpackAppType(uint8_t **bufferPtr, taf_sim_AppType_t *valuePtr)
Definition: taf_sim_messages.h:185
static bool taf_sim_PackLockResponse(uint8_t **bufferPtr, taf_sim_LockResponse_t value)
Definition: taf_sim_messages.h:151