ClodBuster Class Reference
Public Member Functions | |
ClodBuster (ConfigFile *cf, int section) | |
virtual void | Main () |
Main method for driver thread. | |
int | ProcessMessage (MessageQueue *resp_queue, player_msghdr *hdr, void *data) |
Message handler. | |
virtual int | Setup () |
Initialize the driver. | |
virtual int | Shutdown () |
Finalize the driver. | |
unsigned char | SetServo (unsigned char chan, int value) |
void | SetServo (unsigned char chan, unsigned char cmd) |
Protected Attributes | |
int | motor_max_speed |
int | motor_max_turnspeed |
bool | use_vel_band |
short | speedDemand |
short | turnRateDemand |
bool | newmotorspeed |
bool | newmotorturn |
Member Function Documentation
void ClodBuster::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 Driver::device_addr, PLAYER_MSGTYPE_DATA, PLAYER_POSITION2D_DATA_STATE, Driver::ProcessMessages(), and Driver::Publish().
int ClodBuster::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 Driver::device_addr, player_position2d_speed_pid_req::kd, player_position2d_speed_pid_req::ki, player_position2d_speed_pid_req::kp, Message::MatchMessage(), player_pose::pa, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_POSITION2D_CMD_VEL, PLAYER_POSITION2D_REQ_GET_GEOM, PLAYER_POSITION2D_REQ_MOTOR_POWER, PLAYER_POSITION2D_REQ_RESET_ODOM, PLAYER_POSITION2D_REQ_SET_ODOM, PLAYER_POSITION2D_REQ_SPEED_PID, PLAYER_POSITION2D_REQ_VELOCITY_MODE, player_position2d_data::pos, player_position2d_geom::pose, player_position2d_set_odom_req::pose, Driver::Publish(), player_pose::px, player_pose::py, player_position2d_geom::size, player_msghdr::size, player_bbox::sl, player_position2d_power_config::state, player_bbox::sw, player_position2d_velocity_mode_config::value, and player_position2d_cmd_vel::vel.
int ClodBuster::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 ClodBuster::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:
- clodbuster.h
- clodbuster.cc