Developer World
Spresense SDK Library v3.2.0-ebc0364
Logical sensors definition

Files

file  sensor_assertion.h
 
file  sensor_command.h
 

Classes

struct  SensorAssertionInfo
 Assert information structure. More...
 
struct  SensorCmdHeader
 the header of sensor commands. More...
 

Macros

#define SENSOR_NOERROR   0x00
 
#define SENSOR_ILLEGALSTATE   0x01
 
#define SENSOR_DUMPINIT_ERROR   0x10
 
#define SENSOR_INVALIDSENSORTYPE   0x11
 
#define SENSOR_PROCESSMODE_ERROR   0x19
 
#define SENSOR_INVALIDEVENTTYPE   0x1A
 
#define SENSOR_QUEUEFULL_ERROR   0x90
 
#define SENSOR_QUEUEEMPTY_ERROR   0x91
 
#define SENSOR_QUEUEPOP_ERROR   0x92
 
#define SENSOR_QUEUEPUSH_ERROR   0x93
 
#define SENSOR_RESORCEBUSY_ERROR   0x94
 
#define SENSOR_CPUFIFOSEND_ERROR   0x95
 
#define SENSOR_INVALIDARG   0xA0
 
#define SENSOR_INVALIDCOMMANDID   0xA1
 
#define SENSOR_NOTUPDATE   0xA2
 
#define SENSOR_TIMESTAMPDISCONTINUOUS   0xA3
 
#define SENSOR_ASSERTIONFAIL   0xA4
 

Typedefs

typedef unsigned char SensorErrorCode
 

Enumerations

enum  SensorEventType {
  InvalidSensorEvent = 0xFF , InitEvent = 0 , ExecEvent , FlushEvent ,
  SensorEventTypeNum
}
 codes of command events. More...
 
enum  SensorProcessMode {
  InvalidSensorProcessMode = 0xFF , CommonMode = 0 , StepCounterMode , GestureProcMode ,
  CompassProcMode , TramProcMode , TramliteProcMode
}
 codes of command logical sensor modes. More...
 
enum  SensorType {
  InvalidSensorType = 0xFF , StepCounter = 0 , ArmGesture , Compass ,
  TransportationMode , TransportationModeLite
}
 codes of command logical sensor types. More...
 
enum  SensorExecResult { SensorOK , SensorError , SensorWarning , SensorResultData }
 results. More...
 

Functions

bool is_async_msg (uint32_t data)
 
uint8_t get_async_msgtype (uint32_t param)
 
uint8_t get_async_msgparam (uint32_t param)
 
uint32_t make_async_msg (uint8_t type, uint8_t param)
 

Detailed Description

Macro Definition Documentation

◆ SENSOR_NOERROR

#define SENSOR_NOERROR   0x00

Success OK.

◆ SENSOR_ILLEGALSTATE

#define SENSOR_ILLEGALSTATE   0x01

State violation.

◆ SENSOR_DUMPINIT_ERROR

#define SENSOR_DUMPINIT_ERROR   0x10

Initialization error of dump function.

◆ SENSOR_INVALIDSENSORTYPE

#define SENSOR_INVALIDSENSORTYPE   0x11

Sensor type value error.

◆ SENSOR_PROCESSMODE_ERROR

#define SENSOR_PROCESSMODE_ERROR   0x19

Parameter process mode error

◆ SENSOR_INVALIDEVENTTYPE

#define SENSOR_INVALIDEVENTTYPE   0x1A

Parameter event type error.

◆ SENSOR_QUEUEFULL_ERROR

#define SENSOR_QUEUEFULL_ERROR   0x90

Queue is full.

◆ SENSOR_QUEUEEMPTY_ERROR

#define SENSOR_QUEUEEMPTY_ERROR   0x91

Queue is empty.

◆ SENSOR_QUEUEPOP_ERROR

#define SENSOR_QUEUEPOP_ERROR   0x92

Queue pop error.

◆ SENSOR_QUEUEPUSH_ERROR

#define SENSOR_QUEUEPUSH_ERROR   0x93

Queue push error.

◆ SENSOR_RESORCEBUSY_ERROR

#define SENSOR_RESORCEBUSY_ERROR   0x94

Resorce busy error.

◆ SENSOR_CPUFIFOSEND_ERROR

#define SENSOR_CPUFIFOSEND_ERROR   0x95

CPU fifo send error.

◆ SENSOR_INVALIDARG

#define SENSOR_INVALIDARG   0xA0

Illegal argument.

◆ SENSOR_INVALIDCOMMANDID

#define SENSOR_INVALIDCOMMANDID   0xA1

Invalid command ID.

◆ SENSOR_NOTUPDATE

#define SENSOR_NOTUPDATE   0xA2

No update.

◆ SENSOR_TIMESTAMPDISCONTINUOUS

#define SENSOR_TIMESTAMPDISCONTINUOUS   0xA3

Time stamps are not continuous.

◆ SENSOR_ASSERTIONFAIL

#define SENSOR_ASSERTIONFAIL   0xA4

Abnormal occurrence.

Enumeration Type Documentation

◆ SensorEventType

codes of command events.

Enumerator
InvalidSensorEvent 

Illegal event type.

InitEvent 

Initialization event.

ExecEvent 

Execution event.

FlushEvent 

Terminal event.

SensorEventTypeNum 

Number of events.

◆ SensorProcessMode

codes of command logical sensor modes.

Enumerator
InvalidSensorProcessMode 

Illegal process mode.

CommonMode 

Common mode.

StepCounterMode 

StepCounter mode.

GestureProcMode 

Gesture mode.

CompassProcMode 

Compass mode.

TramProcMode 

Tram mode.

TramliteProcMode 

Tramlite mode.

◆ SensorType

enum SensorType

codes of command logical sensor types.

Enumerator
InvalidSensorType 

Illegal sensor type.

StepCounter 

Step counter sensor type.

ArmGesture 

Arm Gesture sensor type.

Compass 

Compass sensor type.

TransportationMode 

Tram sensor type.

TransportationModeLite 

Tramlite sensor type.

◆ SensorExecResult

results.

Enumerator
SensorOK 

Command execution succeeded.

SensorError 

Command execution failed.

SensorWarning 

Warning is issued when the command is executed.

SensorResultData 

Result Event from logical sensor.