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 can33 * 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_Create(), le_atClient_SetCommand(),80 * - le_atClient_GetFirstIntermediateResponse() is used to get the first intermediate result code.82 * le_atClient_GetNextIntermediateResponse().Returns LE_NOT_FOUND when there are no further results.84 * When a response has been set in the AT command declaration, the AT command response returned by95 * le_atClient_RemoveUnsolicitedResponseHandler(). The subscribed handler is called when the given96 * pattern is detected. The handler receives a parameter with the complete line of the unsolicited129 //--------------------------------------------------------------------------------------------------132 * Connect the current client thread to the service providing this API. Block until the service is135 * For each thread that wants to use this API, either ConnectService or TryConnectService must be136 * called before any other functions in this API. Normally, ConnectService is automatically called141 //--------------------------------------------------------------------------------------------------147 //--------------------------------------------------------------------------------------------------150 * Try to connect the current client thread to the service providing this API. Return with an error153 * For each thread that wants to use this API, either ConnectService or TryConnectService must be154 * called before any other functions in this API. Normally, ConnectService is automatically called161 * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.162 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).165 //--------------------------------------------------------------------------------------------------171 //--------------------------------------------------------------------------------------------------177 * longer a connection to the service, and the functions in this API can't be used. For details, see182 //--------------------------------------------------------------------------------------------------189 //--------------------------------------------------------------------------------------------------191 //--------------------------------------------------------------------------------------------------195 //--------------------------------------------------------------------------------------------------197 //--------------------------------------------------------------------------------------------------201 //--------------------------------------------------------------------------------------------------205 //--------------------------------------------------------------------------------------------------206 typedef struct le_atClient_UnsolicitedResponseHandler* le_atClient_UnsolicitedResponseHandlerRef_t;209 //--------------------------------------------------------------------------------------------------218 //--------------------------------------------------------------------------------------------------220 (225 //--------------------------------------------------------------------------------------------------231 //--------------------------------------------------------------------------------------------------238 //--------------------------------------------------------------------------------------------------246 //--------------------------------------------------------------------------------------------------253 //--------------------------------------------------------------------------------------------------259 //--------------------------------------------------------------------------------------------------265 //--------------------------------------------------------------------------------------------------275 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------292 //--------------------------------------------------------------------------------------------------302 //--------------------------------------------------------------------------------------------------315 //--------------------------------------------------------------------------------------------------325 //--------------------------------------------------------------------------------------------------328 * Several final responses can be specified separated by a '|' character into the string given in338 //--------------------------------------------------------------------------------------------------348 //--------------------------------------------------------------------------------------------------359 //--------------------------------------------------------------------------------------------------369 //--------------------------------------------------------------------------------------------------379 //--------------------------------------------------------------------------------------------------389 //--------------------------------------------------------------------------------------------------400 //--------------------------------------------------------------------------------------------------410 //--------------------------------------------------------------------------------------------------422 //--------------------------------------------------------------------------------------------------429 //--------------------------------------------------------------------------------------------------440 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------464 //--------------------------------------------------------------------------------------------------478 //--------------------------------------------------------------------------------------------------489 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------521 //--------------------------------------------------------------------------------------------------543 //--------------------------------------------------------------------------------------------------550 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------574 //--------------------------------------------------------------------------------------------------struct le_atClient_UnsolicitedResponseHandler * le_atClient_UnsolicitedResponseHandlerRef_tDefinition: le_atClient_interface.h:206le_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_atClient_DeviceRef_t le_atClient_Start(int fd)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:220le_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)