22 #ifndef _PLUGINS_PANTILT_SONY_EVID100P_THREAD_H_
23 #define _PLUGINS_PANTILT_SONY_EVID100P_THREAD_H_
25 #include "../act_thread.h"
27 #include <blackboard/interface_listener.h>
28 #include <interfaces/CameraControlInterface.h>
30 #ifdef USE_TIMETRACKER
31 # include <utils/time/tracker.h>
37 class PanTiltInterface;
39 class SwitchInterface;
49 std::string &ptu_cfg_prefix,
50 std::string &ptu_name);
79 std::string pantilt_cfg_prefix_;
80 std::string ptu_cfg_prefix_;
81 std::string ptu_name_;
82 std::string cfg_device_;
83 unsigned int cfg_read_timeout_ms_;
88 WorkerThread(std::string ptu_name,
91 const float & pan_min,
92 const float & pan_max,
93 const float & tilt_min,
94 const float & tilt_max);
97 void set_power(
bool powered);
98 void goto_pantilt(
float pan,
float tilt);
99 void get_pantilt(
float &pan,
float &tilt);
100 void set_velocities(
float pan_vel,
float tilt_vel);
101 void set_mirror(
bool enabled);
102 void set_zoom(
unsigned int zoom_value);
103 unsigned int get_zoom();
107 bool has_fresh_data();
113 void exec_goto_pantilt(
float pan,
float tilt);
114 void exec_set_zoom(
unsigned int zoom);
116 void exec_set_mirror(
bool mirror);
145 bool effect_pending_;
149 bool mirror_pending_;
155 unsigned int cur_zoom_;
PanTilt act thread for the PTU part of the Sony EviD100P camera.
PanTiltSonyEviD100PThread(std::string &pantilt_cfg_prefix, std::string &ptu_cfg_prefix, std::string &ptu_name)
Constructor.
virtual void finalize()
Finalize the thread.
virtual void loop()
Code to execute in the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual bool bb_interface_message_received(fawkes::Interface *interface, fawkes::Message *message) noexcept
BlackBoard message received notification.
void update_sensor_values()
Update sensor values as necessary.
virtual void init()
Initialize the thread.
Sony EviD100P Visca controller.
BlackBoard interface listener.
CameraControlInterface Fawkes BlackBoard Interface.
Effect
Enumeration defining the possible effects.
Base class for all Fawkes BlackBoard interfaces.
JointInterface Fawkes BlackBoard Interface.
Logger * logger
This is the Logger member used to access the logger.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Mutex mutual exclusion lock.
PanTiltInterface Fawkes BlackBoard Interface.
SwitchInterface Fawkes BlackBoard Interface.
Thread class encapsulation of pthreads.
virtual void once()
Execute an action exactly once.
Fawkes library namespace.