24 #include <interfaces/JointInterface.h> 26 #include <core/exceptions/software.h> 46 JointInterface::JointInterface() : Interface()
48 data_size =
sizeof(JointInterface_data_t);
50 data = (JointInterface_data_t *)
data_ptr;
55 unsigned char tmp_hash[] = {0xd2, 0x74, 0x1b, 0x6a, 0x5b, 0xf, 0xa9, 0xe1, 0xb0, 0xa8, 0x47, 0x84, 0x6f, 0x8f, 0x1c, 0xab};
60 JointInterface::~JointInterface()
74 return data->position;
96 data->position = new_position;
109 return data->velocity;
131 data->velocity = new_velocity;
140 "message type for this interface type.", type);
155 memcpy(data, oi->data,
sizeof(JointInterface_data_t));
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void * data_ptr
Pointer to memory that contains local data.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
float position() const
Get position value.
void set_hash(unsigned char *ihash)
Set hash.
Fawkes library namespace.
Base class for all Fawkes BlackBoard interfaces.
message_data_ts_t * data_ts
data timestamp aliasing pointer
unsigned int data_size
Size of memory needed to hold all data.
bool data_changed
Indicator if data has changed.
virtual void copy_values(const Interface *other)
Copy values from other interface.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
float velocity() const
Get velocity value.
const char * type() const
Get type of interface.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
size_t maxlenof_position() const
Get maximum length of position value.
void set_position(const float new_position)
Set position value.
virtual Message * create_message(const char *type) const
Create message based on type name.
void set_velocity(const float new_velocity)
Set velocity value.
JointInterface Fawkes BlackBoard Interface.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
const char * type() const
Get message type.