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

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

Macros

#define BAROMETER_RESOURCE_INDEX(res)   LWM2M_RESOURCES_INDEX(LWM2MObjectBarometerResources, res)
 
#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTBAROMETER
 
#define FLUSH_RESOURCES
 

Functions

void LWM2MObjectBarometer_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 LWM2MObjectBarometer_Enable (float minRangeValue, float maxRangeValue)
 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 LWM2MObjectBarometer_Init (void)
 Initialize LWM2M object instance. Must be called before any other function call. More...
 
void LWM2MObjectBarometer_SetValue (float sensorValue_hPa)
 the function set the current measured sensorValue in [hPa] More...
 
static void LWM2MObjectBarometerInternalDisable (void)
 
static void LWM2MObjectBarometerInternalEnable (float minRangeValue, float maxRangeValue)
 
static void LWM2MObjectBarometerInternalSetValue (float sensorValue_hPa)
 
static retcode_t LWM2MObjectBarometerResetMinMaxValues (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 

Variables

static Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectBarometerInternalDisable }
 
static Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectBarometerInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static
Lwm2m_Single_Resource_Update_T 
AsyncCall_Updater = { .set_single = LWM2MObjectBarometerInternalSetValue, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static Lwm2m_URI_Path_T BarometerUriPath = { LWM2MOBJECTS_IX_BAROMETER_0, LWM2MOBJECTS_IX_BAROMETER_0, -1 }
 
LWM2MObjectBarometer_Resource_T LWM2MObjectBarometerResources
 LWM2M resource data for instance 0. More...
 
static bool MinMaxInit = false
 
static volatile bool Started = false
 

Macro Definition Documentation

#define BAROMETER_RESOURCE_INDEX (   res)    LWM2M_RESOURCES_INDEX(LWM2MObjectBarometerResources, res)
#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTBAROMETER
#define FLUSH_RESOURCES
Value:
BAROMETER_RESOURCE_INDEX(minRangeValue),\
BAROMETER_RESOURCE_INDEX(maxRangeValue),\
BAROMETER_RESOURCE_INDEX(sensorValue),\
BAROMETER_RESOURCE_INDEX(minMeasuredValue),\
BAROMETER_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 BAROMETER_RESOURCE_INDEX(res)
Definition: LWM2MObjectBarometer.c:98
static Lwm2m_URI_Path_T BarometerUriPath
Definition: LWM2MObjectBarometer.c:87

Function Documentation

void LWM2MObjectBarometer_Disable ( void  )

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectBarometer_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 LWM2MObjectBarometer_Init ( void  )

Refer interface header for description

void LWM2MObjectBarometer_SetValue ( float  sensorValue_hPa)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LWM2MObjectBarometerInternalDisable ( void  )
static
static void LWM2MObjectBarometerInternalEnable ( float  minRangeValue,
float  maxRangeValue 
)
static
static void LWM2MObjectBarometerInternalSetValue ( float  sensorValue_hPa)
static
static retcode_t LWM2MObjectBarometerResetMinMaxValues ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

Variable Documentation

Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectBarometerInternalDisable }
static
Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectBarometerInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
static
Lwm2m_Single_Resource_Update_T AsyncCall_Updater = { .set_single = LWM2MObjectBarometerInternalSetValue, .mutex = LWM2M_MUTEX_INIT_VALUE }
static
LWM2MObjectBarometer_Resource_T LWM2MObjectBarometerResources
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 LWM2MObjectBarometerResetMinMaxValues(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectBarometer.c:110
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:40 by doxygen 1.8.8