24 #ifndef __INTERFACES_ROBOTINOSENSORINTERFACE_H_ 25 #define __INTERFACES_ROBOTINOSENSORINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 43 typedef struct __attribute__((packed)) {
44 int64_t timestamp_sec;
45 int64_t timestamp_usec;
54 bool bumper_estop_enabled;
57 } RobotinoSensorInterface_data_t;
59 RobotinoSensorInterface_data_t *data;
67 typedef struct __attribute__((packed)) {
68 int64_t timestamp_sec;
69 int64_t timestamp_usec;
74 } SetBumperEStopEnabledMessage_data_t;
76 SetBumperEStopEnabledMessage_data_t *data;
85 bool is_enabled()
const;
86 void set_enabled(
const bool new_enabled);
87 size_t maxlenof_enabled()
const;
88 virtual Message * clone()
const;
95 typedef struct __attribute__((packed)) {
96 int64_t timestamp_sec;
97 int64_t timestamp_usec;
104 } SetDigitalOutputMessage_data_t;
106 SetDigitalOutputMessage_data_t *data;
115 uint8_t digital_out()
const;
118 bool is_enabled()
const;
119 void set_enabled(
const bool new_enabled);
120 size_t maxlenof_enabled()
const;
121 virtual Message * clone()
const;
150 float distance(
unsigned int index)
const;
151 void set_distance(
unsigned int index,
const float new_distance);
156 void set_digital_in(
unsigned int index,
const bool new_digital_in);
165 float analog_in(
unsigned int index)
const;
166 void set_analog_in(
unsigned int index,
const float new_analog_in);
175 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Fawkes library namespace.
int32_t * mot_position() const
Get mot_position value.
float * mot_current() const
Get mot_current value.
bool is_bumper_estop_enabled() const
Get bumper_estop_enabled value.
size_t maxlenof_mot_velocity() const
Get maximum length of mot_velocity value.
bool * is_digital_out() const
Get digital_out value.
size_t maxlenof_mot_position() const
Get maximum length of mot_position value.
Base class for all Fawkes BlackBoard interfaces.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_digital_in() const
Get maximum length of digital_in value.
void set_analog_in(unsigned int index, const float new_analog_in)
Set analog_in value at given index.
size_t maxlenof_mot_current() const
Get maximum length of mot_current value.
RobotinoSensorInterface Fawkes BlackBoard Interface.
size_t maxlenof_analog_in() const
Get maximum length of analog_in value.
const char * type() const
Get type of interface.
float * analog_in() const
Get analog_in value.
size_t maxlenof_bumper() const
Get maximum length of bumper value.
bool is_bumper() const
Get bumper value.
void set_bumper_estop_enabled(const bool new_bumper_estop_enabled)
Set bumper_estop_enabled value.
SetBumperEStopEnabledMessage Fawkes BlackBoard Interface Message.
void set_digital_out(unsigned int index, const bool new_digital_out)
Set digital_out value at given index.
void set_mot_velocity(unsigned int index, const float new_mot_velocity)
Set mot_velocity value at given index.
virtual void copy_values(const Interface *other)
Copy values from other interface.
void set_digital_in(unsigned int index, const bool new_digital_in)
Set digital_in value at given index.
float * distance() const
Get distance value.
size_t maxlenof_bumper_estop_enabled() const
Get maximum length of bumper_estop_enabled value.
size_t maxlenof_digital_out() const
Get maximum length of digital_out value.
void set_distance(unsigned int index, const float new_distance)
Set distance value at given index.
SetDigitalOutputMessage Fawkes BlackBoard Interface Message.
void set_mot_current(unsigned int index, const float new_mot_current)
Set mot_current value at given index.
void set_mot_position(unsigned int index, const int32_t new_mot_position)
Set mot_position value at given index.
virtual Message * create_message(const char *type) const
Create message based on type name.
void set_bumper(const bool new_bumper)
Set bumper value.
bool * is_digital_in() const
Get digital_in value.
float * mot_velocity() const
Get mot_velocity value.
size_t maxlenof_distance() const
Get maximum length of distance value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.