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

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

#include "XdkCommonInfo.h"
#include "LWM2MObjects.h"
#include "LWM2MUtil.h"
#include "LWM2M.h"
#include "BCDS_Basics.h"
#include <Serval_Exceptions.h>
+ Include dependency graph for LWM2MObjectIlluminance.c:

Macros

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTILLUMINANCE
 
#define FLUSH_RESOURCES
 
#define ILLUMINANCE_RESOURCES_INDEX(res)   LWM2M_RESOURCES_INDEX(LWM2MObjectIlluminanceResources, res)
 

Functions

void LWM2MObjectIlluminance_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 LWM2MObjectIlluminance_Enable (float minRange, float maxRange)
 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 LWM2MObjectIlluminance_Init (void)
 Initialize LWM2M object instance. Must be called before any other function call. More...
 
void LWM2MObjectIlluminance_SetValue (float currentValue)
 the function set the current measured sensorValue in [mlx] More...
 
static void LWM2MObjectIlluminanceInternalDisable (void)
 
static void LWM2MObjectIlluminanceInternalEnable (float minRange, float maxRange)
 
static void LWM2MObjectIlluminanceInternalSetValue (float currentValue)
 
static retcode_t ResetMinMax (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 

Variables

static Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectIlluminanceInternalDisable }
 
static Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectIlluminanceInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static
Lwm2m_Single_Resource_Update_T 
AsyncCall_Updater = { .set_single = LWM2MObjectIlluminanceInternalSetValue, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static Lwm2m_URI_Path_T IlluminanceUriPath = { LWM2MOBJECTS_IX_ILLUMINANCE_0, LWM2MOBJECTS_IX_ILLUMINANCE_0, -1 }
 
LWM2MObjectIlluminance_Resource_T LWM2MObjectIlluminanceResources
 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_LWM2MOBJECTILLUMINANCE
#define FLUSH_RESOURCES
Value:
ILLUMINANCE_RESOURCES_INDEX(minRangeValue),\
ALPWISE BLESW_CyclingPower Profile Release Notes this release Note is general for all the SDK and some changes are specific for a SDK This Notes includes changes for Profile and SDK specific sample application KNOWN ISSUES AND LIMITATIONS none REVISION Set Chain Length value
Definition: BLESW_CyclingPower ReleaseNotes.txt:24
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 ILLUMINANCE_RESOURCES_INDEX(res)
Definition: LWM2MObjectIlluminance.c:65
static Lwm2m_URI_Path_T IlluminanceUriPath
Definition: LWM2MObjectIlluminance.c:95
#define ILLUMINANCE_RESOURCES_INDEX (   res)    LWM2M_RESOURCES_INDEX(LWM2MObjectIlluminanceResources, res)

Function Documentation

void LWM2MObjectIlluminance_Disable ( void  )

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectIlluminance_Enable ( float  minRange,
float  maxRange 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectIlluminance_Init ( void  )

Refer interface header for description

void LWM2MObjectIlluminance_SetValue ( float  currentValue)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LWM2MObjectIlluminanceInternalDisable ( void  )
static
static void LWM2MObjectIlluminanceInternalEnable ( float  minRange,
float  maxRange 
)
static
static void LWM2MObjectIlluminanceInternalSetValue ( float  currentValue)
static
static retcode_t ResetMinMax ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

Variable Documentation

Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectIlluminanceInternalDisable }
static
LWM2MObjectIlluminance_Resource_T LWM2MObjectIlluminanceResources
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
static retcode_t ResetMinMax(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectIlluminance.c:102
#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