ER Class Reference
Public Member Functions | |
ER (ConfigFile *cf, int section) | |
int | SetVelocity (double lvel, double rvel) |
void | Stop (int StopMode) |
virtual void | Main () |
Main method for driver thread. | |
virtual int | Setup () |
Initialize the driver. | |
virtual int | Shutdown () |
Finalize the driver. | |
virtual int | ProcessMessage (MessageQueue *resp_queue, player_msghdr *hdr, void *data) |
Message handler. |
Member Function Documentation
void ER::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_pose::pa, PLAYER_MSGTYPE_DATA, PLAYER_POSITION2D_DATA_STATE, player_position2d_data::pos, Driver::ProcessMessages(), Driver::Publish(), player_pose::px, player_pose::py, and player_position2d_data::vel.
int ER::ProcessMessage | ( | MessageQueue * | resp_queue, | |
player_msghdr * | hdr, | |||
void * | data | |||
) | [virtual] |
Message handler.
This function is called once for each message in the incoming queue. Reimplement it to provide message handling. Return 0 if you handled the message and -1 otherwise
- Parameters:
-
resp_queue The queue to which any response should go. hdr The message header data The message body
Reimplemented from Driver.
References Message::MatchMessage(), player_pose::pa, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_MSGTYPE_RESP_NACK, PLAYER_POSITION2D_CMD_VEL, PLAYER_POSITION2D_REQ_GET_GEOM, PLAYER_POSITION2D_REQ_MOTOR_POWER, player_position2d_geom::pose, Driver::Publish(), player_pose::px, player_pose::py, player_position2d_geom::size, player_bbox::sl, player_position2d_power_config::state, player_bbox::sw, and player_position2d_cmd_vel::vel.
int ER::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 ER::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().
The documentation for this class was generated from the following files:
- er.h
- er.cc