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

ArCompassConnector Class Reference

#include <ArTCM2.h>

List of all members.


Detailed Description

Use this class to create an instance of a TCM2 subclass and connect to the device based on program command line options. This allows the user of a program to select a different kind of compass configuration (for example, if the compass is connected to a computer serial port, use ArTCMCompassDirect instead of the normal ArTCMCompassRobot.)

The following command-line arguments are checked:

Compass options:
-compassType <robot|serialTCM>	Select compass device type (default: robot)
-compassPort <port>	Serial port for "serialTCM" type compass. (default: /dev/ttyS3)
Examples:

demo.cpp.


Public Member Functions

 ArCompassConnector (ArArgumentParser *argParser)
bool connect (ArTCM2 *) const
ArTCM2create (ArRobot *robot)

Protected Types

enum  DeviceType { Robot, SerialTCM, None }

Protected Member Functions

void logOptions ()
bool parseArgs ()

Protected Attributes

ArArgumentParsermyArgParser
DeviceType myDeviceType
ArFunctorC< ArCompassConnectormyLogArgsCallback
ArRetFunctorC< bool, ArCompassConnectormyParseArgsCallback
ArRobotmyRobot
const char * mySerialPort
ArFunctormySerialTCMReadFunctor


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:40 2010 for Aria by  doxygen 1.4.2