Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26507/libplayercore
Modified Files:
player.h
Log Message:
modified simulation interface
Index: player.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/player.h,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -d -r1.113 -r1.114
*** player.h 8 Aug 2006 21:17:49 -0000 1.113
--- player.h 19 Aug 2006 00:51:18 -0000 1.114
***************
*** 4241,4262 ****
/** The maximum length of a string indentifying a simulation object or
object property. */
! #define PLAYER_SIMULATION_IDENTIFIER_MAXLEN 64
/** Request/reply subtype: set 2D pose */
! #define PLAYER_SIMULATION_REQ_SET_POSE2D 1
/** Request/reply subtype: get 2D pose */
! #define PLAYER_SIMULATION_REQ_GET_POSE2D 2
! /** Request/reply subtype: set integer property value */
! #define PLAYER_SIMULATION_REQ_SET_PROPERTY_INT 3
! /** Request/reply subtype: get integer property value */
! #define PLAYER_SIMULATION_REQ_GET_PROPERTY_INT 4
! /** Request/reply subtype: set floating point property value */
! #define PLAYER_SIMULATION_REQ_SET_PROPERTY_FLOAT 5
! /** Request/reply subtype: get floating point property value */
! #define PLAYER_SIMULATION_REQ_GET_PROPERTY_FLOAT 6
! /** Request/reply subtype: set string property value */
! #define PLAYER_SIMULATION_REQ_SET_PROPERTY_STRING 7
! /** Request/reply subtype: get string property value */
! #define PLAYER_SIMULATION_REQ_GET_PROPERTY_STRING 8
/** @brief Data
--- 4241,4255 ----
/** The maximum length of a string indentifying a simulation object or
object property. */
! #define PLAYER_SIMULATION_IDENTIFIER_MAXLEN 64 // 64 bytes - change as needed
! #define PLAYER_SIMULATION_PROPERTY_DATA_MAXLEN 32767 // 32K - change as
needed
/** Request/reply subtype: set 2D pose */
! #define PLAYER_SIMULATION_REQ_SET_POSE2D 1
/** Request/reply subtype: get 2D pose */
! #define PLAYER_SIMULATION_REQ_GET_POSE2D 2
! /** Request/reply subtype: set property value */
! #define PLAYER_SIMULATION_REQ_SET_PROPERTY 3
! /** Request/reply subtype: get property value */
! #define PLAYER_SIMULATION_REQ_GET_PROPERTY 4
/** @brief Data
***************
*** 4296,4359 ****
} player_simulation_pose2d_req_t;
! /** @brief Request/reply: get/set integer property of a named simulation
object
! To retrieve an integer property of an object in a simulator, send a
! @ref PLAYER_SIMULATION_REQ_GET_PROPERTY_INT request. The server will
! reply with the integer value filled in. To set a integer property,
! send a completely filled in @ref PLAYER_SIMULATION_REQ_SET_PROPERTY_INT
! request. The server will respond with an ACK if the property was
! successfully set to your value, else a NACK. */
! typedef struct player_simulation_property_int_req
! {
! /** Length of name */
! uint32_t name_count;
! /** The identifier of the object we want to locate */
! char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
! /** Length of property identifier */
! uint32_t prop_count;
! /** The identifier of the property we want to get/set */
! char prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
! /** The value of the property */
! int32_t value;
! } player_simulation_property_int_req_t;
! /** @brief Request/reply: get/set floating-point property of a named
! simulation object
! Behaves identically to the integer version, but for double-precision
! floating-pont values. */
! typedef struct player_simulation_property_float_req
{
- /** Length of name */
- uint32_t name_count;
/** The identifier of the object we want to locate */
char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
- /** Length of property identifier */
- uint32_t prop_count;
- /** The identifier of the property we want to get/set */
- char prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
- /** The value of the property */
- double value;
- } player_simulation_property_float_req_t;
-
- /** @brief Request/reply: get/set string property of a named
- simulation object
-
- Behaves identically to the integer version, but for strings.*/
- typedef struct player_simulation_property_string_req
- {
/** Length of name */
uint32_t name_count;
- /** The identifier of the object we want to locate */
- char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
- /** Length of property identifier */
- uint32_t prop_count;
/** The identifier of the property we want to get/set */
! char prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
! /** Length of the data string. */
uint32_t value_count;
! /** The data string. */
! char value[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
! } player_simulation_property_string_req_t;
/** @} */
--- 4289,4327 ----
} player_simulation_pose2d_req_t;
! /** @brief Request/reply: get/set a property of a named simulation object
! @par To retrieve an property of an object in a simulator, send a @ref
! PLAYER_SIMULATION_REQ_GET_PROPERTY request. The server will reply with
! the value array filled in. The type of the data varies by property and
! it is up to the caller to cast the data to the correct type: see the
! warning below.
! @par To set a property, send a completely filled in @ref
! PLAYER_SIMULATION_REQ_SET_PROPERTY request. The server will respond
! with an ACK if the property was successfully set to your value, else a
! NACK.
! @par **WARNING** Types are architecture-dependent, so this feature may
! not work correctly if the simulator is running on a different
! architecture than your client. The value bytes are transmitted as a
! raw binary object: no architecture-specific type conversions are
! performed. Use with caution.
! */
! typedef struct player_simulation_property_req
{
/** The identifier of the object we want to locate */
char name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
/** Length of name */
uint32_t name_count;
/** The identifier of the property we want to get/set */
! char property[PLAYER_SIMULATION_IDENTIFIER_MAXLEN];
! /** Length of property identifier */
! uint32_t property_count;
! /** The value of the property */
! char value[PLAYER_SIMULATION_PROPERTY_DATA_MAXLEN];
! /** The length of the value data in bytes */
uint32_t value_count;
! } player_simulation_property_req_t;
!
/** @} */
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit