24 #ifndef __INTERFACES_NAOSENSORINTERFACE_H_ 25 #define __INTERFACES_NAOSENSORINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 56 typedef struct __attribute__((packed)) {
57 int64_t timestamp_sec;
58 int64_t timestamp_usec;
101 } NaoSensorInterface_data_t;
103 NaoSensorInterface_data_t *data;
112 typedef struct __attribute__((packed)) {
113 int64_t timestamp_sec;
114 int64_t timestamp_usec;
118 } EmitUltrasonicWaveMessage_data_t;
120 EmitUltrasonicWaveMessage_data_t *data;
133 virtual Message * clone()
const;
140 typedef struct __attribute__((packed)) {
141 int64_t timestamp_sec;
142 int64_t timestamp_usec;
146 } StartUltrasonicMessage_data_t;
148 StartUltrasonicMessage_data_t *data;
161 virtual Message * clone()
const;
168 typedef struct __attribute__((packed)) {
169 int64_t timestamp_sec;
170 int64_t timestamp_usec;
171 } StopUltrasonicMessage_data_t;
173 StopUltrasonicMessage_data_t *data;
182 virtual Message * clone()
const;
301 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
uint8_t r_foot_bumper_r() const
Get r_foot_bumper_r value.
void set_l_fsr_rl(const float new_l_fsr_rl)
Set l_fsr_rl value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_r_foot_bumper_r(const uint8_t new_r_foot_bumper_r)
Set r_foot_bumper_r value.
size_t maxlenof_r_fsr_fl() const
Get maximum length of r_fsr_fl value.
void set_accel_x(const float new_accel_x)
Set accel_x value.
StopUltrasonicMessage Fawkes BlackBoard Interface Message.
uint8_t l_foot_bumper_l() const
Get l_foot_bumper_l value.
void set_l_fsr_fl(const float new_l_fsr_fl)
Set l_fsr_fl value.
size_t maxlenof_l_cop_x() const
Get maximum length of l_cop_x value.
size_t maxlenof_ultrasonic_distance_left() const
Get maximum length of ultrasonic_distance_left value.
size_t maxlenof_battery_charge() const
Get maximum length of battery_charge value.
size_t maxlenof_l_fsr_fl() const
Get maximum length of l_fsr_fl value.
void set_head_touch_front(const uint8_t new_head_touch_front)
Set head_touch_front value.
void set_chest_button(const uint8_t new_chest_button)
Set chest_button value.
float r_fsr_fr() const
Get r_fsr_fr value.
size_t maxlenof_head_touch_middle() const
Get maximum length of head_touch_middle value.
void set_accel_z(const float new_accel_z)
Set accel_z value.
size_t maxlenof_r_fsr_fr() const
Get maximum length of r_fsr_fr value.
Fawkes library namespace.
size_t maxlenof_r_total_weight() const
Get maximum length of r_total_weight value.
float l_fsr_rl() const
Get l_fsr_rl value.
Right emitter and right receiver.
size_t maxlenof_ultrasonic_distance_right() const
Get maximum length of ultrasonic_distance_right value.
void set_l_fsr_rr(const float new_l_fsr_rr)
Set l_fsr_rr value.
float l_fsr_fl() const
Get l_fsr_fl value.
Right emitter and left receiver.
size_t maxlenof_l_fsr_rl() const
Get maximum length of l_fsr_rl value.
float l_fsr_rr() const
Get l_fsr_rr value.
void set_l_total_weight(const float new_l_total_weight)
Set l_total_weight value.
float accel_x() const
Get accel_x value.
StartUltrasonicMessage Fawkes BlackBoard Interface Message.
void set_r_total_weight(const float new_r_total_weight)
Set r_total_weight value.
UltrasonicDirection ultrasonic_direction() const
Get ultrasonic_direction value.
uint8_t l_foot_bumper_r() const
Get l_foot_bumper_r value.
NaoSensorInterface Fawkes BlackBoard Interface.
void set_l_cop_y(const float new_l_cop_y)
Set l_cop_y value.
size_t maxlenof_angle_y() const
Get maximum length of angle_y value.
Base class for all Fawkes BlackBoard interfaces.
float * ultrasonic_distance_right() const
Get ultrasonic_distance_right value.
float angle_x() const
Get angle_x value.
void set_gyro_y(const float new_gyro_y)
Set gyro_y value.
void set_battery_charge(const float new_battery_charge)
Set battery_charge value.
size_t maxlenof_gyro_ref() const
Get maximum length of gyro_ref value.
float * ultrasonic_distance_left() const
Get ultrasonic_distance_left value.
size_t maxlenof_accel_y() const
Get maximum length of accel_y value.
size_t maxlenof_head_touch_front() const
Get maximum length of head_touch_front value.
size_t maxlenof_gyro_y() const
Get maximum length of gyro_y value.
void set_r_fsr_fr(const float new_r_fsr_fr)
Set r_fsr_fr value.
size_t maxlenof_r_foot_bumper_l() const
Get maximum length of r_foot_bumper_l value.
void set_ultrasonic_distance_right(unsigned int index, const float new_ultrasonic_distance_right)
Set ultrasonic_distance_right value at given index.
size_t maxlenof_r_fsr_rr() const
Get maximum length of r_fsr_rr value.
float r_fsr_fl() const
Get r_fsr_fl value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
void set_r_fsr_fl(const float new_r_fsr_fl)
Set r_fsr_fl value.
size_t maxlenof_gyro_x() const
Get maximum length of gyro_x value.
UltrasonicDirection
This determines the chosen sender/receiver.
void set_r_cop_y(const float new_r_cop_y)
Set r_cop_y value.
const char * type() const
Get type of interface.
float l_fsr_fr() const
Get l_fsr_fr value.
void set_gyro_x(const float new_gyro_x)
Set gyro_x value.
float gyro_ref() const
Get gyro_ref value.
float r_cop_y() const
Get r_cop_y value.
Both emitters and both receivers.
size_t maxlenof_head_touch_rear() const
Get maximum length of head_touch_rear value.
void set_angle_y(const float new_angle_y)
Set angle_y value.
virtual Message * create_message(const char *type) const
Create message based on type name.
float accel_y() const
Get accel_y value.
Left emitter and left receiver.
void set_accel_y(const float new_accel_y)
Set accel_y value.
float accel_z() const
Get accel_z value.
void set_l_foot_bumper_r(const uint8_t new_l_foot_bumper_r)
Set l_foot_bumper_r value.
uint8_t chest_button() const
Get chest_button value.
size_t maxlenof_ultrasonic_direction() const
Get maximum length of ultrasonic_direction value.
void set_l_cop_x(const float new_l_cop_x)
Set l_cop_x value.
size_t maxlenof_l_total_weight() const
Get maximum length of l_total_weight value.
void set_r_foot_bumper_l(const uint8_t new_r_foot_bumper_l)
Set r_foot_bumper_l value.
float l_cop_y() const
Get l_cop_y value.
float angle_y() const
Get angle_y value.
void set_l_fsr_fr(const float new_l_fsr_fr)
Set l_fsr_fr value.
size_t maxlenof_chest_button() const
Get maximum length of chest_button value.
void set_head_touch_rear(const uint8_t new_head_touch_rear)
Set head_touch_rear value.
size_t maxlenof_r_foot_bumper_r() const
Get maximum length of r_foot_bumper_r value.
float gyro_y() const
Get gyro_y value.
float r_fsr_rl() const
Get r_fsr_rl value.
void set_l_foot_bumper_l(const uint8_t new_l_foot_bumper_l)
Set l_foot_bumper_l value.
size_t maxlenof_r_cop_x() const
Get maximum length of r_cop_x value.
float l_total_weight() const
Get l_total_weight value.
size_t maxlenof_accel_z() const
Get maximum length of accel_z value.
float r_cop_x() const
Get r_cop_x value.
size_t maxlenof_l_fsr_rr() const
Get maximum length of l_fsr_rr value.
float gyro_x() const
Get gyro_x value.
uint8_t head_touch_rear() const
Get head_touch_rear value.
uint8_t r_foot_bumper_l() const
Get r_foot_bumper_l value.
void set_r_fsr_rl(const float new_r_fsr_rl)
Set r_fsr_rl value.
size_t maxlenof_l_cop_y() const
Get maximum length of l_cop_y value.
EmitUltrasonicWaveMessage Fawkes BlackBoard Interface Message.
void set_ultrasonic_distance_left(unsigned int index, const float new_ultrasonic_distance_left)
Set ultrasonic_distance_left value at given index.
void set_r_fsr_rr(const float new_r_fsr_rr)
Set r_fsr_rr value.
size_t maxlenof_l_foot_bumper_l() const
Get maximum length of l_foot_bumper_l value.
size_t maxlenof_r_cop_y() const
Get maximum length of r_cop_y value.
float battery_charge() const
Get battery_charge value.
No transmission received, yet.
uint8_t head_touch_front() const
Get head_touch_front value.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
float l_cop_x() const
Get l_cop_x value.
size_t maxlenof_r_fsr_rl() const
Get maximum length of r_fsr_rl value.
void set_r_cop_x(const float new_r_cop_x)
Set r_cop_x value.
size_t maxlenof_accel_x() const
Get maximum length of accel_x value.
float r_fsr_rr() const
Get r_fsr_rr value.
void set_ultrasonic_direction(const UltrasonicDirection new_ultrasonic_direction)
Set ultrasonic_direction value.
size_t maxlenof_l_fsr_fr() const
Get maximum length of l_fsr_fr value.
float r_total_weight() const
Get r_total_weight value.
const char * tostring_UltrasonicDirection(UltrasonicDirection value) const
Convert UltrasonicDirection constant to string.
void set_head_touch_middle(const uint8_t new_head_touch_middle)
Set head_touch_middle value.
size_t maxlenof_angle_x() const
Get maximum length of angle_x value.
Left emitter and right receiver.
uint8_t head_touch_middle() const
Get head_touch_middle value.
size_t maxlenof_l_foot_bumper_r() const
Get maximum length of l_foot_bumper_r value.
void set_angle_x(const float new_angle_x)
Set angle_x value.
void set_gyro_ref(const float new_gyro_ref)
Set gyro_ref value.