GarciaDriver Class Reference

Inheritance diagram for GarciaDriver:

Inheritance graph
[legend]
Collaboration diagram for GarciaDriver:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 31 of file garcia_mixed.h.


Public Member Functions

 GarciaDriver (ConfigFile *cf, int section)
virtual ~GarciaDriver ()
int Setup ()
 Initialize the driver.
int Shutdown ()
 Finalize the driver.
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

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

Definition at line 282 of file garcia_mixed.cc.

References mGarcia.

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

Definition at line 314 of file garcia_mixed.cc.

References mGarcia, and Driver::StopThread().

Here is the call graph for this function:

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.

Reimplemented from Driver.

Definition at line 334 of file garcia_mixed.cc.

References Driver::ProcessMessages(), and RefreshData().

Here is the call graph for this function:

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_queue The queue to which any response should go.
hdr The message header
data The message body

Reimplemented from Driver.

Definition at line 358 of file garcia_mixed.cc.

References Message::MatchMessage(), mDioAddr, mIrAddr, mPos2dAddr, mSpeechAddr, 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, ProcessDioCommand(), ProcessIrPoseReq(), ProcessPos2dGeomReq(), ProcessPos2dPosCmd(), ProcessPos2dVelCmd(), and ProcessSpeechCommand().

Here is the call graph for this function:


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

Last updated 12 September 2005 21:38:45