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 unsolicited153 //--------------------------------------------------------------------------------------------------157 //--------------------------------------------------------------------------------------------------160 //--------------------------------------------------------------------------------------------------163 * Connect the current client thread to the service providing this API. Block until the service is166 * For each thread that wants to use this API, either ConnectService or TryConnectService must be167 * called before any other functions in this API. Normally, ConnectService is automatically called172 //--------------------------------------------------------------------------------------------------178 //--------------------------------------------------------------------------------------------------181 * Try to connect the current client thread to the service providing this API. Return with an error184 * For each thread that wants to use this API, either ConnectService or TryConnectService must be185 * called before any other functions in this API. Normally, ConnectService is automatically called194 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).197 //--------------------------------------------------------------------------------------------------203 //--------------------------------------------------------------------------------------------------207 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants210 //--------------------------------------------------------------------------------------------------217 //--------------------------------------------------------------------------------------------------223 * longer a connection to the service, and the functions in this API can't be used. For details, see228 //--------------------------------------------------------------------------------------------------235 //--------------------------------------------------------------------------------------------------238 //--------------------------------------------------------------------------------------------------241 //--------------------------------------------------------------------------------------------------244 //--------------------------------------------------------------------------------------------------247 //--------------------------------------------------------------------------------------------------252 //--------------------------------------------------------------------------------------------------255 //--------------------------------------------------------------------------------------------------259 //--------------------------------------------------------------------------------------------------262 //--------------------------------------------------------------------------------------------------268 //--------------------------------------------------------------------------------------------------275 //--------------------------------------------------------------------------------------------------283 //--------------------------------------------------------------------------------------------------290 //--------------------------------------------------------------------------------------------------296 //--------------------------------------------------------------------------------------------------302 //--------------------------------------------------------------------------------------------------312 //--------------------------------------------------------------------------------------------------319 //--------------------------------------------------------------------------------------------------329 //--------------------------------------------------------------------------------------------------338 //--------------------------------------------------------------------------------------------------348 * @note If the AT Command reference or set intermediate response is invalid, a fatal error occurs,351 //--------------------------------------------------------------------------------------------------360 //--------------------------------------------------------------------------------------------------363 * Several final responses can be specified separated by a '|' character into the string given in373 //--------------------------------------------------------------------------------------------------382 //--------------------------------------------------------------------------------------------------393 //--------------------------------------------------------------------------------------------------402 //--------------------------------------------------------------------------------------------------412 //--------------------------------------------------------------------------------------------------421 //--------------------------------------------------------------------------------------------------432 //--------------------------------------------------------------------------------------------------441 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------460 //--------------------------------------------------------------------------------------------------471 //--------------------------------------------------------------------------------------------------482 //--------------------------------------------------------------------------------------------------493 //--------------------------------------------------------------------------------------------------505 //--------------------------------------------------------------------------------------------------516 //--------------------------------------------------------------------------------------------------527 //--------------------------------------------------------------------------------------------------546 //--------------------------------------------------------------------------------------------------563 //--------------------------------------------------------------------------------------------------571 //--------------------------------------------------------------------------------------------------587 //--------------------------------------------------------------------------------------------------591 //--------------------------------------------------------------------------------------------------le_result_t le_atClient_SetIntermediateResponse(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL intermediate)le_result_t le_atClient_Send(le_atClient_CmdRef_t cmdRef)le_result_t le_atClient_TryConnectService(void)le_result_t le_atClient_SetTimeout(le_atClient_CmdRef_t cmdRef, uint32_t timer)le_atClient_DeviceRef_t le_atClient_Start(int fd)le_result_t le_atClient_Stop(le_atClient_DeviceRef_t device)le_result_t le_atClient_GetFinalResponse(le_atClient_CmdRef_t cmdRef, char *finalRsp, size_t finalRspSize)le_result_t le_atClient_GetNextIntermediateResponse(le_atClient_CmdRef_t cmdRef, char *intermediateRsp, size_t intermediateRspSize)LE_FULL_API void le_atClient_SetServerDisconnectHandler(le_atClient_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_atClient_Delete(le_atClient_CmdRef_t cmdRef)le_result_t le_atClient_SetText(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL text)void(* le_atClient_UnsolicitedResponseHandlerFunc_t)(const char *LE_NONNULL unsolicitedRsp, void *contextPtr)Definition: le_atClient_common.h:60le_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)struct le_atClient_UnsolicitedResponseHandler * le_atClient_UnsolicitedResponseHandlerRef_tDefinition: le_atClient_common.h:50void le_atClient_DisconnectService(void)le_result_t le_atClient_SetDevice(le_atClient_CmdRef_t cmdRef, le_atClient_DeviceRef_t devRef)void le_atClient_RemoveUnsolicitedResponseHandler(le_atClient_UnsolicitedResponseHandlerRef_t handlerRef)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_SetFinalResponse(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL response)le_result_t le_atClient_GetFirstIntermediateResponse(le_atClient_CmdRef_t cmdRef, char *intermediateRsp, size_t intermediateRspSize)void le_atClient_ConnectService(void)le_result_t le_atClient_SetCommand(le_atClient_CmdRef_t cmdRef, const char *LE_NONNULL command)void(* le_atClient_DisconnectHandler_t)(void *)Definition: le_atClient_interface.h:158