24 #include <libplayercore/playercore.h>
26 #include "acpGarcia.h"
50 void ProcessPos2dPosCmd(
player_msghdr_t* hdr, player_position2d_cmd_pos_t &data);
51 void ProcessPos2dVelCmd(
player_msghdr_t* hdr, player_position2d_cmd_vel_t &data);
52 void ProcessSpeechCommand(
player_msghdr_t* hdr, player_speech_cmd_t &data);
64 player_position2d_data_t mPos2dData;
65 player_position2d_cmd_pos_t mPos2dPosCmd;
66 player_position2d_cmd_vel_t mPos2dVelCmd;
70 player_ir_data_t mIrData;
74 player_speech_cmd_t mSpeechCmd;
78 player_dio_data_t mDioData;
79 player_dio_cmd_t mDioCmd;
83 player_power_data_t mPowerData;
int MainSetup()
Sets up the resources needed by the driver thread.
Definition: garcia_mixed.cc:280
virtual void Publish(player_devaddr_t addr, QueuePointer &queue, uint8_t type, uint8_t subtype, void *src=NULL, size_t deprecated=0, double *timestamp=NULL, bool copy=true)
Publish a message via one of this driver's interfaces.
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
double ReadFloat(int section, const char *name, double value)
Read a floating point (double) value.
Generic message header.
Definition: player.h:162
uint8_t type
Message type; must be one of PLAYER_MSGTYPE_*.
Definition: player.h:166
const char * ReadFilename(int section, const char *name, const char *value)
Read a filename.
int ReadInt(int section, const char *name, int value)
Read an integer value.
void ProcessMessages(void)
Process pending messages.
#define PLAYER_MSGTYPE_DATA
A data message.
Definition: player.h:95
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
#define PLAYER_MSGTYPE_REQ
A request message.
Definition: player.h:106
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
Class for loading configuration file information.
Definition: configfile.h:197
A device address.
Definition: player.h:146
An autopointer for the message queue.
Definition: message.h:74
#define PLAYER_ERROR1(msg, a)
Definition: error.h:82
A pose in space.
Definition: player.h:229
#define PLAYER_ERROR(msg)
Definition: error.h:81
virtual void Main()
Main method for driver thread.
Definition: garcia_mixed.cc:320
Base class for drivers which oeprate with a thread.
Definition: driver.h:553
void MainQuit()
Cleanup method for driver thread (called when main exits)
Definition: garcia_mixed.cc:308
uint32_t size
Size in bytes of the payload to follow.
Definition: player.h:174
#define PLAYER_WARN(msg)
Warning message macros.
Definition: error.h:89
#define PLAYER_MSGTYPE_CMD
A command message.
Definition: player.h:99
Base class for all drivers.
Definition: driver.h:109
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
Definition: garcia_mixed.cc:344
Definition: garcia_mixed.h:31