


Public Member Functions | |
| Visca (OptionManager &mgr, const std::string &descrName="Visca PTZ Controller", const std::string &tagName="ViscaPTZ", const char *defdev="/dev/ttyUSB1", const int cameraAddr=1) | |
| Default constructor; see ModelComponent.H. | |
| ~Visca () | |
| Destructor. | |
| virtual void | start2 () |
| This is called from within start() after the subcomponents have started. | |
| bool | movePanTilt (const int pan, const int tilt, bool relative=false, const int panSpeed=5, const int tiltSpeed=5) |
| Moves the camera, ptz. | |
| bool | resetPanTilt () |
| Reset the pan tilt. | |
| bool | zoom (const int val, bool relative=false) |
| zoom to a given value with a given speed | |
| bool | setFocus (const int val, bool relative=false) |
| set focus | |
| bool | setAutoFocus (const bool val) |
| set Auto focus | |
| bool | setTargetTracking () |
| set the target tracking option in the camera | |
| int | getCurrentZoom () |
| bool | getPanTilt (short int &pan, short int &tilt) |
Protected Member Functions | |
| int | sendRawCmd (const unsigned char *cmd, const int length) |
| Send the packet to the serial port. | |
Protected Attributes | |
| nub::soft_ref< Serial > | itsPort |
| Serial port to use. | |
Definition at line 47 of file Visca.H.
| Visca::Visca | ( | OptionManager & | mgr, | |
| const std::string & | descrName = "Visca PTZ Controller", |
|||
| const std::string & | tagName = "ViscaPTZ", |
|||
| const char * | defdev = "/dev/ttyUSB1", |
|||
| const int | cameraAddr = 1 | |||
| ) |
Default constructor; see ModelComponent.H.
Definition at line 45 of file Visca.C.
References ModelComponent::addSubComponent(), and itsPort.
| bool Visca::movePanTilt | ( | const int | pan, | |
| const int | tilt, | |||
| bool | relative = false, |
|||
| const int | panSpeed = 5, |
|||
| const int | tiltSpeed = 5 | |||
| ) |
Moves the camera, ptz.
Returns true on success, false if some serial error occurred.
Definition at line 111 of file Visca.C.
References sendRawCmd().
| bool Visca::resetPanTilt | ( | ) |
| int Visca::sendRawCmd | ( | const unsigned char * | cmd, | |
| const int | length | |||
| ) | [protected] |
Send the packet to the serial port.
Definition at line 65 of file Visca.C.
References itsPort.
Referenced by movePanTilt(), resetPanTilt(), setAutoFocus(), setFocus(), setTargetTracking(), and zoom().
| bool Visca::setAutoFocus | ( | const bool | val | ) |
| bool Visca::setFocus | ( | const int | val, | |
| bool | relative = false | |||
| ) |
| bool Visca::setTargetTracking | ( | ) |
set the target tracking option in the camera
Definition at line 313 of file Visca.C.
References sendRawCmd().
| void Visca::start2 | ( | ) | [virtual] |
This is called from within start() after the subcomponents have started.
Reimplemented from ModelComponent.
| bool Visca::zoom | ( | const int | val, | |
| bool | relative = false | |||
| ) |
zoom to a given value with a given speed
Definition at line 219 of file Visca.C.
References sendRawCmd().
nub::soft_ref<Serial> Visca::itsPort [protected] |
1.6.3