XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions
In-built Sensor

Interface header file for the In-built Sensor features. More...

+ Collaboration diagram for In-built Sensor:

Files

file  XDK_Sensor.h
 

Data Structures

struct  Sensor_AccelConfiguration_S
 Structure representing the accelerometer configurations. More...
 
struct  Sensor_AxisValue_S
 Structure to represent the Axis value. More...
 
struct  Sensor_Configuration_S
 
struct  Sensor_Enable_S
 Structure to represent the Sensors to be enabled. More...
 
struct  Sensor_GyroConfiguration_S
 Structure representing the Gyro configurations. More...
 
struct  Sensor_LightConfiguration_S
 Structure representing the supported light sensor. More...
 
struct  Sensor_MagConfiguration_S
 Structure representing the Magnetometer configurations. More...
 
struct  Sensor_MagValue_S
 Structure to represent the Magnetometer Data. More...
 
struct  Sensor_Setup_S
 Structure to represent the Sensor setup features. More...
 
struct  Sensor_TempConfiguration_S
 Structure representing to configure Temperature sensor. More...
 
struct  Sensor_Value_S
 Structure to represent the Data Collector sampled node informations. More...
 

Typedefs

typedef struct
Sensor_AccelConfiguration_S 
Sensor_AccelConfiguration_T
 Typedef representing the accelerometer configurations. More...
 
typedef enum Sensor_AccelType_E Sensor_AccelType_T
 Typedef representing the supported Accelerometer sensor. More...
 
typedef struct Sensor_AxisValue_S Sensor_AccelValue_T
 Typedef to represent the Accelerometer Data. More...
 
typedef struct
Sensor_Configuration_S 
Sensor_Configuration_T
 
typedef struct Sensor_Enable_S Sensor_Enable_T
 Typedef to represent the Sensor to be enabled. More...
 
typedef struct
Sensor_GyroConfiguration_S 
Sensor_GyroConfiguration_T
 Typedef representing the Gyro configurations. More...
 
typedef enum Sensor_GyroType_E Sensor_GyroType_T
 Typedef representing the supported Gyroscope sensor. More...
 
typedef struct Sensor_AxisValue_S Sensor_GyroValue_T
 Typedef to represent the Gyroscope Data. More...
 
typedef struct
Sensor_LightConfiguration_S 
Sensor_LightConfiguration_T
 Typedef representing the supported light sensor. More...
 
typedef struct
Sensor_MagConfiguration_S 
Sensor_MagConfiguration_T
 Typedef representing the Magnetometer configurations. More...
 
typedef struct Sensor_MagValue_S Sensor_MagValue_T
 Typedef to represent the Magnetometer Data. More...
 
typedef struct Sensor_Setup_S Sensor_Setup_T
 Typedef to represent the Sensor setup features. More...
 
typedef struct
Sensor_TempConfiguration_S 
Sensor_TempConfiguration_T
 Typedef representing to configure Temperature sensor. More...
 
typedef struct Sensor_Value_S Sensor_Value_T
 Typedef to represent the Data Collector sampled node information. More...
 

Enumerations

enum  Sensor_AccelType_E
 Enum representing the supported Accelerometer sensors. More...
 
enum  Sensor_GyroType_E
 Enum representing the supported Gyroscope sensors. More...
 

Functions

Retcode_T Sensor_Enable (void)
 This will enable the Sensor module. More...
 
Retcode_T Sensor_GetData (Sensor_Value_T *value)
 This will sample the necessary sensor nodes. More...
 
Retcode_T Sensor_Setup (Sensor_Setup_T *setup)
 This will setup the Sensor module. More...
 

Detailed Description

This provides the basic sensor sampling feature with the default configuration. This supports only single thread for data sampling and reporting, yet.


Data Structure Documentation

struct Sensor_AccelConfiguration_S
Note
In the accel configuration the interupt enabled is ACCELEROMETER_BMA280_SLOPE_DURATION4 and the interupt is enabled when there is change of slope in y axis. Interupt configurations can be changed in Sensor.c file.

Data Fields

CmdProcessor_Func_T Callback
 
bool IsInteruptEnabled
 
bool IsRawData
 
Sensor_AccelType_T Type
 

Field Documentation

Accelerometer callback when interupt is enabled

bool IsInteruptEnabled

To check whether interupt is enabled, if not enabled then AccelCallback is not needed

bool IsRawData

To check whether Raw Accel data is required, if not converted G value is updated

Sensor to sample Accelerometer data. Unused if Enable.Accel is false. By default in-built BMA280 sensor is used.

struct Sensor_AxisValue_S

Data Fields

int32_t X
 
int32_t Y
 
int32_t Z
 

Field Documentation

int32_t X

x-axis value

int32_t Y

y-axis value

int32_t Z

z-axis value

struct Sensor_Configuration_S
+ Collaboration diagram for Sensor_Configuration_S:

Data Fields

Sensor_AccelConfiguration_T Accel
 
Sensor_GyroConfiguration_T Gyro
 
Sensor_LightConfiguration_T Light
 
Sensor_MagConfiguration_T Mag
 
Sensor_TempConfiguration_T Temp
 

Field Documentation

The accelerometer sensor configurations

The gyro sensor configurations

The light sensor configurations

The magnetometer sensor configurations

The temperature sensor configurations

struct Sensor_Enable_S

Data Fields

bool Accel
 
bool Gyro
 
bool Humidity
 
bool Light
 
bool Mag
 
bool Noise
 
bool Pressure
 
bool Temp
 

Field Documentation

bool Accel

Boolean representing if Accelerometer sensor is to be enabled or not

bool Gyro

Boolean representing if Gyroscope sensor is to be enabled or not

bool Humidity

Boolean representing if Humidity sensor is to be enabled or not

bool Light

Boolean representing if Light sensor is to be enabled or not

bool Mag

Boolean representing if Magnetometer sensor is to be enabled or not

bool Noise

Boolean representing if Noise sensor is to be enabled or not

bool Pressure

Boolean representing if Pressure sensor is to be enabled or not

bool Temp

Boolean representing if Temperature sensor is to be enabled or not

struct Sensor_GyroConfiguration_S

Data Fields

bool IsRawData
 
Sensor_GyroType_T Type
 

Field Documentation

bool IsRawData

To check whether Raw Gyro data is required, if not converted Degree Value is updated

Sensor to sample Gyroscope data. Unused if Enable.Gyro is false. By default in-built BMG160 sensor is used.

struct Sensor_LightConfiguration_S
Note
The configuration for light interupt are default values and the upper and lower threshold values are defined in sensor.c. Interupt configurations can be changed in Sensor.c file.

Data Fields

CmdProcessor_Func_T Callback
 
bool IsInteruptEnabled
 

Field Documentation

bool IsInteruptEnabled
struct Sensor_MagConfiguration_S

Data Fields

bool IsRawData
 

Field Documentation

bool IsRawData

To check whether Raw Magnetometer data is required, if not micro tesla value is updated

struct Sensor_MagValue_S

Data Fields

int32_t R
 
int32_t X
 
int32_t Y
 
int32_t Z
 

Field Documentation

int32_t R

Magnetometer sensor resistance value

int32_t X

Magnetometer sensor x-axis value

int32_t Y

Magnetometer sensor y-axis value

int32_t Z

Magnetometer sensor z-axis value

struct Sensor_Setup_S
+ Collaboration diagram for Sensor_Setup_S:

Data Fields

CmdProcessor_TCmdProcessorHandle
 
Sensor_Configuration_T Config
 
Sensor_Enable_T Enable
 

Field Documentation

CmdProcessor_T* CmdProcessorHandle

The Sensors to be enabled

struct Sensor_TempConfiguration_S
Note
The configuration for light interupt are default values and the upper and lower threshold values are defined in sensor.c. Interupt configurations can be changed in Sensor.c file.

Data Fields

int32_t OffsetCorrection
 

Field Documentation

int32_t OffsetCorrection

Temperature sensor offset correction value (in mDegC). Unused if Enable.Temp is false.

struct Sensor_Value_S
+ Collaboration diagram for Sensor_Value_S:

Data Fields

Sensor_AccelValue_T Accel
 
Sensor_GyroValue_T Gyro
 
uint32_t Light
 
Sensor_MagValue_T Mag
 
float Noise
 
uint32_t Pressure
 
uint32_t RH
 
double Temp
 

Field Documentation

uint32_t Light

Light sensor value

float Noise

Noise sensor value

uint32_t Pressure

Environmental sensor relative pressure value

uint32_t RH

Environmental sensor relative humidity value

double Temp

Environmental sensor relative temperature value

Typedef Documentation

Enumeration Type Documentation

Enumerator
SENSOR_ACCEL_BMA280 

In-built BMA280 sensor

SENSOR_ACCEL_BMI160 

In-built BMI160 sensor

Enumerator
SENSOR_GYRO_BMG160 

In-built BMG160 sensor

SENSOR_GYRO_BMI160 

In-built BMI160 sensor

Function Documentation

Retcode_T Sensor_Enable ( void  )
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • Based on setup->Enable value, it will enable the necessary sensors.
  • Sensor_Setup must have been successful prior.
  • Do not call this API more than once.

+ Here is the caller graph for this function:

Retcode_T Sensor_GetData ( Sensor_Value_T value)
Parameters
in/out]value The sampled sensor node values. User must provide a valid buffer.
Returns
RETCODE_OK on success, or an error code otherwise.
Note

+ Here is the caller graph for this function:

Retcode_T Sensor_Setup ( Sensor_Setup_T setup)
Parameters
[in]setupPointer to the Sensor setup feature
Returns
RETCODE_OK on success, or an error code otherwise.
Note
  • This must be the first API to be called if this Sensor feature is to be used.
  • Do not call this API more than once.

+ Here is the caller graph for this function:


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:50 by doxygen 1.8.8