30 #define DEFAULT_MICA2_PORT "/dev/ttyS0"
31 #define DEFAULT_MICA2_RATE B57600
34 class NodeCalibrationValues
38 unsigned int group_id;
41 typedef std::vector<NodeCalibrationValues> NCV;
47 unsigned short thermistor;
50 unsigned short accelX;
51 unsigned short accelY;
60 unsigned short accelX;
61 unsigned short accelY;
62 unsigned short sound[5];
69 unsigned char flags [2];
70 unsigned char request[2];
71 unsigned char type [2];
72 unsigned char TID [16];
73 unsigned char start [2];
74 unsigned char length [2];
75 unsigned char data [8];
81 unsigned char board_id;
82 unsigned char packet_id;
83 unsigned char node_id;
85 unsigned short data[12];
86 unsigned char terminator;
104 unsigned int new_rate;
105 unsigned int node_id;
107 unsigned char rf_power;
108 unsigned char rf_channel;
111 unsigned short device;
112 unsigned short state;
120 unsigned short seq_no;
121 unsigned short destination_id;
128 unsigned char ptotal;
132 unsigned char data[23];
virtual int Subscribe(player_devaddr_t addr)
Subscribe to this driver.
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
Generic message header.
Definition: player.h:162
virtual int Subscribe(QueuePointer &, player_devaddr_t)
Subscribe to this driver.
Definition: driver.h:343
virtual int MainSetup(void)
Sets up the resources needed by the driver thread.
Definition: driver.h:658
virtual void MainQuit(void)
Cleanup method for driver thread (called when main exits)
Definition: driver.h:664
const char * ReadString(int section, const char *name, const char *value)
Read a string value.
uint8_t subtype
Message subtype; interface specific.
Definition: player.h:168
virtual void Main(void)=0
Main method for driver thread.
int ReadInt(int section, const char *name, int value)
Read an integer value.
#define PLAYER_MSGTYPE_DATA
A data message.
Definition: player.h:95
#define PLAYER_ERROR2(msg, a, b)
Definition: error.h:83
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
virtual int ProcessMessage(QueuePointer &resp_queue, player_msghdr *hdr, void *data)
Message handler.
static bool MatchDeviceAddress(player_devaddr_t addr1, player_devaddr_t addr2)
Compare two addresses.
Definition: device.h:201
#define PLAYER_MSGTYPE_REQ
A request message.
Definition: player.h:106
#define PLAYER_MSGTYPE_RESP_NACK
A negative response message.
Definition: player.h:125
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
int ReadTupleInt(int section, const char *name, int index, int value)
Read an integer from a tuple field.
A device address.
Definition: player.h:146
virtual int Unsubscribe(QueuePointer &, player_devaddr_t)
Unsubscribe from this driver.
Definition: driver.h:369
An autopointer for the message queue.
Definition: message.h:74
#define PLAYER_ERROR(msg)
Definition: error.h:81
Base class for drivers which oeprate with a thread.
Definition: driver.h:553
Messages between wsn and a robot.
Definition: er.h:87
#define PLAYER_MSGTYPE_CMD
A command message.
Definition: player.h:99
Base class for all drivers.
Definition: driver.h:109
#define PLAYER_MSG0(level, msg)
General messages.
Definition: error.h:105
virtual int Unsubscribe(player_devaddr_t addr)
Unsubscribe from this driver.