le_atClient_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 used33 * An AT command statement is requested before sending it. The following steps have to be done for53 * le_atClient_SetFinalResponse() are the first characters of the response lines. They are used as a58 * '>' character to receive additional information. The given text is sent to the modem when '>' is64 * When the AT command declaration is complete, it can be sent using le_atClient_Send(). This API is67 * le_atClient_SetCommandAndSend() is equivalent to le_atClient_Start(), le_atClient_SetCommand(),77 * - le_atClient_GetFirstIntermediateResponse() is used to get the first intermediate result code.82 * When a response has been set in the AT command declaration, the AT command response returned by93 * le_atClient_RemoveUnsolicitedResponseHandler(). The subscribed handler is called when the given94 * pattern is detected. The handler receives a parameter with the complete line of the unsolicited116 //--------------------------------------------------------------------------------------------------119 * Connect the current client thread to the service providing this API. Block until the service is122 * For each thread that wants to use this API, either ConnectService or TryConnectService must be123 * called before any other functions in this API. Normally, ConnectService is automatically called128 //--------------------------------------------------------------------------------------------------134 //--------------------------------------------------------------------------------------------------137 * Try to connect the current client thread to the service providing this API. Return with an error140 * For each thread that wants to use this API, either ConnectService or TryConnectService must be141 * called before any other functions in this API. Normally, ConnectService is automatically called148 * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.149 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).152 //--------------------------------------------------------------------------------------------------158 //--------------------------------------------------------------------------------------------------164 * longer a connection to the service, and the functions in this API can't be used. For details, see169 //--------------------------------------------------------------------------------------------------176 //--------------------------------------------------------------------------------------------------184 //--------------------------------------------------------------------------------------------------188 //--------------------------------------------------------------------------------------------------190 //--------------------------------------------------------------------------------------------------194 //--------------------------------------------------------------------------------------------------198 //--------------------------------------------------------------------------------------------------202 //--------------------------------------------------------------------------------------------------206 //--------------------------------------------------------------------------------------------------210 //--------------------------------------------------------------------------------------------------214 //--------------------------------------------------------------------------------------------------218 //--------------------------------------------------------------------------------------------------222 //--------------------------------------------------------------------------------------------------226 //--------------------------------------------------------------------------------------------------230 //--------------------------------------------------------------------------------------------------234 //--------------------------------------------------------------------------------------------------238 //--------------------------------------------------------------------------------------------------242 //--------------------------------------------------------------------------------------------------246 //--------------------------------------------------------------------------------------------------250 //--------------------------------------------------------------------------------------------------254 //--------------------------------------------------------------------------------------------------258 //--------------------------------------------------------------------------------------------------262 //--------------------------------------------------------------------------------------------------266 //--------------------------------------------------------------------------------------------------270 //--------------------------------------------------------------------------------------------------274 //--------------------------------------------------------------------------------------------------278 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------286 //--------------------------------------------------------------------------------------------------287 typedef struct le_atClient_UnsolicitedResponseHandler* le_atClient_UnsolicitedResponseHandlerRef_t;290 //--------------------------------------------------------------------------------------------------299 //--------------------------------------------------------------------------------------------------301 (306 //--------------------------------------------------------------------------------------------------312 //--------------------------------------------------------------------------------------------------319 //--------------------------------------------------------------------------------------------------324 //--------------------------------------------------------------------------------------------------331 //--------------------------------------------------------------------------------------------------337 //--------------------------------------------------------------------------------------------------343 //--------------------------------------------------------------------------------------------------352 //--------------------------------------------------------------------------------------------------359 //--------------------------------------------------------------------------------------------------368 //--------------------------------------------------------------------------------------------------378 //--------------------------------------------------------------------------------------------------389 //--------------------------------------------------------------------------------------------------399 //--------------------------------------------------------------------------------------------------402 * Several final responses can be specified separated by a '|' character into the string given in410 //--------------------------------------------------------------------------------------------------420 //--------------------------------------------------------------------------------------------------429 //--------------------------------------------------------------------------------------------------439 //--------------------------------------------------------------------------------------------------448 //--------------------------------------------------------------------------------------------------458 //--------------------------------------------------------------------------------------------------466 //--------------------------------------------------------------------------------------------------476 //--------------------------------------------------------------------------------------------------486 //--------------------------------------------------------------------------------------------------493 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------515 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------547 //--------------------------------------------------------------------------------------------------560 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------594 //--------------------------------------------------------------------------------------------------601 //--------------------------------------------------------------------------------------------------622 //--------------------------------------------------------------------------------------------------626 //--------------------------------------------------------------------------------------------------le_atClient_DeviceRef_t le_atClient_Start(const char *devicePath)struct le_atClient_UnsolicitedResponseHandler * le_atClient_UnsolicitedResponseHandlerRef_tDefinition: le_atClient_interface.h:287le_result_t le_atClient_SetIntermediateResponse(le_atClient_CmdRef_t cmdRef, const char *intermediate)le_result_t le_atClient_SetCommand(le_atClient_CmdRef_t cmdRef, const char *command)le_result_t le_atClient_SetText(le_atClient_CmdRef_t cmdRef, const char *text)le_result_t le_atClient_SetCommandAndSend(le_atClient_CmdRef_t *cmdRefPtr, le_atClient_DeviceRef_t devRef, const char *command, const char *interResp, const char *finalResp, uint32_t timeout)le_atClient_CmdRef_t le_atClient_Create(void)le_result_t le_atClient_Delete(le_atClient_CmdRef_t cmdRef)le_atClient_UnsolicitedResponseHandlerRef_t le_atClient_AddUnsolicitedResponseHandler(const char *unsolRsp, le_atClient_DeviceRef_t devRef, le_atClient_UnsolicitedResponseHandlerFunc_t handlerPtr, void *contextPtr, uint32_t lineCount)le_result_t le_atClient_Stop(le_atClient_DeviceRef_t device)void(* le_atClient_UnsolicitedResponseHandlerFunc_t)(const char *unsolicitedRsp, void *contextPtr)Definition: le_atClient_interface.h:301le_result_t le_atClient_Send(le_atClient_CmdRef_t cmdRef)le_result_t le_atClient_GetFirstIntermediateResponse(le_atClient_CmdRef_t cmdRef, char *intermediateRsp, size_t intermediateRspNumElements)le_result_t le_atClient_GetFinalResponse(le_atClient_CmdRef_t cmdRef, char *finalRsp, size_t finalRspNumElements)le_result_t le_atClient_SetTimeout(le_atClient_CmdRef_t cmdRef, uint32_t timer)void le_atClient_DisconnectService(void)le_result_t le_atClient_SetFinalResponse(le_atClient_CmdRef_t cmdRef, const char *response)void le_atClient_RemoveUnsolicitedResponseHandler(le_atClient_UnsolicitedResponseHandlerRef_t addHandlerRef)void le_atClient_ConnectService(void)le_result_t le_atClient_GetNextIntermediateResponse(le_atClient_CmdRef_t cmdRef, char *intermediateRsp, size_t intermediateRspNumElements)le_result_t le_atClient_TryConnectService(void)le_result_t le_atClient_SetDevice(le_atClient_CmdRef_t cmdRef, le_atClient_DeviceRef_t devRef)