RFLEX Class Reference

Inheritance diagram for RFLEX:
Collaboration diagram for RFLEX:

List of all members.

Public Member Functions

 RFLEX (ConfigFile *cf, int section)
virtual void Main ()
 Main method for driver thread.
virtual int Subscribe (player_devaddr_t addr)
 Subscribe to this driver.
virtual int Unsubscribe (player_devaddr_t addr)
 Unsubscribe from this driver.
virtual int Setup ()
 Initialize the driver.
virtual int Shutdown ()
 Finalize the driver.
virtual void StartThread (void)
 Start the driver thread.
virtual void StopThread (void)
 Cancel (and wait for termination) of the driver thread.
int ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data)
 Message handler.

Public Attributes

bool ThreadAlive

Static Public Attributes

static int joy_control

Private Member Functions

void ResetRawPositions ()
int initialize_robot ()
void reset_odometry ()
void set_odometry (float, float, float)
void update_everything (player_rflex_data_t *d)
void set_config_defaults ()

Private Attributes

player_devaddr_t position_id
player_devaddr_t sonar_id
player_devaddr_t sonar_id_2
player_devaddr_t ir_id
player_devaddr_t bumper_id
player_devaddr_t power_id
player_devaddr_t aio_id
player_devaddr_t dio_id
player_position2d_cmd_vel_t command
int command_type
int position_subscriptions
int sonar_subscriptions
int ir_subscriptions
int bumper_subscriptions
int rflex_fd
char rflex_serial_port [MAX_FILENAME_SIZE]
double m_odo_x
double m_odo_y
double rad_odo_theta

Member Function Documentation

void RFLEX::Main (  )  [virtual]
int RFLEX::Setup (  )  [virtual]

Initialize the driver.

This function is called with the first client subscribes; it MUST be implemented by the driver.

Returns:
Returns 0 on success.

Implements Driver.

References StartThread().

Here is the call graph for this function:

int RFLEX::Shutdown (  )  [virtual]

Finalize the driver.

This function is called with the last client unsubscribes; it MUST be implemented by the driver.

Returns:
Returns 0 on success.

Implements Driver.

References StopThread().

Here is the call graph for this function:

void RFLEX::StartThread ( void   )  [virtual]

Start the driver thread.

This method is usually called from the overloaded Setup() method to create the driver thread. This will call Main().

Reimplemented from Driver.

References Driver::driverthread, and Driver::DummyMain().

Referenced by Setup().

Here is the call graph for this function:

void RFLEX::StopThread ( void   )  [virtual]

Cancel (and wait for termination) of the driver thread.

This method is usually called from the overloaded Shutdown() method to terminate the driver thread.

Reimplemented from Driver.

References Driver::driverthread, Driver::Lock(), and Driver::Unlock().

Referenced by Shutdown().

Here is the call graph for this function:

int RFLEX::Subscribe ( player_devaddr_t  addr  )  [virtual]

Subscribe to this driver.

The Subscribe() and Unsubscribe() methods are used to control subscriptions to the driver; a driver MAY override them, but usually won't.

Parameters:
addr Address of the device to subscribe to (the driver may have more than one interface).
Returns:
Returns 0 on success.

Reimplemented from Driver.

References PLAYER_BUMPER_CODE, PLAYER_IR_CODE, PLAYER_POSITION2D_CODE, PLAYER_SONAR_CODE, and Driver::Subscribe().

Here is the call graph for this function:

int RFLEX::Unsubscribe ( player_devaddr_t  addr  )  [virtual]

Unsubscribe from this driver.

The Subscribe() and Unsubscribe() methods are used to control subscriptions to the driver; a driver MAY override them, but usually won't.

Parameters:
addr Address of the device to unsubscribe from (the driver may have more than one interface).
Returns:
Returns 0 on success.

Reimplemented from Driver.

References PLAYER_BUMPER_CODE, PLAYER_IR_CODE, PLAYER_POSITION2D_CODE, PLAYER_SONAR_CODE, and Driver::Unsubscribe().

Here is the call graph for this function:


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

Last updated 12 September 2005 21:38:45