le_atServer_interface.h
Go to the documentation of this file.
15 * @warning Some AT commands may conflict with Legato APIs; using both may cause problems that can be16 * difficult to diagnose. AT commands should be avoided whenever possible, and should only be used19 * The AT Commands Server handles AT commands' subscriptions on a requested serial device. The server30 * A new AT command can be added into the parser using le_atServer_Create(), and it can be deleted48 * le_atServer_SendFinalResponse(). The AT device will be locked until the final response is sent.57 * is buffered and sent as soon as the AT device becomes available (i.e., the processing AT command82 //--------------------------------------------------------------------------------------------------85 * Connect the current client thread to the service providing this API. Block until the service is89 * called before any other functions in this API. Normally, ConnectService is automatically called94 //--------------------------------------------------------------------------------------------------100 //--------------------------------------------------------------------------------------------------103 * Try to connect the current client thread to the service providing this API. Return with an error106 * For each thread that wants to use this API, either ConnectService or TryConnectService must be107 * called before any other functions in this API. Normally, ConnectService is automatically called114 * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.115 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).118 //--------------------------------------------------------------------------------------------------124 //--------------------------------------------------------------------------------------------------130 * longer a connection to the service, and the functions in this API can't be used. For details, see135 //--------------------------------------------------------------------------------------------------142 //--------------------------------------------------------------------------------------------------146 //--------------------------------------------------------------------------------------------------150 //--------------------------------------------------------------------------------------------------154 //--------------------------------------------------------------------------------------------------158 //--------------------------------------------------------------------------------------------------162 //--------------------------------------------------------------------------------------------------166 //--------------------------------------------------------------------------------------------------171 //--------------------------------------------------------------------------------------------------175 //--------------------------------------------------------------------------------------------------179 //--------------------------------------------------------------------------------------------------183 //--------------------------------------------------------------------------------------------------188 //--------------------------------------------------------------------------------------------------192 //--------------------------------------------------------------------------------------------------196 //--------------------------------------------------------------------------------------------------200 //--------------------------------------------------------------------------------------------------205 //--------------------------------------------------------------------------------------------------209 //--------------------------------------------------------------------------------------------------213 //--------------------------------------------------------------------------------------------------217 //--------------------------------------------------------------------------------------------------222 //--------------------------------------------------------------------------------------------------226 //--------------------------------------------------------------------------------------------------230 //--------------------------------------------------------------------------------------------------248 //--------------------------------------------------------------------------------------------------252 //--------------------------------------------------------------------------------------------------266 //--------------------------------------------------------------------------------------------------270 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------286 //--------------------------------------------------------------------------------------------------290 //--------------------------------------------------------------------------------------------------305 //--------------------------------------------------------------------------------------------------307 (314 //--------------------------------------------------------------------------------------------------322 //--------------------------------------------------------------------------------------------------329 //--------------------------------------------------------------------------------------------------337 //--------------------------------------------------------------------------------------------------344 //--------------------------------------------------------------------------------------------------352 //--------------------------------------------------------------------------------------------------359 //--------------------------------------------------------------------------------------------------367 //--------------------------------------------------------------------------------------------------374 //--------------------------------------------------------------------------------------------------385 //--------------------------------------------------------------------------------------------------398 //--------------------------------------------------------------------------------------------------404 //--------------------------------------------------------------------------------------------------417 //--------------------------------------------------------------------------------------------------421 //--------------------------------------------------------------------------------------------------428 //--------------------------------------------------------------------------------------------------437 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------462 //--------------------------------------------------------------------------------------------------475 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------520 //--------------------------------------------------------------------------------------------------529 //--------------------------------------------------------------------------------------------------Definition: le_atServer_interface.h:255le_result_t le_atServer_Stop(le_atServer_DeviceRef_t device)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:307le_result_t le_atServer_SendIntermediateResponse(le_atServer_CmdRef_t commandRef, const char *intermediateRsp)action will be done on all bound devicesDefinition: le_atServer_interface.h:273Action AT command (e.g. 'AT+CMD')Definition: le_atServer_interface.h:233struct le_atServer_Device * le_atServer_DeviceRef_tDefinition: le_atServer_interface.h:155action will be done on a specified deviceDefinition: le_atServer_interface.h:276void le_atServer_RemoveCommandHandler(le_atServer_CommandHandlerRef_t addHandlerRef)le_result_t le_atServer_SendFinalResponse(le_atServer_CmdRef_t commandRef, le_atServer_FinalRsp_t final, bool customStringAvailable, const char *finalRsp)le_result_t le_atServer_Delete(le_atServer_CmdRef_t commandRef)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_atServer_DeviceRef_t le_atServer_Start(const char *devicePath)AT command received with parameters (e.g. 'AT+CMD=x,y')Definition: le_atServer_interface.h:236le_result_t le_atServer_SendUnsolicitedResponse(const char *unsolRsp, le_atServer_AvailableDevice_t availableDevice, le_atServer_DeviceRef_t device)void le_atServer_ConnectService(void)Test AT command (e.g. 'AT+CMD=?')Definition: le_atServer_interface.h:239struct le_atServer_CommandHandler * le_atServer_CommandHandlerRef_tDefinition: le_atServer_interface.h:287Definition: le_atServer_interface.h:259le_atServer_CmdRef_t le_atServer_Create(const char *name)le_result_t le_atServer_TryConnectService(void)le_result_t le_atServer_SetDevice(le_atServer_CmdRef_t commandRef, le_atServer_AvailableDevice_t availableDevice, le_atServer_DeviceRef_t device)le_result_t le_atServer_GetCommandName(le_atServer_CmdRef_t commandRef, char *name, size_t nameNumElements)struct le_atServer_Cmd * le_atServer_CmdRef_tDefinition: le_atServer_interface.h:147le_result_t le_atServer_GetParameter(le_atServer_CmdRef_t commandRef, uint32_t index, char *parameter, size_t parameterNumElements)Read AT command (e.g. 'AT+CMD?')Definition: le_atServer_interface.h:242