Aria  2.8.0
ArCompassConnector Class Reference

Use this class to create an instance of a TCM2 subclass and connect to the device based on program command line options. More...

#include <ArTCM2.h>

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
 

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.

The documentation for this class was generated from the following files: