#include <Driver.h>
|
| | Driver () |
| |
| | ~Driver () |
| |
| float | getMinPanRad () |
| |
| float | getMaxPanRad () |
| |
| float | getMinTiltRad () |
| |
| float | getMaxTiltRad () |
| |
| void | initialize () |
| |
| void | write (const std::string &msg) |
| |
| std::string | readAns () |
| |
| template<typename T > |
| T | getQuery (const std::string &answer) |
| |
| int | getPos (Axis axis, bool offset) |
| |
| float | getPosDeg (Axis axis, bool offset) |
| |
| float | getPosRad (Axis axis, bool offset) |
| |
| bool | setPosDeg (const Axis &axis, const bool &offset, const float &val, const bool &awaitCompletion=false) |
| |
| bool | setPosRad (const Axis &axis, const bool &offset, const float &val, const bool &awaitCompletion=false) |
| |
| bool | setPos (const Axis &axis, const bool &offset=false, const int &val=0, const bool &awaitCompletion=false) |
| |
| void | setSpeed (Axis axis, int speed) |
| |
| void | setSpeedDeg (Axis axis, float speed) |
| |
| void | setSpeedRad (Axis axis, float speed) |
| |
| void | setHalt () |
| |
| int Driver::extractPacket |
( |
const uint8_t * |
buffer, |
|
|
size_t |
size |
|
) |
| const |
|
protected |
Find a packet into the currently accumulated data.
| float ptu::Driver::getMaxPanRad |
( |
| ) |
|
|
inline |
The maximum pan postion in rad.
| float ptu::Driver::getMaxTiltRad |
( |
| ) |
|
|
inline |
The maximum tilt postion in rad.
| float ptu::Driver::getMinPanRad |
( |
| ) |
|
|
inline |
The minimum pan postion in rad.
| float ptu::Driver::getMinTiltRad |
( |
| ) |
|
|
inline |
The minimum tilt postion in rad.
| int Driver::getPos |
( |
Axis |
axis, |
|
|
bool |
offset |
|
) |
| |
Get current pan-tilt position.
- Parameters
-
| axis | the axis to be used |
| offset | if true, the relative value is used |
- Returns
- position
| float Driver::getPosDeg |
( |
Axis |
axis, |
|
|
bool |
offset |
|
) |
| |
Get the position as degree value instead of ticks as given by getPos.
- Parameters
-
| axis | Select the axis to be read out. (PAN or TILT) |
| offset | if true the offset command will be used. |
- Returns
- the position of selected axis as degree value. (0 is front center).
| float Driver::getPosRad |
( |
Axis |
axis, |
|
|
bool |
offset |
|
) |
| |
Get the position in radian.
- See also
- getPos
template<typename T >
| T ptu::Driver::getQuery |
( |
const std::string & |
answer | ) |
|
|
inline |
Converts an answer to a value of type T. The answer string is like '* <result><CR>'.
| void Driver::initialize |
( |
| ) |
|
Initial communication with the device to set proper modes and query limits.
| std::string Driver::readAns |
( |
| ) |
|
Read the answer of a query.
- Parameters
-
- Returns
- answer string
| bool Driver::setPos |
( |
const Axis & |
axis, |
|
|
const bool & |
offset = false, |
|
|
const int & |
val = 0, |
|
|
const bool & |
awaitCompletion = false |
|
) |
| |
Set current pan-tilt position.
- Parameters
-
| val | the value to which to set the position |
| axis | the axis to be used |
| offset | if true, the relative value is used |
| awaitCompletion | force the command to be completed before next command will be processed. |
- Returns
- true if successful
| bool Driver::setPosDeg |
( |
const Axis & |
axis, |
|
|
const bool & |
offset, |
|
|
const float & |
val, |
|
|
const bool & |
awaitCompletion = false |
|
) |
| |
Set the Position for selected axis to given value in degree.
- Parameters
-
| axis | Specify the axis which should be set (PAN, TILT). |
| offset | Select if the position should be set as an offset from current position or if false it will be set as absolute value (while 0 is front center). |
| awaitCompletion | Set if movement should be completed before processing next command. |
- Returns
- Returns bool value. true if success, false otherwise.
| bool Driver::setPosRad |
( |
const Axis & |
axis, |
|
|
const bool & |
offset, |
|
|
const float & |
val, |
|
|
const bool & |
awaitCompletion = false |
|
) |
| |
Set the position in radian.
- See also
- setPos
| void Driver::setSpeed |
( |
Axis |
axis, |
|
|
int |
speed |
|
) |
| |
Set desired speed for an axis in positions/second.
| void Driver::setSpeedDeg |
( |
Axis |
axis, |
|
|
float |
speed |
|
) |
| |
Set desired speed for an axis in degree/second.
| void Driver::setSpeedRad |
( |
Axis |
axis, |
|
|
float |
speed |
|
) |
| |
Set desired speed for an axis in radian/second.
| void Driver::write |
( |
const std::string & |
msg | ) |
|
Sends a message to the device.
- Parameters
-
| msg | the message to be sent |
| timeout | timeout in ms |
- Exceptions
-
| iodrivers_base | write errors |
The documentation for this class was generated from the following files:
- /build/rock-master-18.09-drivers-ptu-directedperception-0.20171014/src/Driver.h
- /build/rock-master-18.09-drivers-ptu-directedperception-0.20171014/src/Driver.cpp