#include <PTUFree.h>
Public Member Functions | |
bool | awaitPositionCommandCompletion () |
awaitPositionCommandCompletion Method to wait for the completion of the last issued pan and tilt position command (waits until ptu stops). More... | |
bool | clearPreset () |
clearPreset Method to delete all existing presets. WARNING: Does not work on older PTUs and is not tested. More... | |
void | closeSerialConnection () |
closeSerialConnection Closes currently used serial port More... | |
std::string | communicate (std::string request) |
communicate Method to send a command 'request' to the serial port (and the device) and recieve the answer More... | |
std::vector< std::string > | evaluateResponse (std::string response) |
evaluateResponse Method that preprocesses the answer of the PTU. Splits the PTU to a maximum of 3 parts. At position 0 is '*' or '!' (successfull or failed command), at position 1 is the full return message without the qualifier at start (might be "", for example if a set command only was performed) and at 2 (optional) there is the number only if the response contained one (e.g. for casts) More... | |
long | getCurrentPanPosition () |
getCurrentPanPosition Method that queries the current pan position More... | |
long | getCurrentPanSpeed () |
getCurrentPanSpeed Method that queries the current pan speed More... | |
long | getCurrentTiltPosition () |
getCurrentTiltPosition Method that queries the current tilt position More... | |
long | getCurrentTiltSpeed () |
getCurrentTiltSpeed Method that queries the current tilt speed More... | |
long | getCurrentUsedMaximumPanPositionLimit () |
getCurrentUsedMaximumPanPositionLimit Method to get the currently used maximum pan position. More... | |
long | getCurrentUsedMaximumTiltPositionLimit () |
getCurrentUsedMaximumTiltPositionLimit Method to get the currently used maximum tilt position. More... | |
long | getCurrentUsedMinimumPanPositionLimit () |
getCurrentUsedMinimumPanPositionLimit Method to get the currently used minimum pan position. More... | |
long | getCurrentUsedMinimumTiltPositionLimit () |
getCurrentUsedMinimumTiltPositionLimit Method to get the currently used minimum tilt position. More... | |
long | getDesiredPanPosition () |
getDesiredPanPosition Method that queries the desired pan position More... | |
long | getDesiredPanSpeed () |
getDesiredPanSpeed Method that queries the desired pan speed More... | |
long | getDesiredTiltPosition () |
getDesiredTiltPosition Method that queries the desired tilt position More... | |
long | getDesiredTiltSpeed () |
getDesiredTiltSpeed Method that queries the desired tilt speed More... | |
long | getFactoryMaximumPanPositionLimit () |
getFactoryMaximumPanPositionLimit Method to get the factory defined maximum pan position. More... | |
long | getFactoryMaximumTiltPositionLimit () |
getFactoryMaximumTiltPositionLimit Method to get the factory defined maximum tilt position. More... | |
long | getFactoryMinimumPanPositionLimit () |
getFactoryMinimumPanPositionLimit Method to get the factory defined minimum pan position. More... | |
long | getFactoryMinimumTiltPositionLimit () |
getFactoryMinimumTiltPositionLimit Method to get the factory defined minimum tilt position. More... | |
long | getPanAcceleartion () |
getPanAcceleartion Method that queries the pan acceleration (no current or desired here) More... | |
long | getPanBaseSpeed () |
getPanBaseSpeed Returns the current pan base speed More... | |
long | getPanInMotionPowerMode () |
getPanInMotionPowerMode Method to get the move power mode for pan axis. More... | |
long | getPanLowerSpeedLimit () |
getPanLowerSpeedLimit Method that queries the pan lower speed limit. WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU More... | |
double | getPanResolution () |
getPanResolution Method that queries the pan resolution (seconds/arc per position). Divide by 3600 to get Degree. More... | |
long | getPanStationaryPowerMode () |
getPanStationaryPowerMode Method to get the stationary power mode for pan axis. More... | |
long | getPanUpperSpeedLimit () |
getPanUpperSpeedLimit Method that queries the pan upper speed limit WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU More... | |
long | getPositionExecutionMode () |
getPositionExecutionMode Method to get the currently used position execution mode. Can return IMMEDIATE_POSITION_EXECUTION_MODE or SLAVED_POSITION_EXECUTION_MODE. More... | |
long | getPositionLimitEnforcementMode () |
getPositionLimitEnforcementMode Method to get the currently used position limit enforcement mode. Can return FACTORY_LIMITS_ENABLED, USER_DEFINED_LIMITS_ENABLED or FACTORY_LIMITS_ENABLED. More... | |
long | getSpeedControlMode () |
getSpeedControlMode Method to get the currently used sped control mode of the ptu. More... | |
long | getTiltAcceleartion () |
getTiltAcceleartion Method that queries the tilt acceleration (no current or desired here) More... | |
long | getTiltBaseSpeed () |
getTiltBaseSpeed Returns the current tilt base speed More... | |
long | getTiltInMotionPowerMode () |
getTiltInMotionPowerMode Method to get the move power mode for tilt axis. More... | |
long | getTiltLowerSpeedLimit () |
getTiltLowerSpeedLimit Method that queries the tilt lower speed limit. WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU More... | |
double | getTiltResolution () |
getTiltResolution Method that queries the tilt resolution (seconds/arc per position). Divide by 3600 to get Degree. More... | |
long | getTiltStationaryPowerMode () |
getTiltStationaryPowerMode Method to get the stationary power mode for tilt axis. More... | |
long | getTiltUpperSpeedLimit () |
getTiltUpperSpeedLimit Method that queries the tilt upper speed limit WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU More... | |
long | getUserMaximumPanPositionLimit () |
getUserMaximumPanPositionLimit Method to get the user defined maximum pan position. WARNING: Does not work on older PTUs and is not tested. More... | |
long | getUserMaximumTiltPositionLimit () |
getUserMaximumTiltPositionLimit Method to get the user defined maximum tilt position. WARNING: Does not work on older PTUs and is not tested. More... | |
long | getUserMinimumPanPositionLimit () |
getUserMinimumPanPositionLimit Method to get the user defined minimum pan position. WARNING: Does not work on older PTUs and is not tested. More... | |
long | getUserMinimumTiltPositionLimit () |
getUserMinimumTiltPositionLimit Method to get the user defined minimum tilt position. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | gotoPreset (int preset_index) |
gotoPreset Method that moves the ptu to a existing preset of pan and tilt corrdiantes. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | halt (long axis) |
halt Method that halts movement on specified axis. More... | |
bool | isOpen () |
isOpen Method to determine if used port is open or closed. More... | |
PTUFree () | |
PTUFree Constructor for PTUFree object. Not connected to any port. More... | |
PTUFree (boost::asio::io_service &io) | |
PTUFree Constructor for PTUFree object with existing io_service. More... | |
std::string | readPTUResponse () |
readPTUResponse Method that reads from the PTU until delimitor (' ') appears. Then the read data is returned. More... | |
bool | reset () |
reset Method to reset the ptu (pan and/or tilt axis depending on reset mode) More... | |
bool | restoreDefault () |
restoreDefault Method to restore default settings. WARNING: Not tested. More... | |
bool | restoreFactoryDefault () |
restoreFactoryDefault Method to set default settings to factory defaults. Saved to EEPROM, do not use too often. WARNING: Not tested. More... | |
bool | saveDefault () |
saveDefault Method to save the current axis settings as default at power up. Note: This class sets the ptu by invoking setNewSerialConnection to some standard values. To get the values saved by this method invoke restore_defaults after setting the ptu connection. Saved to EEPROM, do not use too often. WARNING: Not tested. More... | |
bool | setBaudRate (int baud) |
setBaudRate Sets the baud rate for the serial port that is used. Only use of serial connection is established More... | |
bool | setDesiredPanAccelerationAbsolute (short int acceleration) |
setDesiredPanAccelerationAbsolute Method that sets the absolute pan acceleration (position/second^2) More... | |
bool | setDesiredPanLowerSpeedLimit (short int lower_speed_limit) |
setDesiredPanLowerSpeedLimit Method that sets the lower speed limit for pan (position/second). WARNING: Takes extremly long or does not work on every ptu More... | |
bool | setDesiredPanPositionAbsolute (short int position) |
setDesiredPanPositionAbsolute Method that sets absolute pan position More... | |
bool | setDesiredPanPositionRelative (short int position_offset) |
setDesiredPanPositionRelative Method that sets current pan position by offset (current pos + offset = new position) More... | |
bool | setDesiredPanSpeedAbsolute (short int speed) |
setDesiredPanSpeedAbsolute Method that sets absolute pan speed (position/second) More... | |
bool | setDesiredPanSpeedRelative (short int speed_offset) |
setDesiredPanSpeedRelative Method that sets the desired pan speed relative to the CURRENT (not the desired!) speed with an offset (position/second) More... | |
bool | setDesiredPanTiltPositionAbsoluteSlaved (short int pan, short int tilt) |
setDesiredPanTiltPositionAbsoluteSlaved Method that allows a movement of pan and tilt axis to specified absolute position where both start at the same time. This method waits until movement is completed. More... | |
bool | setDesiredPanUpperSpeedLimit (short int upper_speed_limit) |
setDesiredPanUpperSpeedLimit Method that sets the upper speed limit for pan (position/second). WARNING: Takes extremly long or does not work on every ptu More... | |
bool | setDesiredTiltAccelerationAbsolute (short int acceleration) |
setDesiredTiltAccelerationAbsolute Method that sets the absolute tilt acceleration (position/second^2) More... | |
bool | setDesiredTiltLowerSpeedLimit (short int lower_speed_limit) |
setDesiredTiltLowerSpeedLimit Method that sets the lower speed limit for tilt (position/second). WARNING: Takes extremly long or does not work on every ptu More... | |
bool | setDesiredTiltPositionAbsolute (short int position) |
setDesiredTiltPositionAbsolute Method that sets absolute tilt position More... | |
bool | setDesiredTiltPositionRelative (short int position_offset) |
setDesiredTiltPositionRelative Method that sets current tilt position by offset (current pos + offset = new position) More... | |
bool | setDesiredTiltSpeedAbsolute (short int speed) |
setDesiredTiltSpeedAbsolute Method that sets absolute tilt speed (position/second) More... | |
bool | setDesiredTiltSpeedRelative (short int speed_offset) |
setDesiredTiltSpeedRelative Method that sets the desired tilt speed relative to the CURRENT (not the desired!) speed with an offset (position/second) More... | |
bool | setDesiredTiltUpperSpeedLimit (short int upper_speed_limit) |
setDesiredTiltUpperSpeedLimit Method that sets the upper speed limit for tilt (position/second). WARNING: Takes extremly long or does not work on every ptu More... | |
bool | setMaximumPanPositionLimit (short int position) |
setMaximumPanPositionLimit Method that is used to set a user defined maximum pan position limit. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | setMaximumTiltPositionLimit (short int position) |
setMaximumTiltPositionLimit Method that is used to set a user defined maximum tilt position limit. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | setMinimumPanPositionLimit (short int position) |
setMinimumPanPositionLimit Method that is used to set a user defined minimum pan position limit. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | setMinimumTiltPositionLimit (short int position) |
setMinimumTiltPositionLimit Method that is used to set a user defined minimum tilt position limit. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | setNewSerialConnection (std::string port, int baud) |
setNewSerialConnection Establishes a new connection via serial port specified by 'port' to a target device using baud rate 'baud'. The ptu is set up with IMMEDIATE_POSITION_EXECUTION_MODE and FACTORY_LIMITS_ENABLED. More... | |
bool | setPanBaseSpeed (short int base_speed) |
setPanBaseSpeed Method that sets the base speed for pan (position/second) More... | |
bool | setPanInMotionPowerMode (long mode) |
setPanInMotionPowerMode Method to set the move power mode for pan axis. More... | |
bool | setPanStationaryPowerMode (long mode) |
setPanStationaryPowerMode Method to set the stationary power mode for pan axis. More... | |
bool | setPositionExecutionMode (long mode) |
setPositionExecutionMode Method to set the position execution mode. More... | |
bool | setPositionLimitEnforcementMode (long enable) |
setPositionLimitEnforcementMode Method to set the position limit enforcement mode. Warning: USER_DEFINED_LIMITS_ENABLED does not work on older PTUs and setting of this value is not tested. More... | |
bool | setPreset (int preset_index, short int pan, short int tilt) |
setPreset Method that allows to associate a pan and tilt position with a preset index. Moves to the pan and tilt position and saves the position as a preset. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | setPreset (int preset_index) |
setPreset Method that allows to associate a pan and tilt position with a preset index. Saves the current pan and tilt position as a preset. WARNING: Does not work on older PTUs and is not tested. More... | |
bool | setResetMode (long mode) |
setResetMode Method to set the reset mode of the ptu. Saved to EEPROM, do not use too often. WARNING: Not tested. More... | |
bool | setSpeedControlMode (long mode) |
setSpeedControlMode Method to set the sped control mode of the ptu. More... | |
bool | setTiltBaseSpeed (short int base_speed) |
setTiltBaseSpeed Method that sets the base speed for tilt (position/second) More... | |
bool | setTiltInMotionPowerMode (long mode) |
setTiltInMotionPowerMode Method to set the move power mode for tilt axis. More... | |
bool | setTiltStationaryPowerMode (long mode) |
setTiltStationaryPowerMode Method to set the stationary power mode for tilt axis. More... | |
void | test () |
test Method to test the methods of this program, for DEBUG/DEVELOPMENT purpose, changes PTU settings for test purpose (restart before normal use) More... | |
Private Member Functions | |
std::string | getErrorString (boost::system::error_code error) |
Private Attributes | |
long | factory_pan_max |
long | factory_pan_min |
long | factory_tilt_max |
long | factory_tilt_min |
long | position_execution_mode |
boost::asio::io_service | ptu_io_service |
boost::asio::serial_port | ptu_port |
bool | timeout_occured |
boost::asio::io_service | timer_io_service |
ptu_free::PTUFree::PTUFree | ( | ) |
PTUFree Constructor for PTUFree object. Not connected to any port.
Definition at line 5 of file PTUFree.cpp.
ptu_free::PTUFree::PTUFree | ( | boost::asio::io_service & | io | ) |
PTUFree Constructor for PTUFree object with existing io_service.
io | Existing io_service object to be used for communication by PTUFree |
Definition at line 8 of file PTUFree.cpp.
bool ptu_free::PTUFree::awaitPositionCommandCompletion | ( | ) |
awaitPositionCommandCompletion Method to wait for the completion of the last issued pan and tilt position command (waits until ptu stops).
Definition at line 859 of file PTUFree.cpp.
bool ptu_free::PTUFree::clearPreset | ( | ) |
clearPreset Method to delete all existing presets. WARNING: Does not work on older PTUs and is not tested.
Definition at line 983 of file PTUFree.cpp.
void ptu_free::PTUFree::closeSerialConnection | ( | ) |
closeSerialConnection Closes currently used serial port
Definition at line 67 of file PTUFree.cpp.
std::string ptu_free::PTUFree::communicate | ( | std::string | request | ) |
communicate Method to send a command 'request' to the serial port (and the device) and recieve the answer
request | Command to execute on device connected via serial port |
Definition at line 71 of file PTUFree.cpp.
std::vector< std::string > ptu_free::PTUFree::evaluateResponse | ( | std::string | response | ) |
evaluateResponse Method that preprocesses the answer of the PTU. Splits the PTU to a maximum of 3 parts. At position 0 is '*' or '!' (successfull or failed command), at position 1 is the full return message without the qualifier at start (might be "", for example if a set command only was performed) and at 2 (optional) there is the number only if the response contained one (e.g. for casts)
response | full ptu response string |
Definition at line 99 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentPanPosition | ( | ) |
getCurrentPanPosition Method that queries the current pan position
Definition at line 252 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentPanSpeed | ( | ) |
getCurrentPanSpeed Method that queries the current pan speed
Definition at line 265 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentTiltPosition | ( | ) |
getCurrentTiltPosition Method that queries the current tilt position
Definition at line 488 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentTiltSpeed | ( | ) |
getCurrentTiltSpeed Method that queries the current tilt speed
Definition at line 501 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentUsedMaximumPanPositionLimit | ( | ) |
getCurrentUsedMaximumPanPositionLimit Method to get the currently used maximum pan position.
Definition at line 765 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentUsedMaximumTiltPositionLimit | ( | ) |
getCurrentUsedMaximumTiltPositionLimit Method to get the currently used maximum tilt position.
Definition at line 789 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentUsedMinimumPanPositionLimit | ( | ) |
getCurrentUsedMinimumPanPositionLimit Method to get the currently used minimum pan position.
Definition at line 753 of file PTUFree.cpp.
long ptu_free::PTUFree::getCurrentUsedMinimumTiltPositionLimit | ( | ) |
getCurrentUsedMinimumTiltPositionLimit Method to get the currently used minimum tilt position.
Definition at line 777 of file PTUFree.cpp.
long ptu_free::PTUFree::getDesiredPanPosition | ( | ) |
getDesiredPanPosition Method that queries the desired pan position
Definition at line 320 of file PTUFree.cpp.
long ptu_free::PTUFree::getDesiredPanSpeed | ( | ) |
getDesiredPanSpeed Method that queries the desired pan speed
Definition at line 333 of file PTUFree.cpp.
long ptu_free::PTUFree::getDesiredTiltPosition | ( | ) |
getDesiredTiltPosition Method that queries the desired tilt position
Definition at line 556 of file PTUFree.cpp.
long ptu_free::PTUFree::getDesiredTiltSpeed | ( | ) |
getDesiredTiltSpeed Method that queries the desired tilt speed
Definition at line 569 of file PTUFree.cpp.
|
private |
Definition at line 1305 of file PTUFree.cpp.
long ptu_free::PTUFree::getFactoryMaximumPanPositionLimit | ( | ) |
getFactoryMaximumPanPositionLimit Method to get the factory defined maximum pan position.
Definition at line 744 of file PTUFree.cpp.
long ptu_free::PTUFree::getFactoryMaximumTiltPositionLimit | ( | ) |
getFactoryMaximumTiltPositionLimit Method to get the factory defined maximum tilt position.
Definition at line 750 of file PTUFree.cpp.
long ptu_free::PTUFree::getFactoryMinimumPanPositionLimit | ( | ) |
getFactoryMinimumPanPositionLimit Method to get the factory defined minimum pan position.
Definition at line 741 of file PTUFree.cpp.
long ptu_free::PTUFree::getFactoryMinimumTiltPositionLimit | ( | ) |
getFactoryMinimumTiltPositionLimit Method to get the factory defined minimum tilt position.
Definition at line 747 of file PTUFree.cpp.
long ptu_free::PTUFree::getPanAcceleartion | ( | ) |
getPanAcceleartion Method that queries the pan acceleration (no current or desired here)
Definition at line 346 of file PTUFree.cpp.
long ptu_free::PTUFree::getPanBaseSpeed | ( | ) |
getPanBaseSpeed Returns the current pan base speed
Definition at line 359 of file PTUFree.cpp.
long ptu_free::PTUFree::getPanInMotionPowerMode | ( | ) |
getPanInMotionPowerMode Method to get the move power mode for pan axis.
Definition at line 1264 of file PTUFree.cpp.
long ptu_free::PTUFree::getPanLowerSpeedLimit | ( | ) |
getPanLowerSpeedLimit Method that queries the pan lower speed limit. WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU
Definition at line 294 of file PTUFree.cpp.
double ptu_free::PTUFree::getPanResolution | ( | ) |
getPanResolution Method that queries the pan resolution (seconds/arc per position). Divide by 3600 to get Degree.
Definition at line 307 of file PTUFree.cpp.
long ptu_free::PTUFree::getPanStationaryPowerMode | ( | ) |
getPanStationaryPowerMode Method to get the stationary power mode for pan axis.
Definition at line 1172 of file PTUFree.cpp.
long ptu_free::PTUFree::getPanUpperSpeedLimit | ( | ) |
getPanUpperSpeedLimit Method that queries the pan upper speed limit WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU
Definition at line 281 of file PTUFree.cpp.
long ptu_free::PTUFree::getPositionExecutionMode | ( | ) |
getPositionExecutionMode Method to get the currently used position execution mode. Can return IMMEDIATE_POSITION_EXECUTION_MODE or SLAVED_POSITION_EXECUTION_MODE.
Definition at line 854 of file PTUFree.cpp.
long ptu_free::PTUFree::getPositionLimitEnforcementMode | ( | ) |
getPositionLimitEnforcementMode Method to get the currently used position limit enforcement mode. Can return FACTORY_LIMITS_ENABLED, USER_DEFINED_LIMITS_ENABLED or FACTORY_LIMITS_ENABLED.
Definition at line 804 of file PTUFree.cpp.
long ptu_free::PTUFree::getSpeedControlMode | ( | ) |
getSpeedControlMode Method to get the currently used sped control mode of the ptu.
Definition at line 1020 of file PTUFree.cpp.
long ptu_free::PTUFree::getTiltAcceleartion | ( | ) |
getTiltAcceleartion Method that queries the tilt acceleration (no current or desired here)
Definition at line 582 of file PTUFree.cpp.
long ptu_free::PTUFree::getTiltBaseSpeed | ( | ) |
getTiltBaseSpeed Returns the current tilt base speed
Definition at line 595 of file PTUFree.cpp.
long ptu_free::PTUFree::getTiltInMotionPowerMode | ( | ) |
getTiltInMotionPowerMode Method to get the move power mode for tilt axis.
Definition at line 1284 of file PTUFree.cpp.
long ptu_free::PTUFree::getTiltLowerSpeedLimit | ( | ) |
getTiltLowerSpeedLimit Method that queries the tilt lower speed limit. WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU
Definition at line 530 of file PTUFree.cpp.
double ptu_free::PTUFree::getTiltResolution | ( | ) |
getTiltResolution Method that queries the tilt resolution (seconds/arc per position). Divide by 3600 to get Degree.
Definition at line 543 of file PTUFree.cpp.
long ptu_free::PTUFree::getTiltStationaryPowerMode | ( | ) |
getTiltStationaryPowerMode Method to get the stationary power mode for tilt axis.
Definition at line 1192 of file PTUFree.cpp.
long ptu_free::PTUFree::getTiltUpperSpeedLimit | ( | ) |
getTiltUpperSpeedLimit Method that queries the tilt upper speed limit WARNING: This Method consumes either extreme amounts of time to execute or does not work properly with all PTU
Definition at line 517 of file PTUFree.cpp.
long ptu_free::PTUFree::getUserMaximumPanPositionLimit | ( | ) |
getUserMaximumPanPositionLimit Method to get the user defined maximum pan position. WARNING: Does not work on older PTUs and is not tested.
Definition at line 700 of file PTUFree.cpp.
long ptu_free::PTUFree::getUserMaximumTiltPositionLimit | ( | ) |
getUserMaximumTiltPositionLimit Method to get the user defined maximum tilt position. WARNING: Does not work on older PTUs and is not tested.
Definition at line 728 of file PTUFree.cpp.
long ptu_free::PTUFree::getUserMinimumPanPositionLimit | ( | ) |
getUserMinimumPanPositionLimit Method to get the user defined minimum pan position. WARNING: Does not work on older PTUs and is not tested.
Definition at line 686 of file PTUFree.cpp.
long ptu_free::PTUFree::getUserMinimumTiltPositionLimit | ( | ) |
getUserMinimumTiltPositionLimit Method to get the user defined minimum tilt position. WARNING: Does not work on older PTUs and is not tested.
Definition at line 714 of file PTUFree.cpp.
bool ptu_free::PTUFree::gotoPreset | ( | int | preset_index | ) |
gotoPreset Method that moves the ptu to a existing preset of pan and tilt corrdiantes. WARNING: Does not work on older PTUs and is not tested.
preset_index | Number to identify preset. Must be between 1 and 32 |
Definition at line 969 of file PTUFree.cpp.
bool ptu_free::PTUFree::halt | ( | long | axis | ) |
halt Method that halts movement on specified axis.
axis | Axis to halt, can be PAN or TILT |
Definition at line 872 of file PTUFree.cpp.
bool ptu_free::PTUFree::isOpen | ( | ) |
isOpen Method to determine if used port is open or closed.
Definition at line 2401 of file PTUFree.cpp.
std::string ptu_free::PTUFree::readPTUResponse | ( | ) |
readPTUResponse Method that reads from the PTU until delimitor ('
') appears. Then the read data is returned.
Definition at line 79 of file PTUFree.cpp.
bool ptu_free::PTUFree::reset | ( | ) |
reset Method to reset the ptu (pan and/or tilt axis depending on reset mode)
Definition at line 1038 of file PTUFree.cpp.
bool ptu_free::PTUFree::restoreDefault | ( | ) |
restoreDefault Method to restore default settings. WARNING: Not tested.
Definition at line 1094 of file PTUFree.cpp.
bool ptu_free::PTUFree::restoreFactoryDefault | ( | ) |
restoreFactoryDefault Method to set default settings to factory defaults. Saved to EEPROM, do not use too often. WARNING: Not tested.
Definition at line 1107 of file PTUFree.cpp.
bool ptu_free::PTUFree::saveDefault | ( | ) |
saveDefault Method to save the current axis settings as default at power up. Note: This class sets the ptu by invoking setNewSerialConnection to some standard values. To get the values saved by this method invoke restore_defaults after setting the ptu connection. Saved to EEPROM, do not use too often. WARNING: Not tested.
Definition at line 1081 of file PTUFree.cpp.
bool ptu_free::PTUFree::setBaudRate | ( | int | baud | ) |
setBaudRate Sets the baud rate for the serial port that is used. Only use of serial connection is established
baud | Baud rate for serial port |
Definition at line 12 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanAccelerationAbsolute | ( | short int | acceleration | ) |
setDesiredPanAccelerationAbsolute Method that sets the absolute pan acceleration (position/second^2)
acceleration | value in position/second^2 for pan acceleration |
Definition at line 193 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanLowerSpeedLimit | ( | short int | lower_speed_limit | ) |
setDesiredPanLowerSpeedLimit Method that sets the lower speed limit for pan (position/second). WARNING: Takes extremly long or does not work on every ptu
lower_speed_limit | value for pan lower speed limit in position/second. MUST BE 0 or >= 57 (second value depending on used ptu) |
Definition at line 224 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanPositionAbsolute | ( | short int | position | ) |
setDesiredPanPositionAbsolute Method that sets absolute pan position
position | absolute pan position ptu shall move to |
Definition at line 139 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanPositionRelative | ( | short int | position_offset | ) |
setDesiredPanPositionRelative Method that sets current pan position by offset (current pos + offset = new position)
position_offset | Offset of current position to be added for new pan position |
Definition at line 152 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanSpeedAbsolute | ( | short int | speed | ) |
setDesiredPanSpeedAbsolute Method that sets absolute pan speed (position/second)
speed | absolute value in position/second for pan speed |
Definition at line 165 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanSpeedRelative | ( | short int | speed_offset | ) |
setDesiredPanSpeedRelative Method that sets the desired pan speed relative to the CURRENT (not the desired!) speed with an offset (position/second)
speed_offset | offset in position/second from CURRENT speed to set new desired speed |
Definition at line 180 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanTiltPositionAbsoluteSlaved | ( | short int | pan, |
short int | tilt | ||
) |
setDesiredPanTiltPositionAbsoluteSlaved Method that allows a movement of pan and tilt axis to specified absolute position where both start at the same time. This method waits until movement is completed.
pan | Absolute position for pan |
tilt | Absolute position for tilt |
Definition at line 900 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredPanUpperSpeedLimit | ( | short int | upper_speed_limit | ) |
setDesiredPanUpperSpeedLimit Method that sets the upper speed limit for pan (position/second). WARNING: Takes extremly long or does not work on every ptu
upper_speed_limit | value for pan upper speed limit in position/second |
Definition at line 208 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltAccelerationAbsolute | ( | short int | acceleration | ) |
setDesiredTiltAccelerationAbsolute Method that sets the absolute tilt acceleration (position/second^2)
acceleration | value in position/second^2 for tilt acceleration |
Definition at line 429 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltLowerSpeedLimit | ( | short int | lower_speed_limit | ) |
setDesiredTiltLowerSpeedLimit Method that sets the lower speed limit for tilt (position/second). WARNING: Takes extremly long or does not work on every ptu
lower_speed_limit | value for tilt lower speed limit in position/second. MUST BE 0 or >= 57 (second value depending on used ptu) |
Definition at line 460 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltPositionAbsolute | ( | short int | position | ) |
setDesiredTiltPositionAbsolute Method that sets absolute tilt position
position | absolute tilt position ptu shall move to |
Definition at line 375 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltPositionRelative | ( | short int | position_offset | ) |
setDesiredTiltPositionRelative Method that sets current tilt position by offset (current pos + offset = new position)
position_offset | Offset of current position to be added for new tilt position |
Definition at line 388 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltSpeedAbsolute | ( | short int | speed | ) |
setDesiredTiltSpeedAbsolute Method that sets absolute tilt speed (position/second)
speed | absolute value in position/second for tilt speed |
Definition at line 401 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltSpeedRelative | ( | short int | speed_offset | ) |
setDesiredTiltSpeedRelative Method that sets the desired tilt speed relative to the CURRENT (not the desired!) speed with an offset (position/second)
speed_offset | offset in position/second from CURRENT speed to set new desired speed |
Definition at line 416 of file PTUFree.cpp.
bool ptu_free::PTUFree::setDesiredTiltUpperSpeedLimit | ( | short int | upper_speed_limit | ) |
setDesiredTiltUpperSpeedLimit Method that sets the upper speed limit for tilt (position/second). WARNING: Takes extremly long or does not work on every ptu
upper_speed_limit | value for tilt upper speed limit in position/second |
Definition at line 444 of file PTUFree.cpp.
bool ptu_free::PTUFree::setMaximumPanPositionLimit | ( | short int | position | ) |
setMaximumPanPositionLimit Method that is used to set a user defined maximum pan position limit. WARNING: Does not work on older PTUs and is not tested.
position | Value for the maximum pan position allowed |
Definition at line 648 of file PTUFree.cpp.
bool ptu_free::PTUFree::setMaximumTiltPositionLimit | ( | short int | position | ) |
setMaximumTiltPositionLimit Method that is used to set a user defined maximum tilt position limit. WARNING: Does not work on older PTUs and is not tested.
position | Value for the maximum tilt position allowed |
Definition at line 672 of file PTUFree.cpp.
bool ptu_free::PTUFree::setMinimumPanPositionLimit | ( | short int | position | ) |
setMinimumPanPositionLimit Method that is used to set a user defined minimum pan position limit. WARNING: Does not work on older PTUs and is not tested.
position | Value for the minimum pan position allowed |
Definition at line 636 of file PTUFree.cpp.
bool ptu_free::PTUFree::setMinimumTiltPositionLimit | ( | short int | position | ) |
setMinimumTiltPositionLimit Method that is used to set a user defined minimum tilt position limit. WARNING: Does not work on older PTUs and is not tested.
position | Value for the minimum tilt position allowed |
Definition at line 660 of file PTUFree.cpp.
bool ptu_free::PTUFree::setNewSerialConnection | ( | std::string | port, |
int | baud | ||
) |
setNewSerialConnection Establishes a new connection via serial port specified by 'port' to a target device using baud rate 'baud'. The ptu is set up with IMMEDIATE_POSITION_EXECUTION_MODE and FACTORY_LIMITS_ENABLED.
port | identifier of serial port that will be used |
baud | baud rate for serial port |
Definition at line 27 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPanBaseSpeed | ( | short int | base_speed | ) |
setPanBaseSpeed Method that sets the base speed for pan (position/second)
base_speed | value for pan base speed in position/second |
Definition at line 237 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPanInMotionPowerMode | ( | long | mode | ) |
setPanInMotionPowerMode Method to set the move power mode for pan axis.
mode | Move power mode for pan axis, can be REGULAR_MOVE_POWER_MODE, LOW_MOVE_POWER_MODE or HIGH_MOVE_POWER_MODE |
Definition at line 1213 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPanStationaryPowerMode | ( | long | mode | ) |
setPanStationaryPowerMode Method to set the stationary power mode for pan axis.
mode | Stationary power mode for pan axis, can be REGULAR_HOLD_POWER_MODE, LOW_HOLD_POWER_MODE or OFF_HOLD_POWER_MODE |
Definition at line 1120 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPositionExecutionMode | ( | long | mode | ) |
setPositionExecutionMode Method to set the position execution mode.
mode | Position execution mode. Can be IMMEDIATE_POSITION_EXECUTION_MODE or SLAVED_POSITION_EXECUTION_MODE. |
Definition at line 825 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPositionLimitEnforcementMode | ( | long | enable | ) |
setPositionLimitEnforcementMode Method to set the position limit enforcement mode. Warning: USER_DEFINED_LIMITS_ENABLED does not work on older PTUs and setting of this value is not tested.
enable | Type of position limit enforcement to enable. Possible values are FACTORY_LIMITS_ENABLED, USER_DEFINED_LIMITS_ENABLED (warning: does not work on older PTU's) and LIMITS_DISABLED |
Definition at line 610 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPreset | ( | int | preset_index, |
short int | pan, | ||
short int | tilt | ||
) |
setPreset Method that allows to associate a pan and tilt position with a preset index. Moves to the pan and tilt position and saves the position as a preset. WARNING: Does not work on older PTUs and is not tested.
preset_index | Number to identify preset. Must be between 1 and 32 |
pan | Absolute position for pan for preset |
tilt | Absolute position for tilt for preset |
Definition at line 936 of file PTUFree.cpp.
bool ptu_free::PTUFree::setPreset | ( | int | preset_index | ) |
setPreset Method that allows to associate a pan and tilt position with a preset index. Saves the current pan and tilt position as a preset. WARNING: Does not work on older PTUs and is not tested.
preset_index | Number to identify preset. Must be between 1 and 32 |
Definition at line 952 of file PTUFree.cpp.
bool ptu_free::PTUFree::setResetMode | ( | long | mode | ) |
setResetMode Method to set the reset mode of the ptu. Saved to EEPROM, do not use too often. WARNING: Not tested.
mode | Ptu reset mode. Possibles Values are NO_RESET_MODE, PAN_ONLY_RESET_MODE, TILT_ONLY_RESET_MODE or BOTH_RESET_MODE |
Definition at line 1052 of file PTUFree.cpp.
bool ptu_free::PTUFree::setSpeedControlMode | ( | long | mode | ) |
setSpeedControlMode Method to set the sped control mode of the ptu.
mode | Speed control mode to set, possible values are INDEPENDENT_SPEED_MODE or PURE_VELOCITY_CONTROL_MODE |
Definition at line 996 of file PTUFree.cpp.
bool ptu_free::PTUFree::setTiltBaseSpeed | ( | short int | base_speed | ) |
setTiltBaseSpeed Method that sets the base speed for tilt (position/second)
base_speed | value for tilt base speed in position/second |
Definition at line 473 of file PTUFree.cpp.
bool ptu_free::PTUFree::setTiltInMotionPowerMode | ( | long | mode | ) |
setTiltInMotionPowerMode Method to set the move power mode for tilt axis.
mode | Move power mode for tilt axis, can be REGULAR_MOVE_POWER_MODE, LOW_MOVE_POWER_MODE or HIGH_MOVE_POWER_MODE |
Definition at line 1238 of file PTUFree.cpp.
bool ptu_free::PTUFree::setTiltStationaryPowerMode | ( | long | mode | ) |
setTiltStationaryPowerMode Method to set the stationary power mode for tilt axis.
mode | Stationary power mode for tilt axis, can be REGULAR_HOLD_POWER_MODE, LOW_HOLD_POWER_MODE or OFF_HOLD_POWER_MODE |
Definition at line 1146 of file PTUFree.cpp.
void ptu_free::PTUFree::test | ( | ) |
test Method to test the methods of this program, for DEBUG/DEVELOPMENT purpose, changes PTU settings for test purpose (restart before normal use)
Definition at line 1633 of file PTUFree.cpp.
|
private |
|
private |
|
private |