Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
ViscaControl (bool blocking=true) | |
Constructor. More... | |
void | open (const char *port) |
Open serial port. More... | |
void | close () |
Close port. More... | |
void | set_address (unsigned int num_cameras) |
Set addresses of cameras. More... | |
void | clear () |
Clear. More... | |
void | send () |
Send outbound queue. More... | |
void | recv (unsigned int max_wait_ms=10) |
Receive data. More... | |
void | recv_ack (unsigned int *socket=NULL) |
Receive ACK packet. More... | |
void | send_with_reply () |
Send and wait for reply, blocking. More... | |
void | send_nonblocking (unsigned int *socket=NULL) |
Send non-blocking. More... | |
void | cancel_command (unsigned int socket) |
Cancel a running command. More... | |
bool | data_available () |
Check data availability. More... | |
void | process () |
Process incoming data. More... | |
void | resetPanTilt () |
Reset pan/tilt. More... | |
void | startGetPanTilt () |
Query for pan/tilt but do not wait until finished This will send an inquire to the camera that asks for pan/tilt values but it does not wait for the data! A later call to getPanTilt will then block and wait until the results arrive. More... | |
void | setPanTilt (int pan, int tilt) |
Set pan tilt. More... | |
void | getPanTilt (int *pan, int *tilt) |
Get pan and tilt values. More... | |
void | setPanTiltLimit (int pan_left, int pan_right, int tilt_up, int tilt_down) |
Set pan tilt limit. More... | |
void | resetPanTiltLimit () |
Reset pan/tilt limit. More... | |
void | resetZoom () |
Reset zoom. More... | |
void | setZoom (unsigned int zoom) |
Set zoom. More... | |
void | getZoom (unsigned int *zoom) |
Get zoom. More... | |
void | setZoomSpeedTele (unsigned int speed) |
Set zoom speed in tele. More... | |
void | setZoomSpeedWide (unsigned int speed) |
Set zoom speed in wide angle. More... | |
void | setZoomDigitalEnabled (bool enabled) |
Enable or disable digital zoome. More... | |
void | resetEffect () |
Reset effects. More... | |
void | applyEffect (unsigned char effect) |
Apply effect. More... | |
void | applyEffectPastel () |
Apply pastel effect. More... | |
void | applyEffectNegArt () |
Apply negative art effect. More... | |
void | applyEffectSepia () |
Apply sepia effect. More... | |
void | applyEffectBnW () |
Apply B/W effect. More... | |
void | applyEffectSolarize () |
Apply solarize effect. More... | |
void | applyEffectMosaic () |
Apply mosaic effect. More... | |
void | applyEffectSlim () |
Apply slim effect. More... | |
void | applyEffectStretch () |
Apply stretch effect. More... | |
unsigned int | getWhiteBalanceMode () |
Get white balance mode. More... | |
Static Public Attributes | |
static const unsigned int | VISCA_WHITEBLANCE_AUTO = VISCA_WB_AUTO |
Automatic white balance. More... | |
static const unsigned int | VISCA_WHITEBALANCE_INDOOR = VISCA_WB_INDOOR |
Indoor white balance preset. More... | |
static const unsigned int | VISCA_WHITEBALANCE_OUTDOOR = VISCA_WB_OUTDOOR |
Outdoor white balance preset. More... | |
static const unsigned int | VISCA_WHITEBALANCE_ONE_PUSH = VISCA_WB_ONE_PUSH |
One push white balance preset. More... | |
static const unsigned int | VISCA_WHITEBALANCE_ATW = VISCA_WB_ATW |
ATW white balance preset. More... | |
static const unsigned int | VISCA_WHITEBALANCE_MANUAL = VISCA_WB_MANUAL |
Manual white balance. More... | |
firevision::ViscaControl::ViscaControl | ( | bool | blocking = true | ) |
void firevision::ViscaControl::applyEffect | ( | unsigned char | filter | ) |
Apply effect.
filter | filter |
Definition at line 938 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::applyEffectBnW | ( | ) |
void firevision::ViscaControl::applyEffectMosaic | ( | ) |
void firevision::ViscaControl::applyEffectNegArt | ( | ) |
void firevision::ViscaControl::applyEffectPastel | ( | ) |
void firevision::ViscaControl::applyEffectSepia | ( | ) |
void firevision::ViscaControl::applyEffectSlim | ( | ) |
void firevision::ViscaControl::applyEffectSolarize | ( | ) |
void firevision::ViscaControl::applyEffectStretch | ( | ) |
void firevision::ViscaControl::cancel_command | ( | unsigned int | socket | ) |
Cancel a running command.
socket | socket that the command was send on |
Definition at line 464 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::clear | ( | ) |
bool firevision::ViscaControl::data_available | ( | ) |
Check data availability.
Definition at line 271 of file visca.cpp.
References fawkes::Exception::append().
void firevision::ViscaControl::getPanTilt | ( | int * | pan, |
int * | tilt | ||
) |
Get pan and tilt values.
If you used startGetPanTilt() to initiate the query the result is received and returned, otherwise a request is sent and the method blocks until the answer has been received.
pan | contains pan upon return |
tilt | contains tilt upon return |
Definition at line 590 of file visca.cpp.
References recv().
unsigned int firevision::ViscaControl::getWhiteBalanceMode | ( | ) |
Get white balance mode.
Definition at line 1066 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::getZoom | ( | unsigned int * | zoom | ) |
Get zoom.
zoom | contains zoom upon return. |
Definition at line 880 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::open | ( | const char * | port | ) |
void firevision::ViscaControl::process | ( | ) |
void firevision::ViscaControl::recv | ( | unsigned int | max_wait_ms = 10 | ) |
Receive data.
max_wait_ms | maximum wait time in miliseconds |
Definition at line 282 of file visca.cpp.
Referenced by clear(), getPanTilt(), and set_address().
void firevision::ViscaControl::recv_ack | ( | unsigned int * | socket = NULL | ) |
void firevision::ViscaControl::resetEffect | ( | ) |
void firevision::ViscaControl::resetPanTilt | ( | ) |
void firevision::ViscaControl::resetPanTiltLimit | ( | ) |
void firevision::ViscaControl::resetZoom | ( | ) |
void firevision::ViscaControl::send | ( | ) |
Send outbound queue.
Definition at line 243 of file visca.cpp.
Referenced by clear(), set_address(), and startGetPanTilt().
void firevision::ViscaControl::send_nonblocking | ( | unsigned int * | socket = NULL | ) |
Send non-blocking.
Does a non-blocking send.
socket | the socket that was used to send the request. |
Definition at line 348 of file visca.cpp.
Referenced by setPanTilt().
void firevision::ViscaControl::send_with_reply | ( | ) |
Send and wait for reply, blocking.
Definition at line 362 of file visca.cpp.
Referenced by applyEffect(), cancel_command(), getWhiteBalanceMode(), getZoom(), resetPanTilt(), resetPanTiltLimit(), resetZoom(), setPanTilt(), setZoom(), setZoomSpeedTele(), and setZoomSpeedWide().
void firevision::ViscaControl::set_address | ( | unsigned int | num_cameras | ) |
void firevision::ViscaControl::setPanTilt | ( | int | pan, |
int | tilt | ||
) |
Set pan tilt.
pan | pan |
tilt | tilt |
Definition at line 508 of file visca.cpp.
References send_nonblocking(), and send_with_reply().
void firevision::ViscaControl::setPanTiltLimit | ( | int | pan_left, |
int | pan_right, | ||
int | tilt_up, | ||
int | tilt_down | ||
) |
void firevision::ViscaControl::setZoom | ( | unsigned int | zoom | ) |
Set zoom.
zoom | zoom value |
Definition at line 855 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::setZoomDigitalEnabled | ( | bool | enabled | ) |
void firevision::ViscaControl::setZoomSpeedTele | ( | unsigned int | speed | ) |
Set zoom speed in tele.
speed | speed |
Definition at line 811 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::setZoomSpeedWide | ( | unsigned int | speed | ) |
Set zoom speed in wide angle.
speed | speed |
Definition at line 833 of file visca.cpp.
References send_with_reply().
void firevision::ViscaControl::startGetPanTilt | ( | ) |
Query for pan/tilt but do not wait until finished This will send an inquire to the camera that asks for pan/tilt values but it does not wait for the data! A later call to getPanTilt will then block and wait until the results arrive.
Initiate a pan/tilt request, but do not wait for the reply.
Not that you can not run another inquire (get*) method until this call has finished! You will get VISCA_E_INQRUNNING as error message.
Definition at line 562 of file visca.cpp.
References send().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |