ptu_directedperception
Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ptu::Cmd Class Reference

#include <Cmd.h>

Static Public Member Functions

static std::string getPos (const Axis &axis, const bool &offset=false)
 
static std::string setPos (const int &val, const Axis &axis, const bool &offset=false)
 
static std::string getResolution (const Axis &axis)
 
static std::string getMinPos (const Axis &axis)
 
static std::string getMaxPos (const Axis &axis)
 
static std::string getPanLimitMode ()
 
static std::string setPanLimitMode (const bool &val)
 
static std::string enableImmediatePosExec ()
 
static std::string enableSlavedPosExec ()
 
static std::string awaitPosCmdCompletion ()
 
static std::string haltPosCmd (const bool &pan, const bool &tilt)
 
static std::string autoScan (const int &panPos1, const int &panPos2)
 
static std::string autoScan (const int &panPos1, const int &panPos2, const int &tiltPos1, const int &tiltPos2)
 
static std::string lastAutoScan ()
 
static std::string getAutoScanAtPowerUp ()
 
static std::string setAutoScanAtPowerUp (const bool &val)
 
static std::string stopAutoScan ()
 
static std::string preset (const int &index, const PresetAction &action)
 
static std::string getDesiredSpeed (const Axis &axis)
 
static std::string setDesiredSpeed (const int &val, const Axis &axis)
 
static std::string getCurrentSpeed (const Axis &axis)
 
static std::string setDesiredDeltaSpeed (const int &val, const Axis &axis)
 
static std::string getDesiredAccel (const Axis &axis)
 
static std::string setDesiredAccel (const int &val, const Axis &axis)
 
static std::string getDesiredBaseSpeed (const Axis &axis)
 
static std::string setDesiredBaseSpeed (const int &val, const Axis &axis)
 
static std::string getSpeedLimit (const Axis &axis, const AxisLimit &limit)
 
static std::string setSpeedLimit (const int &val, const Axis &axis, const AxisLimit &limit)
 
static std::string getCtrlMode ()
 
static std::string setCtrlMode (const CtrllMode &mode)
 

Static Public Attributes

static const std::string DELIM_CR = "\r"
 The CR delimiter. More...
 
static const std::string DELIM_SP = " "
 The space delimiter. More...
 
static const std::string SUCC_BEG = "*"
 The beginning of any successful command. More...
 
static const std::string ERR_BEG = "!"
 The beginning of any error. More...
 
static const std::string SUCC_CMD = "*\r"
 The return message for a successful command. More...
 

Protected Member Functions

 Cmd ()
 

Constructor & Destructor Documentation

◆ Cmd()

ptu::Cmd::Cmd ( )
protected

Member Function Documentation

◆ autoScan() [1/2]

string Cmd::autoScan ( const int &  panPos1,
const int &  panPos2 
)
static

Command defines and initiates repetitive monitoring (scanning) of the pan-tilt. Autoscanning is immediately terminated upon receipt of a character from the host computer, and the pan-tilt is sent to its home position.

Parameters
panPos1the pan position from where to start
panPos2the pan position where to stop
Returns
the properly formated message

◆ autoScan() [2/2]

string Cmd::autoScan ( const int &  panPos1,
const int &  panPos2,
const int &  tiltPos1,
const int &  tiltPos2 
)
static

Command defines and initiates repetitive monitoring (scanning) of the pan-tilt. Autoscanning is immediately terminated upon receipt of a character from the host computer, and the pan-tilt is sent to its home position.

Parameters
panPos1the pan position from where to start
panPos2the pan position where to stop
tiltPos1the tilt position from where to start
tiltPos2the tilt position where to stop
Returns
the properly formated message

◆ awaitPosCmdCompletion()

string Cmd::awaitPosCmdCompletion ( )
static

Await position command completion. Also useful for executing multiple coordinated position commands.

Returns
the properly formated message

◆ enableImmediatePosExec()

string Cmd::enableImmediatePosExec ( )
static

Enables immediate position execution mode.

Returns
the properly formated message

◆ enableSlavedPosExec()

string Cmd::enableSlavedPosExec ( )
static

Enables slaved position execution mode. Combine with await commands to execute multiple coordinated position commands.

Returns
the properly formated message

◆ getAutoScanAtPowerUp()

string Cmd::getAutoScanAtPowerUp ( )
static

Get autoscan status at power up.

Returns
the properly formated message

◆ getCtrlMode()

string Cmd::getCtrlMode ( )
static

Query the current speed control mode.

Returns
the properly formated message

◆ getCurrentSpeed()

string Cmd::getCurrentSpeed ( const Axis axis)
static

Get current pan / tilt speed in positions / sec.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getDesiredAccel()

string Cmd::getDesiredAccel ( const Axis axis)
static

Get desired pan / tilt accelearation in positions / sec^2.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getDesiredBaseSpeed()

string Cmd::getDesiredBaseSpeed ( const Axis axis)
static

Get desired pan / tilt base speed in positions / sec.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getDesiredSpeed()

string Cmd::getDesiredSpeed ( const Axis axis)
static

Get desired pan / tilt speed in positions / sec.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getMaxPos()

string Cmd::getMaxPos ( const Axis axis)
static

Get maximum position possible.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getMinPos()

string Cmd::getMinPos ( const Axis axis)
static

Get minimum position possible.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getPanLimitMode()

string Cmd::getPanLimitMode ( )
static

Get the pan position limit mode.

Returns
the properly formated message

◆ getPos()

string Cmd::getPos ( const Axis axis,
const bool &  offset = false 
)
static

Get current pan-tilt position.

Parameters
axisthe axis to be used
offsetif true, the relative value is used
Returns
the properly formated message

◆ getResolution()

string Cmd::getResolution ( const Axis axis)
static

Get resolution in arc seconds.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ getSpeedLimit()

string Cmd::getSpeedLimit ( const Axis axis,
const AxisLimit limit 
)
static

Get the upper and lower speed bounds for desired speed commands.

Parameters
axisthe axis to be used
limitthe limit to be queried (upper or lower)
Returns
the properly formated message

◆ haltPosCmd()

string Cmd::haltPosCmd ( const bool &  pan,
const bool &  tilt 
)
static

Halts position commands on specific axis.

Parameters
panif true, halts position command on pan axis
tiltif true, halts position command on tilt axis
Returns
the properly formated message

◆ lastAutoScan()

string Cmd::lastAutoScan ( )
static

Initiate last defined monitor (autoscan) command (the default at power up is pan axis only autoscan between the pan limit positions).

Returns
the properly formated message

◆ preset()

string Cmd::preset ( const int &  index,
const PresetAction action 
)
static

Sets, goes to or clear a preset position command.

Parameters
indexthe index of the preset to act upon
actionthe action to perform on preset
Returns
the properly formated message

◆ setAutoScanAtPowerUp()

string Cmd::setAutoScanAtPowerUp ( const bool &  val)
static

Enable / disable autoscan at power up.

Returns
the properly formated message

◆ setCtrlMode()

string Cmd::setCtrlMode ( const CtrllMode mode)
static

Set the current speed control mode (independent or pure speed)

◆ setDesiredAccel()

string Cmd::setDesiredAccel ( const int &  val,
const Axis axis 
)
static

Set desired pan / tilt acceleration in positions / sec^2.

Parameters
valthe desired acceleration
axisthe axis to be used
Returns
the properly formated message

◆ setDesiredBaseSpeed()

string Cmd::setDesiredBaseSpeed ( const int &  val,
const Axis axis 
)
static

Set desired pan / tilt base speed in positions / sec.

Parameters
valthe desired speed
axisthe axis to be used
Returns
the properly formated message

◆ setDesiredDeltaSpeed()

string Cmd::setDesiredDeltaSpeed ( const int &  val,
const Axis axis 
)
static

Set desired pan / tilt speed in position / sec as an offset from the current speed.

Parameters
axisthe axis to be used
Returns
the properly formated message

◆ setDesiredSpeed()

string Cmd::setDesiredSpeed ( const int &  val,
const Axis axis 
)
static

Set desired pan / tilt speed in positions / sec.

Parameters
valthe desired speed
axisthe axis to be used
Returns
the properly formated message

◆ setPanLimitMode()

string Cmd::setPanLimitMode ( const bool &  val)
static

Enable or disable pan position limits.

Returns
the properly formated message

◆ setPos()

string Cmd::setPos ( const int &  val,
const Axis axis,
const bool &  offset = false 
)
static

Set current pan-tilt position.

Parameters
valthe value to which to set the position
axisthe axis to be used
offsetif true, the relative value is used
Returns
the properly formated message

◆ setSpeedLimit()

string Cmd::setSpeedLimit ( const int &  val,
const Axis axis,
const AxisLimit limit 
)
static

Set the upper and lower speed bounds for desired speed commands.

Parameters
valthe desired speed bound
axisthe axis to be used
limitthe limit to be queried (upper or lower)
Returns
the properly formated message

◆ stopAutoScan()

string Cmd::stopAutoScan ( )
static

To stop the auto scan.

Member Data Documentation

◆ DELIM_CR

const string Cmd::DELIM_CR = "\r"
static

The CR delimiter.

◆ DELIM_SP

const string Cmd::DELIM_SP = " "
static

The space delimiter.

◆ ERR_BEG

const string Cmd::ERR_BEG = "!"
static

The beginning of any error.

◆ SUCC_BEG

const string Cmd::SUCC_BEG = "*"
static

The beginning of any successful command.

◆ SUCC_CMD

const string Cmd::SUCC_CMD = "*\r"
static

The return message for a successful command.


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