CHENGQI YANG / MGC3130

Dependencies:   BufferedArray

Dependents:   NucleoMGC3130 i2c_master

Embed: (wiki syntax)

« Back to documentation index

SensorData Class Reference

SensorData Class Reference

This message contains the sensor data output of the MGC3X30. More...

#include <SensorData.h>

Inherits GestICMsg.

Public Member Functions

 SensorData ()
 Construct a empty message.
 SensorData (GestICMsg *msg)
 Construct a message with existing as its base.
bool convert (GestICMsg *msg)
 Apply existing as its content.
bool isDSPStatus ()
 Check if DPS status information is included.
bool isGestureInfo ()
 Check if the gesture information is included.
bool isTouchInfo ()
 Check if touch information is included.
bool isAirWheelInfo ()
 Check if air wheel information is included.
bool isxyzPosition ()
 Check if xyz position information is included.
bool isNoisePower ()
 Check if noise power information is included.
bool isCICData ()
 Check if uncalibrated sensor data is included.
bool isSDData ()
 Check if signal deviation dtat is included.
bool isPositionValid ()
 Check if the position in the xyzPosition field is valid.
bool isAirWheelValid ()
 Check if the AirWheel is active and the data in the AirWheelInfo field is valid.
bool isRawDataValid ()
 Check if raw data is valid, if set indicates that the data of the CICData and SDData fields are valid; otherwise those fields must be ignored.
bool isNoisePowerValid ()
 Check if the NoisePower field is valid.
bool isEnvironmentalNoise ()
 Check if the environmental noise has been detected.
bool isClipping ()
 Check if the the ADCs are clipping.
bool isDSPRunning ()
 Check if the system is currently running.
int getTimeStamp ()
 200 Hz counter value wraps around after 256 ticks.
GestureInfogetGestureInfo ()
 Get detailed gesture information.
TouchInfogetTouchInfo ()
 Get detailed touch information.
int * getAirWheelInfo ()
 First: Value represents the current angular position with a resolution of 32 counts for a full revolution.
int * getxyzPosition ()
 Get x, y and z position data.
float getNoisePower ()
 Get noise power of the GestIC system.
float * getUncalibratedData ()
 Uncalibrated Sensor Data (CIC Data) Structure: Vector of five, 32-bit Words interpreted as float values in format.
float * getSignalDeviation ()
 Get signal deviation Structure: Vector of five, 32-bit Words interpreted as float values in xxxx.xxxx.xxxx.xxxx.xxxx (South.West.North.East.Center) format.
int getMsgSize ()
 Complete size of the message in bytes including the header.
int getFlags ()
 Reserved for future use.
int getSeq ()
 Sequence number which is increased for each message sent out by MGC3X30.
int getID ()
 For each ID, the GestIC Library holds a dedicated structure containing the message direction, its payload elements and possible reply actions.

Detailed Description

This message contains the sensor data output of the MGC3X30.

The content of the message can be configured via bit mask.The elements DataOutputConfigMask, TimeStamp, and SystemInfo are always part of the message. The inclusion of further payload elements depends on the Configuration, and the actual Configuration can be read from the payload element. DataOutputConfigMask.

Definition at line 13 of file SensorData.h.


Constructor & Destructor Documentation

SensorData (  )

Construct a empty message.

Definition at line 3 of file SensorData.cpp.

SensorData ( GestICMsg msg )

Construct a message with existing as its base.

Parameters:
msgreceived message

Definition at line 7 of file SensorData.cpp.


Member Function Documentation

bool convert ( GestICMsg msg )

Apply existing as its content.

Parameters:
msgreceived message, used by API itself.
Returns:
true current is a sensor payload and content has been updated. false current is not sensor payload and content not affected.

Definition at line 14 of file SensorData.cpp.

int * getAirWheelInfo (  )

First: Value represents the current angular position with a resolution of 32 counts for a full revolution.

Second: [0 - 7] Counts of full rotations. Each time the angular position crosses ‘0’, a full revolution is counted. If the users hand is moving in clockwise direction the counter is increased. For counterclockwise movements, the counter is decreased.

Returns:
int array [angular,Counts] NULL means data not avaliable

Definition at line 210 of file SensorData.cpp.

int getFlags (  ) [inherited]

Reserved for future use.

Returns:
always be 0x00

Definition at line 11 of file GestICMsg.cpp.

GestureInfo * getGestureInfo (  )

Get detailed gesture information.

Returns:
NULL means data not avaliable

Definition at line 263 of file SensorData.cpp.

int getID (  ) [inherited]

For each ID, the GestIC Library holds a dedicated structure containing the message direction, its payload elements and possible reply actions.

Returns:
ID of the messag.

Definition at line 21 of file GestICMsg.cpp.

int getMsgSize (  ) [inherited]

Complete size of the message in bytes including the header.

Returns:
payload length, include head.

Definition at line 6 of file GestICMsg.cpp.

float getNoisePower (  )

Get noise power of the GestIC system.

Returns:
float value

Definition at line 224 of file SensorData.cpp.

int getSeq (  ) [inherited]

Sequence number which is increased for each message sent out by MGC3X30.

Range is 0…255. The host controller can use that information to verify if the messages got lost during I2C™ transmission. MGC3X30 ignores the sequence number in the received messages.

Returns:
the sqeuence number

Definition at line 16 of file GestICMsg.cpp.

float * getSignalDeviation (  )

Get signal deviation Structure: Vector of five, 32-bit Words interpreted as float values in xxxx.xxxx.xxxx.xxxx.xxxx (South.West.North.East.Center) format.

Returns:
int array [South.West.North.East.Center] NULL means data not avaliable

Definition at line 250 of file SensorData.cpp.

int getTimeStamp (  )

200 Hz counter value wraps around after 256 ticks.

This indicates when an event has taken place and allows measuring the elapsed time between two events, as long as it is below approximately 1.25 seconds.

Returns:
8-Bit Counter of 200 Hz (Sample Interval)

Definition at line 129 of file SensorData.cpp.

TouchInfo * getTouchInfo (  )

Get detailed touch information.

Returns:
NULL means data not avaliable

Definition at line 200 of file SensorData.cpp.

float * getUncalibratedData (  )

Uncalibrated Sensor Data (CIC Data) Structure: Vector of five, 32-bit Words interpreted as float values in format.

An offset of 32000 needs to be added to each channel. xxxx.xxxx.xxxx.xxxx.xxxx (South.West.North.East.Center)

Returns:
int array [South.West.North.East.Center] NULL means data not avaliable

Definition at line 237 of file SensorData.cpp.

int * getxyzPosition (  )

Get x, y and z position data.

Returns:
int array [x,y,z] NULL means data not avaliable

Definition at line 185 of file SensorData.cpp.

bool isAirWheelInfo (  )

Check if air wheel information is included.

Returns:
true included false not included

Definition at line 93 of file SensorData.cpp.

bool isAirWheelValid (  )

Check if the AirWheel is active and the data in the AirWheelInfo field is valid.

Returns:
true valid false not valid

Definition at line 142 of file SensorData.cpp.

bool isCICData (  )

Check if uncalibrated sensor data is included.

Returns:
true included false not included

Definition at line 114 of file SensorData.cpp.

bool isClipping (  )

Check if the the ADCs are clipping.

Returns:
true valid false not valid

Definition at line 170 of file SensorData.cpp.

bool isDSPRunning (  )

Check if the system is currently running.

If not set, the system is about to go to Sleep.

Returns:
true valid false not valid

Definition at line 177 of file SensorData.cpp.

bool isDSPStatus (  )

Check if DPS status information is included.

Returns:
true included false not included

Definition at line 72 of file SensorData.cpp.

bool isEnvironmentalNoise (  )

Check if the environmental noise has been detected.

Returns:
true valid false not valid

Definition at line 163 of file SensorData.cpp.

bool isGestureInfo (  )

Check if the gesture information is included.

Returns:
true included false not included

Definition at line 79 of file SensorData.cpp.

bool isNoisePower (  )

Check if noise power information is included.

Returns:
true included false not included

Definition at line 107 of file SensorData.cpp.

bool isNoisePowerValid (  )

Check if the NoisePower field is valid.

Returns:
true valid false not valid

Definition at line 156 of file SensorData.cpp.

bool isPositionValid (  )

Check if the position in the xyzPosition field is valid.

Returns:
true valid false not valid

Definition at line 135 of file SensorData.cpp.

bool isRawDataValid (  )

Check if raw data is valid, if set indicates that the data of the CICData and SDData fields are valid; otherwise those fields must be ignored.

Returns:
true valid false not valid

Definition at line 149 of file SensorData.cpp.

bool isSDData (  )

Check if signal deviation dtat is included.

Returns:
true included false not included

Definition at line 121 of file SensorData.cpp.

bool isTouchInfo (  )

Check if touch information is included.

Returns:
true included false not included

Definition at line 86 of file SensorData.cpp.

bool isxyzPosition (  )

Check if xyz position information is included.

Returns:
true included false not included

Definition at line 100 of file SensorData.cpp.