next up previous contents
Next: 2.6 CommsProxy Up: 2. Class Reference Previous: 2.4 BlobfinderProxy   Contents

Subsections

2.5 BumperProxy

The BumperProxy class is used to read from a bumper device.

Attributes

uint8_t bumper_count;
uint8_t bumpers[PLAYER_BUMPER_MAX_SAMPLES];

array representing bumped state.

Methods

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

Constructor. Leave the access field empty to start unconnected.

bool Bumped (const unsigned int i)

Returns 1 if the specified bumper has been bumped, 0 otherwise.

bool BumpedAny ()

Returns 1 if any bumper has been bumped, 0 otherwise.

int GetBumperGeom( player_bumper_geom_t* bumper_defs )

Requests the geometries of the bumpers. Returns -1 if anything went wrong, 0 if OK

uint8_t BumperCount ()

Returns the number of bumper readings.

void Print ()

Print out the current bumper state.



2004-05-31