44 bool absPosQ(
char axis,
double& nRad)
override;
63 bool offPosQ(
char axis,
double& nRad)
override;
67 bool maxPosQ(
char axis,
double& nRad)
override;
71 bool minPosQ(
char axis,
double& nRad)
override;
106 bool aWait()
override;
114 bool halt(
char axis)
override;
118 bool speed(
char axis,
double radSec)
override;
122 bool speedQ(
char axis,
double& radSec)
override;
126 bool aceleration(
char axis,
double radSec2)
override;
136 bool baseSpeed(
char axis,
double radSec)
override;
142 bool baseSpeedQ(
char axis,
double& radSec)
override;
146 bool upperSpeed(
char axis,
double radSec)
override;
150 bool upperSpeedQ(
char axis,
double& radSec)
override;
154 bool lowerSpeed(
char axis,
double radSec)
override;
158 bool lowerSpeedQ(
char axis,
double& radSec)
override;
162 bool reset()
override;
166 bool save()
override;
178 bool version(
char* nVersion)
override;
182 void nversion(
double& nVersion)
override;
186 bool powerModeQ(
bool transit,
char& mode)
override;
190 bool powerMode(
bool transit,
char mode)
override;
194 double status([[maybe_unused]]
double& rad)
override {
return 1; }
198 bool setLimits(
char axis,
double& l,
double& u)
override;
277 bool init(
const std::string& port)
override;
281 void close()
override;
288 double radError(
char axis,
double nRadMoved)
override;
292 long radToPos(
char axis,
double nRad)
override;
296 double posToRad(
char axis,
long nPos)
override;
306 bool scan(
char axis,
int wait,
float initial,
float final,
double radPre)
324 bool verbose(
bool set)
override;
352 bool transmit(
const char* command)
override;
356 bool receive(
const char* command,
char* response)
override;
360 bool radQuerry(
char axis,
char command,
double& nRad)
override;
364 bool radAsign(
char axis,
char command,
double nRad)
override;
bool powerMode(bool transit, char mode) override
Specification of power mode.
~CPtuDPerception() override
Destructor.
bool restoreFactoryDefaults() override
Restore factory default values.
bool radQuerry(char axis, char command, double &nRad) override
Used to obtains a number of radians.
double posToRad(char axis, long nPos) override
To obtain the number of radians for a discrete value.
bool transmit(const char *command) override
To transmition commands to the PTU.
bool scan(char axis, int wait, float initial, float final, double radPre) override
Performs a scan in the axis indicated and whit the precision desired.
bool save() override
Save or restart default values.
bool enableLimitsQ(bool &enable) override
Query if exist movement limits.
bool aceleration(char axis, double radSec2) override
Specification (de/a)celeration in turn.
This class implements initialization and communication methods to control a generic Pan and Tilt Unit...
long radToPos(char axis, double nRad) override
To obtain the discrete value for a number of radians.
Contains classes for various device interfaces.
bool speed(char axis, double radSec) override
Specification of turn speed.
double radError(char axis, double nRadMoved) override
To obtains the mistake for use discrete values when the movement is expressed in radians.
bool moveToAbsPos(char axis, double nRad) override
Specification of positions in absolute terms.
bool absPosQ(char axis, double &nRad) override
Query position in absolute terms.
bool powerModeQ(bool transit, char &mode) override
Query power mode.
bool upperSpeed(char axis, double radSec) override
Specification of velocity upper limit.
CPtuDPerception()=default
Default constructor.
bool maxPosQ(char axis, double &nRad) override
Query max movement limit of a axis in absolute terms.
void clearErrors() override
Clear errors.
bool enableLimits(bool set) override
Enable/Disable movement limits.
bool version(char *nVersion) override
Version and CopyRights.
bool radAsign(char axis, char command, double nRad) override
Method used for asign a number of radians with a command.
bool offPosQ(char axis, double &nRad) override
Query position in relative terms.
void nversion(double &nVersion) override
Number of version.
bool resolution() override
Query the pan and tilt resolution per position moved and initialize local atributes.
bool inmediateExecution(bool set) override
With I mode (default) instructs pan-tilt unit to immediately execute positional commands.
bool baseSpeedQ(char axis, double &radSec) override
Query velocity to which start and finish the (de/a)celeration.
bool speedQ(char axis, double &radSec) override
Query turn speed.
bool rangeMeasure() override
Search limit forward.
bool echoModeQ(bool &mode) override
Query echo mode.
bool moveToOffPos(char axis, double nRad) override
Specify desired axis position as an offset from the current position.
int nError
TimeoutError: Only occurs if the communication is cut with PTU so it is advisable to check the connec...
double status([[maybe_unused]] double &rad) override
Check if ptu is moving.
bool acelerationQ(char axis, double &radSec2) override
Query (de/a)celeration in turn.
virtual long convertToLong(char *sLong)
Convert string to long.
bool verbose(bool set) override
Set verbose.
bool halt(char axis) override
Inmediately stop.
This class implements initialization and communication methods to control a Pan and Tilt Unit model P...
bool minPosQ(char axis, double &nRad) override
Query min movement limit of a axis in absolute terms.
bool restoreDefaults() override
Restore default values.
bool changeMotionDir() override
bool baseSpeed(char axis, double radSec) override
Specification of velocity to which start and finish the (de/a)celeration.
bool lowerSpeed(char axis, double radSec) override
Specification of velocity lower limit.
bool aWait() override
Wait the finish of the last position command to continue accept commands.
bool receive(const char *command, char *response) override
To receive the responseof the PTU.
bool verboseQ(bool &modo) override
Query verbose mode.
bool setLimits(char axis, double &l, double &u) override
Set limits of movement.
virtual double convertToDouble(char *sDouble)
Convert string to double.
bool reset() override
Reset PTU to initial state.
void close() override
Close Connection with serial port.
bool upperSpeedQ(char axis, double &radSec) override
Query velocity upper limit.
bool echoMode(bool mode) override
Enable/Disable echo response with command.
int checkErrors() override
Check errors, returns 0 if there are not errors or error code in otherwise Error codes: ...
bool illegalCommandError()
bool init(const std::string &port) override
PTU and serial port initialization.
bool haltAll() override
Inmediately stop all.
bool lowerSpeedQ(char axis, double &radSec) override
Query velocity lower limit.