24 #ifndef __INTERFACES_PANTILTINTERFACE_H_ 25 #define __INTERFACES_PANTILTINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 50 typedef struct __attribute__((packed)) {
51 int64_t timestamp_sec;
52 int64_t timestamp_usec;
77 } PanTiltInterface_data_t;
79 PanTiltInterface_data_t *data;
87 typedef struct __attribute__((packed)) {
88 int64_t timestamp_sec;
89 int64_t timestamp_usec;
92 StopMessage_data_t *data;
100 virtual Message * clone()
const;
107 typedef struct __attribute__((packed)) {
108 int64_t timestamp_sec;
109 int64_t timestamp_usec;
110 } FlushMessage_data_t;
112 FlushMessage_data_t *data;
120 virtual Message * clone()
const;
127 typedef struct __attribute__((packed)) {
128 int64_t timestamp_sec;
129 int64_t timestamp_usec;
130 } CalibrateMessage_data_t;
132 CalibrateMessage_data_t *data;
140 virtual Message * clone()
const;
147 typedef struct __attribute__((packed)) {
148 int64_t timestamp_sec;
149 int64_t timestamp_usec;
150 } ParkMessage_data_t;
152 ParkMessage_data_t *data;
160 virtual Message * clone()
const;
167 typedef struct __attribute__((packed)) {
168 int64_t timestamp_sec;
169 int64_t timestamp_usec;
172 } GotoMessage_data_t;
174 GotoMessage_data_t *data;
177 GotoMessage(
const float ini_pan,
const float ini_tilt);
184 void set_pan(
const float new_pan);
187 void set_tilt(
const float new_tilt);
189 virtual Message * clone()
const;
196 typedef struct __attribute__((packed)) {
197 int64_t timestamp_sec;
198 int64_t timestamp_usec;
203 } TimedGotoMessage_data_t;
205 TimedGotoMessage_data_t *data;
208 TimedGotoMessage(
const float ini_time_sec,
const float ini_pan,
const float ini_tilt);
214 float time_sec()
const;
215 void set_time_sec(
const float new_time_sec);
216 size_t maxlenof_time_sec()
const;
218 void set_pan(
const float new_pan);
221 void set_tilt(
const float new_tilt);
223 virtual Message * clone()
const;
230 typedef struct __attribute__((packed)) {
231 int64_t timestamp_sec;
232 int64_t timestamp_usec;
234 } SetEnabledMessage_data_t;
236 SetEnabledMessage_data_t *data;
248 virtual Message * clone()
const;
255 typedef struct __attribute__((packed)) {
256 int64_t timestamp_sec;
257 int64_t timestamp_usec;
260 } SetVelocityMessage_data_t;
262 SetVelocityMessage_data_t *data;
277 virtual Message * clone()
const;
284 typedef struct __attribute__((packed)) {
285 int64_t timestamp_sec;
286 int64_t timestamp_usec;
291 } SetMarginMessage_data_t;
293 SetMarginMessage_data_t *data;
308 virtual Message * clone()
const;
318 uint32_t
flags()
const;
319 void set_flags(
const uint32_t new_flags);
322 void set_pan(
const float new_pan);
325 void set_tilt(
const float new_tilt);
327 uint32_t
msgid()
const;
328 void set_msgid(
const uint32_t new_msgid);
375 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
size_t maxlenof_flags() const
Get maximum length of flags value.
TimedGotoMessage Fawkes BlackBoard Interface Message.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
size_t maxlenof_pan_velocity() const
Get maximum length of pan_velocity value.
size_t maxlenof_final() const
Get maximum length of final value.
static const uint32_t ERROR_PAN_OUTOFRANGE
ERROR_PAN_OUTOFRANGE constant.
static const uint32_t ERROR_COMMUNICATION
ERROR_COMMUNICATION constant.
size_t maxlenof_min_tilt() const
Get maximum length of min_tilt value.
static const uint32_t ERROR_UNSPECIFIC
ERROR_UNSPECIFIC constant.
void set_pan_velocity(const float new_pan_velocity)
Set pan_velocity value.
Fawkes library namespace.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
bool is_final() const
Get final value.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
void set_max_pan_velocity(const float new_max_pan_velocity)
Set max_pan_velocity value.
SetEnabledMessage Fawkes BlackBoard Interface Message.
void set_flags(const uint32_t new_flags)
Set flags value.
bool is_enabled() const
Get enabled value.
size_t maxlenof_tilt_velocity() const
Get maximum length of tilt_velocity value.
size_t maxlenof_max_pan() const
Get maximum length of max_pan value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
float max_pan() const
Get max_pan value.
uint32_t error_code() const
Get error_code value.
float tilt() const
Get tilt value.
Base class for all Fawkes BlackBoard interfaces.
void set_pan_margin(const float new_pan_margin)
Set pan_margin value.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
float max_tilt() const
Get max_tilt value.
SetVelocityMessage Fawkes BlackBoard Interface Message.
float max_tilt_velocity() const
Get max_tilt_velocity value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
float min_pan() const
Get min_pan value.
void set_min_pan(const float new_min_pan)
Set min_pan value.
size_t maxlenof_min_pan() const
Get maximum length of min_pan value.
float tilt_velocity() const
Get tilt_velocity value.
size_t maxlenof_pan() const
Get maximum length of pan value.
float pan_velocity() const
Get pan_velocity value.
float pan_margin() const
Get pan_margin value.
const char * type() const
Get type of interface.
ParkMessage Fawkes BlackBoard Interface Message.
virtual Message * create_message(const char *type) const
Create message based on type name.
static const uint32_t FLAG_SUPPORTS_PAN
FLAG_SUPPORTS_PAN constant.
void set_tilt_margin(const float new_tilt_margin)
Set tilt_margin value.
bool is_calibrated() const
Get calibrated value.
size_t maxlenof_tilt() const
Get maximum length of tilt value.
FlushMessage Fawkes BlackBoard Interface Message.
void set_min_tilt(const float new_min_tilt)
Set min_tilt value.
void set_tilt(const float new_tilt)
Set tilt value.
float max_pan_velocity() const
Get max_pan_velocity value.
static const uint32_t ERROR_TILT_OUTOFRANGE
ERROR_TILT_OUTOFRANGE constant.
void set_final(const bool new_final)
Set final value.
void set_calibrated(const bool new_calibrated)
Set calibrated value.
size_t maxlenof_tilt_margin() const
Get maximum length of tilt_margin value.
GotoMessage Fawkes BlackBoard Interface Message.
float pan() const
Get pan value.
void set_max_tilt(const float new_max_tilt)
Set max_tilt value.
size_t maxlenof_max_tilt() const
Get maximum length of max_tilt value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
void set_max_tilt_velocity(const float new_max_tilt_velocity)
Set max_tilt_velocity value.
SetMarginMessage Fawkes BlackBoard Interface Message.
void set_pan(const float new_pan)
Set pan value.
size_t maxlenof_calibrated() const
Get maximum length of calibrated value.
CalibrateMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_SUPPORTS_TILT
FLAG_SUPPORTS_TILT constant.
PanTiltInterface Fawkes BlackBoard Interface.
void set_max_pan(const float new_max_pan)
Set max_pan value.
size_t maxlenof_pan_margin() const
Get maximum length of pan_margin value.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
void set_enabled(const bool new_enabled)
Set enabled value.
float tilt_margin() const
Get tilt_margin value.
void set_tilt_velocity(const float new_tilt_velocity)
Set tilt_velocity value.
uint32_t msgid() const
Get msgid value.
size_t maxlenof_max_pan_velocity() const
Get maximum length of max_pan_velocity value.
void set_error_code(const uint32_t new_error_code)
Set error_code value.
size_t maxlenof_max_tilt_velocity() const
Get maximum length of max_tilt_velocity value.
StopMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
uint32_t flags() const
Get flags value.
float min_tilt() const
Get min_tilt value.