Aria
2.8.0
|
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 |
ArTCM2 * | create (ArRobot *robot) |
Protected Types | |
enum | DeviceType { Robot, SerialTCM, None } |
Protected Member Functions | |
void | logOptions () |
bool | parseArgs () |
Protected Attributes | |
ArArgumentParser * | myArgParser |
DeviceType | myDeviceType |
ArFunctorC< ArCompassConnector > | myLogArgsCallback |
ArRetFunctorC< bool, ArCompassConnector > | myParseArgsCallback |
ArRobot * | myRobot |
const char * | mySerialPort |
ArFunctor * | mySerialTCMReadFunctor |
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)