GarciaDriver Class Reference

List of all members.

Public Member Functions

 GarciaDriver (ConfigFile *cf, int section)
int Setup ()
 Initialize the driver.
int Shutdown ()
 Finalize the driver.
virtual void Main ()
 Main method for driver thread.
virtual int ProcessMessage (MessageQueue *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 ()

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.

Reimplemented from Driver.

References Driver::ProcessMessages().

int GarciaDriver::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_DIO_CMD_VALUES, PLAYER_ERROR1, PLAYER_IR_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.

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.

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.

References Driver::StopThread().


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

Last updated 12 September 2005 21:38:45