player.h
00001 /* 00002 * Player - One Hell of a Robot Server 00003 * Copyright (C) 2000 00004 * Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard 00005 * 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 */ 00022 /******************************************************************** 00023 * 00024 * This library is free software; you can redistribute it and/or 00025 * modify it under the terms of the GNU Lesser General Public 00026 * License as published by the Free Software Foundation; either 00027 * version 2.1 of the License, or (at your option) any later version. 00028 * 00029 * This library is distributed in the hope that it will be useful, 00030 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00031 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00032 * Lesser General Public License for more details. 00033 * 00034 * You should have received a copy of the GNU Lesser General Public 00035 * License along with this library; if not, write to the Free Software 00036 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00037 * 00038 ********************************************************************/ 00039 00040 /* 00041 * Desc: Player communication packet structures and codes 00042 * CVS: $Id: player.h 4350 2008-02-09 02:52:29Z thjc $ 00043 */ 00044 00045 00046 #ifndef PLAYER_H 00047 #define PLAYER_H 00048 00049 #include <time.h> 00050 00051 /* Include values from the configure script */ 00052 #include "playerconfig.h" 00053 00064 #define PLAYER_MAX_MESSAGE_SIZE 8388608 /*8MB*/ 00065 00066 #define PLAYER_MAX_PAYLOAD_SIZE (PLAYER_MAX_MESSAGE_SIZE - sizeof(player_msghdr_t)) 00067 00068 #define PLAYER_MAX_DRIVER_STRING_LEN 64 00069 00070 #define PLAYER_MAX_DEVICES 4096 00071 00072 #define PLAYER_MSGQUEUE_DEFAULT_MAXLEN 1024 00073 00074 #define PLAYER_IDENT_STRING "Player v." 00075 00076 #define PLAYER_IDENT_STRLEN 32 00077 00078 #define PLAYER_KEYLEN 32 00079 00091 #define PLAYER_MSGTYPE_DATA 1 00092 00095 #define PLAYER_MSGTYPE_CMD 2 00096 00102 #define PLAYER_MSGTYPE_REQ 3 00103 00108 #define PLAYER_MSGTYPE_RESP_ACK 4 00109 00113 #define PLAYER_MSGTYPE_SYNCH 5 00114 00121 #define PLAYER_MSGTYPE_RESP_NACK 6 00122 00141 typedef struct player_devaddr 00142 { 00144 uint32_t host; 00147 uint32_t robot; 00149 uint16_t interf; 00151 uint16_t index; 00152 } player_devaddr_t; 00153 00157 typedef struct player_msghdr 00158 { 00160 player_devaddr_t addr; 00162 uint8_t type; 00164 uint8_t subtype; 00166 double timestamp; 00168 uint32_t seq; 00170 uint32_t size; 00171 } player_msghdr_t; 00180 typedef struct player_null 00181 { 00182 } player_null_t; 00183 00185 typedef struct player_point_2d 00186 { 00188 double px; 00190 double py; 00191 } player_point_2d_t; 00192 00193 00195 typedef struct player_point_3d 00196 { 00198 double px; 00200 double py; 00202 double pz; 00203 } player_point_3d_t; 00204 00205 00207 typedef struct player_orientation_3d 00208 { 00210 double proll; 00212 double ppitch; 00214 double pyaw; 00215 } player_orientation_3d_t; 00216 00218 typedef struct player_pose2d 00219 { 00221 double px; 00223 double py; 00225 double pa; 00226 } player_pose2d_t; 00227 00229 typedef struct player_pose3d 00230 { 00232 double px; 00234 double py; 00236 double pz; 00238 double proll; 00240 double ppitch; 00242 double pyaw; 00243 } player_pose3d_t; 00244 00246 typedef struct player_bbox2d 00247 { 00249 double sw; 00251 double sl; 00252 } player_bbox2d_t; 00253 00255 typedef struct player_bbox3d 00256 { 00258 double sw; 00260 double sl; 00262 double sh; 00263 } player_bbox3d_t; 00264 00266 typedef struct player_blackboard_entry 00267 { 00269 uint32_t key_count; 00271 char* key; 00273 uint32_t group_count; 00275 char* group; 00277 uint16_t type; 00279 uint16_t subtype; 00281 uint32_t data_count; 00283 uint8_t* data; 00285 uint32_t timestamp_sec; 00287 uint32_t timestamp_usec; 00289 } player_blackboard_entry_t; 00290 00292 typedef struct player_segment 00293 { 00295 double x0; 00297 double y0; 00299 double x1; 00301 double y1; 00302 } player_segment_t; 00303 00308 typedef struct player_extent2d 00309 { 00311 double x0; 00313 double y0; 00315 double x1; 00317 double y1; 00318 } player_extent2d_t; 00319 00321 typedef struct player_color 00322 { 00324 uint8_t alpha; 00326 uint8_t red; 00328 uint8_t green; 00330 uint8_t blue; 00331 } player_color_t; 00332 00334 typedef struct player_bool 00335 { 00337 uint8_t state; 00338 } player_bool_t; 00339 00341 typedef struct player_uint32 00342 { 00343 uint32_t value; 00344 } player_uint32_t; 00345 00346 00394 #define PLAYER_CAPABILTIES_REQ 255 00395 00397 typedef struct player_capabilities_req 00398 { 00400 uint32_t type; 00402 uint32_t subtype; 00403 } player_capabilities_req_t; 00404 00405 00413 #define PLAYER_GET_INTPROP_REQ 254 00414 #define PLAYER_SET_INTPROP_REQ 253 00415 #define PLAYER_GET_DBLPROP_REQ 252 00416 #define PLAYER_SET_DBLPROP_REQ 251 00417 #define PLAYER_GET_STRPROP_REQ 250 00418 #define PLAYER_SET_STRPROP_REQ 249 00419 00421 typedef struct player_intprop_req 00422 { 00424 uint32_t key_count; 00426 char *key; 00428 int32_t value; 00429 } player_intprop_req_t; 00430 00432 typedef struct player_dblprop_req 00433 { 00435 uint32_t key_count; 00437 char *key; 00439 double value; 00440 } player_dblprop_req_t; 00441 00443 typedef struct player_strprop_req 00444 { 00446 uint32_t key_count; 00448 char *key; 00450 uint32_t value_count; 00452 char *value; 00453 } player_strprop_req_t; 00454 00455 // ///////////////////////////////////////////////////////////////////////////// 00456 // 00457 // Here starts the alphabetical list of interfaces 00458 // (please keep it that way) 00459 // 00460 // ///////////////////////////////////////////////////////////////////////////// 00461 00498 #include <libplayercore/player_interfaces.h> 00499 00500 #endif /* PLAYER_H */