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

This file provides the implementation of LWM2MObjectTemperature 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 LWM2MObjectTemperature.c:

Macros

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTTEMPERATURE
 
#define FLUSH_RESOURCES
 
#define TEMPERATURE_RESOURCE_INDEX(res)   LWM2M_RESOURCES_INDEX(LWM2MObjectTemperatureResources, res)
 

Functions

void LWM2MObjectTemperature_Disable (void)
 Disable the 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 LWM2MObjectTemperature_Enable (float minRangeValue_C, float maxRangeValue_C)
 Enable 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 LWM2MObjectTemperature_Init (void)
 Initialize LWM2M object instance. Must be called before any other function call. More...
 
void LWM2MObjectTemperature_SetValue (float sensorValue_C)
 the function set the current measured sensorValue in [Cel] More...
 
static void LWM2MObjectTemperatureInternalDisable (void)
 
static void LWM2MObjectTemperatureInternalEnable (float minRangeValue_C, float maxRangeValue_C)
 
static void LWM2MObjectTemperatureInternalSetValue (float sensorValue_C)
 
static retcode_t ResetMinMaxValues (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 

Variables

static Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectTemperatureInternalDisable }
 
static Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectTemperatureInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static
Lwm2m_Single_Resource_Update_T 
AsyncCall_Updater = { .set_single = LWM2MObjectTemperatureInternalSetValue, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
LWM2MObjectTemperatureResource_T LWM2MObjectTemperatureResources
 LWM2M resource data for instance 0. More...
 
static bool MinMaxInit = false
 
static volatile bool Started = false
 
static Lwm2m_URI_Path_T TemperatureUriPath = { LWM2MOBJECTS_IX_TEMPERATURE_0, LWM2MOBJECTS_IX_TEMPERATURE_0, -1 }
 

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTTEMPERATURE
#define FLUSH_RESOURCES
Value:
TEMPERATURE_RESOURCE_INDEX(minRangeValue),\
TEMPERATURE_RESOURCE_INDEX(maxRangeValue),\
TEMPERATURE_RESOURCE_INDEX(minMeasuredValue),\
TEMPERATURE_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...
#define TEMPERATURE_RESOURCE_INDEX(res)
Definition: LWM2MObjectTemperature.c:73
static Lwm2m_URI_Path_T TemperatureUriPath
Definition: LWM2MObjectTemperature.c:70
#define TEMPERATURE_RESOURCE_INDEX (   res)    LWM2M_RESOURCES_INDEX(LWM2MObjectTemperatureResources, res)

Function Documentation

void LWM2MObjectTemperature_Disable ( void  )

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectTemperature_Enable ( float  minRangeValue_C,
float  maxRangeValue_C 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectTemperature_Init ( void  )

Refer interface header for description

void LWM2MObjectTemperature_SetValue ( float  sensorValue_C)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LWM2MObjectTemperatureInternalDisable ( void  )
static
static void LWM2MObjectTemperatureInternalEnable ( float  minRangeValue_C,
float  maxRangeValue_C 
)
static
static void LWM2MObjectTemperatureInternalSetValue ( float  sensorValue_C)
static
static retcode_t ResetMinMaxValues ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

Variable Documentation

Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectTemperatureInternalDisable }
static
LWM2MObjectTemperatureResource_T LWM2MObjectTemperatureResources
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("") },
}
static retcode_t ResetMinMaxValues(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectTemperature.c:109
#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
bool MinMaxInit = false
static
volatile bool Started = 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