le_atServer_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  * @page c_atServer AT Commands Server
14  *
15  * @ref le_atServer_interface.h "API Reference"
16  *
17  * The AT commands Server handles AT commands' subscriptions on a requested serial device. The
18  * server is compliant with 3GPP 27.007, paragraphs 4.0, 4.1 and 4.2, and V25 ter, paragraphs 5.3,
19  * 5.4.
20  *
21  * @section le_atServer_binding IPC interfaces binding
22  *
23  * All the functions of this API are provided by the @b atService.
24  *
25  * Here's a code sample binding to the AT commands server:
26  * @verbatim
27  bindings:
28  {
29  atServerTest.atServerTestComp.le_atServer -> atService.le_atServer
30  }
31  @endverbatim
32  *
33  * @section atServer_syntax AT command syntax
34  *
35  * @subsection atServer_Syntax Syntax rules
36  *
37  * To be interpreted, the command line sent to the AT commands server must start by the pattern
38  * "AT" (mean ATtention command).<br>
39  * Lowercase characters are changed to their uppercase equivalents. Only characters between quotes
40  * are not replaced.
41  *
42  * The supported command formats are:
43  * - Basic syntax command:
44  * - using the format AT<command>[<number>]<br>
45  * The command name is composed of one or several of those characters: A to Z, & and \\.
46  * - the syntax of S command is also supported, like:
47  * - ATS<parameter_number>?
48  * - ATS<parameter_number>=<value>
49  * - D command is supported. The characters which don't belong to the following list are
50  * ignore:
51  * - V.250 dialing digits: 0 1 2 3 4 5 6 7 8 9 * # + A B C D
52  * - V.250 modifier characters: , T P ! W @
53  * - V.250 semicolon character: ;
54  * - GSM/UMTS modifier characters:
55  * - I or i for CLIR supplementary service subscription
56  * (I=invocation, i=suppression)
57  * - G or g for CUG supplementary service subscription (G=invocation,
58  * g=suppression)
59  * - Direct dialing from phonebook: > (if follow by a string, it has to be put
60  * between quote)
61  * .
62  * @if 0 doxygen comment: The dot above ends the sub item, and must be kept @endif
63  * All characters after the "D" are considered part of The D command parameter up to a semicolon or
64  * the end of command line.
65  * <br>
66  * - Extended command format, with the following format:
67  * - action command with no parameters: AT+<name>
68  * - parameter command: AT+<name>=<value1>[,<value2>[,<value3>[...]]]<br>
69  * Values must be separated by a coma. Some values may be optional: in that case, optional
70  * value can be omitted in the AT command (e.g. AT+ABCD=,1).<br>
71  * A value is a string composed of one or several of the following characters: 0 to 9,
72  * A to F, H, z*, #, +, -. To set a value with other characters, the value has to be set
73  * between quote.
74  * - test command (determine the supported values): AT+<name>=?
75  * - read command (determine the current values, or stored values): AT+<name>?
76  *
77  * @note '+' AT command starting character shall be replaced by other symbol, not included into
78  * a to z, A to Z, & and \\.
79  *
80  * @subsection atServer_concate Concatenating commands
81  *
82  * Basic syntax command can be concatenated without a separator:<br>
83  * ATE1V1S95=47S0=0
84  *
85  * Additional commands (extended syntax command or basic syntax command) can be added after an
86  * extended syntax command with the insertion of a semicolon at the end of the command:<br>
87  * AT+CMDA=<param1>,<param2>;+CMDB?;+CMDC=?<br>
88  * AT+CMDA=<param1>,<param2>;E1V1
89  *
90  * Extended syntax command can be concatenated after basic syntax commands without a separator:<br>
91  * ATE1V1+CMD=<param1>
92  *
93  * @section atServer_binding Device Binding
94  *
95  * le_atServer_Start() must be called to bind the file descriptor of the device with the AT commands
96  * server. Note that a socket can also be bound.
97  * Multiple devices can be bound.
98  * A file descriptor can be unbound using le_atServer_Stop().
99  *
100  * The server can be suspended using le_atServer_Suspend() in order to use the
101  * opened fd for other purposes like starting a PPP service on the opened fd.
102  * For that a fd dup needs to be done before opening a server session.
103  * When needed, the server can be resumed using le_atServer_Resume(). Make sure
104  * to close the fd when the application exists or you may get too many open files error.
105  *
106  * used before opening a server session
107  * @section atServer_subscription Subscription
108  *
109  * A new AT command can be added into the parser using le_atServer_Create(), and it can be deleted
110  * using le_atServer_Delete().
111  * le_atServer_EnableEcho() allows the user to enable echo on a selected device.
112  * le_atServer_DisableEcho() allows the user to disable echo on a selected device.
113  *
114  * le_atServer_EnableExtendedErrorCodes() allows the user to use extended error
115  * codes on a selected device.
116  * le_atServer_DisableExtendedErrorCodes() allows the user to disable extended
117  * error codes on a selected device.
118  *
119  * @section atServer_handler Handler
120  *
121  * To handle the AT command, the application has to subscribe a handler using
122  * le_atServer_AddCommandHandler(). It can be removed with le_atServer_RemoveCommandHandler().<br>
123  * The called handler (le_atServer_CommandHandlerRef_t prototype) can use
124  * le_atServer_GetCommandName() to retrieve the received AT command string.<br>
125  * The device used to execute the AT command can be retrieve thanks to le_atServer_GetDevice().<br>
126  * It can also call le_atServer_GetParameter() to retrieve parameters of the AT command. This
127  * function gets the string sending through the AT command. If the parameter was sent between
128  * quotes, the quotes are removed. This API can be used for both formats:
129  * - In case of a basic format command, if exists, the parameter can be retrieved at the index 0.<br>
130  * For S command specific format (ATS<parameter_number>=<value>), the <parameter_number> is
131  * retrieved at the index 0, the <value> parameter at the index 1.
132  *
133  * - In case of an extended format command, parameters are retrieved thanks to their indexes,
134  * starting from 0. If the parameter is missed (e.g. "AT+CMD=,1"), the getting value is an empty
135  * string (i.e. '\0' with null length).
136  *
137  * The handler receives in argument the type of the AT command (of le_atServer_Type_t type).
138  * Even if these types are specific to the extended format commands according to the standards, they
139  * are also applicable here to basic format commands to detect commands with parameters, or read
140  * values (e.g. ATS<parameter_number>?).
141  *
142  * @section atServer_responses Responses
143  *
144  * @subsection intermediateRsp Intermediate response
145  *
146  * The application has can send intermediate responses through
147  * le_atServer_SendIntermediateResponse().
148  *
149  * @subsection finalRsp Final response
150  *
151  * In all cases, the application must send a final response using
152  * le_atServer_SendFinalResponse(). The corresponding device will be locked until the final response
153  * is sent.
154  *
155  * If no answer is sent, the device will not accept any new AT commands (an error will be
156  * returned).
157  *
158  * le_atServer_SendFinalResponse() has to inform of the result thanks to the argument of
159  * le_atServer_FinalRsp_t type. This argument permits to the AT command Server to:
160  * - create the result string if no custom string is provided
161  * - continue or stop the parsing of concatenated commands: if one command is failed, next commands
162  * are not executed, the final result of the concatenated AT command is the last error.
163  *
164  * @subsection unsolicitedRsp Unsolicited response
165  *
166  * The application can also send unsolicited responses to warn a host
167  * application using le_atServer_SendUnsolicitedResponse().
168  *
169  * This response is sent when no AT command is being processing on the device (i.e. unsolicited
170  * response is sent between the latest final response and the next reception of an AT command).<br>
171  * If an unsolicited response is sent when an AT command is in progress, the unsolicited response
172  * is buffered and sent as soon as the device becomes available (i.e., the processing AT command
173  * sends its final response).
174  *
175  * @section atServer_bridge Bridge
176  *
177  * A second file descriptor can be used thanks to le_atServer_OpenBridge() to send
178  * all unknown AT commands to an altervative device (such as the modem). For all devices linked to
179  * that bridge using le_atServer_AddDeviceToBridge(), unknown commands will be sent through that file
180  * descriptor.
181  *
182  * @image html atCommandsParserBridge.png
183  *
184  * @note AT commands server is opened on the file descriptor fd1 using le_atServer_Open() API.
185  * AT commands server is bridged on the file descriptor fd2 using le_atServer_OpenBridge() API.
186  *
187  * A device can be remove from a bridge thanks to le_atServer_RemoveDeviceFromBridge() API.
188  * A bridge can be closed using le_atServer_CloseBridge() API.
189  *
190  * @warning Some modem AT commands may conflict with Legato APIs; using both may cause problems that
191  * can be difficult to diagnose. The modem AT commands should be avoided whenever possible, and
192  * should only be used with great care.
193  *
194  * The application can send an unsolicited on all opened device, or only one on a dedicated deivce.
195  *
196  * <HR>
197  *
198  * Copyright (C) Sierra Wireless Inc.
199  */
200 /**
201  * @file le_atServer_interface.h
202  *
203  * Legato @ref c_atServer include file.
204  *
205  * Copyright (C) Sierra Wireless Inc.
206  */
207 
208 #ifndef LE_ATSERVER_INTERFACE_H_INCLUDE_GUARD
209 #define LE_ATSERVER_INTERFACE_H_INCLUDE_GUARD
210 
211 
212 #include "legato.h"
213 
214 // Interface specific includes
215 #include "le_atDefs_interface.h"
216 
217 
218 //--------------------------------------------------------------------------------------------------
219 /**
220  * Type for handler called when a server disconnects.
221  */
222 //--------------------------------------------------------------------------------------------------
223 typedef void (*le_atServer_DisconnectHandler_t)(void *);
224 
225 //--------------------------------------------------------------------------------------------------
226 /**
227  *
228  * Connect the current client thread to the service providing this API. Block until the service is
229  * available.
230  *
231  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
232  * called before any other functions in this API. Normally, ConnectService is automatically called
233  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
234  *
235  * This function is created automatically.
236  */
237 //--------------------------------------------------------------------------------------------------
239 (
240  void
241 );
242 
243 //--------------------------------------------------------------------------------------------------
244 /**
245  *
246  * Try to connect the current client thread to the service providing this API. Return with an error
247  * if the service is not available.
248  *
249  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
250  * called before any other functions in this API. Normally, ConnectService is automatically called
251  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
252  *
253  * This function is created automatically.
254  *
255  * @return
256  * - LE_OK if the client connected successfully to the service.
257  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
258  * bound.
259  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
260  * - LE_COMM_ERROR if the Service Directory cannot be reached.
261  */
262 //--------------------------------------------------------------------------------------------------
264 (
265  void
266 );
267 
268 //--------------------------------------------------------------------------------------------------
269 /**
270  * Set handler called when server disconnection is detected.
271  *
272  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
273  * to continue without exiting, it should call longjmp() from inside the handler.
274  */
275 //--------------------------------------------------------------------------------------------------
277 (
278  le_atServer_DisconnectHandler_t disconnectHandler,
279  void *contextPtr
280 );
281 
282 //--------------------------------------------------------------------------------------------------
283 /**
284  *
285  * Disconnect the current client thread from the service providing this API.
286  *
287  * Normally, this function doesn't need to be called. After this function is called, there's no
288  * longer a connection to the service, and the functions in this API can't be used. For details, see
289  * @ref apiFilesC_client.
290  *
291  * This function is created automatically.
292  */
293 //--------------------------------------------------------------------------------------------------
295 (
296  void
297 );
298 
299 
300 //--------------------------------------------------------------------------------------------------
301 /**
302  * Reference type for an AT command.
303  */
304 //--------------------------------------------------------------------------------------------------
305 typedef struct le_atServer_Cmd* le_atServer_CmdRef_t;
306 
307 
308 //--------------------------------------------------------------------------------------------------
309 /**
310  * Reference type for a AT command device.
311  */
312 //--------------------------------------------------------------------------------------------------
313 typedef struct le_atServer_Device* le_atServer_DeviceRef_t;
314 
315 
316 //--------------------------------------------------------------------------------------------------
317 /**
318  * Reference type for a AT commands server / AT commands client bridge.
319  */
320 //--------------------------------------------------------------------------------------------------
321 typedef struct le_atServer_Bridge* le_atServer_BridgeRef_t;
322 
323 
324 //--------------------------------------------------------------------------------------------------
325 /**
326  * Received AT command type.
327  *
328  */
329 //--------------------------------------------------------------------------------------------------
330 typedef enum
331 {
333  ///< Action AT command (e.g. 'AT+CMD')
335  ///< AT command received with parameters (e.g. 'AT+CMD=x,y')
337  ///< Test AT command (e.g. 'AT+CMD=?')
339  ///< Read AT command (e.g. 'AT+CMD?')
340 }
342 
343 
344 //--------------------------------------------------------------------------------------------------
345 /**
346  * Final response.
347  */
348 //--------------------------------------------------------------------------------------------------
349 typedef enum
350 {
352  ///< AT command successfully treated, "\r\nOK\r\n" is sent if no custom
353  ///< response is set
355  ///< error in AT command treatement, "\r\nERROR\r\n" is sent if no custom
356  ///< response is set
357 }
359 
360 
361 //--------------------------------------------------------------------------------------------------
362 /**
363  * Device availability.
364  */
365 //--------------------------------------------------------------------------------------------------
366 typedef enum
367 {
369  ///< action will be done on all bound devices
371  ///< action will be done on a specified device
372 }
374 
375 
376 //--------------------------------------------------------------------------------------------------
377 /**
378  * Reference type used by Add/Remove functions for EVENT 'le_atServer_Command'
379  */
380 //--------------------------------------------------------------------------------------------------
381 typedef struct le_atServer_CommandHandler* le_atServer_CommandHandlerRef_t;
382 
383 
384 //--------------------------------------------------------------------------------------------------
385 /**
386  * Handler for the AT command processing.
387  *
388  * @note The argument "parametersNumber" is set only when "type" parameter value is
389  * LE_AT_SERVER_TYPE_PARA
390  */
391 //--------------------------------------------------------------------------------------------------
392 typedef void (*le_atServer_CommandHandlerFunc_t)
393 (
394  le_atServer_CmdRef_t commandRef,
395  ///< Received AT command reference
396  le_atServer_Type_t type,
397  ///< Received AT command type
398  uint32_t parametersNumber,
399  ///< Parameters number
400  void* contextPtr
401  ///<
402 );
403 
404 //--------------------------------------------------------------------------------------------------
405 /**
406  * Suspend server / enter data mode
407  *
408  * When this function is called the server stops monitoring the fd for events
409  * hence no more I/O operations are done on the fd by the server.
410  *
411  * @return
412  * - LE_OK Success.
413  * - LE_BAD_PARAMETER Invalid device reference.
414  * - LE_FAULT Device not monitored
415  *
416  */
417 //--------------------------------------------------------------------------------------------------
419 (
421  ///< [IN] device to be suspended
422 );
423 
424 //--------------------------------------------------------------------------------------------------
425 /**
426  * Resume server / enter command mode
427  *
428  * When this function is called the server resumes monitoring the fd for events
429  * and is able to interpret AT commands again.
430  *
431  * @return
432  * - LE_OK Success.
433  * - LE_BAD_PARAMETER Invalid device reference.
434  * - LE_FAULT Device not monitored
435  *
436  */
437 //--------------------------------------------------------------------------------------------------
439 (
441  ///< [IN] device to be resumed
442 );
443 
444 //--------------------------------------------------------------------------------------------------
445 /**
446  * This function opens an AT server session on the requested device.
447  *
448  * @return
449  * - Reference to the requested device.
450  * - NULL if the device is not available or fd is a BAD FILE DESCRIPTOR.
451  *
452  * @note Make sure to duplicate (man dup) your file descriptor before opening
453  * a server session to be able to use the suspend/resume feature
454  *
455  */
456 //--------------------------------------------------------------------------------------------------
458 (
459  int fd
460  ///< [IN] File descriptor.
461 );
462 
463 //--------------------------------------------------------------------------------------------------
464 /**
465  * This function closes the AT server session on the requested device.
466  *
467  * @return
468  * - LE_OK The function succeeded.
469  * - LE_BAD_PARAMETER Invalid device reference.
470  * - LE_BUSY The requested device is busy.
471  * - LE_FAULT Failed to stop the server, check logs
472  * for more information.
473  */
474 //--------------------------------------------------------------------------------------------------
476 (
478  ///< [IN] device to be unbound
479 );
480 
481 //--------------------------------------------------------------------------------------------------
482 /**
483  * This function created an AT command and register it into the AT parser.
484  *
485  * @return
486  * - Reference to the AT command.
487  * - NULL if an error occurs.
488  */
489 //--------------------------------------------------------------------------------------------------
491 (
492  const char* LE_NONNULL name
493  ///< [IN] AT command name string
494 );
495 
496 //--------------------------------------------------------------------------------------------------
497 /**
498  * This function deletes an AT command (i.e. unregister from the AT parser).
499  *
500  * @return
501  * - LE_OK The function succeeded.
502  * - LE_FAULT The function failed to delete the command.
503  * - LE_BUSY Command is in progress.
504  *
505  */
506 //--------------------------------------------------------------------------------------------------
508 (
509  le_atServer_CmdRef_t commandRef
510  ///< [IN] AT command reference
511 );
512 
513 //--------------------------------------------------------------------------------------------------
514 /**
515  * Add handler function for EVENT 'le_atServer_Command'
516  *
517  * This event provides information when the AT command is detected.
518  *
519  */
520 //--------------------------------------------------------------------------------------------------
522 (
523  le_atServer_CmdRef_t commandRef,
524  ///< [IN] AT command reference
526  ///< [IN] Handler to called when the AT command is detected
527  void* contextPtr
528  ///< [IN]
529 );
530 
531 //--------------------------------------------------------------------------------------------------
532 /**
533  * Remove handler function for EVENT 'le_atServer_Command'
534  */
535 //--------------------------------------------------------------------------------------------------
537 (
539  ///< [IN]
540 );
541 
542 //--------------------------------------------------------------------------------------------------
543 /**
544  * This function can be used to get the parameters of a received AT command.
545  *
546  * @return
547  * - LE_OK The function succeeded.
548  * - LE_FAULT The function failed to get the requested parameter.
549  *
550  */
551 //--------------------------------------------------------------------------------------------------
553 (
554  le_atServer_CmdRef_t commandRef,
555  ///< [IN] AT command reference
556  uint32_t index,
557  ///< [IN] agument index
558  char* parameter,
559  ///< [OUT] parameter value
560  size_t parameterSize
561  ///< [IN]
562 );
563 
564 //--------------------------------------------------------------------------------------------------
565 /**
566  * This function can be used to get the AT command string.
567  *
568  * @return
569  * - LE_OK The function succeeded.
570  * - LE_FAULT The function failed to get the AT command string.
571  *
572  */
573 //--------------------------------------------------------------------------------------------------
575 (
576  le_atServer_CmdRef_t commandRef,
577  ///< [IN] AT command reference
578  char* name,
579  ///< [OUT] AT command string
580  size_t nameSize
581  ///< [IN]
582 );
583 
584 //--------------------------------------------------------------------------------------------------
585 /**
586  * This function can be used to get the device reference in use for an AT command specified with
587  * its reference.
588  *
589  * @return
590  * - LE_OK The function succeeded.
591  * - LE_FAULT The function failed to get the AT command string.
592  *
593  */
594 //--------------------------------------------------------------------------------------------------
596 (
597  le_atServer_CmdRef_t commandRef,
598  ///< [IN] AT command reference
599  le_atServer_DeviceRef_t* deviceRefPtr
600  ///< [OUT] Device reference
601 );
602 
603 //--------------------------------------------------------------------------------------------------
604 /**
605  * This function can be used to send an intermediate response.
606  *
607  * @return
608  * - LE_OK The function succeeded.
609  * - LE_FAULT The function failed to send the intermediate response.
610  *
611  */
612 //--------------------------------------------------------------------------------------------------
614 (
615  le_atServer_CmdRef_t commandRef,
616  ///< [IN] AT command reference
617  const char* LE_NONNULL intermediateRsp
618  ///< [IN] Intermediate response to be
619  ///< sent
620 );
621 
622 //--------------------------------------------------------------------------------------------------
623 /**
624  * This function can be used to send the final response.
625  *
626  * @return
627  * - LE_OK The function succeeded.
628  * - LE_FAULT The function failed to send the final response.
629  *
630  */
631 //--------------------------------------------------------------------------------------------------
633 (
634  le_atServer_CmdRef_t commandRef,
635  ///< [IN] AT command reference
636  le_atServer_FinalRsp_t finalResponse,
637  ///< [IN] Final response to be sent
638  bool customStringAvailable,
639  ///< [IN] Custom final response has to be sent
640  ///< instead of the default one.
641  const char* LE_NONNULL finalRsp
642  ///< [IN] custom final response string
643 );
644 
645 //--------------------------------------------------------------------------------------------------
646 /**
647  * This function can be used to send the unsolicited response.
648  *
649  * @return
650  * - LE_OK The function succeeded.
651  * - LE_FAULT The function failed to send the unsolicited response.
652  *
653  */
654 //--------------------------------------------------------------------------------------------------
656 (
657  const char* LE_NONNULL unsolRsp,
658  ///< [IN] Unsolicited response to be
659  ///< sent
660  le_atServer_AvailableDevice_t availableDevice,
661  ///< [IN] device to send the
662  ///< unsolicited response
664  ///< [IN] device reference where the
665  ///< unsolicited response has to
666  ///< be sent
667 );
668 
669 //--------------------------------------------------------------------------------------------------
670 /**
671  * This function enables echo on the selected device.
672  *
673  * @return
674  * - LE_OK The function succeeded.
675  * - LE_BAD_PARAMETER Invalid device reference.
676  */
677 //--------------------------------------------------------------------------------------------------
679 (
681  ///< [IN] device reference
682 );
683 
684 //--------------------------------------------------------------------------------------------------
685 /**
686  * This function disables echo on the selected device.
687  *
688  * @return
689  * - LE_OK The function succeeded.
690  * - LE_BAD_PARAMETER Invalid device reference.
691  */
692 //--------------------------------------------------------------------------------------------------
694 (
696  ///< [IN] device reference
697 );
698 
699 //--------------------------------------------------------------------------------------------------
700 /**
701  * This function opens a AT commands server bridge.
702  * All unknown AT commands will be sent on this alternative file descriptor thanks to the AT client
703  * Service.
704  *
705  * @return
706  * - Reference to the requested bridge.
707  * - NULL if the device can't be bridged
708  */
709 //--------------------------------------------------------------------------------------------------
711 (
712  int fd
713  ///< [IN] File descriptor.
714 );
715 
716 //--------------------------------------------------------------------------------------------------
717 /**
718  * This function closes an opened bridge.
719  *
720  * @return
721  * - LE_OK The function succeeded.
722  * - LE_FAULT The function failed to close the bridge.
723  * - LE_BUSY The bridge is in use (devices references have to be removed first).
724  */
725 //--------------------------------------------------------------------------------------------------
727 (
728  le_atServer_BridgeRef_t bridgeRef
729  ///< [IN] Bridge reference
730 );
731 
732 //--------------------------------------------------------------------------------------------------
733 /**
734  * This function adds a device to an opened bridge.
735  *
736  * @return
737  * - LE_OK The function succeeded.
738  * - LE_BUSY The device is already used by the bridge.
739  * - LE_FAULT The function failed to add the device to the bridge.
740  */
741 //--------------------------------------------------------------------------------------------------
743 (
744  le_atServer_DeviceRef_t deviceRef,
745  ///< [IN] Device reference to add to the bridge
746  le_atServer_BridgeRef_t bridgeRef
747  ///< [IN] Bridge refence
748 );
749 
750 //--------------------------------------------------------------------------------------------------
751 /**
752  * This function removes a device from a bridge
753  *
754  * @return
755  * - LE_OK The function succeeded.
756  * - LE_NOT_FOUND The device is not isued by the specified bridge
757  * - LE_BUSY The device is currently in use
758  * - LE_FAULT The function failed to add the device to the bridge.
759  */
760 //--------------------------------------------------------------------------------------------------
762 (
763  le_atServer_DeviceRef_t deviceRef,
764  ///< [IN] Device reference to add to the bridge
765  le_atServer_BridgeRef_t bridgeRef
766  ///< [IN] Bridge refence
767 );
768 
769 //--------------------------------------------------------------------------------------------------
770 /**
771  * This function enables extended error codes on the selected device.
772  */
773 //--------------------------------------------------------------------------------------------------
775 (
776  void
777 );
778 
779 //--------------------------------------------------------------------------------------------------
780 /**
781  * This function disables extended error codes on the selected device.
782  */
783 //--------------------------------------------------------------------------------------------------
785 (
786  void
787 );
788 
789 #endif // LE_ATSERVER_INTERFACE_H_INCLUDE_GUARD
void le_atServer_SetServerDisconnectHandler(le_atServer_DisconnectHandler_t disconnectHandler, void *contextPtr)
le_result_t le_atServer_AddDeviceToBridge(le_atServer_DeviceRef_t deviceRef, le_atServer_BridgeRef_t bridgeRef)
Definition: le_atServer_interface.h:351
void le_atServer_DisableExtendedErrorCodes(void)
le_result_t
Definition: le_basics.h:35
le_atServer_CmdRef_t le_atServer_Create(const char *LE_NONNULL name)
action will be done on all bound devices
Definition: le_atServer_interface.h:368
Action AT command (e.g. &#39;AT+CMD&#39;)
Definition: le_atServer_interface.h:332
le_atServer_BridgeRef_t le_atServer_OpenBridge(int fd)
le_result_t le_atServer_SendUnsolicitedResponse(const char *LE_NONNULL unsolRsp, le_atServer_AvailableDevice_t availableDevice, le_atServer_DeviceRef_t device)
le_result_t le_atServer_CloseBridge(le_atServer_BridgeRef_t bridgeRef)
struct le_atServer_Device * le_atServer_DeviceRef_t
Definition: le_atServer_interface.h:313
action will be done on a specified device
Definition: le_atServer_interface.h:370
le_atServer_DeviceRef_t le_atServer_Open(int fd)
le_result_t le_atServer_GetCommandName(le_atServer_CmdRef_t commandRef, char *name, size_t nameSize)
void(* le_atServer_DisconnectHandler_t)(void *)
Definition: le_atServer_interface.h:223
void le_atServer_EnableExtendedErrorCodes(void)
le_result_t le_atServer_Close(le_atServer_DeviceRef_t device)
le_result_t le_atServer_Delete(le_atServer_CmdRef_t commandRef)
le_atServer_FinalRsp_t
Definition: le_atServer_interface.h:349
void(* le_atServer_CommandHandlerFunc_t)(le_atServer_CmdRef_t commandRef, le_atServer_Type_t type, uint32_t parametersNumber, void *contextPtr)
Definition: le_atServer_interface.h:393
le_atServer_Type_t
Definition: le_atServer_interface.h:330
le_atServer_CommandHandlerRef_t le_atServer_AddCommandHandler(le_atServer_CmdRef_t commandRef, le_atServer_CommandHandlerFunc_t handlerPtr, void *contextPtr)
void le_atServer_DisconnectService(void)
le_result_t le_atServer_RemoveDeviceFromBridge(le_atServer_DeviceRef_t deviceRef, le_atServer_BridgeRef_t bridgeRef)
le_result_t le_atServer_DisableEcho(le_atServer_DeviceRef_t device)
AT command received with parameters (e.g. &#39;AT+CMD=x,y&#39;)
Definition: le_atServer_interface.h:334
le_result_t le_atServer_EnableEcho(le_atServer_DeviceRef_t device)
void le_atServer_ConnectService(void)
Test AT command (e.g. &#39;AT+CMD=?&#39;)
Definition: le_atServer_interface.h:336
le_atServer_AvailableDevice_t
Definition: le_atServer_interface.h:366
le_result_t le_atServer_SendIntermediateResponse(le_atServer_CmdRef_t commandRef, const char *LE_NONNULL intermediateRsp)
le_result_t le_atServer_SendFinalResponse(le_atServer_CmdRef_t commandRef, le_atServer_FinalRsp_t finalResponse, bool customStringAvailable, const char *LE_NONNULL finalRsp)
le_result_t le_atServer_GetParameter(le_atServer_CmdRef_t commandRef, uint32_t index, char *parameter, size_t parameterSize)
struct le_atServer_CommandHandler * le_atServer_CommandHandlerRef_t
Definition: le_atServer_interface.h:381
Definition: le_atServer_interface.h:354
le_result_t le_atServer_TryConnectService(void)
void le_atServer_RemoveCommandHandler(le_atServer_CommandHandlerRef_t handlerRef)
le_result_t le_atServer_GetDevice(le_atServer_CmdRef_t commandRef, le_atServer_DeviceRef_t *deviceRefPtr)
le_result_t le_atServer_Suspend(le_atServer_DeviceRef_t device)
struct le_atServer_Cmd * le_atServer_CmdRef_t
Definition: le_atServer_interface.h:305
le_result_t le_atServer_Resume(le_atServer_DeviceRef_t device)
struct le_atServer_Bridge * le_atServer_BridgeRef_t
Definition: le_atServer_interface.h:321
Read AT command (e.g. &#39;AT+CMD?&#39;)
Definition: le_atServer_interface.h:338