player.h
/*
* Player - One Hell of a Robot Server
* Copyright (C) 2000
* Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/********************************************************************
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
********************************************************************/
/*
* Desc: Player communication packet structures and codes
* CVS: $Id: player.h 8799 2010-06-28 04:12:42Z jpgr87 $
*/
#ifndef PLAYER_H
#define PLAYER_H
#include <time.h>
/* Include values from the configure script */
#include "playerconfig.h"
#define PLAYER_MAX_MESSAGE_SIZE 8388608 /*8MB*/
#define PLAYER_MAX_PAYLOAD_SIZE (PLAYER_MAX_MESSAGE_SIZE - sizeof(player_msghdr_t))
#define PLAYER_MAX_DRIVER_STRING_LEN 64
#define PLAYER_MAX_DEVICES 4096
#define PLAYER_MSGQUEUE_DEFAULT_MAXLEN 1024
#define PLAYER_IDENT_STRING "Player v."
#define PLAYER_IDENT_STRLEN 32
#define PLAYER_KEYLEN 32
#define PLAYER_MSGTYPE_DATA 1
#define PLAYER_MSGTYPE_CMD 2
#define PLAYER_MSGTYPE_REQ 3
#define PLAYER_MSGTYPE_RESP_ACK 4
#define PLAYER_MSGTYPE_SYNCH 5
#define PLAYER_MSGTYPE_RESP_NACK 6
typedef struct player_devaddr
{
uint32_t host;
uint32_t robot;
uint16_t interf;
uint16_t index;
} player_devaddr_t;
typedef struct player_msghdr
{
player_devaddr_t addr;
uint8_t type;
uint8_t subtype;
double timestamp;
uint32_t seq;
uint32_t size;
} player_msghdr_t;
typedef struct player_point_2d
{
double px;
double py;
} player_point_2d_t;
typedef struct player_point_3d
{
double px;
double py;
double pz;
} player_point_3d_t;
typedef struct player_orientation_3d
{
double proll;
double ppitch;
double pyaw;
} player_orientation_3d_t;
typedef struct player_pose2d
{
double px;
double py;
double pa;
} player_pose2d_t;
typedef struct player_pose3d
{
double px;
double py;
double pz;
double proll;
double ppitch;
double pyaw;
} player_pose3d_t;
typedef struct player_bbox2d
{
double sw;
double sl;
} player_bbox2d_t;
typedef struct player_bbox3d
{
double sw;
double sl;
double sh;
} player_bbox3d_t;
typedef struct player_blackboard_entry
{
uint32_t key_count;
char* key;
uint32_t group_count;
char* group;
uint16_t type;
uint16_t subtype;
uint32_t data_count;
uint8_t* data;
uint32_t timestamp_sec;
uint32_t timestamp_usec;
} player_blackboard_entry_t;
typedef struct player_segment
{
double x0;
double y0;
double x1;
double y1;
} player_segment_t;
typedef struct player_extent2d
{
double x0;
double y0;
double x1;
double y1;
} player_extent2d_t;
typedef struct player_color
{
uint8_t alpha;
uint8_t red;
uint8_t green;
uint8_t blue;
} player_color_t;
typedef struct player_bool
{
uint8_t state;
} player_bool_t;
typedef struct player_uint32
{
uint32_t value;
} player_uint32_t;
#define PLAYER_CAPABILTIES_REQ 255
typedef struct player_capabilities_req
{
uint32_t type;
uint32_t subtype;
} player_capabilities_req_t;
#define PLAYER_GET_INTPROP_REQ 254
#define PLAYER_SET_INTPROP_REQ 253
#define PLAYER_GET_DBLPROP_REQ 252
#define PLAYER_SET_DBLPROP_REQ 251
#define PLAYER_GET_STRPROP_REQ 250
#define PLAYER_SET_STRPROP_REQ 249
#define PLAYER_GET_BOOLPROP_REQ 248
#define PLAYER_SET_BOOLPROP_REQ 247
typedef struct player_boolprop_req
{
uint32_t key_count;
char *key;
char value;
} player_boolprop_req_t;
typedef struct player_intprop_req
{
uint32_t key_count;
char *key;
int32_t value;
} player_intprop_req_t;
typedef struct player_dblprop_req
{
uint32_t key_count;
char *key;
double value;
} player_dblprop_req_t;
typedef struct player_strprop_req
{
uint32_t key_count;
char *key;
uint32_t value_count;
char *value;
} player_strprop_req_t;
// /////////////////////////////////////////////////////////////////////////////
//
// Here starts the alphabetical list of interfaces
// (please keep it that way)
//
// /////////////////////////////////////////////////////////////////////////////
#include <libplayerinterface/player_interfaces.h>
#endif /* PLAYER_H */
player_segment::y0
double y0
Endpoints [m].
Definition: player.h:292
player_segment_t
struct player_segment player_segment_t
A line segment, used to construct vector-based maps.
player_extent2d::y1
double y1
Endpoints [m].
Definition: player.h:312
player_bbox2d::sl
double sl
Length [m].
Definition: player.h:246
player_bool::state
uint8_t state
state
Definition: player.h:332
player_devaddr::interf
uint16_t interf
The interface provided by the device; must be one of PLAYER_*_CODE.
Definition: player.h:149
player_pose3d::ppitch
double ppitch
pitch [rad]
Definition: player.h:235
player_blackboard_entry
Vectormap feature data.
Definition: player.h:261
player_bbox3d
A rectangular bounding box, used to define the size of an object.
Definition: player.h:250
player_msghdr
Generic message header.
Definition: player.h:157
player_boolprop_req::value
char value
The property value.
Definition: player.h:425
player_extent2d
A rectangular bounding box, used to define the origin and bounds of an object.
Definition: player.h:303
player_dblprop_req::key_count
uint32_t key_count
The property key's length.
Definition: player.h:443
player_color
A color descriptor.
Definition: player.h:316
player_dblprop_req::value
double value
The property value.
Definition: player.h:447
player_pose2d::px
double px
X [m].
Definition: player.h:216
player_uint32_t
struct player_uint32 player_uint32_t
Structure for messages returning a single integer.
player_point_3d_t
struct player_point_3d player_point_3d_t
A point in 3D space.
player_msghdr::addr
player_devaddr_t addr
Device to which this message pertains.
Definition: player.h:160
player_pose3d::py
double py
Y [m].
Definition: player.h:229
player_orientation_3d::proll
double proll
roll [rad]
Definition: player.h:205
player_segment::y1
double y1
Endpoints [m].
Definition: player.h:296
player_dblprop_req
Request to get a double property.
Definition: player.h:440
player_pose2d
A pose in the plane.
Definition: player.h:213
player_extent2d::x1
double x1
Endpoints [m].
Definition: player.h:310
player_bbox2d_t
struct player_bbox2d player_bbox2d_t
A rectangular bounding box, used to define the size of an object.
player_blackboard_entry::data_count
uint32_t data_count
Entry data length.
Definition: player.h:276
player_orientation_3d
An angle in 3D space.
Definition: player.h:202
player_segment::x0
double x0
Endpoints [m].
Definition: player.h:290
player_devaddr
A device address.
Definition: player.h:141
player_orientation_3d::pyaw
double pyaw
yaw [rad]
Definition: player.h:209
player_point_3d::py
double py
Y [m].
Definition: player.h:195
player_blackboard_entry::key_count
uint32_t key_count
Length of key in bytes.
Definition: player.h:264
player_color_t
struct player_color player_color_t
A color descriptor.
player_bbox3d_t
struct player_bbox3d player_bbox3d_t
A rectangular bounding box, used to define the size of an object.
player_pose2d_t
struct player_pose2d player_pose2d_t
A pose in the plane.
player_color::alpha
uint8_t alpha
Alpha (transparency) channel.
Definition: player.h:319
player_color::green
uint8_t green
Green color channel.
Definition: player.h:323
player_msghdr_t
struct player_msghdr player_msghdr_t
Generic message header.
player_blackboard_entry::group_count
uint32_t group_count
Second identifier count.
Definition: player.h:268
player_devaddr::host
uint32_t host
The "host" on which the device resides.
Definition: player.h:144
player_point_2d
A point in the plane.
Definition: player.h:180
player_point_2d::py
double py
Y [m].
Definition: player.h:185
player_blackboard_entry::timestamp_usec
uint32_t timestamp_usec
Time of entry creation.
Definition: player.h:282
player_uint32
Structure for messages returning a single integer.
Definition: player.h:336
player_blackboard_entry::timestamp_sec
uint32_t timestamp_sec
Time of entry creation.
Definition: player.h:280
player_boolprop_req::key_count
uint32_t key_count
The property key's length.
Definition: player.h:421
player_bbox3d::sw
double sw
Width [m].
Definition: player.h:253
player_pose3d::px
double px
X [m].
Definition: player.h:227
player_segment::x1
double x1
Endpoints [m].
Definition: player.h:294
player_pose2d::pa
double pa
yaw [rad]
Definition: player.h:220
player_intprop_req::key_count
uint32_t key_count
The property key's length.
Definition: player.h:432
player_msghdr::size
uint32_t size
Size in bytes of the payload to follow.
Definition: player.h:170
player_msghdr::type
uint8_t type
Message type; must be one of PLAYER_MSGTYPE_*.
Definition: player.h:162
player_devaddr::robot
uint32_t robot
The "robot" or device collection in which the device resides.
Definition: player.h:147
player_blackboard_entry::group
char * group
Second identifier.
Definition: player.h:270
player_point_3d::pz
double pz
Z [m].
Definition: player.h:197
player_point_2d_t
struct player_point_2d player_point_2d_t
A point in the plane.
player_bbox2d
A rectangular bounding box, used to define the size of an object.
Definition: player.h:241
player_point_2d::px
double px
X [m].
Definition: player.h:183
player_boolprop_req
Request to get a boolean property.
Definition: player.h:418
player_intprop_req::value
int32_t value
The property value.
Definition: player.h:436
player_blackboard_entry::key
char * key
Identifier for the entry.
Definition: player.h:266
player_extent2d::x0
double x0
Origin x [m].
Definition: player.h:306
player_msghdr::timestamp
double timestamp
Time associated with message contents (seconds since epoch)
Definition: player.h:166
player_strprop_req::value
char * value
The property value.
Definition: player.h:460
player_blackboard_entry::type
uint16_t type
Entry data type.
Definition: player.h:272
player_point_3d::px
double px
X [m].
Definition: player.h:193
player_strprop_req::value_count
uint32_t value_count
The property's length.
Definition: player.h:458
player_pose3d::pyaw
double pyaw
yaw [rad]
Definition: player.h:237
player_orientation_3d::ppitch
double ppitch
pitch [rad]
Definition: player.h:207
player_bbox3d::sl
double sl
Length [m].
Definition: player.h:255
player_capabilities_req
Structure containing a single capability request.
Definition: player.h:392
player_orientation_3d_t
struct player_orientation_3d player_orientation_3d_t
An angle in 3D space.
player_bool
A boolean variable, 0 for false anything else for true.
Definition: player.h:329
player_bbox2d::sw
double sw
Width [m].
Definition: player.h:244
player_bool_t
struct player_bool player_bool_t
A boolean variable, 0 for false anything else for true.
player_devaddr_t
struct player_devaddr player_devaddr_t
A device address.
player_bbox3d::sh
double sh
Height [m].
Definition: player.h:257
player_extent2d::y0
double y0
Origin y [m].
Definition: player.h:308
player_pose3d_t
struct player_pose3d player_pose3d_t
A pose in space.
player_msghdr::seq
uint32_t seq
For keeping track of associated messages.
Definition: player.h:168
player_strprop_req::key_count
uint32_t key_count
The property key's length.
Definition: player.h:454
player_pose3d
A pose in space.
Definition: player.h:224
player_blackboard_entry::data
uint8_t * data
Entry data.
Definition: player.h:278
player_intprop_req::key
char * key
The property key.
Definition: player.h:434
player_point_3d
A point in 3D space.
Definition: player.h:190
player_pose2d::py
double py
Y [m].
Definition: player.h:218
player_boolprop_req::key
char * key
The property key.
Definition: player.h:423
player_strprop_req
Request to get a string property.
Definition: player.h:451
player_intprop_req
Request to get an integer property.
Definition: player.h:429
player_blackboard_entry_t
struct player_blackboard_entry player_blackboard_entry_t
Vectormap feature data.
player_msghdr::subtype
uint8_t subtype
Message subtype; interface specific.
Definition: player.h:164
player_color::blue
uint8_t blue
Blue color channel.
Definition: player.h:325
player_pose3d::proll
double proll
roll [rad]
Definition: player.h:233
player_pose3d::pz
double pz
Z [m].
Definition: player.h:231
player_color::red
uint8_t red
Red color channel.
Definition: player.h:321
player_segment
A line segment, used to construct vector-based maps.
Definition: player.h:287
player_dblprop_req::key
char * key
The property key.
Definition: player.h:445
player_capabilities_req::type
uint32_t type
The type of the requested capability (i.e.
Definition: player.h:395
player_capabilities_req::subtype
uint32_t subtype
The subtype of the requested capability (i.e.
Definition: player.h:397
player_blackboard_entry::subtype
uint16_t subtype
Entry data subtype.
Definition: player.h:274
player_strprop_req::key
char * key
The property key.
Definition: player.h:456
player_extent2d_t
struct player_extent2d player_extent2d_t
A rectangular bounding box, used to define the origin and bounds of an object.
player_devaddr::index
uint16_t index
Which device of that interface.
Definition: player.h:151

Last updated 12 September 2005 21:38:45