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