le_atClient_interface.h
Go to the documentation of this file.
17 * @warning Some AT commands may conflict with Legato APIs; using both may cause problems that can40 * le_atClient_Start() must be called to bind a specific device with the ATClient, the user app must52 * An AT command statement is requested before sending it. The following steps have to be done for72 * le_atClient_SetFinalResponse() are the first characters of the response lines. They are used as a77 * '>' character to receive additional information. The given text is sent to the modem when '>' is83 * When the AT command declaration is complete, it can be sent using le_atClient_Send(). This API is86 * le_atClient_SetCommandAndSend() is equivalent to le_atClient_Create(), le_atClient_SetCommand(),99 * - le_atClient_GetFirstIntermediateResponse() is used to get the first intermediate result code.101 * le_atClient_GetNextIntermediateResponse().Returns LE_NOT_FOUND when there are no further results.103 * When a response has been set in the AT command declaration, the AT command response returned by114 * le_atClient_RemoveUnsolicitedResponseHandler(). The subscribed handler is called when the given115 * pattern is detected. The handler receives a parameter with the complete line of the unsolicited149 //--------------------------------------------------------------------------------------------------153 //--------------------------------------------------------------------------------------------------156 //--------------------------------------------------------------------------------------------------159 * Connect the current client thread to the service providing this API. Block until the service is162 * For each thread that wants to use this API, either ConnectService or TryConnectService must be163 * called before any other functions in this API. Normally, ConnectService is automatically called168 //--------------------------------------------------------------------------------------------------174 //--------------------------------------------------------------------------------------------------177 * Try to connect the current client thread to the service providing this API. Return with an error180 * For each thread that wants to use this API, either ConnectService or TryConnectService must be181 * called before any other functions in this API. Normally, ConnectService is automatically called190 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).193 //--------------------------------------------------------------------------------------------------199 //--------------------------------------------------------------------------------------------------203 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants206 //--------------------------------------------------------------------------------------------------213 //--------------------------------------------------------------------------------------------------219 * longer a connection to the service, and the functions in this API can't be used. For details, see224 //--------------------------------------------------------------------------------------------------231 //--------------------------------------------------------------------------------------------------234 //--------------------------------------------------------------------------------------------------237 //--------------------------------------------------------------------------------------------------240 //--------------------------------------------------------------------------------------------------243 //--------------------------------------------------------------------------------------------------248 //--------------------------------------------------------------------------------------------------251 //--------------------------------------------------------------------------------------------------255 //--------------------------------------------------------------------------------------------------258 //--------------------------------------------------------------------------------------------------264 //--------------------------------------------------------------------------------------------------271 //--------------------------------------------------------------------------------------------------279 //--------------------------------------------------------------------------------------------------286 //--------------------------------------------------------------------------------------------------292 //--------------------------------------------------------------------------------------------------298 //--------------------------------------------------------------------------------------------------308 //--------------------------------------------------------------------------------------------------315 //--------------------------------------------------------------------------------------------------325 //--------------------------------------------------------------------------------------------------334 //--------------------------------------------------------------------------------------------------344 * @note If the AT Command reference or set intermediate response is invalid, a fatal error occurs,347 //--------------------------------------------------------------------------------------------------356 //--------------------------------------------------------------------------------------------------359 * Several final responses can be specified separated by a '|' character into the string given in369 //--------------------------------------------------------------------------------------------------378 //--------------------------------------------------------------------------------------------------389 //--------------------------------------------------------------------------------------------------398 //--------------------------------------------------------------------------------------------------408 //--------------------------------------------------------------------------------------------------417 //--------------------------------------------------------------------------------------------------428 //--------------------------------------------------------------------------------------------------437 //--------------------------------------------------------------------------------------------------449 //--------------------------------------------------------------------------------------------------456 //--------------------------------------------------------------------------------------------------467 //--------------------------------------------------------------------------------------------------478 //--------------------------------------------------------------------------------------------------489 //--------------------------------------------------------------------------------------------------501 //--------------------------------------------------------------------------------------------------512 //--------------------------------------------------------------------------------------------------523 //--------------------------------------------------------------------------------------------------542 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------567 //--------------------------------------------------------------------------------------------------583 //--------------------------------------------------------------------------------------------------587 //--------------------------------------------------------------------------------------------------le_result_t le_atClient_TryConnectService(void)le_atClient_UnsolicitedResponseHandlerRef_t le_atClient_AddUnsolicitedResponseHandler(const char *LE_NONNULL unsolRsp, le_atClient_DeviceRef_t devRef, le_atClient_UnsolicitedResponseHandlerFunc_t handlerPtr, void *contextPtr, uint32_t lineCount)le_result_t le_atClient_SetTimeout(le_atClient_CmdRef_t cmdRef, uint32_t timer)le_result_t le_atClient_SetText(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL text)le_result_t le_atClient_SetIntermediateResponse(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL intermediate)le_result_t le_atClient_Delete(le_atClient_CmdRef_t cmdRef)le_atClient_DeviceRef_t le_atClient_Start(int fd)le_result_t le_atClient_GetNextIntermediateResponse(le_atClient_CmdRef_t cmdRef, char *intermediateRsp, size_t intermediateRspSize)void(* le_atClient_DisconnectHandler_t)(void *)Definition: le_atClient_interface.h:154le_result_t le_atClient_SetDevice(le_atClient_CmdRef_t cmdRef, le_atClient_DeviceRef_t devRef)LE_FULL_API void le_atClient_SetServerDisconnectHandler(le_atClient_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_atClient_SetCommandAndSend(le_atClient_CmdRef_t *cmdRefPtr, le_atClient_DeviceRef_t devRef, const char *LE_NONNULL command, const char *LE_NONNULL interResp, const char *LE_NONNULL finalResp, uint32_t timeout)le_atClient_CmdRef_t le_atClient_Create(void)le_result_t le_atClient_GetFinalResponse(le_atClient_CmdRef_t cmdRef, char *finalRsp, size_t finalRspSize)le_result_t le_atClient_Send(le_atClient_CmdRef_t cmdRef)le_result_t le_atClient_Stop(le_atClient_DeviceRef_t device)void le_atClient_RemoveUnsolicitedResponseHandler(le_atClient_UnsolicitedResponseHandlerRef_t handlerRef)le_result_t le_atClient_SetFinalResponse(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL response)void le_atClient_ConnectService(void)le_result_t le_atClient_GetFirstIntermediateResponse(le_atClient_CmdRef_t cmdRef, char *intermediateRsp, size_t intermediateRspSize)void le_atClient_DisconnectService(void)le_result_t le_atClient_SetCommand(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL command)