Macros | Functions | Variables
LWM2MObjectHumidity.c File Reference

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

#include "XdkCommonInfo.h"
#include "LWM2MObjects.h"
#include "LWM2MUtil.h"
#include "LWM2M.h"
#include <Serval_Clock.h>
#include <Serval_Exceptions.h>
#include <BCDS_Retcode.h>
#include "XDK_SensorHandle.h"
+ Include dependency graph for LWM2MObjectHumidity.c:

Macros

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTHUMIDITY
 
#define FLUSH_RESOURCES
 
#define HUMIDITY_RESOURCE_INDEX(res)   LWM2M_RESOURCES_INDEX(LWM2MObjectHumidityResources, res)
 

Functions

void LWM2MObjectHumidity_Disable (void)
 Disable LWM2M object instance to stop providing sensor data. Sets unit to "" and all other values to 0. Function is thread safe, it schedules a job for serval. Execution may therefore be deferred. More...
 
void LWM2MObjectHumidity_Enable (float minRangeValue, float maxRangeValue)
 Enables the LWM2M object instance to start providing sensor data. Function is thread safe, it schedules a job for serval. Execution may therefore be deferred. More...
 
void LWM2MObjectHumidity_Init (void)
 Initialize LWM2M object instance. Must be called before any other function call. More...
 
void LWM2MObjectHumidity_SetValue (float sensorValue_prh)
 the function set the current measured sensorValue in [%] More...
 
static void LWM2MObjectHumidityInternalDisable (void)
 
static void LWM2MObjectHumidityInternalEnable (float minRangeValue, float maxRangeValue)
 
static void LWM2MObjectHumidityInternalSetValue (float sensorValue_prh)
 
static retcode_t ResetMinMaxValues (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 

Variables

static Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectHumidityInternalDisable }
 
static Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectHumidityInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static
Lwm2m_Single_Resource_Update_T 
AsyncCall_Updater = { .set_single = LWM2MObjectHumidityInternalSetValue, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static Lwm2m_URI_Path_T HumidityUriPath = { LWM2MOBJECTS_IX_HUMIDITY_0, LWM2MOBJECTS_IX_HUMIDITY_0, -1 }
 
LWM2MObjectHumidityResource_T LWM2MObjectHumidityResources
 LWM2M resource data for instance 0. More...
 
static bool MinMaxInit = false
 
static volatile bool started = false
 

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTHUMIDITY
#define FLUSH_RESOURCES
Value:
HUMIDITY_RESOURCE_INDEX(minRangeValue),\
HUMIDITY_RESOURCE_INDEX(maxRangeValue),\
HUMIDITY_RESOURCE_INDEX(sensorValue),\
HUMIDITY_RESOURCE_INDEX(minMeasuredValue),\
HUMIDITY_RESOURCE_INDEX(maxMeasuredValue))
retcode_t Lwm2mReporting_multipleResourcesChanged(Lwm2m_URI_Path_T *objectInstanceUripath, uint8_t count,...)
Notify the stack that a resource has changed. This will cause the stack to notify any pending observe...
static Lwm2m_URI_Path_T HumidityUriPath
Definition: LWM2MObjectHumidity.c:70
#define HUMIDITY_RESOURCE_INDEX(res)
Definition: LWM2MObjectHumidity.c:74
#define HUMIDITY_RESOURCE_INDEX (   res)    LWM2M_RESOURCES_INDEX(LWM2MObjectHumidityResources, res)

Function Documentation

void LWM2MObjectHumidity_Disable ( void  )

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectHumidity_Enable ( float  minRangeValue,
float  maxRangeValue 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectHumidity_Init ( void  )

Refer interface header for description

void LWM2MObjectHumidity_SetValue ( float  sensorValue_prh)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LWM2MObjectHumidityInternalDisable ( void  )
static
static void LWM2MObjectHumidityInternalEnable ( float  minRangeValue,
float  maxRangeValue 
)
static
static void LWM2MObjectHumidityInternalSetValue ( float  sensorValue_prh)
static
static retcode_t ResetMinMaxValues ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

Variable Documentation

Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectHumidityInternalDisable }
static
Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectHumidityInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
static
Lwm2m_Single_Resource_Update_T AsyncCall_Updater = { .set_single = LWM2MObjectHumidityInternalSetValue, .mutex = LWM2M_MUTEX_INIT_VALUE }
static
LWM2MObjectHumidityResource_T LWM2MObjectHumidityResources
Initial value:
=
{
{ 5601, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5602, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5603, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5604, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5700, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5701, LWM2M_STRING_RO("") },
}
#define LWM2M_READ_ONLY
Definition: Serval_Lwm2m.h:218
#define LWM2M_FLOAT(floating)
Definition: Serval_Lwm2m.h:99
#define LWM2M_STRING_RO(string)
Definition: Serval_Lwm2m.h:95
#define LWM2M_FUNCTION(function)
Definition: Serval_Lwm2m.h:109
static retcode_t ResetMinMaxValues(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectHumidity.c:109
bool MinMaxInit = false
static
volatile bool started = false
static

This documentation file has been automatically generated on Fri Oct 4 2019 03:47:01 by doxygen 1.8.8