CHENGQI YANG / MGC3130

Dependencies:   BufferedArray

Dependents:   NucleoMGC3130 i2c_master

Embed: (wiki syntax)

« Back to documentation index

GestICMsg Class Reference

GestICMsg Class Reference

A message is the container to exchange data between GestIC Library and the application host. More...

#include <GestICMsg.h>

Inherited by SensorData.

Public Member Functions

 GestICMsg ()
 Construct a empty message.
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

A message is the container to exchange data between GestIC Library and the application host.

Each message has a minimum length of 4 bytes and a maximum of 255 bytes, and fits into the data packets of the communication interface (e.g., I2C). Each frame transports a single message (see Figure 3-1).

Definition at line 12 of file GestICMsg.h.


Constructor & Destructor Documentation

GestICMsg (  )

Construct a empty message.

Definition at line 3 of file GestICMsg.cpp.


Member Function Documentation

int getFlags (  )

Reserved for future use.

Returns:
always be 0x00

Definition at line 11 of file GestICMsg.cpp.

int getID (  )

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 (  )

Complete size of the message in bytes including the header.

Returns:
payload length, include head.

Definition at line 6 of file GestICMsg.cpp.

int getSeq (  )

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.