le_dcs_interface.h
Go to the documentation of this file.
18 * When applications need to exchange data with other devices on the packet switched data network,26 * about all the data channels available on a device, and administratively start or stop a selected32 * When one application asks DCS to start a specified channel, DCS associates it with this channel;37 * Similarly, it is operationally brought down when its administrative state goes down to indicate67 * path dataConnectionService:/wifi/SSID. Per-SSID configurations are saved now on the wifiService70 * Moreover, confidential user credentials, like passphrase, PSK, user name with password, are now72 * wifiClient, only through which reading and writing of such info can be done. Note that the WiFi74 * reference and debugging. In this way, @c le_dcs keeps technology-specific configurations on the104 * | -------------------------------| -----------------------------------------------------------------------------------------|105 * | le_dcs_GetChannels() | Retrieves the list of all available channels across all supported technologies |108 * | le_dcs_GetState() | Queries for a channel's administrative state and network interface name by its reference |109 * | le_dcs_AddEventHandler() | Adds a channel event notification handler for a specific channel |110 * | le_dcs_RemoveEventHandler() | Removes a channel event notification handler for a specific channel |118 * le_dcs_GetChannels() to obtain an up-to-date list of all channels available over all supported119 * technologies on which are the channel reference and technology type of each available channel.124 * subsequent @c le_dcs APIs. le_dcs_GetChannels() is asynchronous, due to need of some technologies177 * transaction that provides the technology and channel type faster but without the reliability of204 * remember all channel references returned via le_dcs_GetChannels() but not all the details about249 * Applications that want to be kept posted about any state changes of the channel can fulfill this251 * For each channel managed by le_dcs, there could be a chain of event handlers provided by multiple318 * The function for an application to start a selected data channel and associate itself with it is357 * With the @c le_dcs interface, connection failures over a channel are handled within the channel358 * itself. Connection retries over another channel of the same or different technology will not be362 * channel. If a different channel is wanted to be tried as a backup that logic and direction needs364 * associated with the channel needs to disassociate from it and re-associate with another channel.370 * Best practices are to retry a reconnect over a certain limited duration with a back-off duration.373 * involving a system-wide blackout, one example is in the cellular packet switched state's becoming380 * (depending on settings like DHCP). The default gateway and DNS addresses for this channel might402 //--------------------------------------------------------------------------------------------------406 //--------------------------------------------------------------------------------------------------409 //--------------------------------------------------------------------------------------------------412 * Connect the current client thread to the service providing this API. Block until the service is415 * For each thread that wants to use this API, either ConnectService or TryConnectService must be416 * called before any other functions in this API. Normally, ConnectService is automatically called421 //--------------------------------------------------------------------------------------------------427 //--------------------------------------------------------------------------------------------------430 * Try to connect the current client thread to the service providing this API. Return with an error433 * For each thread that wants to use this API, either ConnectService or TryConnectService must be434 * called before any other functions in this API. Normally, ConnectService is automatically called443 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).446 //--------------------------------------------------------------------------------------------------452 //--------------------------------------------------------------------------------------------------456 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants459 //--------------------------------------------------------------------------------------------------466 //--------------------------------------------------------------------------------------------------472 * longer a connection to the service, and the functions in this API can't be used. For details, see477 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------488 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------495 //--------------------------------------------------------------------------------------------------498 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------505 //--------------------------------------------------------------------------------------------------509 //--------------------------------------------------------------------------------------------------512 //--------------------------------------------------------------------------------------------------516 * The LE_DCS_EVENT_UP event for a given data channel means that it has been brought up and become519 * The LE_DCS_EVENT_DOWN event means that the given data channel has gone down, been disassociated529 //--------------------------------------------------------------------------------------------------532 //--------------------------------------------------------------------------------------------------536 //--------------------------------------------------------------------------------------------------539 //--------------------------------------------------------------------------------------------------543 //--------------------------------------------------------------------------------------------------546 //--------------------------------------------------------------------------------------------------550 //--------------------------------------------------------------------------------------------------553 //--------------------------------------------------------------------------------------------------557 //--------------------------------------------------------------------------------------------------560 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------577 //--------------------------------------------------------------------------------------------------581 //--------------------------------------------------------------------------------------------------588 //--------------------------------------------------------------------------------------------------595 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------610 //--------------------------------------------------------------------------------------------------623 //--------------------------------------------------------------------------------------------------631 //--------------------------------------------------------------------------------------------------638 //--------------------------------------------------------------------------------------------------642 //--------------------------------------------------------------------------------------------------649 //--------------------------------------------------------------------------------------------------651 * Get the object reference of the channel given by the name and its technology type in the first658 //--------------------------------------------------------------------------------------------------667 //--------------------------------------------------------------------------------------------------669 * Trigger a query for the list of all available data channels that will be returned asynchronously672 //--------------------------------------------------------------------------------------------------le_dcs_EventHandlerRef_t le_dcs_AddEventHandler(le_dcs_ChannelRef_t channelRef, le_dcs_EventHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_dcs_TryConnectService(void)le_dcs_Technology_t le_dcs_GetTechnology(le_dcs_ChannelRef_t channelRef)le_dcs_ReqObjRef_t le_dcs_Start(le_dcs_ChannelRef_t channelRef)void le_dcs_ConnectService(void)LE_FULL_API void le_dcs_SetServerDisconnectHandler(le_dcs_DisconnectHandler_t disconnectHandler, void *contextPtr)le_dcs_ChannelRef_t le_dcs_GetReference(const char *LE_NONNULL name, le_dcs_Technology_t technology)void le_dcs_DisconnectService(void)le_result_t le_dcs_Stop(le_dcs_ReqObjRef_t reqRef)void le_dcs_RemoveEventHandler(le_dcs_EventHandlerRef_t handlerRef)void(* le_dcs_DisconnectHandler_t)(void *)Definition: le_dcs_interface.h:407void le_dcs_GetChannels(le_dcs_GetChannelsHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_dcs_GetState(le_dcs_ChannelRef_t channelRef, le_dcs_State_t *statePtr, char *interfaceName, size_t interfaceNameSize)