Receiver interface for the fischertechnik IR control set

Dependencies:   NeedfulThings

Embed: (wiki syntax)

« Back to documentation index

FtControlSetMessage Class Reference

FtControlSetMessage Class Reference

interface class that translates the raw message of ft IR remote control More...

#include <FtControlSetMessage.h>

Public Types

enum  Status { OK = 0, FrameKO, ParityKO }
 

Status enum returned by getStatus().

More...

Public Member Functions

 FtControlSetMessage (uint32_t rawMessage)
 Constructor from raw 32bit message.
int32_t getLeftX () const
 get x position of left control stick [-15,15]
int32_t getLeftY () const
 get y position of left control stick [-15,15]
int32_t getRightX () const
 get x position of right control stick [-15,15]
int32_t getRightY () const
 get y position of right control stick [-15,15]
bool getOnButton () const
 get state of the ON button
bool getOffButton () const
 get state of the OFF button
bool getSwitch1 () const
 get state of switch 1 (Frequency setting)
bool getSwitch2 () const
 get state of switch 2 (Receiver ID)
Status getStatus () const
 get Status of this message, see Status
uint32_t getRawMessage () const
 get message in raw format

Detailed Description

interface class that translates the raw message of ft IR remote control

Note:
just a wrapper arround an evil bitfield, not really portable, ... but they are so handy

Definition at line 9 of file FtControlSetMessage.h.


Member Enumeration Documentation

enum Status

Status enum returned by getStatus().

Enumerator:
OK 

everything is fine

FrameKO 

wrong header ID

ParityKO 

parity error

Definition at line 37 of file FtControlSetMessage.h.


Constructor & Destructor Documentation

FtControlSetMessage ( uint32_t  rawMessage )

Constructor from raw 32bit message.

Definition at line 45 of file FtControlSetMessage.h.


Member Function Documentation

int32_t getLeftX (  ) const

get x position of left control stick [-15,15]

Definition at line 48 of file FtControlSetMessage.h.

int32_t getLeftY (  ) const

get y position of left control stick [-15,15]

Definition at line 52 of file FtControlSetMessage.h.

bool getOffButton (  ) const

get state of the OFF button

Definition at line 68 of file FtControlSetMessage.h.

bool getOnButton (  ) const

get state of the ON button

Definition at line 64 of file FtControlSetMessage.h.

uint32_t getRawMessage (  ) const

get message in raw format

Definition at line 85 of file FtControlSetMessage.h.

int32_t getRightX (  ) const

get x position of right control stick [-15,15]

Definition at line 56 of file FtControlSetMessage.h.

int32_t getRightY (  ) const

get y position of right control stick [-15,15]

Definition at line 60 of file FtControlSetMessage.h.

Status getStatus (  ) const

get Status of this message, see Status

Definition at line 80 of file FtControlSetMessage.h.

bool getSwitch1 (  ) const

get state of switch 1 (Frequency setting)

Definition at line 72 of file FtControlSetMessage.h.

bool getSwitch2 (  ) const

get state of switch 2 (Receiver ID)

Definition at line 76 of file FtControlSetMessage.h.