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

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

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

Macros

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTLIGHTCONTROL
 
#define LIGHTCONTROL_RESOURCES_INDEX(res)   LWM2M_RESOURCES_INDEX(LightRedResources, res)
 

Functions

static bool AdjustState (volatile bool *current, bool state)
 
static retcode_t LightControl (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr, volatile bool *state, void(*handler)(bool state))
 
static LWM2M_MUTEX_INSTANCE (mutex)
 
void LWM2MObjectLightControl_Enable (bool testMode)
 Enable LWM2M object instances to start providing light controls. More...
 
void LWM2MObjectLightControl_Init (void)
 Initialize LWM2M object instances. Must be called before any other function call. More...
 
static void NotifyOrange (bool state)
 
static void NotifyRed (bool state)
 
static void NotifyYellow (bool state)
 
static retcode_t RW_Orange (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 
static retcode_t RW_Red (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 
static retcode_t RW_Yellow (Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
 

Variables

static volatile bool LedTestMode = false
 
LWM2MObjectLightControl_Resource_T LightOrangeResources
 LWM2M resource data for instance 1. More...
 
LWM2MObjectLightControl_Resource_T LightRedResources
 LWM2M resource data for instance 0. More...
 
LWM2MObjectLightControl_Resource_T LightYellowResources
 LWM2M resource data for instance 2. More...
 
static volatile bool Orange = false
 
static volatile bool Red = false
 
static volatile bool Started = false
 
static volatile bool Yellow = false
 

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTLIGHTCONTROL
#define LIGHTCONTROL_RESOURCES_INDEX (   res)    LWM2M_RESOURCES_INDEX(LightRedResources, res)

Function Documentation

static bool AdjustState ( volatile bool *  current,
bool  state 
)
static

+ Here is the caller graph for this function:

static retcode_t LightControl ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr,
volatile bool *  state,
void(*)(bool state)  handler 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static LWM2M_MUTEX_INSTANCE ( mutex  )
static
void LWM2MObjectLightControl_Enable ( bool  testMode)

Refer interface header for description

void LWM2MObjectLightControl_Init ( void  )

Refer interface header for description

+ Here is the call graph for this function:

static void NotifyOrange ( bool  state)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void NotifyRed ( bool  state)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void NotifyYellow ( bool  state)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static retcode_t RW_Orange ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

+ Here is the call graph for this function:

static retcode_t RW_Red ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

+ Here is the call graph for this function:

static retcode_t RW_Yellow ( Lwm2mSerializer_T serializer_ptr,
Lwm2mParser_T parser_ptr 
)
static

+ Here is the call graph for this function:

Variable Documentation

volatile bool LedTestMode = false
static
LWM2MObjectLightControl_Resource_T LightOrangeResources
Initial value:
=
{
{ 5706, LWM2M_STRING_RO("255,165,0") },
}
static retcode_t RW_Orange(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectLightControl.c:183
#define LWM2M_DYNAMIC(dyn)
Definition: Serval_Lwm2m.h:105
#define LWM2M_STRING_RO(string)
Definition: Serval_Lwm2m.h:95
Initial value:
=
{
{ 5706, LWM2M_STRING_RO("255,0,0") },
{ 5850, LWM2M_DYNAMIC(RW_Red) },
}
#define LWM2M_DYNAMIC(dyn)
Definition: Serval_Lwm2m.h:105
#define LWM2M_STRING_RO(string)
Definition: Serval_Lwm2m.h:95
static retcode_t RW_Red(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectLightControl.c:178
LWM2MObjectLightControl_Resource_T LightYellowResources
Initial value:
=
{
{ 5706, LWM2M_STRING_RO("255,255,0") },
}
#define LWM2M_DYNAMIC(dyn)
Definition: Serval_Lwm2m.h:105
#define LWM2M_STRING_RO(string)
Definition: Serval_Lwm2m.h:95
static retcode_t RW_Yellow(Lwm2mSerializer_T *serializer_ptr, Lwm2mParser_T *parser_ptr)
Definition: LWM2MObjectLightControl.c:188
volatile bool Orange = false
static
volatile bool Red = false
static
volatile bool Started = false
static
volatile bool Yellow = 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