30 #ifndef READLOG_TIME_H
31 #define READLOG_TIME_H
33 #include <libplayercore/playertime.h>
45 public:
int GetTime(
struct timeval* time);
48 public:
int GetTimeDouble(
double* time);
53 extern struct timeval ReadLogTime_time;
54 extern double ReadLogTime_timeDouble;
#define PLAYER_WARN1(msg, a)
Definition: error.h:90
#define PLAYER_MSG1(level, msg, a)
Definition: error.h:106
uint32_t host
The "host" on which the device resides.
Definition: player.h:148
double py
Y [m].
Definition: player.h:199
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
A rectangular bounding box, used to define the size of an object.
Definition: player.h:255
double ReadFloat(int section, const char *name, double value)
Read a floating point (double) value.
struct player_pose3d player_pose3d_t
A pose in space.
double px
X [m].
Definition: player.h:231
Generic message header.
Definition: player.h:162
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
uint8_t type
Message type; must be one of PLAYER_MSGTYPE_*.
Definition: player.h:166
#define PLAYER_WARN3(msg, a, b, c)
Definition: error.h:92
A point in 3D space.
Definition: player.h:195
uint8_t subtype
Message subtype; interface specific.
Definition: player.h:168
uint32_t robot
The "robot" or device collection in which the device resides.
Definition: player.h:151
virtual void Main(void)=0
Main method for driver thread.
#define PLAYER_MAX_MESSAGE_SIZE
The largest possible message.
Definition: player.h:68
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.
Available interfaces are stored in an array of these, defined in interface_util.c.
Definition: interface_util.h:72
#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
double px
X [m].
Definition: player.h:197
#define PLAYER_WARN2(msg, a, b)
Definition: error.h:91
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
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
#define PLAYER_MSG6(level, msg, a, b, c, d, e, f)
Definition: error.h:111
Class for loading configuration file information.
Definition: configfile.h:197
double sw
Width [m].
Definition: player.h:257
double pz
Z [m].
Definition: player.h:201
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
Base class for drivers which oeprate with a thread.
Definition: driver.h:553
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
Definition: readlog_time.h:37
#define PLAYER_MSG0(level, msg)
General messages.
Definition: error.h:105
uint16_t index
Which device of that interface.
Definition: player.h:155
player_devaddr_t addr
Device to which this message pertains.
Definition: player.h:164
uint16_t interf
The interface provided by the device; must be one of PLAYER_*_CODE.
Definition: player.h:153