Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

InputHandler Class Reference

List of all members.

Public Member Functions

void down (void)
 Down arrow key handler: drive the robot backward.
 InputHandler (ArClientBase *client, ArKeyHandler *keyHandler)
void left (void)
 Left arrow key handler: turn the robot left.
void listData ()
void logTrackingTerse ()
void logTrackingVerbose ()
void resetTracking ()
void right (void)
 Right arrow key handler: turn the robot right.
void safeDrive ()
 Send a request to enable "safe drive" mode on the server.
void sendInput (void)
 Send drive request to the server with stored values.
void unsafeDrive ()
 Send a request to disable "safe drive" mode on the server.
void up (void)
 Up arrow key handler: drive the robot forward.
virtual ~InputHandler (void)

Protected Attributes

ArClientBasemyClient
ArKeyHandlermyKeyHandler
bool myPrinting
 Set this to true in the constructor to print out debugging information.
double myRotRatio
 Current rotation ration value (a percentage of the maximum rotational velocity).
double myTransRatio
 Current translation value (a percentage of the maximum speed).
ArFunctorC< InputHandlermyDownCB
ArFunctorC< InputHandlermyLeftCB
ArFunctorC< InputHandlermyListDataCB
ArFunctorC< InputHandlermyLogTrackingTerseCB
ArFunctorC< InputHandlermyLogTrackingVerboseCB
ArFunctorC< InputHandlermyResetTrackingCB
ArFunctorC< InputHandlermyRightCB
ArFunctorC< InputHandlermySafeDriveCB
ArFunctorC< InputHandlermyUnsafeDriveCB
ArFunctorC< InputHandlermyUpCB

Constructor & Destructor Documentation

InputHandler::InputHandler ArClientBase client,
ArKeyHandler keyHandler
 

Parameters:
client Our client networking object
keyHandler Key handler to register command callbacks with

Definition at line 116 of file clientDemo.cpp.

References ArKeyHandler::addKeyHandler(), client, myDownCB, myKeyHandler, myLeftCB, myListDataCB, myLogTrackingTerseCB, myLogTrackingVerboseCB, myResetTrackingCB, myRightCB, mySafeDriveCB, myUnsafeDriveCB, and myUpCB.

InputHandler::~InputHandler void   )  [virtual]
 

Definition at line 147 of file clientDemo.cpp.


Member Function Documentation

void InputHandler::down void   ) 
 

Down arrow key handler: drive the robot backward.

Definition at line 159 of file clientDemo.cpp.

References myPrinting, and myTransRatio.

void InputHandler::left void   ) 
 

Left arrow key handler: turn the robot left.

Definition at line 166 of file clientDemo.cpp.

References myPrinting, and myRotRatio.

void InputHandler::listData  ) 
 

Definition at line 210 of file clientDemo.cpp.

References ArClientBase::logDataList(), and myClient.

void InputHandler::logTrackingTerse  ) 
 

Definition at line 215 of file clientDemo.cpp.

References ArClientBase::logTracking(), and myClient.

void InputHandler::logTrackingVerbose  ) 
 

Definition at line 220 of file clientDemo.cpp.

References ArClientBase::logTracking(), and myClient.

void InputHandler::resetTracking  ) 
 

Definition at line 225 of file clientDemo.cpp.

References myClient, and ArClientBase::resetTracking().

void InputHandler::right void   ) 
 

Right arrow key handler: turn the robot right.

Definition at line 173 of file clientDemo.cpp.

References myPrinting, and myRotRatio.

void InputHandler::safeDrive  ) 
 

Send a request to enable "safe drive" mode on the server.

Definition at line 180 of file clientDemo.cpp.

References ArBasePacket::byteToBuf(), myClient, myPrinting, and ArClientBase::requestOnce().

Referenced by main().

void InputHandler::sendInput void   ) 
 

Send drive request to the server with stored values.

Definition at line 231 of file clientDemo.cpp.

References ArClientBase::dataExists(), ArNetPacket::doubleToBuf(), myClient, myPrinting, myRotRatio, myTransRatio, and ArClientBase::requestOnce().

Referenced by main().

void InputHandler::unsafeDrive  ) 
 

Send a request to disable "safe drive" mode on the server.

Definition at line 195 of file clientDemo.cpp.

References ArBasePacket::byteToBuf(), myClient, myPrinting, and ArClientBase::requestOnce().

void InputHandler::up void   ) 
 

Up arrow key handler: drive the robot forward.

Definition at line 152 of file clientDemo.cpp.

References myPrinting, and myTransRatio.


Member Data Documentation

ArClientBase* InputHandler::myClient [protected]
 

Definition at line 88 of file clientDemo.cpp.

Referenced by listData(), logTrackingTerse(), logTrackingVerbose(), resetTracking(), safeDrive(), sendInput(), and unsafeDrive().

ArFunctorC<InputHandler> InputHandler::myDownCB [protected]
 

Definition at line 104 of file clientDemo.cpp.

Referenced by InputHandler().

ArKeyHandler* InputHandler::myKeyHandler [protected]
 

Definition at line 89 of file clientDemo.cpp.

Referenced by InputHandler().

ArFunctorC<InputHandler> InputHandler::myLeftCB [protected]
 

Definition at line 105 of file clientDemo.cpp.

Referenced by InputHandler().

ArFunctorC<InputHandler> InputHandler::myListDataCB [protected]
 

Definition at line 109 of file clientDemo.cpp.

Referenced by InputHandler().

ArFunctorC<InputHandler> InputHandler::myLogTrackingTerseCB [protected]
 

Definition at line 110 of file clientDemo.cpp.

Referenced by InputHandler().

ArFunctorC<InputHandler> InputHandler::myLogTrackingVerboseCB [protected]
 

Definition at line 111 of file clientDemo.cpp.

Referenced by InputHandler().

bool InputHandler::myPrinting [protected]
 

Set this to true in the constructor to print out debugging information.

Definition at line 92 of file clientDemo.cpp.

Referenced by down(), left(), right(), safeDrive(), sendInput(), unsafeDrive(), and up().

ArFunctorC<InputHandler> InputHandler::myResetTrackingCB [protected]
 

Definition at line 112 of file clientDemo.cpp.

Referenced by InputHandler().

ArFunctorC<InputHandler> InputHandler::myRightCB [protected]
 

Definition at line 106 of file clientDemo.cpp.

Referenced by InputHandler().

double InputHandler::myRotRatio [protected]
 

Current rotation ration value (a percentage of the maximum rotational velocity).

Definition at line 98 of file clientDemo.cpp.

Referenced by left(), right(), and sendInput().

ArFunctorC<InputHandler> InputHandler::mySafeDriveCB [protected]
 

Definition at line 107 of file clientDemo.cpp.

Referenced by InputHandler().

double InputHandler::myTransRatio [protected]
 

Current translation value (a percentage of the maximum speed).

Definition at line 95 of file clientDemo.cpp.

Referenced by down(), sendInput(), and up().

ArFunctorC<InputHandler> InputHandler::myUnsafeDriveCB [protected]
 

Definition at line 108 of file clientDemo.cpp.

Referenced by InputHandler().

ArFunctorC<InputHandler> InputHandler::myUpCB [protected]
 

Definition at line 103 of file clientDemo.cpp.

Referenced by InputHandler().


The documentation for this class was generated from the following file:
Generated on Tue Feb 20 10:51:52 2007 for ArNetworking by  doxygen 1.4.0