le_clkSync_interface.h
Go to the documentation of this file.
18 * time on a Legato device. It includes the APIs for acquiring the current clock time from a given23 * A current clock time can be queried from a time source via different protocols. While the various37 * Each configured clock time source can be assigned a numeric priority within the range 0-9, with39 * execution of the system clock update via a call to @ref le_clkSync_UpdateSystemTime, the source40 * with the highest priority will first be attempted. And likewise down the prioritized list, each46 * clockTime:/source/. For each source, its priority and location configurations can be configured.48 * its location configuration is the IP address or host name of its time server, and up to 2 can be66 * @note These clock time configurations can be installed and modified not only through the "config67 * set" command on a device's console and Legato's le_cfg_Set APIs, but also AVC's write operation72 * @warning It is a high risk system operation to update a device's system time, as there could be76 * given API to trigger this execution. In many cases, it might even be necessary to schedule this83 * sources will be internally generated and then walked from the highest priority to the lowest in96 * the API @ref le_clkSync_GetUpdateSystemStatus, and this status code is defined in the enum @ref124 //--------------------------------------------------------------------------------------------------128 //--------------------------------------------------------------------------------------------------131 //--------------------------------------------------------------------------------------------------134 * Connect the current client thread to the service providing this API. Block until the service is137 * For each thread that wants to use this API, either ConnectService or TryConnectService must be138 * called before any other functions in this API. Normally, ConnectService is automatically called143 //--------------------------------------------------------------------------------------------------149 //--------------------------------------------------------------------------------------------------152 * Try to connect the current client thread to the service providing this API. Return with an error155 * For each thread that wants to use this API, either ConnectService or TryConnectService must be156 * called before any other functions in this API. Normally, ConnectService is automatically called165 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).168 //--------------------------------------------------------------------------------------------------174 //--------------------------------------------------------------------------------------------------178 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants181 //--------------------------------------------------------------------------------------------------188 //--------------------------------------------------------------------------------------------------194 * longer a connection to the service, and the functions in this API can't be used. For details, see199 //--------------------------------------------------------------------------------------------------206 //--------------------------------------------------------------------------------------------------211 //--------------------------------------------------------------------------------------------------214 //--------------------------------------------------------------------------------------------------216 * Clock source's update status. Note that these defined values are the same as defined in Sierra219 //--------------------------------------------------------------------------------------------------222 //--------------------------------------------------------------------------------------------------226 //--------------------------------------------------------------------------------------------------229 //--------------------------------------------------------------------------------------------------233 //--------------------------------------------------------------------------------------------------236 //--------------------------------------------------------------------------------------------------247 //--------------------------------------------------------------------------------------------------256 //--------------------------------------------------------------------------------------------------263 //--------------------------------------------------------------------------------------------------270 //--------------------------------------------------------------------------------------------------272 * Execute a system clock time update that will be completed asynchronously & return the resulting275 //--------------------------------------------------------------------------------------------------le_result_t le_clkSync_GetCurrentTime(le_clkSync_ClockTime_t *timePtr, le_clkSync_ClockSource_t *sourcePtr)Definition: le_clkSync_common.h:149void le_clkSync_ConnectService(void)void le_clkSync_UpdateSystemTime(le_clkSync_UpdateSystemTimeHandlerFunc_t handlerPtr, void *contextPtr)le_clkSync_UpdateSystemStatus_t le_clkSync_GetUpdateSystemStatus(le_clkSync_ClockSource_t source)void(* le_clkSync_UpdateSystemTimeHandlerFunc_t)(le_result_t status, void *contextPtr)Definition: le_clkSync_common.h:168void le_clkSync_DisconnectService(void)LE_FULL_API void le_clkSync_SetServerDisconnectHandler(le_clkSync_DisconnectHandler_t disconnectHandler, void *contextPtr)void(* le_clkSync_DisconnectHandler_t)(void *)Definition: le_clkSync_interface.h:129le_result_t le_clkSync_TryConnectService(void)