Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_audio_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_AUDIO_MESSAGES_H_INCLUDE_GUARD
12 #define TAF_AUDIO_MESSAGES_H_INCLUDE_GUARD
13 
14 
15 #include "taf_audio_common.h"
16 
17 #define _MAX_MSG_SIZE IFGEN_TAF_AUDIO_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_audio_Close 0
28 #define _MSGID_taf_audio_CreateConnector 1
29 #define _MSGID_taf_audio_DeleteConnector 2
30 #define _MSGID_taf_audio_Connect 3
31 #define _MSGID_taf_audio_Disconnect 4
32 #define _MSGID_taf_audio_OpenSpeaker 5
33 #define _MSGID_taf_audio_OpenMic 6
34 #define _MSGID_taf_audio_OpenModemVoiceRx 7
35 #define _MSGID_taf_audio_OpenModemVoiceTx 8
36 #define _MSGID_taf_audio_PlayDtmf 9
37 #define _MSGID_taf_audio_Mute 10
38 #define _MSGID_taf_audio_Unmute 11
39 #define _MSGID_taf_audio_OpenPlayer 12
40 #define _MSGID_taf_audio_PlayFile 13
41 #define _MSGID_taf_audio_OpenRecorder 14
42 #define _MSGID_taf_audio_RecordFile 15
43 #define _MSGID_taf_audio_AddMediaHandler 16
44 #define _MSGID_taf_audio_RemoveMediaHandler 17
45 #define _MSGID_taf_audio_AddDtmfDetectorHandler 18
46 #define _MSGID_taf_audio_RemoveDtmfDetectorHandler 19
47 #define _MSGID_taf_audio_Stop 20
48 #define _MSGID_taf_audio_SetGain 21
49 #define _MSGID_taf_audio_GetGain 22
50 #define _MSGID_taf_audio_EnableNoiseSuppressor 23
51 #define _MSGID_taf_audio_EnableEchoCanceller 24
52 #define _MSGID_taf_audio_DisableNoiseSuppressor 25
53 #define _MSGID_taf_audio_DisableEchoCanceller 26
54 #define _MSGID_taf_audio_IsEchoCancellerEnabled 27
55 #define _MSGID_taf_audio_IsNoiseSuppressorEnabled 28
56 #define _MSGID_taf_audio_OpenI2sRx 29
57 #define _MSGID_taf_audio_OpenI2sTx 30
58 #define _MSGID_taf_audio_OpenPcmRx 31
59 #define _MSGID_taf_audio_OpenPcmTx 32
60 #define _MSGID_taf_audio_SetSamplePcmSamplingRate 33
61 #define _MSGID_taf_audio_GetSamplePcmSamplingRate 34
62 #define _MSGID_taf_audio_SetSamplePcmChannelNumber 35
63 #define _MSGID_taf_audio_GetSamplePcmChannelNumber 36
64 #define _MSGID_taf_audio_SetEncodingFormat 37
65 #define _MSGID_taf_audio_GetEncodingFormat 38
66 
67 
68 // Define type-safe pack/unpack functions for all enums, including included types
69 
70 static inline bool taf_audio_PackMediaEvent
71 (
72  uint8_t **bufferPtr,
74 )
75 {
76  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
77 }
78 
79 static inline bool taf_audio_UnpackMediaEvent
80 (
81  uint8_t **bufferPtr,
82  taf_audio_MediaEvent_t* valuePtr
83 )
84 {
85  bool result;
86  uint32_t value = 0;
87  result = le_pack_UnpackUint32(bufferPtr, &value);
88  if (result)
89  {
90  *valuePtr = (taf_audio_MediaEvent_t)value;
91  }
92  return result;
93 }
94 
95 static inline bool taf_audio_PackFormat
96 (
97  uint8_t **bufferPtr,
98  taf_audio_Format_t value
99 )
100 {
101  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
102 }
103 
104 static inline bool taf_audio_UnpackFormat
105 (
106  uint8_t **bufferPtr,
107  taf_audio_Format_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_audio_Format_t)value;
116  }
117  return result;
118 }
119 
120 static inline bool taf_audio_PackAmrMode
121 (
122  uint8_t **bufferPtr,
123  taf_audio_AmrMode_t value
124 )
125 {
126  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
127 }
128 
129 static inline bool taf_audio_UnpackAmrMode
130 (
131  uint8_t **bufferPtr,
132  taf_audio_AmrMode_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_audio_AmrMode_t)value;
141  }
142  return result;
143 }
144 
145 static inline bool taf_audio_PackI2SChannel
146 (
147  uint8_t **bufferPtr,
149 )
150 {
151  return le_pack_PackUint32(bufferPtr, (uint32_t)value);
152 }
153 
154 static inline bool taf_audio_UnpackI2SChannel
155 (
156  uint8_t **bufferPtr,
157  taf_audio_I2SChannel_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_audio_I2SChannel_t)value;
166  }
167  return result;
168 }
169 
170 // Define pack/unpack functions for all structures, including included types
171 
172 
173 #endif // TAF_AUDIO_MESSAGES_H_INCLUDE_GUARD
static bool taf_audio_PackAmrMode(uint8_t **bufferPtr, taf_audio_AmrMode_t value)
Definition: taf_audio_messages.h:121
static bool taf_audio_PackFormat(uint8_t **bufferPtr, taf_audio_Format_t value)
Definition: taf_audio_messages.h:96
static bool taf_audio_UnpackFormat(uint8_t **bufferPtr, taf_audio_Format_t *valuePtr)
Definition: taf_audio_messages.h:105
static bool taf_audio_PackI2SChannel(uint8_t **bufferPtr, taf_audio_I2SChannel_t value)
Definition: taf_audio_messages.h:146
static bool taf_audio_UnpackAmrMode(uint8_t **bufferPtr, taf_audio_AmrMode_t *valuePtr)
Definition: taf_audio_messages.h:130
taf_audio_AmrMode_t
Definition: taf_audio_common.h:106
static bool taf_audio_UnpackI2SChannel(uint8_t **bufferPtr, taf_audio_I2SChannel_t *valuePtr)
Definition: taf_audio_messages.h:155
LE_DECLARE_INLINE bool le_pack_UnpackUint32(uint8_t **bufferPtr, uint32_t *valuePtr)
Definition: le_pack.h:1205
taf_audio_MediaEvent_t
Definition: taf_audio_common.h:54
taf_audio_Format_t
Definition: taf_audio_common.h:89
_Message_t
Definition: taf_audio_messages.h:25
taf_audio_I2SChannel_t
Definition: taf_audio_common.h:153
#define _MAX_MSG_SIZE
Definition: taf_audio_messages.h:17
static bool taf_audio_PackMediaEvent(uint8_t **bufferPtr, taf_audio_MediaEvent_t value)
Definition: taf_audio_messages.h:71
static bool taf_audio_UnpackMediaEvent(uint8_t **bufferPtr, taf_audio_MediaEvent_t *valuePtr)
Definition: taf_audio_messages.h:80
struct __attribute__((packed))
Definition: taf_audio_messages.h:20
LE_DECLARE_INLINE bool le_pack_PackUint32(uint8_t **bufferPtr, uint32_t value)
Definition: le_pack.h:205