driver.h
141 int AddInterface(player_devaddr_t *addr, ConfigFile * cf, int section, int code, const char * key = NULL);
159 int AddFileWatch(int fd, bool ReadWatch = true, bool WriteWatch = false, bool ExceptWatch = true);
162 int RemoveFileWatch(int fd, bool ReadWatch = true, bool WriteWatch = false, bool ExceptWatch = true);
501 };
#define PLAYER_MSG5(level, msg, a, b, c, d, e)
Error message macros.
Definition: error.h:110
player_pose2d_t vel
translational velocities [m/s,m/s,rad/s] (x, y, yaw)
Definition: player_interfaces.h:620
Command: state (PLAYER_POSITION1D_CMD_VEL)
Definition: player_interfaces.h:3565
static bool MatchMessage(player_msghdr_t *hdr, int type, int subtype, player_devaddr_t addr)
Helper for message processing.
Definition: message.h:159
#define PLAYER_POSITION1D_DATA_STATE
Data subtype: state.
Definition: player_interfaces.h:3507
Data: state (PLAYER_POSITION1D_DATA_STATE)
Definition: player_interfaces.h:3537
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
#define PLAYER_POSITION1D_CMD_VEL
Command subtype: velocity command.
Definition: player_interfaces.h:3513
float vel
velocity [m/s] or [rad/s]
Definition: player_interfaces.h:3568
uint8_t type
Message type; must be one of PLAYER_MSGTYPE_*.
Definition: player.h:166
#define PLAYER_POSITION2D_REQ_MOTOR_POWER
Request/reply: Motor power.
Definition: player_interfaces.h:496
#define PLAYER_POSITION2D_REQ_POSITION_PID
Request/reply: Set position PID parameters.
Definition: player_interfaces.h:556
#define PLAYER_POSITION2D_CMD_VEL
Command: velocity (PLAYER_POSITION2D_CMD_VEL)
Definition: player_interfaces.h:581
uint32_t robot
The "robot" or device collection in which the device resides.
Definition: player.h:151
#define PLAYER_POSITION1D_REQ_RESET_ODOM
Request/reply subtype: reset odometry.
Definition: player_interfaces.h:3495
Definition: position/differential/chronos.hh:27
QueuePointer InQueue
Queue for all incoming messages for this driver.
Definition: driver.h:285
#define PLAYER_MSGTYPE_RESP_ACK
A positive response message.
Definition: player.h:112
player_pose3d_t pose
Pose of the robot base, in the robot cs (m, rad).
Definition: player_interfaces.h:658
#define PLAYER_POSITION2D_REQ_GET_GEOM
Request/reply: geometry.
Definition: player_interfaces.h:483
player_thread_state_t ThreadState
TODO: insert state machine here.
Definition: driver.h:584
#define PLAYER_POSITION2D_REQ_SPEED_PROF
Request/reply: Set linear speed profile parameters.
Definition: player_interfaces.h:562
virtual void TestCancel()
enable thread cancellation and test for cancellation
Definition: driver.h:186
Request/reply: Set linear speed profile parameters.
Definition: player_interfaces.h:3698
int ReadDeviceAddr(player_devaddr_t *addr, int section, const char *name, int code, int index, const char *key)
Read a device id.
float acc
max acceleration [m/s^2]
Definition: player_interfaces.h:720
virtual int Unsubscribe(QueuePointer &, player_devaddr_t)
Unsubscribe from this driver.
Definition: driver.h:369
#define PLAYER_POSITION2D_REQ_RESET_ODOM
Request/reply: Reset odometry.
Definition: player_interfaces.h:541
#define PLAYER_POSITION2D_REQ_POSITION_MODE
Request/reply: Change control mode.
Definition: player_interfaces.h:529
#define PLAYER_POSITION1D_REQ_SPEED_PROF
Request/reply subtype: set speed profile params.
Definition: player_interfaces.h:3504
pthread_mutex_t accessMutex
Mutex used to lock access, via Lock() and Unlock(), to driver internals, like the list of subscribed ...
Definition: driver.h:168
PlayerBarrier SetupBarrier
Barrier to synchronise threads on setup.
Definition: driver.h:588
player_devaddr_t device_addr
Default device address (single-interface drivers)
Definition: driver.h:269
#define PLAYER_POSITION2D_DATA_STATE
Data: state (PLAYER_POSITION2D_DATA_STATE)
Definition: player_interfaces.h:568
#define PLAYER_POSITION2D_CMD_POS
Command: position (PLAYER_POSITION2D_CMD_POS)
Definition: player_interfaces.h:588
pthread_mutex_t subscriptionMutex
Mutex used to protect the subscription count for the driver.
Definition: driver.h:170
#define PLAYER_POSITION2D_REQ_SPEED_PID
Request/reply: Set velocity PID parameters.
Definition: player_interfaces.h:548
int entries
Total number of entries in the device table using this driver.
Definition: driver.h:273
float speed
max speed [m/s]
Definition: player_interfaces.h:718
player_bbox3d_t size
Dimensions of the base (m).
Definition: player_interfaces.h:660
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
#define PLAYER_MSGQUEUE_DEFAULT_MAXLEN
Default maximum length for a message queue.
Definition: player.h:76
#define PLAYER_POSITION2D_REQ_SET_ODOM
Request/reply: Set odometry.
Definition: player_interfaces.h:535
int subscriptions
Number of subscriptions to this driver.
Definition: driver.h:118
Definition: driver.h:471