le_atDefs_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @file le_atDefs_interface.h
14  *
15  * Definition file common to multiple AT commands related services.
16  *
17  * Copyright (C) Sierra Wireless Inc.
18  */
19 
20 #ifndef LE_ATDEFS_INTERFACE_H_INCLUDE_GUARD
21 #define LE_ATDEFS_INTERFACE_H_INCLUDE_GUARD
22 
23 
24 #include "legato.h"
25 
26 
27 //--------------------------------------------------------------------------------------------------
28 /**
29  * Type for handler called when a server disconnects.
30  */
31 //--------------------------------------------------------------------------------------------------
32 typedef void (*le_atDefs_DisconnectHandler_t)(void *);
33 
34 //--------------------------------------------------------------------------------------------------
35 /**
36  *
37  * Connect the current client thread to the service providing this API. Block until the service is
38  * available.
39  *
40  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
41  * called before any other functions in this API. Normally, ConnectService is automatically called
42  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
43  *
44  * This function is created automatically.
45  */
46 //--------------------------------------------------------------------------------------------------
48 (
49  void
50 );
51 
52 //--------------------------------------------------------------------------------------------------
53 /**
54  *
55  * Try to connect the current client thread to the service providing this API. Return with an error
56  * if the service is not available.
57  *
58  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
59  * called before any other functions in this API. Normally, ConnectService is automatically called
60  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
61  *
62  * This function is created automatically.
63  *
64  * @return
65  * - LE_OK if the client connected successfully to the service.
66  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
67  * bound.
68  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
69  * - LE_COMM_ERROR if the Service Directory cannot be reached.
70  */
71 //--------------------------------------------------------------------------------------------------
73 (
74  void
75 );
76 
77 //--------------------------------------------------------------------------------------------------
78 /**
79  * Set handler called when server disconnection is detected.
80  *
81  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
82  * to continue without exiting, it should call longjmp() from inside the handler.
83  */
84 //--------------------------------------------------------------------------------------------------
86 (
87  le_atDefs_DisconnectHandler_t disconnectHandler,
88  void *contextPtr
89 );
90 
91 //--------------------------------------------------------------------------------------------------
92 /**
93  *
94  * Disconnect the current client thread from the service providing this API.
95  *
96  * Normally, this function doesn't need to be called. After this function is called, there's no
97  * longer a connection to the service, and the functions in this API can't be used. For details, see
98  * @ref apiFilesC_client.
99  *
100  * This function is created automatically.
101  */
102 //--------------------------------------------------------------------------------------------------
104 (
105  void
106 );
107 
108 
109 //--------------------------------------------------------------------------------------------------
110 /**
111  * Command string maximum length.
112  *
113  * @warning Special characters cost more than one byte
114  *
115  */
116 //--------------------------------------------------------------------------------------------------
117 #define LE_ATDEFS_COMMAND_MAX_LEN 511
118 
119 //--------------------------------------------------------------------------------------------------
120 /**
121  * Command string maximum length.
122  * One extra byte is added for the null character.
123  */
124 //--------------------------------------------------------------------------------------------------
125 #define LE_ATDEFS_COMMAND_MAX_BYTES 512
126 
127 //--------------------------------------------------------------------------------------------------
128 /**
129  * Parameter string maximum length.
130  *
131  * @warning Special characters cost more than one byte
132  *
133  */
134 //--------------------------------------------------------------------------------------------------
135 #define LE_ATDEFS_PARAMETER_MAX_LEN 127
136 
137 //--------------------------------------------------------------------------------------------------
138 /**
139  * Parameter string maximum length.
140  * One extra byte is added for the null character.
141  */
142 //--------------------------------------------------------------------------------------------------
143 #define LE_ATDEFS_PARAMETER_MAX_BYTES 128
144 
145 //--------------------------------------------------------------------------------------------------
146 /**
147  * AT command response maximum length.
148  *
149  * @warning Special characters cost more than one byte
150  *
151  */
152 //--------------------------------------------------------------------------------------------------
153 #define LE_ATDEFS_RESPONSE_MAX_LEN 352
154 
155 //--------------------------------------------------------------------------------------------------
156 /**
157  * AT command response maximum length.
158  * One extra byte is added for the null character.
159  */
160 //--------------------------------------------------------------------------------------------------
161 #define LE_ATDEFS_RESPONSE_MAX_BYTES 353
162 
163 //--------------------------------------------------------------------------------------------------
164 /**
165  * Maximum number of bytes in an unsolicited response (not including the null-terminator).
166  *
167  * @warning Special characters cost more than one byte
168  *
169  */
170 //--------------------------------------------------------------------------------------------------
171 #define LE_ATDEFS_UNSOLICITED_MAX_LEN 256
172 
173 //--------------------------------------------------------------------------------------------------
174 /**
175  * Maximum number of bytes in an unsolicited response (including the null-terminator).
176  */
177 //--------------------------------------------------------------------------------------------------
178 #define LE_ATDEFS_UNSOLICITED_MAX_BYTES 257
179 
180 //--------------------------------------------------------------------------------------------------
181 /**
182  * Maximum number of bytes in a text message (not including the null-terminator).
183  *
184  * @warning Special characters cost more than one byte
185  *
186  */
187 //--------------------------------------------------------------------------------------------------
188 #define LE_ATDEFS_TEXT_MAX_LEN 256
189 
190 //--------------------------------------------------------------------------------------------------
191 /**
192  * Maximum number of bytes in an text message (including the null-terminator).
193  */
194 //--------------------------------------------------------------------------------------------------
195 #define LE_ATDEFS_TEXT_MAX_BYTES 257
196 
197 //--------------------------------------------------------------------------------------------------
198 /**
199  * Command default timeout (in ms)
200  */
201 //--------------------------------------------------------------------------------------------------
202 #define LE_ATDEFS_COMMAND_DEFAULT_TIMEOUT 30000
203 
204 #endif // LE_ATDEFS_INTERFACE_H_INCLUDE_GUARD
le_result_t
Definition: le_basics.h:35
void le_atDefs_DisconnectService(void)
le_result_t le_atDefs_TryConnectService(void)
void le_atDefs_ConnectService(void)
void(* le_atDefs_DisconnectHandler_t)(void *)
Definition: le_atDefs_interface.h:32
void le_atDefs_SetServerDisconnectHandler(le_atDefs_DisconnectHandler_t disconnectHandler, void *contextPtr)