le_temp_interface.h
Go to the documentation of this file.
25 * @warning Some of the functions in this API may not be supported by your target. Please refer to52 * When temperature thresholds are reached, an event is sent with a string type that specifies the66 * - le_temp_SetThreshold() function allows the application to configure a threshold for a sensor.100 //--------------------------------------------------------------------------------------------------104 //--------------------------------------------------------------------------------------------------107 //--------------------------------------------------------------------------------------------------110 * Connect the current client thread to the service providing this API. Block until the service is113 * For each thread that wants to use this API, either ConnectService or TryConnectService must be114 * called before any other functions in this API. Normally, ConnectService is automatically called119 //--------------------------------------------------------------------------------------------------125 //--------------------------------------------------------------------------------------------------128 * Try to connect the current client thread to the service providing this API. Return with an error131 * For each thread that wants to use this API, either ConnectService or TryConnectService must be132 * called before any other functions in this API. Normally, ConnectService is automatically called141 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).144 //--------------------------------------------------------------------------------------------------150 //--------------------------------------------------------------------------------------------------154 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants157 //--------------------------------------------------------------------------------------------------164 //--------------------------------------------------------------------------------------------------170 * longer a connection to the service, and the functions in this API can't be used. For details, see175 //--------------------------------------------------------------------------------------------------182 //--------------------------------------------------------------------------------------------------186 //--------------------------------------------------------------------------------------------------189 //--------------------------------------------------------------------------------------------------193 //--------------------------------------------------------------------------------------------------196 //--------------------------------------------------------------------------------------------------200 //--------------------------------------------------------------------------------------------------203 //--------------------------------------------------------------------------------------------------211 //--------------------------------------------------------------------------------------------------218 //--------------------------------------------------------------------------------------------------227 //--------------------------------------------------------------------------------------------------238 //--------------------------------------------------------------------------------------------------245 //--------------------------------------------------------------------------------------------------254 //--------------------------------------------------------------------------------------------------258 //--------------------------------------------------------------------------------------------------265 //--------------------------------------------------------------------------------------------------273 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------291 //--------------------------------------------------------------------------------------------------302 //--------------------------------------------------------------------------------------------------310 //--------------------------------------------------------------------------------------------------321 //--------------------------------------------------------------------------------------------------331 //--------------------------------------------------------------------------------------------------le_result_t le_temp_GetSensorName(le_temp_SensorRef_t sensor, char *sensorName, size_t sensorNameSize)le_result_t le_temp_GetTemperature(le_temp_SensorRef_t sensor, int32_t *temperaturePtr)le_result_t le_temp_TryConnectService(void)LE_FULL_API void le_temp_SetServerDisconnectHandler(le_temp_DisconnectHandler_t disconnectHandler, void *contextPtr)void(* le_temp_DisconnectHandler_t)(void *)Definition: le_temp_interface.h:105le_result_t le_temp_SetThreshold(le_temp_SensorRef_t sensor, const char *LE_NONNULL threshold, int32_t temperature)void le_temp_RemoveThresholdEventHandler(le_temp_ThresholdEventHandlerRef_t handlerRef)struct le_temp_ThresholdEventHandler * le_temp_ThresholdEventHandlerRef_tDefinition: le_temp_common.h:71void(* le_temp_ThresholdEventHandlerFunc_t)(le_temp_SensorRef_t sensor, const char *LE_NONNULL threshold, void *contextPtr)Definition: le_temp_common.h:80le_result_t le_temp_StartMonitoring(void)void le_temp_DisconnectService(void)le_temp_SensorRef_t le_temp_Request(const char *LE_NONNULL sensorName)le_result_t le_temp_GetThreshold(le_temp_SensorRef_t sensor, const char *LE_NONNULL threshold, int32_t *temperaturePtr)le_temp_ThresholdEventHandlerRef_t le_temp_AddThresholdEventHandler(le_temp_ThresholdEventHandlerFunc_t ThresholdEventHandlerPtr, void *contextPtr)void le_temp_ConnectService(void)