GarciaDriver Class Reference
Inheritance diagram for GarciaDriver:
Collaboration diagram for GarciaDriver:

List of all members.

Public Member Functions

 GarciaDriver (ConfigFile *cf, int section)
int MainSetup ()
 Sets up the resources needed by the driver thread.
void MainQuit ()
 Cleanup method for driver thread (called when main exits)
virtual void Main ()
 Main method for driver thread.
virtual int ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data)
 Message handler.
void ProcessPos2dPosCmd (player_msghdr_t *hdr, player_position2d_cmd_pos_t &data)
void ProcessPos2dVelCmd (player_msghdr_t *hdr, player_position2d_cmd_vel_t &data)
void ProcessSpeechCommand (player_msghdr_t *hdr, player_speech_cmd_t &data)
void ProcessDioCommand (player_msghdr_t *hdr, player_dio_cmd_t &data)
void ProcessPos2dGeomReq (player_msghdr_t *hdr)
void ProcessIrPoseReq (player_msghdr_t *hdr)
void RefreshData ()

Private Attributes

player_devaddr_t mPos2dAddr
player_position2d_data_t mPos2dData
player_position2d_cmd_pos_t mPos2dPosCmd
player_position2d_cmd_vel_t mPos2dVelCmd
player_devaddr_t mIrAddr
player_ir_data_t mIrData
player_devaddr_t mSpeechAddr
player_speech_cmd_t mSpeechCmd
player_devaddr_t mDioAddr
player_dio_data_t mDioData
player_dio_cmd_t mDioCmd
player_devaddr_t mPowerAddr
player_power_data_t mPowerData
int32_t mSleep
double mLength
double mWidth
double mWheelBase
double mWheelRadius
acpValue mSpeed
acpValue mPitch
acpValue mVolume
acpGarcia * mGarcia

Member Function Documentation

void GarciaDriver::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.

Implements ThreadedDriver.

References Driver::ProcessMessages().

Here is the call graph for this function:

void GarciaDriver::MainQuit ( void  ) [virtual]

Cleanup method for driver thread (called when main exits)

Overload this method and to do additional cleanup when the driver thread exits.

Reimplemented from ThreadedDriver.

int GarciaDriver::ProcessMessage ( QueuePointer 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_queueThe queue to which any response should go.
hdrThe message header
dataThe message body

Reimplemented from Driver.

References Message::MatchMessage(), PLAYER_DIO_CMD_VALUES, PLAYER_ERROR1, PLAYER_IR_REQ_POSE, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_DATA, PLAYER_MSGTYPE_REQ, PLAYER_POSITION2D_CMD_POS, PLAYER_POSITION2D_CMD_VEL, PLAYER_POSITION2D_REQ_GET_GEOM, PLAYER_SPEECH_CMD_SAY, player_msghdr::size, and player_msghdr::type.

Here is the call graph for this function:


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