Basic Image AlgorithmS Library
2.8.0
|
for use with Sony PanTilt Cameras, also compatible with WISKA PanTilt Cameras. More...
#include <PanTilt/ViscaControl.hh>
Public Types | |
enum | VISCA_CONSTANT { VISCA_ERROR =-1, VISCA_INTERLACED =0, VISCA_PROGRESSIVE } |
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
void | AdressSet () |
void | CamPower (bool mode) |
bool | ClosePanTiltUnit () |
void | ContinuousRead () |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
ViscaControl::VISCA_CONSTANT | GetCCDScanningMode () |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
int | GetMaxZoom () |
int | GetPan () |
int | GetTilt () |
int | GetZoom () |
bool | InitPanTiltUnit (std::string port) |
bool | IsConnected () |
void | LightOff () |
void | LightOn () |
void | ManageAnswer () |
Answers start with X0, where X is the camera number +8, e.g. More... | |
void | MoveAbsolute (short panPos, short tiltPos) |
void | MoveDown () |
void | MoveDownLeft () |
void | MoveDownRight () |
void | MoveHome () |
void | MoveLeft () |
void | MovePhysical (short panSteps, short tiltSteps) |
void | MoveRelative (short relPan, short relTilt) |
void | MoveRight () |
void | MoveStop () |
void | MoveUp () |
void | MoveUpLeft () |
void | MoveUpRight () |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
void | PanTiltPosInq () |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | ResetCamCustom () |
void | ResetPanTilt () |
void | SetActiveUnit (unsigned char activeUnit) |
bool | SetCCDScanningMode (VISCA_CONSTANT mode) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetPanSpeed (unsigned char panSpeed) |
void | SetTiltSpeed (unsigned char tiltSpeed) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
ViscaControl () | |
void | WaitForAck () |
void | Wash () |
void | Wipe () |
void | ZoomDirect (short zoom) |
void | ZoomInq () |
void | ZoomStop () |
void | ZoomTele () |
void | ZoomWide () |
~ViscaControl () | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Public Attributes | |
short int | pan_ |
short int | tilt_ |
bool | used_ |
short int | zoom_ |
Protected Member Functions | |
int | CamInitialize_ () |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
int | SendCommand_ (unsigned char *buf, int length, bool manageAnswer=true) |
adresses of cameras start with 1, eg, 0x81 is first cam the reply starts with 0 on 90, e.g. More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
unsigned char | activeUnit_ |
pthread_mutex_t | camMutex |
bool | connected_ |
int | maxZoom_ |
unsigned char | panSpeed_ |
unsigned char | sendBuffer [16] |
unsigned char * | sendPtr |
BIAS::SerialPortIO | serialIO_ |
unsigned char | tiltSpeed_ |
bool | zoomed_ |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
for use with Sony PanTilt Cameras, also compatible with WISKA PanTilt Cameras.
This is used to control a camera settings. It uses the class SerialPortIO to send commands and receive answers. Also included are some functions of the Camera (MoveUp...), they can be extended as needed (for a full list of functions see the reference manuals for the parts). The commands always start with 8X where X is the camera number, so 1 is the first camera!! and X of {1,...,7}. A broadcast is done with 88. Replies start with 9X and 0!! (unequal to request command!)
Definition at line 57 of file ViscaControl.hh.
Enumerator | |
---|---|
VISCA_ERROR | |
VISCA_INTERLACED | |
VISCA_PROGRESSIVE |
Definition at line 61 of file ViscaControl.hh.
ViscaControl::ViscaControl | ( | ) |
Definition at line 48 of file ViscaControl.cpp.
ViscaControl::~ViscaControl | ( | ) |
Definition at line 67 of file ViscaControl.cpp.
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
void ViscaControl::AdressSet | ( | ) |
Definition at line 383 of file ViscaControl.cpp.
|
protected |
Definition at line 346 of file ViscaControl.cpp.
void ViscaControl::CamPower | ( | bool | mode | ) |
Definition at line 331 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnCloseCam(), BIAS::wxViscaControlPanelButtons::OnCloseCam(), BIAS::wxViscaControlPanel::OnOpenCam(), and BIAS::wxViscaControlPanelButtons::OnOpenCam().
bool ViscaControl::ClosePanTiltUnit | ( | ) |
Definition at line 92 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnConnect(), and BIAS::wxViscaControlPanelButtons::OnConnect().
|
inlineprotectedinherited |
void ViscaControl::ContinuousRead | ( | ) |
Definition at line 122 of file ViscaControl.cpp.
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
ViscaControl::VISCA_CONSTANT ViscaControl::GetCCDScanningMode | ( | ) |
Definition at line 652 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnProgressive(), and BIAS::wxViscaControlPanelButtons::OnProgressive().
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inline |
Definition at line 132 of file ViscaControl.hh.
Referenced by BIAS::wxViscaControlPanel::OnScrollZoom(), and BIAS::wxViscaControlPanelButtons::OnScrollZoom().
|
inline |
Definition at line 133 of file ViscaControl.hh.
Referenced by BIAS::wxViscaControlPanelButtons::OnLeft(), and BIAS::wxViscaControlPanelButtons::OnRight().
|
inline |
Definition at line 134 of file ViscaControl.hh.
Referenced by BIAS::wxViscaControlPanelButtons::OnDown(), BIAS::wxViscaControlPanelButtons::OnDownLeft(), BIAS::wxViscaControlPanelButtons::OnDownRight(), BIAS::wxViscaControlPanelButtons::OnUp(), BIAS::wxViscaControlPanelButtons::OnUpLeft(), and BIAS::wxViscaControlPanelButtons::OnUpRight().
|
inline |
Definition at line 135 of file ViscaControl.hh.
bool ViscaControl::InitPanTiltUnit | ( | std::string | port | ) |
Definition at line 71 of file ViscaControl.cpp.
References BIAS::SPPM_NoParity.
Referenced by BIAS::wxViscaControlPanel::OnConnect(), and BIAS::wxViscaControlPanelButtons::OnConnect().
|
inline |
Definition at line 128 of file ViscaControl.hh.
Referenced by BIAS::wxViscaControlPanelButtons::OnButtonHome(), BIAS::wxViscaControlPanel::OnButtonReset(), BIAS::wxViscaControlPanelButtons::OnButtonReset(), BIAS::wxViscaControlPanel::OnButtonStop(), BIAS::wxViscaControlPanelButtons::OnButtonStop(), BIAS::wxViscaControlPanel::OnButtonTele(), BIAS::wxViscaControlPanelButtons::OnButtonTele(), BIAS::wxViscaControlPanel::OnButtonWide(), BIAS::wxViscaControlPanelButtons::OnButtonWide(), BIAS::wxViscaControlPanel::OnCloseCam(), BIAS::wxViscaControlPanelButtons::OnCloseCam(), BIAS::wxViscaControlPanel::OnConnect(), BIAS::wxViscaControlPanelButtons::OnConnect(), BIAS::wxViscaControlPanelButtons::OnDown(), BIAS::wxViscaControlPanelButtons::OnDownLeft(), BIAS::wxViscaControlPanelButtons::OnDownRight(), BIAS::wxViscaControlPanelButtons::OnLeft(), BIAS::wxViscaControlPanel::OnOpenCam(), BIAS::wxViscaControlPanelButtons::OnOpenCam(), BIAS::wxViscaControlPanel::OnProgressive(), BIAS::wxViscaControlPanelButtons::OnProgressive(), BIAS::wxViscaControlPanelButtons::OnRight(), BIAS::wxViscaControlPanel::OnScrollPan(), BIAS::wxViscaControlPanel::OnScrollTilt(), BIAS::wxViscaControlPanelButtons::OnStop(), BIAS::wxViscaControlPanelButtons::OnUp(), BIAS::wxViscaControlPanelButtons::OnUpLeft(), and BIAS::wxViscaControlPanelButtons::OnUpRight().
void ViscaControl::LightOff | ( | ) |
Definition at line 285 of file ViscaControl.cpp.
void ViscaControl::LightOn | ( | ) |
Definition at line 270 of file ViscaControl.cpp.
void ViscaControl::ManageAnswer | ( | ) |
Answers start with X0, where X is the camera number +8, e.g.
90 is camera 1
Definition at line 129 of file ViscaControl.cpp.
void ViscaControl::MoveAbsolute | ( | short | panPos, |
short | tiltPos | ||
) |
Definition at line 227 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnScrollPan(), and BIAS::wxViscaControlPanel::OnScrollTilt().
void ViscaControl::MoveDown | ( | ) |
Definition at line 466 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnDown().
void ViscaControl::MoveDownLeft | ( | ) |
Definition at line 481 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnDownLeft().
void ViscaControl::MoveDownRight | ( | ) |
Definition at line 496 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnDownRight().
void ViscaControl::MoveHome | ( | ) |
Definition at line 372 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnButtonHome().
void ViscaControl::MoveLeft | ( | ) |
Definition at line 393 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnLeft().
void ViscaControl::MovePhysical | ( | short | panSteps, |
short | tiltSteps | ||
) |
Definition at line 248 of file ViscaControl.cpp.
void ViscaControl::MoveRelative | ( | short | relPan, |
short | relTilt | ||
) |
Definition at line 206 of file ViscaControl.cpp.
void ViscaControl::MoveRight | ( | ) |
Definition at line 408 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnRight().
void ViscaControl::MoveStop | ( | ) |
Definition at line 511 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnButtonHome(), and BIAS::wxViscaControlPanelButtons::OnStop().
void ViscaControl::MoveUp | ( | ) |
Definition at line 422 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnUp().
void ViscaControl::MoveUpLeft | ( | ) |
Definition at line 436 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnUpLeft().
void ViscaControl::MoveUpRight | ( | ) |
Definition at line 451 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanelButtons::OnUpRight().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
void ViscaControl::PanTiltPosInq | ( | ) |
Definition at line 362 of file ViscaControl.cpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
void ViscaControl::ResetCamCustom | ( | ) |
Definition at line 578 of file ViscaControl.cpp.
void ViscaControl::ResetPanTilt | ( | ) |
Definition at line 567 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnButtonReset(), and BIAS::wxViscaControlPanelButtons::OnButtonReset().
|
protected |
adresses of cameras start with 1, eg, 0x81 is first cam the reply starts with 0 on 90, e.g.
0.90 is first cam
Definition at line 105 of file ViscaControl.cpp.
|
inline |
Definition at line 114 of file ViscaControl.hh.
bool ViscaControl::SetCCDScanningMode | ( | VISCA_CONSTANT | mode | ) |
Definition at line 632 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnProgressive(), and BIAS::wxViscaControlPanelButtons::OnProgressive().
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inline |
Definition at line 106 of file ViscaControl.hh.
|
inline |
Definition at line 109 of file ViscaControl.hh.
|
inlineinherited |
void BIAS::ViscaControl::WaitForAck | ( | ) |
void ViscaControl::Wash | ( | ) |
Definition at line 300 of file ViscaControl.cpp.
void ViscaControl::Wipe | ( | ) |
Definition at line 315 of file ViscaControl.cpp.
void ViscaControl::ZoomDirect | ( | short | zoom | ) |
Definition at line 605 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnScrollZoom(), and BIAS::wxViscaControlPanelButtons::OnScrollZoom().
void ViscaControl::ZoomInq | ( | ) |
Definition at line 591 of file ViscaControl.cpp.
void ViscaControl::ZoomStop | ( | ) |
Definition at line 553 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnButtonStop(), and BIAS::wxViscaControlPanelButtons::OnButtonStop().
void ViscaControl::ZoomTele | ( | ) |
Definition at line 527 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnButtonTele(), and BIAS::wxViscaControlPanelButtons::OnButtonTele().
void ViscaControl::ZoomWide | ( | ) |
Definition at line 541 of file ViscaControl.cpp.
Referenced by BIAS::wxViscaControlPanel::OnButtonWide(), and BIAS::wxViscaControlPanelButtons::OnButtonWide().
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
Definition at line 162 of file ViscaControl.hh.
|
protected |
Definition at line 152 of file ViscaControl.hh.
|
protected |
Definition at line 155 of file ViscaControl.hh.
|
staticprotectedinherited |
|
protected |
Definition at line 156 of file ViscaControl.hh.
short int BIAS::ViscaControl::pan_ |
Definition at line 139 of file ViscaControl.hh.
|
protected |
Definition at line 160 of file ViscaControl.hh.
|
protected |
Definition at line 157 of file ViscaControl.hh.
|
protected |
Definition at line 158 of file ViscaControl.hh.
|
protected |
Definition at line 164 of file ViscaControl.hh.
short int BIAS::ViscaControl::tilt_ |
Definition at line 139 of file ViscaControl.hh.
|
protected |
Definition at line 161 of file ViscaControl.hh.
bool BIAS::ViscaControl::used_ |
Definition at line 141 of file ViscaControl.hh.
short int BIAS::ViscaControl::zoom_ |
Definition at line 139 of file ViscaControl.hh.
|
protected |
Definition at line 154 of file ViscaControl.hh.