next up previous contents
Next: 2.7 GpsProxy Up: 2. Class Reference Previous: 2.5 BumperProxy   Contents

Subsections

2.6 CommsProxy

The CommsProxy class controls a comms device. Data may be written one message at a time using the Write method. Incoming data are stored in a set of parallel lists:

The current number of valid messages is stored in msg_num, and so each list should be considered to be of length msg_num. To delete a message from the lists, use Delete().

Attributes

uint8_t** msg;

List of received messages.

size_t* msg_len;

List of lengths of the received messages.

struct timeval* msg_ts;

List of timestamps of the received messages.

size_t msg_num;

Number of received messages

Methods

CommsProxy(PlayerClient* pc, unsigned short index,
unsigned char access ='c')

Proxy constructor. Leave the access field empty to start unconnected.

int Write(void *msg, int len)

Write a message to the outgoing queue. Returns the number of bytes written, or -1 on error.

int Delete(int index)

Delete the given message. Returns 0 on success and -1 on error.

void Print()

Print out current message.

Attributes

unsigned short count;

The number of beacons detected

double pose[3];

The pose of the sensor [x,y,theta] in [m,m,rad]

double size[2];

The size of the sensor [x,y] in [m,m]

double fiducial_size[2];

The size of the most recently detected fiducial

double min_range;

the minimum range of the sensor in meters (partially defines the FOV)

double max_range;

the maximum range of the sensor in meters (partially defines the FOV)

double view_angle;

the receptive angle of the sensor in degrees (partially defines the FOV)

FiducialItem beacons[PLAYER_FIDUCIAL_MAX_SAMPLES];

The latest laser beacon data. Each beacon has the following information: Where each pose array is composed of:

Methods

FiducialProxy(PlayerClient* pc, unsigned short index,
unsigned char access='c')

Constructor. Leave the access field empty to start unconnected.

void Print()

Print out latest beacon data.

int PrintFOV()

Print the latest FOV configuration

int PrintGeometry()

Print the latest geometry configuration

int GetConfigure()

Get the sensor's geometry configuration

int GetFOV()

Get the field of view


next up previous contents
Next: 2.7 GpsProxy Up: 2. Class Reference Previous: 2.5 BumperProxy   Contents
2004-05-31