|
libnifalcon
1.0.1
|
#include <FalconCLIBase.h>
Collaboration diagram for libnifalcon::FalconCLIBase:Public Types | |
| enum | { DEVICE_OPTIONS = 0x1, COMM_OPTIONS = 0x2, FIRMWARE_OPTIONS = 0x4 } |
Public Member Functions | |
| FalconCLIBase () | |
| virtual | ~FalconCLIBase () |
Protected Member Functions | |
| virtual void | addOptions (int value) |
| virtual bool | parseOptions (int argc, char **argv) |
| void | outputProgramOptions () |
| bool | calibrateDevice () |
Protected Attributes | |
| std::unique_ptr< FalconDevice > | m_falconDevice |
| optparse::OptionParser | m_parser |
| bool | m_displayCalibrationMessage |
Private Member Functions | |
| DECLARE_LOGGER () | |
FalconCLIBase provides an simple framework for building test applications with libnifalcon. It wraps the information needed from the user into a set of cpp-optparse options, and does the work of parsing command line options for:
See the falcon_test_cli program for an example of a test suite program built using FalconCLIBase
| anonymous enum |
Enumeration of options that this class provides
| Enumerator | |
|---|---|
| DEVICE_OPTIONS |
Allows user to choose device index, see device count, etc... |
| COMM_OPTIONS |
Allows user to choose communications type. Not commonly used since comm is usually set by default in FalconDevice now (see FalconDevice constructor). |
| FIRMWARE_OPTIONS |
Allows user to choose firmware type, load firmware, etc... |
| libnifalcon::FalconCLIBase::FalconCLIBase | ( | ) |
Constructor
|
inlinevirtual |
Destructor
|
protectedvirtual |
Builds options map. Overridden to add application specific options
|
protected |
Conveinence function for handling device calibration
|
private |
|
protected |
Prints help message
|
protectedvirtual |
Parses options off command line. Overridden to handle application specific options
|
protected |
String to display with calibration instructions
|
protected |
Internal device structure
|
protected |
Structure of options that we'll allow
1.8.10