Definition at line 12 of file JoystPacket.h.
Public Types | |
enum | { MOTORLEN = 1, SIGNLEN = 1, SPEEDLEN = 3, TOTLEN = SIGNLEN + MOTORLEN + SPEEDLEN + TIMELEN + TYPELEN } |
enumeration for Joyst packet data More... | |
Public Member Functions | |
JoystPacket () | |
Constructor for a new joystick packet. | |
JoystPacket (char data[TOTLEN]) | |
Constructor for an incomming joystick packet. | |
~JoystPacket () | |
Destructor for the joystick packet. | |
void | printPacket () |
print out the packet | |
int | setMotor (int newMotor) |
set the motor to controll | |
int | setSpeed (int newSp) |
set the speed of the motor (sets the sign as well) | |
int | getMotor () |
get the motor | |
int | getSpeed () |
get the speed of the motor | |
virtual void | registerPacket () |
register the packet to be sent on the outgoing socket | |
virtual int | sendPacket (int fd) |
set the packet over a file descriptor | |
Private Attributes | |
int | motor |
the motor to control | |
char | sign |
the sign of the speed | |
int | speed |
the speed of the command |
|
enumeration for Joyst packet data
Definition at line 17 of file JoystPacket.h. |
|
get the motor
|
|
get the speed of the motor
|
|
set the packet over a file descriptor
Implements Packet. |
|
set the motor to controll
|
|
set the speed of the motor (sets the sign as well)
|