libnifalcon::FalconCLIBase Class Reference
[Utility Classes]

#include <FalconCLIBase.h>

List of all members.

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

boost::shared_ptr< FalconDevicem_falconDevice
boost::program_options::options_description m_progOptions
boost::program_options::variables_map m_varMap
bool m_displayCalibrationMessage

Private Member Functions

 DECLARE_LOGGER ()


Detailed Description

FalconCLIBase provides an simple framework for building test applications with libnifalcon. It wraps the information needed from the user into a set of boost::program_options, and does the work of parsing command line options for:

The FalconCLIBase class is only available if the boost::program_options library is available on the system.

See the falcon_test_cli program for an example of a test suite program built using FalconCLIBase


Member Enumeration Documentation

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...


Constructor & Destructor Documentation

libnifalcon::FalconCLIBase::FalconCLIBase (  ) 

Constructor

virtual libnifalcon::FalconCLIBase::~FalconCLIBase (  )  [inline, virtual]

Destructor


Member Function Documentation

void libnifalcon::FalconCLIBase::addOptions ( int  value  )  [protected, virtual]

Builds options map. Overridden to add application specific options

bool libnifalcon::FalconCLIBase::calibrateDevice (  )  [protected]

Conveinence function for handling device calibration

libnifalcon::FalconCLIBase::DECLARE_LOGGER (  )  [private]

void libnifalcon::FalconCLIBase::outputProgramOptions (  )  [protected]

Prints help message

bool libnifalcon::FalconCLIBase::parseOptions ( int  argc,
char **  argv 
) [protected, virtual]

Parses options off command line. Overridden to handle application specific options

Returns:
True if command line options are parsed correctly, false otherwise


Member Data Documentation

String to display with calibration instructions

Internal device structure

boost::program_options::options_description libnifalcon::FalconCLIBase::m_progOptions [protected]

Structure of options that we'll allow

boost::program_options::variables_map libnifalcon::FalconCLIBase::m_varMap [protected]

Options passed to us through the command line


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

Generated on Sun Sep 20 12:24:31 2009 for libnifalcon by  doxygen 1.5.9