Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_mdc_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_MDC_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_MDC_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_mdc_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_MDC_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_mdc_StartSession 0
28 #define _MSGID_taf_mdc_StartSessionAsync 1
29 #define _MSGID_taf_mdc_StopSession 2
30 #define _MSGID_taf_mdc_StopSessionAsync 3
31 
32 
33 // Define type-safe pack/unpack functions for all enums, including included types
34 
35 static inline bool taf_dcs_PackDataBearerTechnology
36 (
37  uint8_t **bufferPtr,
39 )
40 {
41  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
42 }
43 
44 static inline bool taf_dcs_UnpackDataBearerTechnology
45 (
46  uint8_t **bufferPtr,
48 )
49 {
50  bool result;
51  uint32_t value = 0;
52  result = le_pack_UnpackUint32(bufferPtr, &value);
53  if (result)
54  {
55  *valuePtr = (taf_dcs_DataBearerTechnology_t)value;
56  }
57  return result;
58 }
59 
60 static inline bool taf_dcs_PackConState
61 (
62  uint8_t **bufferPtr,
63  taf_dcs_ConState_t value
64 )
65 {
66  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
67 }
68 
69 static inline bool taf_dcs_UnpackConState
70 (
71  uint8_t **bufferPtr,
72  taf_dcs_ConState_t* valuePtr
73 )
74 {
75  bool result;
76  uint32_t value = 0;
77  result = le_pack_UnpackUint32(bufferPtr, &value);
78  if (result)
79  {
80  *valuePtr = (taf_dcs_ConState_t)value;
81  }
82  return result;
83 }
84 
85 static inline bool taf_dcs_PackPdp
86 (
87  uint8_t **bufferPtr,
88  taf_dcs_Pdp_t value
89 )
90 {
91  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
92 }
93 
94 static inline bool taf_dcs_UnpackPdp
95 (
96  uint8_t **bufferPtr,
97  taf_dcs_Pdp_t* valuePtr
98 )
99 {
100  bool result;
101  uint32_t value = 0;
102  result = le_pack_UnpackUint32(bufferPtr, &value);
103  if (result)
104  {
105  *valuePtr = (taf_dcs_Pdp_t)value;
106  }
107  return result;
108 }
109 
110 static inline bool taf_dcs_PackRoamingType
111 (
112  uint8_t **bufferPtr,
114 )
115 {
116  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
117 }
118 
119 static inline bool taf_dcs_UnpackRoamingType
120 (
121  uint8_t **bufferPtr,
122  taf_dcs_RoamingType_t* valuePtr
123 )
124 {
125  bool result;
126  uint32_t value = 0;
127  result = le_pack_UnpackUint32(bufferPtr, &value);
128  if (result)
129  {
130  *valuePtr = (taf_dcs_RoamingType_t)value;
131  }
132  return result;
133 }
134 
135 static inline bool taf_dcs_PackAuth
136 (
137  uint8_t **bufferPtr,
138  taf_dcs_Auth_t value
139 )
140 {
141  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
142 }
143 
144 static inline bool taf_dcs_UnpackAuth
145 (
146  uint8_t **bufferPtr,
147  taf_dcs_Auth_t* valuePtr
148 )
149 {
150  bool result;
151  uint32_t value = 0;
152  result = le_pack_UnpackUint32(bufferPtr, &value);
153  if (result)
154  {
155  *valuePtr = (taf_dcs_Auth_t)value;
156  }
157  return result;
158 }
159 
160 static inline bool taf_dcs_PackApnType
161 (
162  uint8_t **bufferPtr,
163  taf_dcs_ApnType_t value
164 )
165 {
166  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
167 }
168 
169 static inline bool taf_dcs_UnpackApnType
170 (
171  uint8_t **bufferPtr,
172  taf_dcs_ApnType_t* valuePtr
173 )
174 {
175  bool result;
176  uint32_t value = 0;
177  result = le_pack_UnpackUint32(bufferPtr, &value);
178  if (result)
179  {
180  *valuePtr = (taf_dcs_ApnType_t)value;
181  }
182  return result;
183 }
184 
185 static inline bool taf_dcs_PackTech
186 (
187  uint8_t **bufferPtr,
188  taf_dcs_Tech_t value
189 )
190 {
191  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
192 }
193 
194 static inline bool taf_dcs_UnpackTech
195 (
196  uint8_t **bufferPtr,
197  taf_dcs_Tech_t* valuePtr
198 )
199 {
200  bool result;
201  uint32_t value = 0;
202  result = le_pack_UnpackUint32(bufferPtr, &value);
203  if (result)
204  {
205  *valuePtr = (taf_dcs_Tech_t)value;
206  }
207  return result;
208 }
209 
210 // Define pack/unpack functions for all structures, including included types
211 
212 
213 static inline bool taf_dcs_PackDefaultGatewayAddresses
214 (
215  uint8_t **bufferPtr,
216  const taf_dcs_DefaultGatewayAddresses_t *valuePtr
217 )
218 {
219  __attribute__((unused))
220  bool subResult, result = true;
221 
222  LE_ASSERT(valuePtr);
223  subResult = le_pack_PackString( bufferPtr,
224  valuePtr->ipv4Addr, 16);
225  result = result && subResult;
226  subResult = le_pack_PackString( bufferPtr,
227  valuePtr->ipv6Addr, 46);
228  result = result && subResult;
229 
230  return result;
231 }
232 
233 static inline bool taf_dcs_UnpackDefaultGatewayAddresses
234 (
235  uint8_t **bufferPtr,
237 )
238 {
239  bool result = true;
240  if (result)
241  {
242  result = le_pack_UnpackString(bufferPtr,
243  valuePtr->ipv4Addr,
244  sizeof(valuePtr->ipv4Addr),
245  16);
246  }
247  if (result)
248  {
249  result = le_pack_UnpackString(bufferPtr,
250  valuePtr->ipv6Addr,
251  sizeof(valuePtr->ipv6Addr),
252  46);
253  }
254  return result;
255 }
256 
257 static inline bool taf_dcs_PackDnsServerAddresses
258 (
259  uint8_t **bufferPtr,
260  const taf_dcs_DnsServerAddresses_t *valuePtr
261 )
262 {
263  __attribute__((unused))
264  bool subResult, result = true;
265 
266  LE_ASSERT(valuePtr);
267  subResult = le_pack_PackString( bufferPtr,
268  valuePtr->ipv4Addr1, 16);
269  result = result && subResult;
270  subResult = le_pack_PackString( bufferPtr,
271  valuePtr->ipv4Addr2, 16);
272  result = result && subResult;
273  subResult = le_pack_PackString( bufferPtr,
274  valuePtr->ipv6Addr1, 46);
275  result = result && subResult;
276  subResult = le_pack_PackString( bufferPtr,
277  valuePtr->ipv6Addr2, 46);
278  result = result && subResult;
279 
280  return result;
281 }
282 
283 static inline bool taf_dcs_UnpackDnsServerAddresses
284 (
285  uint8_t **bufferPtr,
287 )
288 {
289  bool result = true;
290  if (result)
291  {
292  result = le_pack_UnpackString(bufferPtr,
293  valuePtr->ipv4Addr1,
294  sizeof(valuePtr->ipv4Addr1),
295  16);
296  }
297  if (result)
298  {
299  result = le_pack_UnpackString(bufferPtr,
300  valuePtr->ipv4Addr2,
301  sizeof(valuePtr->ipv4Addr2),
302  16);
303  }
304  if (result)
305  {
306  result = le_pack_UnpackString(bufferPtr,
307  valuePtr->ipv6Addr1,
308  sizeof(valuePtr->ipv6Addr1),
309  46);
310  }
311  if (result)
312  {
313  result = le_pack_UnpackString(bufferPtr,
314  valuePtr->ipv6Addr2,
315  sizeof(valuePtr->ipv6Addr2),
316  46);
317  }
318  return result;
319 }
320 
321 static inline bool taf_dcs_PackStateInfo
322 (
323  uint8_t **bufferPtr,
324  const taf_dcs_StateInfo_t *valuePtr
325 )
326 {
327  __attribute__((unused))
328  bool subResult, result = true;
329 
330  LE_ASSERT(valuePtr);
331  subResult = taf_dcs_PackPdp( bufferPtr,
332  valuePtr->ipType );
333  result = result && subResult;
334 
335  return result;
336 }
337 
338 static inline bool taf_dcs_UnpackStateInfo
339 (
340  uint8_t **bufferPtr,
341  taf_dcs_StateInfo_t *valuePtr
342 )
343 {
344  bool result = true;
345  if (result)
346  {
347  result = taf_dcs_UnpackPdp(bufferPtr,
348  &valuePtr->ipType );
349  }
350  return result;
351 }
352 
353 static inline bool taf_dcs_PackRoamingStatusInd
354 (
355  uint8_t **bufferPtr,
356  const taf_dcs_RoamingStatusInd_t *valuePtr
357 )
358 {
359  __attribute__((unused))
360  bool subResult, result = true;
361 
362  LE_ASSERT(valuePtr);
363  subResult = le_pack_PackUint8( bufferPtr,
364  valuePtr->phoneId );
365  result = result && subResult;
366  subResult = le_pack_PackBool( bufferPtr,
367  valuePtr->isRoaming );
368  result = result && subResult;
369  subResult = taf_dcs_PackRoamingType( bufferPtr,
370  valuePtr->type );
371  result = result && subResult;
372 
373  return result;
374 }
375 
376 static inline bool taf_dcs_UnpackRoamingStatusInd
377 (
378  uint8_t **bufferPtr,
380 )
381 {
382  bool result = true;
383  if (result)
384  {
385  result = le_pack_UnpackUint8(bufferPtr,
386  &valuePtr->phoneId );
387  }
388  if (result)
389  {
390  result = le_pack_UnpackBool(bufferPtr,
391  &valuePtr->isRoaming );
392  }
393  if (result)
394  {
395  result = taf_dcs_UnpackRoamingType(bufferPtr,
396  &valuePtr->type );
397  }
398  return result;
399 }
400 
401 static inline bool taf_dcs_PackProfileInfo
402 (
403  uint8_t **bufferPtr,
404  const taf_dcs_ProfileInfo_t *valuePtr
405 )
406 {
407  __attribute__((unused))
408  bool subResult, result = true;
409 
410  LE_ASSERT(valuePtr);
411  subResult = le_pack_PackUint32( bufferPtr,
412  valuePtr->index );
413  result = result && subResult;
414  subResult = taf_dcs_PackTech( bufferPtr,
415  valuePtr->tech );
416  result = result && subResult;
417  subResult = le_pack_PackString( bufferPtr,
418  valuePtr->name, 64);
419  result = result && subResult;
420 
421  return result;
422 }
423 
424 static inline bool taf_dcs_UnpackProfileInfo
425 (
426  uint8_t **bufferPtr,
427  taf_dcs_ProfileInfo_t *valuePtr
428 )
429 {
430  bool result = true;
431  if (result)
432  {
433  result = le_pack_UnpackUint32(bufferPtr,
434  &valuePtr->index );
435  }
436  if (result)
437  {
438  result = taf_dcs_UnpackTech(bufferPtr,
439  &valuePtr->tech );
440  }
441  if (result)
442  {
443  result = le_pack_UnpackString(bufferPtr,
444  valuePtr->name,
445  sizeof(valuePtr->name),
446  64);
447  }
448  return result;
449 }
450 
451 #endif // TAF_MDC_MESSAGES_H_INCLUDE_GUARD
static bool taf_dcs_PackDnsServerAddresses(uint8_t **bufferPtr, const taf_dcs_DnsServerAddresses_t *valuePtr)
Definition: taf_mdc_messages.h:258
static bool taf_dcs_UnpackPdp(uint8_t **bufferPtr, taf_dcs_Pdp_t *valuePtr)
Definition: taf_mdc_messages.h:95
static bool taf_dcs_PackApnType(uint8_t **bufferPtr, taf_dcs_ApnType_t value)
Definition: taf_mdc_messages.h:161
static bool taf_dcs_PackProfileInfo(uint8_t **bufferPtr, const taf_dcs_ProfileInfo_t *valuePtr)
Definition: taf_mdc_messages.h:402
static bool taf_dcs_PackDefaultGatewayAddresses(uint8_t **bufferPtr, const taf_dcs_DefaultGatewayAddresses_t *valuePtr)
Definition: taf_mdc_messages.h:214
taf_dcs_Pdp_t ipType
Definition: taf_dcs_common.h:344
uint32_t index
Definition: taf_dcs_common.h:386
static bool taf_dcs_PackAuth(uint8_t **bufferPtr, taf_dcs_Auth_t value)
Definition: taf_mdc_messages.h:136
static bool taf_dcs_UnpackConState(uint8_t **bufferPtr, taf_dcs_ConState_t *valuePtr)
Definition: taf_mdc_messages.h:70
char ipv4Addr[16+1]
Definition: taf_dcs_common.h:152
char ipv6Addr[46+1]
Definition: taf_dcs_common.h:153
static bool taf_dcs_UnpackStateInfo(uint8_t **bufferPtr, taf_dcs_StateInfo_t *valuePtr)
Definition: taf_mdc_messages.h:339
static bool taf_dcs_PackDataBearerTechnology(uint8_t **bufferPtr, taf_dcs_DataBearerTechnology_t value)
Definition: taf_mdc_messages.h:36
taf_dcs_Tech_t
Definition: taf_dcs_common.h:321
bool isRoaming
Definition: taf_dcs_common.h:357
LE_DECLARE_INLINE bool le_pack_UnpackString(uint8_t **bufferPtr, char *stringPtr, uint32_t bufferSize, uint32_t maxStringCount)
Definition: le_pack.h:1565
static bool taf_dcs_UnpackTech(uint8_t **bufferPtr, taf_dcs_Tech_t *valuePtr)
Definition: taf_mdc_messages.h:195
Definition: taf_dcs_common.h:354
taf_dcs_DataBearerTechnology_t
Definition: taf_dcs_common.h:178
uint32_t taf_dcs_Auth_t
Definition: taf_dcs_common.h:293
static bool taf_dcs_UnpackApnType(uint8_t **bufferPtr, taf_dcs_ApnType_t *valuePtr)
Definition: taf_mdc_messages.h:170
Definition: taf_dcs_common.h:150
static bool taf_dcs_PackConState(uint8_t **bufferPtr, taf_dcs_ConState_t value)
Definition: taf_mdc_messages.h:61
#define _MAX_MSG_SIZE
Definition: taf_mdc_messages.h:17
static bool taf_dcs_UnpackAuth(uint8_t **bufferPtr, taf_dcs_Auth_t *valuePtr)
Definition: taf_mdc_messages.h:145
taf_dcs_Tech_t tech
Definition: taf_dcs_common.h:387
Definition: taf_dcs_common.h:342
char ipv4Addr1[16+1]
Definition: taf_dcs_common.h:165
uint8_t phoneId
Definition: taf_dcs_common.h:356
static bool taf_dcs_UnpackProfileInfo(uint8_t **bufferPtr, taf_dcs_ProfileInfo_t *valuePtr)
Definition: taf_mdc_messages.h:425
static bool taf_dcs_UnpackRoamingStatusInd(uint8_t **bufferPtr, taf_dcs_RoamingStatusInd_t *valuePtr)
Definition: taf_mdc_messages.h:377
Definition: taf_dcs_common.h:384
static bool taf_dcs_PackRoamingStatusInd(uint8_t **bufferPtr, const taf_dcs_RoamingStatusInd_t *valuePtr)
Definition: taf_mdc_messages.h:354
taf_dcs_ConState_t
Definition: taf_dcs_common.h:235
char name[64+1]
Definition: taf_dcs_common.h:388
taf_dcs_RoamingType_t type
Definition: taf_dcs_common.h:358
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
static bool taf_dcs_PackPdp(uint8_t **bufferPtr, taf_dcs_Pdp_t value)
Definition: taf_mdc_messages.h:86
char ipv4Addr2[16+1]
Definition: taf_dcs_common.h:166
LE_DECLARE_INLINE bool le_pack_UnpackUint8(uint8_t **bufferPtr, uint8_t *valuePtr)
Definition: le_pack.h:1164
static bool taf_dcs_UnpackRoamingType(uint8_t **bufferPtr, taf_dcs_RoamingType_t *valuePtr)
Definition: taf_mdc_messages.h:120
uint32_t taf_dcs_ApnType_t
Definition: taf_dcs_common.h:313
#define LE_ASSERT(condition)
Definition: le_log.h:935
_Message_t
Definition: taf_mdc_messages.h:25
static bool taf_dcs_UnpackDnsServerAddresses(uint8_t **bufferPtr, taf_dcs_DnsServerAddresses_t *valuePtr)
Definition: taf_mdc_messages.h:284
static bool taf_dcs_UnpackDataBearerTechnology(uint8_t **bufferPtr, taf_dcs_DataBearerTechnology_t *valuePtr)
Definition: taf_mdc_messages.h:45
char ipv6Addr1[46+1]
Definition: taf_dcs_common.h:167
LE_DECLARE_INLINE bool le_pack_UnpackBool(uint8_t **bufferPtr, bool *valuePtr)
Definition: le_pack.h:1413
struct __attribute__((packed))
Definition: taf_mdc_messages.h:20
LE_DECLARE_INLINE bool le_pack_PackBool(uint8_t **bufferPtr, bool value)
Definition: le_pack.h:591
static bool taf_dcs_PackTech(uint8_t **bufferPtr, taf_dcs_Tech_t value)
Definition: taf_mdc_messages.h:186
taf_dcs_Pdp_t
Definition: taf_dcs_common.h:254
static bool taf_dcs_PackRoamingType(uint8_t **bufferPtr, taf_dcs_RoamingType_t value)
Definition: taf_mdc_messages.h:111
static bool taf_dcs_UnpackDefaultGatewayAddresses(uint8_t **bufferPtr, taf_dcs_DefaultGatewayAddresses_t *valuePtr)
Definition: taf_mdc_messages.h:234
LE_DECLARE_INLINE bool le_pack_PackString(uint8_t **bufferPtr, const char *stringPtr, uint32_t maxStringCount)
Definition: le_pack.h:884
taf_dcs_RoamingType_t
Definition: taf_dcs_common.h:273
Definition: taf_dcs_common.h:163
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205
char ipv6Addr2[46+1]
Definition: taf_dcs_common.h:168
LE_DECLARE_INLINE bool le_pack_PackUint8(uint8_t **bufferPtr, uint8_t value)
Definition: le_pack.h:118
static bool taf_dcs_PackStateInfo(uint8_t **bufferPtr, const taf_dcs_StateInfo_t *valuePtr)
Definition: taf_mdc_messages.h:322