XDK API  3.6.0
Documentation
Macros | Functions | Variables
LWM2MSensorDeviceEnvironment.c File Reference

This file provides the implementation of LWM2MSensorDeviceEnvironment module. More...

#include "XdkCommonInfo.h"
#include "LWM2MObjectBarometer.h"
#include "LWM2MObjectTemperature.h"
#include "LWM2MObjectHumidity.h"
#include "LWM2MSensorDeviceEnvironment.h"
#include "XDK_SensorHandle.h"
+ Include dependency graph for LWM2MSensorDeviceEnvironment.c:

Macros

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MSENSORDEVICEENVIRONMENTAL
 
#define HUMIDITY_TO_PERC_FLOAT(I)   ((float)(I)) /* from integer %rH */
 
#define PRESSURE_TO_HPA_FLOAT(I)   ((float)(I) / 100.0F) /* from integer Pa */
 
#define TEMPERATURE_OFFSET_CORRECTION   (-3459) /* Self heating, temperature correction factor*/
 
#define TEMPERATURE_TO_C_FLOAT(I)   ((float)(I) / 1000.0F) /* from integer mDeg */
 

Functions

void LWM2MSensorDeviceEnvironment_Activate (bool enableTemperature, bool enableHumidity, bool enablePressure)
 Initialize sensor. Initialize sensors, setting them active or inactive. Though the sensor provides three seperate values, the XDK sensor is activated, if at least one sensor is active. The related lwm2m objects are initialized accordingly. Intended to be only called by the sensors timer thread. More...
 
void LWM2MSensorDeviceEnvironment_Update (enum ProcessingMode mode, bool notify)
 Read sensor values and process them. Read the values from the sensor, process them according the provided mode and transfer them to lwm2m objects, when notify indicates that. Intended to be only called by the sensors timer thread. More...
 

Variables

static bool EnableSensor = false
 
static
SensorDeviceProcessDataFloat_T 
HumiditySensorDeviceData = { { { 0 } }, 1, 0, CURRENT, false }
 
static
SensorDeviceProcessDataFloat_T 
PressureSensorDeviceData = { { { 0 } }, 1, 0, CURRENT, false }
 
static
SensorDeviceProcessDataFloat_T 
TemperatureSensorDeviceData = { { { 0 } }, 1, 0, CURRENT, false }
 

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MSENSORDEVICEENVIRONMENTAL
#define HUMIDITY_TO_PERC_FLOAT (   I)    ((float)(I)) /* from integer %rH */
#define PRESSURE_TO_HPA_FLOAT (   I)    ((float)(I) / 100.0F) /* from integer Pa */
#define TEMPERATURE_OFFSET_CORRECTION   (-3459) /* Self heating, temperature correction factor*/
#define TEMPERATURE_TO_C_FLOAT (   I)    ((float)(I) / 1000.0F) /* from integer mDeg */

Function Documentation

void LWM2MSensorDeviceEnvironment_Activate ( bool  enableTemperature,
bool  enableHumidity,
bool  enablePressure 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MSensorDeviceEnvironment_Update ( enum ProcessingMode  mode,
bool  notify 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool EnableSensor = false
static
SensorDeviceProcessDataFloat_T HumiditySensorDeviceData = { { { 0 } }, 1, 0, CURRENT, false }
static
SensorDeviceProcessDataFloat_T PressureSensorDeviceData = { { { 0 } }, 1, 0, CURRENT, false }
static
SensorDeviceProcessDataFloat_T TemperatureSensorDeviceData = { { { 0 } }, 1, 0, CURRENT, false }
static

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:41 by doxygen 1.8.8