SegwayRMP Class Reference
Public Member Functions | |
SegwayRMP (ConfigFile *cf, int section) | |
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. | |
Protected Attributes | |
player_devaddr_t | position_id |
player_position2d_data_t | position_data |
player_devaddr_t | position3d_id |
player_position3d_data_t | position3d_data |
player_devaddr_t | power_id |
player_power_data_t | power_data |
Member Function Documentation
int SegwayRMP::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
- Todo:
- Handle config requests
Reimplemented from Driver.
References player_msghdr::addr, player_devaddr::index, player_devaddr::interf, Message::MatchMessage(), player_pose::pa, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_REQ, PLAYER_POSITION2D_CMD_VEL, PLAYER_POSITION3D_CMD_SET_VEL, player_pose3d::px, player_pose::px, player_pose3d::pyaw, player_msghdr::size, player_position3d_cmd_vel::state, player_position2d_cmd_vel::state, player_msghdr::subtype, player_msghdr::type, player_position3d_cmd_vel::vel, and player_position2d_cmd_vel::vel.
int SegwayRMP::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 PLAYER_ERROR, PLAYER_ERROR1, and PLAYER_MSG0.
int SegwayRMP::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 PLAYER_MSG0, and Driver::StopThread().
The documentation for this class was generated from the following files:
- segwayrmp.h
- segwayrmp.cc