REB Class Reference
Inheritance diagram for REB:

Collaboration diagram for REB:

Public Member Functions | |
| REB (ConfigFile *cf, int section) | |
| virtual void | Main () |
| Main method for driver thread. | |
| int | ProcessMessage (ClientData *client, player_msghdr *hdr, uint8_t *data, uint8_t *resp_data, size_t *resp_len) |
| virtual int | Subscribe (player_device_id_t id) |
| virtual int | Unsubscribe (player_device_id_t id) |
| virtual int | Setup () |
| Initialize the driver. | |
| virtual int | Shutdown () |
| Finalize the driver. | |
| void | Restart () |
| void | ReadConfig () |
| void | SetOdometry (int, int, short) |
| void | SetIRState (int) |
| void | UpdateData (void) |
| void | UpdateIRData (player_ir_data_t *) |
| void | UpdatePowerData (player_power_data_t *) |
| void | UpdatePosData (player_position_data_t *) |
| void | ConfigAD (int, int) |
| unsigned short | ReadAD (int) |
| void | ReadAllIR (uint16_t *ir) |
| void | SetSpeed (int, int) |
| int | ReadSpeed (int) |
| void | SetPos (int, int) |
| void | SetPosCounter (int, int) |
| int | ReadPos (int) |
| unsigned char | ReadStatus (int, int *, int *) |
| void | ConfigPosPID (int, int, int, int) |
| void | ConfigSpeedPID (int, int, int, int) |
| void | ConfigSpeedProfile (int, int, int) |
Private Member Functions | |
| int | write_serial (char *, int) |
| int | read_serial_until (char *, int, char *, int) |
| int | write_command (char *buf, int len, int maxsize) |
| int | ProcessCommand (player_position_cmd_t *poscmd) |
Private Attributes | |
| player_device_id_t | ir_id |
| player_device_id_t | position_id |
| player_device_id_t | power_id |
| int | ir_subscriptions |
| int | position_subscriptions |
| int | param_index |
| int | reb_fd |
| struct timeval | last_position |
| bool | refresh_last_position |
| int | last_lpos |
| int | last_rpos |
| int | last_x_f |
| int | last_y_f |
| double | last_theta |
| struct timeval | last_pos_update |
| struct timeval | last_power_update |
| struct timeval | last_ir_update |
| int | pos_update_period |
| int | current_heading |
| short | desired_heading |
| int | ir_sequence |
| struct timeval | last_ir |
| bool | motors_enabled |
| bool | velocity_mode |
| bool | direct_velocity_control |
| char | reb_serial_port [MAX_FILENAME_SIZE] |
| struct pollfd write_pfd | read_pfd |
| short | last_trans_command |
| short | last_rot_command |
| int | leftvel |
| int | rightvel |
| int | leftpos |
| int | rightpos |
Member Function Documentation
| void REB::Main | ( | ) | [virtual] |
Main method for driver thread.
drivers have their own thread of execution, created using StartThread(); this is the entry point for the driver thread, and must be overloaded by all threaded drivers.
Reimplemented from Driver.
References PLAYER_MSGTYPE_DATA, and Driver::ProcessMessages().
Here is the call graph for this function:

| int REB::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.
| int REB::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 Driver::StopThread().
Here is the call graph for this function:

The documentation for this class was generated from the following files:
- reb.h
- reb.cc
