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

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

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

Macros

#define ACCELEROMETER_RESOURCES_INDEX(res)   LWM2M_RESOURCES_INDEX(LWM2MObjectAccelerometerResources, res)
 
#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTACCELEROMETER
 
#define FLUSH_RESOURCES
 

Functions

void LWM2MObjectAccelerometer_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 LWM2MObjectAccelerometer_Enable (float minRange, float maxRange)
 Enable 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 LWM2MObjectAccelerometer_Init (void)
 Initialize LWM2M object instance. Must be called before any other function call. More...
 
void LWM2MObjectAccelerometer_SetValues (float xAxis, float yAxis, float zAxis)
 Set values for x-, y-, and z-axis. More...
 
static void LWM2MObjectAccelerometerInternalDisable (void)
 
static void LWM2MObjectAccelerometerInternalEnable (float minRange, float maxRange)
 
static void LWM2MObjectAccelerometerInternalSetValues (float xAxis, float yAxis, float zAxis)
 

Variables

static Lwm2m_URI_Path_T AccelerometerUriPath = { LWM2MOBJECTS_IX_ACCELEROMETER_0, LWM2MOBJECTS_IX_ACCELEROMETER_0, -1 }
 
static Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectAccelerometerInternalDisable }
 
static Lwm2m_Pair_Resource_Update_T AsyncCall_Enabler = { .set_pair = LWM2MObjectAccelerometerInternalEnable, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
static
Lwm2m_Tripple_Resource_Update_T 
AsyncCall_Updater = { .set_tripple = LWM2MObjectAccelerometerInternalSetValues, .mutex = LWM2M_MUTEX_INIT_VALUE }
 
LWM2MObjectAccelerometer_Resource_T LWM2MObjectAccelerometerResources
 LWM2M resource data for instance 0. More...
 
static volatile bool Started = false
 

Macro Definition Documentation

#define ACCELEROMETER_RESOURCES_INDEX (   res)    LWM2M_RESOURCES_INDEX(LWM2MObjectAccelerometerResources, res)
#define BCDS_MODULE_ID   XDK_COMMON_ID_LWM2MOBJECTACCELEROMETER
#define FLUSH_RESOURCES
Value:
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 AccelerometerUriPath
Definition: LWM2MObjectAccelerometer.c:79
#define ACCELEROMETER_RESOURCES_INDEX(res)
Definition: LWM2MObjectAccelerometer.c:64

Function Documentation

void LWM2MObjectAccelerometer_Disable ( void  )

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void LWM2MObjectAccelerometer_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 LWM2MObjectAccelerometer_Init ( void  )

Refer interface header for description

void LWM2MObjectAccelerometer_SetValues ( float  xAxis,
float  yAxis,
float  zAxis 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void LWM2MObjectAccelerometerInternalDisable ( void  )
static
static void LWM2MObjectAccelerometerInternalEnable ( float  minRange,
float  maxRange 
)
static
static void LWM2MObjectAccelerometerInternalSetValues ( float  xAxis,
float  yAxis,
float  zAxis 
)
static

Variable Documentation

Lwm2m_Call_T AsyncCall_Disabler = { .call = LWM2MObjectAccelerometerInternalDisable }
static
LWM2MObjectAccelerometer_Resource_T LWM2MObjectAccelerometerResources
Initial value:
=
{
{ 5603, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5604, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5701, LWM2M_STRING_RO("") },
{ 5702, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5703, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
{ 5704, LWM2M_FLOAT(0.0F) | LWM2M_READ_ONLY },
}
#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
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