XDK API  3.6.0
Documentation
Files | Typedefs | Enumerations | Functions
Step Counter

Virtual Step Counter Sensor based on BMI160. More...

+ Collaboration diagram for Step Counter:

Files

file  BCDS_StepCounter.h
 

Typedefs

typedef void * StepCounter_HandlePtr_T
 
typedef enum StepCounter_Mode_E StepCounter_Mode_T
 

Enumerations

enum  StepCounter_Mode_E
 

Functions

Retcode_T StepCounter_clear (StepCounter_HandlePtr_T handle)
 Clear Step Counter value (Resets the step counts calculated) More...
 
Retcode_T StepCounter_deInit (StepCounter_HandlePtr_T handle)
 API to Deinitialise the step counter module. More...
 
Retcode_T StepCounter_init (StepCounter_HandlePtr_T handle)
 Initializes the Step Counter sensor.This API should return RETCODE_OK in order to communicate with sensor.This function needs to be called before calling any other function of the Step counter sensor api. More...
 
Retcode_T StepCounter_read (StepCounter_HandlePtr_T handle, int16_t *stepCounterValue)
 Read step count value (Provides the number of user steps) More...
 
Retcode_T StepCounter_setMode (StepCounter_HandlePtr_T handle, StepCounter_Mode_T stepCounterMode)
 Set Step Counter Mode
This sensor allows to configure the mode of the step counter. More...
 

Detailed Description

Step counter is used to calculate the number of steps by detecting the movement of the user.

Note
When counting steps, the update is done after a certain count in the beginning and also when moved from idle position.
- STEP_COUNTER_NORMAL_MODE has update delay of 7 steps
- STEP_COUNTER_SENSITIVE_MODE has update delay of 4 steps
- STEP_COUNTER_ROBUST_MODE has update delay of 11 steps

Limitations of stepcounter :
This sensor cannot be used while using virtual sensor fingerPrint

Typedef Documentation

typedef void* StepCounter_HandlePtr_T

Defines the handle for Step Counter sensor

Enumeration Type Documentation

Enum values that represent step counter modes

Enumerator
STEP_COUNTER_NORMAL_MODE 

Step counter NORMAL mode

STEP_COUNTER_SENSITIVE_MODE 

Step counter SENSITIVE mode

STEP_COUNTER_ROBUST_MODE 

Step counter ROBUST mode

STEP_COUNTER_INVALID_MODE 

This Specifies maximum number of enum elements and it is used only for error handling

Function Documentation

Retcode_T StepCounter_clear ( StepCounter_HandlePtr_T  handle)
Parameters
[in]StepCounter_HandlePtr_Tthe handle to the Step Counter object
Return values
RETCODE_OKStep Counter sensor initialization success.
RETCODE_NULL_POINTERIn case of invalid sensor handle.
Note
Refer #XdkSensorHandle.h for selecting the proper handle.
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T StepCounter_deInit ( StepCounter_HandlePtr_T  handle)
Parameters
[in]StepCounter_HandlePtr_Tthe handle to the Step Counter object which is to be deinitialised
Return values
RETCODE_OKStepCounter sensor De-initialization success.
RETCODE_FAILUREStepCounter sensor De-initialization failure.
Warning
This API needs to be called when we require to stop the StepCounter sensor data reading.
Note
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T StepCounter_init ( StepCounter_HandlePtr_T  handle)
Parameters
[in]StepCounter_HandlePtr_Tthe handle to the Step Counter object that should be initialized
Return values
RETCODE_SUCCESSStep Counter sensor initialization success.
RETCODE_NULL_POINTERIn case of invalid sensor handle.
Note
Refer #XdkSensorHandle.h for selecting the proper handle.
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T StepCounter_read ( StepCounter_HandlePtr_T  handle,
int16_t *  stepCounterValue 
)
Parameters
[in]StepCounter_HandlePtr_Tthe handle to the Step Counter object
[out]stepCounterValuevalue of Step count
Return values
RETCODE_OKReading step count value success.
RETCODE_NULL_POINTERIn case of invalid sensor handle.
Note
Refer #XdkSensorHandle.h for selecting the proper handle.
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.
Retcode_T StepCounter_setMode ( StepCounter_HandlePtr_T  handle,
StepCounter_Mode_T  stepCounterMode 
)
Parameters
[in]StepCounter_HandlePtr_Tthe handle to the Step Counter object
[in]stepCounterModevalue of Step counter mode
value mode
0 STEP_COUNTER_NORMAL_MODE (default setting, recommended for most applications)
1 STEP_COUNTER_SENSITIVE_MODE (can be used for light weighted, small persons)
2 STEP_COUNTER_ROBUST_MODE (can be used, if many false positive detections are observed)
Return values
RETCODE_OKStep Counter sensor initialization success.
RETCODE_NULL_POINTERIn case of invalid sensor handle.
Note
Refer #XdkSensorHandle.h for selecting the proper handle.
The return value consist of (First 1 MSByte represents Package ID, Next Byte represents Severity and Last 2 LSBytes represents error code).
Pass the return value of this function to #BCDS_getUserErrorCode() API to know the user type return code present in #BCDS_SensorErrorType.h.

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