Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::NaoSensorInterface Class Reference

NaoSensorInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::NaoSensorInterface:

Classes

class  EmitUltrasonicWaveMessage
 EmitUltrasonicWaveMessage Fawkes BlackBoard Interface Message. More...
struct  NaoSensorInterface_data_t
 Internal data storage, do NOT modify!
class  StartUltrasonicMessage
 StartUltrasonicMessage Fawkes BlackBoard Interface Message. More...
class  StopUltrasonicMessage
 StopUltrasonicMessage Fawkes BlackBoard Interface Message. More...

Public Types

enum  UltrasonicDirection {
  USD_NONE, USD_LEFT_LEFT, USD_LEFT_RIGHT, USD_RIGHT_RIGHT,
  USD_RIGHT_LEFT, USD_BOTH_BOTH
}
 This determines the chosen sender/receiver. More...

Public Member Functions

const char * tostring_UltrasonicDirection (UltrasonicDirection value) const
 Convert UltrasonicDirection constant to string.
virtual bool message_valid (const Message *message) const
 Check if message is valid and can be enqueued.
float accel_x () const
 Get accel_x value.
void set_accel_x (const float new_accel_x)
 Set accel_x value.
size_t maxlenof_accel_x () const
 Get maximum length of accel_x value.
float accel_y () const
 Get accel_y value.
void set_accel_y (const float new_accel_y)
 Set accel_y value.
size_t maxlenof_accel_y () const
 Get maximum length of accel_y value.
float accel_z () const
 Get accel_z value.
void set_accel_z (const float new_accel_z)
 Set accel_z value.
size_t maxlenof_accel_z () const
 Get maximum length of accel_z value.
float gyro_x () const
 Get gyro_x value.
void set_gyro_x (const float new_gyro_x)
 Set gyro_x value.
size_t maxlenof_gyro_x () const
 Get maximum length of gyro_x value.
float gyro_y () const
 Get gyro_y value.
void set_gyro_y (const float new_gyro_y)
 Set gyro_y value.
size_t maxlenof_gyro_y () const
 Get maximum length of gyro_y value.
float gyro_ref () const
 Get gyro_ref value.
void set_gyro_ref (const float new_gyro_ref)
 Set gyro_ref value.
size_t maxlenof_gyro_ref () const
 Get maximum length of gyro_ref value.
float angle_x () const
 Get angle_x value.
void set_angle_x (const float new_angle_x)
 Set angle_x value.
size_t maxlenof_angle_x () const
 Get maximum length of angle_x value.
float angle_y () const
 Get angle_y value.
void set_angle_y (const float new_angle_y)
 Set angle_y value.
size_t maxlenof_angle_y () const
 Get maximum length of angle_y value.
float l_fsr_fl () const
 Get l_fsr_fl value.
void set_l_fsr_fl (const float new_l_fsr_fl)
 Set l_fsr_fl value.
size_t maxlenof_l_fsr_fl () const
 Get maximum length of l_fsr_fl value.
float l_fsr_fr () const
 Get l_fsr_fr value.
void set_l_fsr_fr (const float new_l_fsr_fr)
 Set l_fsr_fr value.
size_t maxlenof_l_fsr_fr () const
 Get maximum length of l_fsr_fr value.
float l_fsr_rl () const
 Get l_fsr_rl value.
void set_l_fsr_rl (const float new_l_fsr_rl)
 Set l_fsr_rl value.
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_fsr_rr (const float new_l_fsr_rr)
 Set l_fsr_rr value.
size_t maxlenof_l_fsr_rr () const
 Get maximum length of l_fsr_rr value.
float r_fsr_fl () const
 Get r_fsr_fl value.
void set_r_fsr_fl (const float new_r_fsr_fl)
 Set r_fsr_fl value.
size_t maxlenof_r_fsr_fl () const
 Get maximum length of r_fsr_fl value.
float r_fsr_fr () const
 Get r_fsr_fr value.
void set_r_fsr_fr (const float new_r_fsr_fr)
 Set r_fsr_fr value.
size_t maxlenof_r_fsr_fr () const
 Get maximum length of r_fsr_fr value.
float r_fsr_rl () const
 Get r_fsr_rl value.
void set_r_fsr_rl (const float new_r_fsr_rl)
 Set r_fsr_rl value.
size_t maxlenof_r_fsr_rl () const
 Get maximum length of r_fsr_rl value.
float r_fsr_rr () const
 Get r_fsr_rr value.
void set_r_fsr_rr (const float new_r_fsr_rr)
 Set r_fsr_rr value.
size_t maxlenof_r_fsr_rr () const
 Get maximum length of r_fsr_rr value.
float l_total_weight () const
 Get l_total_weight value.
void set_l_total_weight (const float new_l_total_weight)
 Set l_total_weight value.
size_t maxlenof_l_total_weight () const
 Get maximum length of l_total_weight value.
float r_total_weight () const
 Get r_total_weight value.
void set_r_total_weight (const float new_r_total_weight)
 Set r_total_weight value.
size_t maxlenof_r_total_weight () const
 Get maximum length of r_total_weight value.
float l_cop_x () const
 Get l_cop_x value.
void set_l_cop_x (const float new_l_cop_x)
 Set l_cop_x value.
size_t maxlenof_l_cop_x () const
 Get maximum length of l_cop_x value.
float l_cop_y () const
 Get l_cop_y value.
void set_l_cop_y (const float new_l_cop_y)
 Set l_cop_y value.
size_t maxlenof_l_cop_y () const
 Get maximum length of l_cop_y value.
float r_cop_x () const
 Get r_cop_x value.
void set_r_cop_x (const float new_r_cop_x)
 Set r_cop_x value.
size_t maxlenof_r_cop_x () const
 Get maximum length of r_cop_x value.
float r_cop_y () const
 Get r_cop_y value.
void set_r_cop_y (const float new_r_cop_y)
 Set r_cop_y value.
size_t maxlenof_r_cop_y () const
 Get maximum length of r_cop_y value.
float * ultrasonic_distance_left () const
 Get ultrasonic_distance_left value.
float ultrasonic_distance_left (unsigned int index) const
 Get ultrasonic_distance_left value at given index.
void set_ultrasonic_distance_left (unsigned int index, const float new_ultrasonic_distance_left)
 Set ultrasonic_distance_left value at given index.
void set_ultrasonic_distance_left (const float *new_ultrasonic_distance_left)
 Set ultrasonic_distance_left value.
size_t maxlenof_ultrasonic_distance_left () const
 Get maximum length of ultrasonic_distance_left value.
float * ultrasonic_distance_right () const
 Get ultrasonic_distance_right value.
float ultrasonic_distance_right (unsigned int index) const
 Get ultrasonic_distance_right value at given index.
void set_ultrasonic_distance_right (unsigned int index, const float new_ultrasonic_distance_right)
 Set ultrasonic_distance_right value at given index.
void set_ultrasonic_distance_right (const float *new_ultrasonic_distance_right)
 Set ultrasonic_distance_right value.
size_t maxlenof_ultrasonic_distance_right () const
 Get maximum length of ultrasonic_distance_right value.
UltrasonicDirection ultrasonic_direction () const
 Get ultrasonic_direction value.
void set_ultrasonic_direction (const UltrasonicDirection new_ultrasonic_direction)
 Set ultrasonic_direction value.
size_t maxlenof_ultrasonic_direction () const
 Get maximum length of ultrasonic_direction value.
uint8_t l_foot_bumper_l () const
 Get l_foot_bumper_l value.
void set_l_foot_bumper_l (const uint8_t new_l_foot_bumper_l)
 Set l_foot_bumper_l value.
size_t maxlenof_l_foot_bumper_l () const
 Get maximum length of l_foot_bumper_l value.
uint8_t l_foot_bumper_r () const
 Get l_foot_bumper_r value.
void set_l_foot_bumper_r (const uint8_t new_l_foot_bumper_r)
 Set l_foot_bumper_r value.
size_t maxlenof_l_foot_bumper_r () const
 Get maximum length of l_foot_bumper_r value.
uint8_t r_foot_bumper_l () const
 Get r_foot_bumper_l value.
void set_r_foot_bumper_l (const uint8_t new_r_foot_bumper_l)
 Set r_foot_bumper_l value.
size_t maxlenof_r_foot_bumper_l () const
 Get maximum length of r_foot_bumper_l value.
uint8_t r_foot_bumper_r () const
 Get r_foot_bumper_r value.
void set_r_foot_bumper_r (const uint8_t new_r_foot_bumper_r)
 Set r_foot_bumper_r value.
size_t maxlenof_r_foot_bumper_r () const
 Get maximum length of r_foot_bumper_r value.
uint8_t head_touch_front () const
 Get head_touch_front value.
void set_head_touch_front (const uint8_t new_head_touch_front)
 Set head_touch_front value.
size_t maxlenof_head_touch_front () const
 Get maximum length of head_touch_front value.
uint8_t head_touch_middle () const
 Get head_touch_middle value.
void set_head_touch_middle (const uint8_t new_head_touch_middle)
 Set head_touch_middle value.
size_t maxlenof_head_touch_middle () const
 Get maximum length of head_touch_middle value.
uint8_t head_touch_rear () const
 Get head_touch_rear value.
void set_head_touch_rear (const uint8_t new_head_touch_rear)
 Set head_touch_rear value.
size_t maxlenof_head_touch_rear () const
 Get maximum length of head_touch_rear value.
uint8_t chest_button () const
 Get chest_button value.
void set_chest_button (const uint8_t new_chest_button)
 Set chest_button value.
size_t maxlenof_chest_button () const
 Get maximum length of chest_button value.
float battery_charge () const
 Get battery_charge value.
void set_battery_charge (const float new_battery_charge)
 Set battery_charge value.
size_t maxlenof_battery_charge () const
 Get maximum length of battery_charge value.
virtual Messagecreate_message (const char *type) const
 Create message based on type name.
virtual void copy_values (const Interface *other)
 Copy values from other interface.
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string.
- Public Member Functions inherited from fawkes::Interface
virtual ~Interface ()
 Destructor.
bool oftype (const char *interface_type) const
 Check if interface is of given type.
const void * datachunk () const
 Get data chunk.
unsigned int datasize () const
 Get data size.
const char * type () const
 Get type of interface.
const char * id () const
 Get identifier of interface.
const char * uid () const
 Get unique identifier of interface.
unsigned short serial () const
 Get instance serial of interface.
unsigned int mem_serial () const
 Get memory serial of interface.
bool operator== (Interface &comp) const
 Check equality of two interfaces.
const unsigned char * hash () const
 Get interface hash.
size_t hash_size () const
 Get size of interface hash.
const char * hash_printable () const
 Get printable interface hash.
bool is_writer () const
 Check if this is a writing instance.
void set_validity (bool valid)
 Mark this interface invalid.
bool is_valid () const
 Check validity of interface.
void set_from_chunk (void *chunk)
 Set from a raw data chunk.
void resize_buffers (unsigned int num_buffers)
 Resize buffer array.
unsigned int num_buffers () const
 Get number of buffers.
void copy_shared_to_buffer (unsigned int buffer)
 Copy data from private memory to buffer.
void copy_private_to_buffer (unsigned int buffer)
 Copy data from private memory to buffer.
void read_from_buffer (unsigned int buffer)
 Copy data from buffer to private memory.
int compare_buffers (unsigned int buffer)
 Compare buffer to private memory.
void read ()
 Read from BlackBoard into local copy.
void write ()
 Write from local copy into BlackBoard memory.
bool has_writer () const
 Check if there is a writer for the interface.
unsigned int num_readers () const
 Get the number of readers.
bool changed () const
 Check if data has been changed.
const Timetimestamp () const
 Get timestamp of last write.
void set_auto_timestamping (bool enabled)
 Enable or disable automated timestamping.
void set_timestamp (const Time *t=NULL)
 Set timestamp.
void set_clock (Clock *clock)
 Set clock to use for timestamping.
std::list< const char * > get_message_types ()
 Obtain a list of textual representations of the message types available for this interface.
unsigned int msgq_enqueue (Message *message)
 Enqueue message at end of queue.
unsigned int msgq_enqueue_copy (Message *message)
 Enqueue copy of message at end of queue.
void msgq_remove (Message *message)
 Remove message from queue.
void msgq_remove (unsigned int message_id)
 Remove message from queue.
unsigned int msgq_size ()
 Get size of message queue.
void msgq_flush ()
 Flush all messages.
void msgq_lock ()
 Lock message queue.
bool msgq_try_lock ()
 Try to lock message queue.
void msgq_unlock ()
 Unlock message queue.
void msgq_pop ()
 Erase first message from queue.
Messagemsgq_first ()
 Get the first message from the message queue.
bool msgq_empty ()
 Check if queue is empty.
template<class MessageType >
bool msgq_first_is ()
 Check if first message has desired type.
template<class MessageType >
MessageType * msgq_first ()
 Get first message casted to the desired type.
template<class MessageType >
MessageType * msgq_first (MessageType *&msg)
 Get first message casted to the desired type.
template<class MessageType >
MessageType * msgq_first_safe (MessageType *&msg) throw ()
 Get first message casted to the desired type without exceptions.
MessageQueue::MessageIterator msgq_begin ()
 Get start iterator for message queue.
MessageQueue::MessageIterator msgq_end ()
 Get end iterator for message queue.
InterfaceFieldIterator fields ()
 Get iterator over all fields of this interface instance.
InterfaceFieldIterator fields_end ()
 Invalid iterator.
unsigned int num_fields ()
 Get the number of fields in the interface.

Additional Inherited Members

- Static Public Member Functions inherited from fawkes::Interface
static void parse_uid (const char *uid, char **type, char **id)
 Parse UID to type and ID strings.
- Protected Member Functions inherited from fawkes::Interface
 Interface ()
 Constructor.
void set_hash (unsigned char *ihash)
 Set hash.
void add_fieldinfo (interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0)
 Add an entry to the field info list.
void add_messageinfo (const char *name)
 Add an entry to the message info list.
- Protected Attributes inherited from fawkes::Interface
void * data_ptr
 Pointer to local memory storage.
unsigned int data_size
 Minimal data size to hold data storage.
bool data_changed
 Indicator if data has changed.
interface_data_ts_tdata_ts
 Pointer to data casted to timestamp struct.

Detailed Description

NaoSensorInterface Fawkes BlackBoard Interface.

This interface provides access to Nao sensors.

Definition at line 33 of file NaoSensorInterface.h.

Member Enumeration Documentation

This determines the chosen sender/receiver.

Enumerator:
USD_NONE 

No transmission received, yet.

USD_LEFT_LEFT 

Left emitter and left receiver.

USD_LEFT_RIGHT 

Left emitter and right receiver.

USD_RIGHT_RIGHT 

Right emitter and right receiver.

USD_RIGHT_LEFT 

Right emitter and left receiver.

USD_BOTH_BOTH 

Both emitters and both receivers.

Definition at line 44 of file NaoSensorInterface.h.

Member Function Documentation

float fawkes::NaoSensorInterface::accel_x ( ) const

Get accel_x value.

Accelerometer x

Returns
accel_x value

Definition at line 120 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::accel_y ( ) const

Get accel_y value.

Accelerometer y

Returns
accel_y value

Definition at line 151 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::accel_z ( ) const

Get accel_z value.

Accelerometer z

Returns
accel_z value

Definition at line 182 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::angle_x ( ) const

Get angle_x value.

Angle x

Returns
angle_x value

Definition at line 306 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::angle_y ( ) const

Get angle_y value.

Angle y

Returns
angle_y value

Definition at line 337 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::battery_charge ( ) const

Get battery_charge value.

Battery charge

Returns
battery_charge value

Definition at line 1229 of file NaoSensorInterface.cpp.

uint8_t fawkes::NaoSensorInterface::chest_button ( ) const

Get chest_button value.

Chest button state

Returns
chest_button value

Definition at line 1198 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

void fawkes::NaoSensorInterface::copy_values ( const Interface other)
virtual

Copy values from other interface.

Parameters
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 1276 of file NaoSensorInterface.cpp.

References fawkes::Interface::type().

Message * fawkes::NaoSensorInterface::create_message ( const char *  type) const
virtual

Create message based on type name.

This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.

Parameters
typemessage type
Returns
message of the given type, empty
Exceptions
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 1257 of file NaoSensorInterface.cpp.

const char * fawkes::NaoSensorInterface::enum_tostring ( const char *  enumtype,
int  val 
) const
virtual

Convert arbitrary enum value to string.

Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.

Parameters
enumtypeenum type as string
valvalue to convert
Returns
string representation of value
Exceptions
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 1287 of file NaoSensorInterface.cpp.

References tostring_UltrasonicDirection().

float fawkes::NaoSensorInterface::gyro_ref ( ) const

Get gyro_ref value.

Gyrometer reference

Returns
gyro_ref value

Definition at line 275 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::gyro_x ( ) const

Get gyro_x value.

Gyrometer x

Returns
gyro_x value

Definition at line 213 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::gyro_y ( ) const

Get gyro_y value.

Gyrometer y

Returns
gyro_y value

Definition at line 244 of file NaoSensorInterface.cpp.

uint8_t fawkes::NaoSensorInterface::head_touch_front ( ) const

Get head_touch_front value.

Front part of head touch sensor (only Academics robot)

Returns
head_touch_front value

Definition at line 1105 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

uint8_t fawkes::NaoSensorInterface::head_touch_middle ( ) const

Get head_touch_middle value.

Middle part of head touch sensor (only Academics robot)

Returns
head_touch_middle value

Definition at line 1136 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

uint8_t fawkes::NaoSensorInterface::head_touch_rear ( ) const

Get head_touch_rear value.

Rear part of head touch sensor (only Academics robot)

Returns
head_touch_rear value

Definition at line 1167 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

float fawkes::NaoSensorInterface::l_cop_x ( ) const

Get l_cop_x value.

Center of pressure X for left foot.

Returns
l_cop_x value

Definition at line 678 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::l_cop_y ( ) const

Get l_cop_y value.

Center of pressure Y for left foot.

Returns
l_cop_y value

Definition at line 709 of file NaoSensorInterface.cpp.

uint8_t fawkes::NaoSensorInterface::l_foot_bumper_l ( ) const

Get l_foot_bumper_l value.

Left foot bumper left side

Returns
l_foot_bumper_l value

Definition at line 981 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

uint8_t fawkes::NaoSensorInterface::l_foot_bumper_r ( ) const

Get l_foot_bumper_r value.

Left foot bumper right side

Returns
l_foot_bumper_r value

Definition at line 1012 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

float fawkes::NaoSensorInterface::l_fsr_fl ( ) const

Get l_fsr_fl value.

Left FSR front left

Returns
l_fsr_fl value

Definition at line 368 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::l_fsr_fr ( ) const

Get l_fsr_fr value.

Left FSR front right

Returns
l_fsr_fr value

Definition at line 399 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::l_fsr_rl ( ) const

Get l_fsr_rl value.

Left FSR rear left

Returns
l_fsr_rl value

Definition at line 430 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::l_fsr_rr ( ) const

Get l_fsr_rr value.

Left FSR rear right

Returns
l_fsr_rr value

Definition at line 461 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::l_total_weight ( ) const

Get l_total_weight value.

Total weight on left foot

Returns
l_total_weight value

Definition at line 616 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_accel_x ( ) const

Get maximum length of accel_x value.

Returns
length of accel_x value, can be length of the array or number of maximum number of characters for a string

Definition at line 130 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_accel_y ( ) const

Get maximum length of accel_y value.

Returns
length of accel_y value, can be length of the array or number of maximum number of characters for a string

Definition at line 161 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_accel_z ( ) const

Get maximum length of accel_z value.

Returns
length of accel_z value, can be length of the array or number of maximum number of characters for a string

Definition at line 192 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_angle_x ( ) const

Get maximum length of angle_x value.

Returns
length of angle_x value, can be length of the array or number of maximum number of characters for a string

Definition at line 316 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_angle_y ( ) const

Get maximum length of angle_y value.

Returns
length of angle_y value, can be length of the array or number of maximum number of characters for a string

Definition at line 347 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_battery_charge ( ) const

Get maximum length of battery_charge value.

Returns
length of battery_charge value, can be length of the array or number of maximum number of characters for a string

Definition at line 1239 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_chest_button ( ) const

Get maximum length of chest_button value.

Returns
length of chest_button value, can be length of the array or number of maximum number of characters for a string

Definition at line 1208 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_gyro_ref ( ) const

Get maximum length of gyro_ref value.

Returns
length of gyro_ref value, can be length of the array or number of maximum number of characters for a string

Definition at line 285 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_gyro_x ( ) const

Get maximum length of gyro_x value.

Returns
length of gyro_x value, can be length of the array or number of maximum number of characters for a string

Definition at line 223 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_gyro_y ( ) const

Get maximum length of gyro_y value.

Returns
length of gyro_y value, can be length of the array or number of maximum number of characters for a string

Definition at line 254 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_head_touch_front ( ) const

Get maximum length of head_touch_front value.

Returns
length of head_touch_front value, can be length of the array or number of maximum number of characters for a string

Definition at line 1115 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_head_touch_middle ( ) const

Get maximum length of head_touch_middle value.

Returns
length of head_touch_middle value, can be length of the array or number of maximum number of characters for a string

Definition at line 1146 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_head_touch_rear ( ) const

Get maximum length of head_touch_rear value.

Returns
length of head_touch_rear value, can be length of the array or number of maximum number of characters for a string

Definition at line 1177 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_cop_x ( ) const

Get maximum length of l_cop_x value.

Returns
length of l_cop_x value, can be length of the array or number of maximum number of characters for a string

Definition at line 688 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_cop_y ( ) const

Get maximum length of l_cop_y value.

Returns
length of l_cop_y value, can be length of the array or number of maximum number of characters for a string

Definition at line 719 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_foot_bumper_l ( ) const

Get maximum length of l_foot_bumper_l value.

Returns
length of l_foot_bumper_l value, can be length of the array or number of maximum number of characters for a string

Definition at line 991 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_foot_bumper_r ( ) const

Get maximum length of l_foot_bumper_r value.

Returns
length of l_foot_bumper_r value, can be length of the array or number of maximum number of characters for a string

Definition at line 1022 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_fl ( ) const

Get maximum length of l_fsr_fl value.

Returns
length of l_fsr_fl value, can be length of the array or number of maximum number of characters for a string

Definition at line 378 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_fr ( ) const

Get maximum length of l_fsr_fr value.

Returns
length of l_fsr_fr value, can be length of the array or number of maximum number of characters for a string

Definition at line 409 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_rl ( ) const

Get maximum length of l_fsr_rl value.

Returns
length of l_fsr_rl value, can be length of the array or number of maximum number of characters for a string

Definition at line 440 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_rr ( ) const

Get maximum length of l_fsr_rr value.

Returns
length of l_fsr_rr value, can be length of the array or number of maximum number of characters for a string

Definition at line 471 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_l_total_weight ( ) const

Get maximum length of l_total_weight value.

Returns
length of l_total_weight value, can be length of the array or number of maximum number of characters for a string

Definition at line 626 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_cop_x ( ) const

Get maximum length of r_cop_x value.

Returns
length of r_cop_x value, can be length of the array or number of maximum number of characters for a string

Definition at line 750 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_cop_y ( ) const

Get maximum length of r_cop_y value.

Returns
length of r_cop_y value, can be length of the array or number of maximum number of characters for a string

Definition at line 781 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_foot_bumper_l ( ) const

Get maximum length of r_foot_bumper_l value.

Returns
length of r_foot_bumper_l value, can be length of the array or number of maximum number of characters for a string

Definition at line 1053 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_foot_bumper_r ( ) const

Get maximum length of r_foot_bumper_r value.

Returns
length of r_foot_bumper_r value, can be length of the array or number of maximum number of characters for a string

Definition at line 1084 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_fl ( ) const

Get maximum length of r_fsr_fl value.

Returns
length of r_fsr_fl value, can be length of the array or number of maximum number of characters for a string

Definition at line 502 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_fr ( ) const

Get maximum length of r_fsr_fr value.

Returns
length of r_fsr_fr value, can be length of the array or number of maximum number of characters for a string

Definition at line 533 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_rl ( ) const

Get maximum length of r_fsr_rl value.

Returns
length of r_fsr_rl value, can be length of the array or number of maximum number of characters for a string

Definition at line 564 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_rr ( ) const

Get maximum length of r_fsr_rr value.

Returns
length of r_fsr_rr value, can be length of the array or number of maximum number of characters for a string

Definition at line 595 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_r_total_weight ( ) const

Get maximum length of r_total_weight value.

Returns
length of r_total_weight value, can be length of the array or number of maximum number of characters for a string

Definition at line 657 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_ultrasonic_direction ( ) const

Get maximum length of ultrasonic_direction value.

Returns
length of ultrasonic_direction value, can be length of the array or number of maximum number of characters for a string

Definition at line 958 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_left ( ) const

Get maximum length of ultrasonic_distance_left value.

Returns
length of ultrasonic_distance_left value, can be length of the array or number of maximum number of characters for a string

Definition at line 833 of file NaoSensorInterface.cpp.

size_t fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_right ( ) const

Get maximum length of ultrasonic_distance_right value.

Returns
length of ultrasonic_distance_right value, can be length of the array or number of maximum number of characters for a string

Definition at line 905 of file NaoSensorInterface.cpp.

bool fawkes::NaoSensorInterface::message_valid ( const Message message) const
virtual

Check if message is valid and can be enqueued.

Parameters
messageMessage to check
Returns
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 1535 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::r_cop_x ( ) const

Get r_cop_x value.

Center of pressure X for right foot.

Returns
r_cop_x value

Definition at line 740 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::r_cop_y ( ) const

Get r_cop_y value.

Center of pressure Y for right foot.

Returns
r_cop_y value

Definition at line 771 of file NaoSensorInterface.cpp.

uint8_t fawkes::NaoSensorInterface::r_foot_bumper_l ( ) const

Get r_foot_bumper_l value.

Right foot bumper left side

Returns
r_foot_bumper_l value

Definition at line 1043 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

uint8_t fawkes::NaoSensorInterface::r_foot_bumper_r ( ) const

Get r_foot_bumper_r value.

Right foot bumper right side

Returns
r_foot_bumper_r value

Definition at line 1074 of file NaoSensorInterface.cpp.

Referenced by NaoQiButtonThread::loop().

float fawkes::NaoSensorInterface::r_fsr_fl ( ) const

Get r_fsr_fl value.

Right FSR front left

Returns
r_fsr_fl value

Definition at line 492 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::r_fsr_fr ( ) const

Get r_fsr_fr value.

Right FSR front right

Returns
r_fsr_fr value

Definition at line 523 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::r_fsr_rl ( ) const

Get r_fsr_rl value.

Right FSR rear left

Returns
r_fsr_rl value

Definition at line 554 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::r_fsr_rr ( ) const

Get r_fsr_rr value.

Right FSR rear right

Returns
r_fsr_rr value

Definition at line 585 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::r_total_weight ( ) const

Get r_total_weight value.

Total weight on right foot

Returns
r_total_weight value

Definition at line 647 of file NaoSensorInterface.cpp.

void fawkes::NaoSensorInterface::set_accel_x ( const float  new_accel_x)

Set accel_x value.

Accelerometer x

Parameters
new_accel_xnew accel_x value

Definition at line 140 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_accel_y ( const float  new_accel_y)

Set accel_y value.

Accelerometer y

Parameters
new_accel_ynew accel_y value

Definition at line 171 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_accel_z ( const float  new_accel_z)

Set accel_z value.

Accelerometer z

Parameters
new_accel_znew accel_z value

Definition at line 202 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_angle_x ( const float  new_angle_x)

Set angle_x value.

Angle x

Parameters
new_angle_xnew angle_x value

Definition at line 326 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_angle_y ( const float  new_angle_y)

Set angle_y value.

Angle y

Parameters
new_angle_ynew angle_y value

Definition at line 357 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_battery_charge ( const float  new_battery_charge)

Set battery_charge value.

Battery charge

Parameters
new_battery_chargenew battery_charge value

Definition at line 1249 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_chest_button ( const uint8_t  new_chest_button)

Set chest_button value.

Chest button state

Parameters
new_chest_buttonnew chest_button value

Definition at line 1218 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_gyro_ref ( const float  new_gyro_ref)

Set gyro_ref value.

Gyrometer reference

Parameters
new_gyro_refnew gyro_ref value

Definition at line 295 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_gyro_x ( const float  new_gyro_x)

Set gyro_x value.

Gyrometer x

Parameters
new_gyro_xnew gyro_x value

Definition at line 233 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_gyro_y ( const float  new_gyro_y)

Set gyro_y value.

Gyrometer y

Parameters
new_gyro_ynew gyro_y value

Definition at line 264 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_head_touch_front ( const uint8_t  new_head_touch_front)

Set head_touch_front value.

Front part of head touch sensor (only Academics robot)

Parameters
new_head_touch_frontnew head_touch_front value

Definition at line 1125 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_head_touch_middle ( const uint8_t  new_head_touch_middle)

Set head_touch_middle value.

Middle part of head touch sensor (only Academics robot)

Parameters
new_head_touch_middlenew head_touch_middle value

Definition at line 1156 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_head_touch_rear ( const uint8_t  new_head_touch_rear)

Set head_touch_rear value.

Rear part of head touch sensor (only Academics robot)

Parameters
new_head_touch_rearnew head_touch_rear value

Definition at line 1187 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_cop_x ( const float  new_l_cop_x)

Set l_cop_x value.

Center of pressure X for left foot.

Parameters
new_l_cop_xnew l_cop_x value

Definition at line 698 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_cop_y ( const float  new_l_cop_y)

Set l_cop_y value.

Center of pressure Y for left foot.

Parameters
new_l_cop_ynew l_cop_y value

Definition at line 729 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_foot_bumper_l ( const uint8_t  new_l_foot_bumper_l)

Set l_foot_bumper_l value.

Left foot bumper left side

Parameters
new_l_foot_bumper_lnew l_foot_bumper_l value

Definition at line 1001 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_foot_bumper_r ( const uint8_t  new_l_foot_bumper_r)

Set l_foot_bumper_r value.

Left foot bumper right side

Parameters
new_l_foot_bumper_rnew l_foot_bumper_r value

Definition at line 1032 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_fsr_fl ( const float  new_l_fsr_fl)

Set l_fsr_fl value.

Left FSR front left

Parameters
new_l_fsr_flnew l_fsr_fl value

Definition at line 388 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_fsr_fr ( const float  new_l_fsr_fr)

Set l_fsr_fr value.

Left FSR front right

Parameters
new_l_fsr_frnew l_fsr_fr value

Definition at line 419 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_fsr_rl ( const float  new_l_fsr_rl)

Set l_fsr_rl value.

Left FSR rear left

Parameters
new_l_fsr_rlnew l_fsr_rl value

Definition at line 450 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_fsr_rr ( const float  new_l_fsr_rr)

Set l_fsr_rr value.

Left FSR rear right

Parameters
new_l_fsr_rrnew l_fsr_rr value

Definition at line 481 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_l_total_weight ( const float  new_l_total_weight)

Set l_total_weight value.

Total weight on left foot

Parameters
new_l_total_weightnew l_total_weight value

Definition at line 636 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_cop_x ( const float  new_r_cop_x)

Set r_cop_x value.

Center of pressure X for right foot.

Parameters
new_r_cop_xnew r_cop_x value

Definition at line 760 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_cop_y ( const float  new_r_cop_y)

Set r_cop_y value.

Center of pressure Y for right foot.

Parameters
new_r_cop_ynew r_cop_y value

Definition at line 791 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_foot_bumper_l ( const uint8_t  new_r_foot_bumper_l)

Set r_foot_bumper_l value.

Right foot bumper left side

Parameters
new_r_foot_bumper_lnew r_foot_bumper_l value

Definition at line 1063 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_foot_bumper_r ( const uint8_t  new_r_foot_bumper_r)

Set r_foot_bumper_r value.

Right foot bumper right side

Parameters
new_r_foot_bumper_rnew r_foot_bumper_r value

Definition at line 1094 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_fsr_fl ( const float  new_r_fsr_fl)

Set r_fsr_fl value.

Right FSR front left

Parameters
new_r_fsr_flnew r_fsr_fl value

Definition at line 512 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_fsr_fr ( const float  new_r_fsr_fr)

Set r_fsr_fr value.

Right FSR front right

Parameters
new_r_fsr_frnew r_fsr_fr value

Definition at line 543 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_fsr_rl ( const float  new_r_fsr_rl)

Set r_fsr_rl value.

Right FSR rear left

Parameters
new_r_fsr_rlnew r_fsr_rl value

Definition at line 574 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_fsr_rr ( const float  new_r_fsr_rr)

Set r_fsr_rr value.

Right FSR rear right

Parameters
new_r_fsr_rrnew r_fsr_rr value

Definition at line 605 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_r_total_weight ( const float  new_r_total_weight)

Set r_total_weight value.

Total weight on right foot

Parameters
new_r_total_weightnew r_total_weight value

Definition at line 667 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_ultrasonic_direction ( const UltrasonicDirection  new_ultrasonic_direction)

Set ultrasonic_direction value.

Direction that was used to gather the ultrasonic readings.

Parameters
new_ultrasonic_directionnew ultrasonic_direction value

Definition at line 970 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_ultrasonic_distance_left ( unsigned int  index,
const float  new_ultrasonic_distance_left 
)

Set ultrasonic_distance_left value at given index.

First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.

Parameters
new_ultrasonic_distance_leftnew ultrasonic_distance_left value
indexindex for of the value

Definition at line 861 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_ultrasonic_distance_left ( const float *  new_ultrasonic_distance_left)

Set ultrasonic_distance_left value.

First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.

Parameters
new_ultrasonic_distance_leftnew ultrasonic_distance_left value

Definition at line 846 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_ultrasonic_distance_right ( unsigned int  index,
const float  new_ultrasonic_distance_right 
)

Set ultrasonic_distance_right value at given index.

First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.

Parameters
new_ultrasonic_distance_rightnew ultrasonic_distance_right value
indexindex for of the value

Definition at line 933 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::NaoSensorInterface::set_ultrasonic_distance_right ( const float *  new_ultrasonic_distance_right)

Set ultrasonic_distance_right value.

First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.

Parameters
new_ultrasonic_distance_rightnew ultrasonic_distance_right value

Definition at line 918 of file NaoSensorInterface.cpp.

References fawkes::Interface::data_changed.

const char * fawkes::NaoSensorInterface::tostring_UltrasonicDirection ( UltrasonicDirection  value) const

Convert UltrasonicDirection constant to string.

Parameters
valuevalue to convert to string
Returns
constant value as string.

Definition at line 102 of file NaoSensorInterface.cpp.

References USD_BOTH_BOTH, USD_LEFT_LEFT, USD_LEFT_RIGHT, USD_NONE, USD_RIGHT_LEFT, and USD_RIGHT_RIGHT.

Referenced by enum_tostring().

NaoSensorInterface::UltrasonicDirection fawkes::NaoSensorInterface::ultrasonic_direction ( ) const

Get ultrasonic_direction value.

Direction that was used to gather the ultrasonic readings.

Returns
ultrasonic_direction value

Definition at line 948 of file NaoSensorInterface.cpp.

float * fawkes::NaoSensorInterface::ultrasonic_distance_left ( ) const

Get ultrasonic_distance_left value.

First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.

Returns
ultrasonic_distance_left value

Definition at line 805 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::ultrasonic_distance_left ( unsigned int  index) const

Get ultrasonic_distance_left value at given index.

First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.

Parameters
indexindex of value
Returns
ultrasonic_distance_left value
Exceptions
Exceptionthrown if index is out of bounds

Definition at line 820 of file NaoSensorInterface.cpp.

float * fawkes::NaoSensorInterface::ultrasonic_distance_right ( ) const

Get ultrasonic_distance_right value.

First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.

Returns
ultrasonic_distance_right value

Definition at line 877 of file NaoSensorInterface.cpp.

float fawkes::NaoSensorInterface::ultrasonic_distance_right ( unsigned int  index) const

Get ultrasonic_distance_right value at given index.

First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.

Parameters
indexindex of value
Returns
ultrasonic_distance_right value
Exceptions
Exceptionthrown if index is out of bounds

Definition at line 892 of file NaoSensorInterface.cpp.


The documentation for this class was generated from the following files: