Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7522/client_libs/libplayerc
Modified Files:
Tag: release-2-0-patches
playerc.h
Log Message:
more backports from HEAD
Index: playerc.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.185
retrieving revision 1.185.2.1
diff -C2 -d -r1.185 -r1.185.2.1
*** playerc.h 11 Apr 2006 15:40:31 -0000 1.185
--- playerc.h 9 Jun 2006 18:13:47 -0000 1.185.2.1
***************
*** 49,52 ****
--- 49,54 ----
#include <stdio.h>
+ #include <sys/types.h>
+ #include <netinet/in.h>
// Get the message structures from Player
***************
*** 82,87 ****
#define PLAYERC_DATAMODE_PULL PLAYER_DATAMODE_PULL
-
-
/***************************************************************************
* Array sizes
--- 84,87 ----
***************
*** 473,476 ****
--- 473,478 ----
double lasttime;
+ double request_timeout;
+
} playerc_client_t;
***************
*** 664,667 ****
--- 666,675 ----
+ /** @brief Set the timeout for client requests.
+
+ @param seconds Seconds to wait for a reply.
+
+ */
+ void playerc_client_set_request_timeout(playerc_client_t* client, uint
seconds);
/** @brief Write data to the server. @internal
***************
*** 756,759 ****
--- 764,771 ----
int playerc_device_unsubscribe(playerc_device_t *device);
+ /** @brief Request capabilities of device */
+ int playerc_device_hascapability(playerc_device_t *device, uint32_t type,
uint32_t subtype);
+
+
/** @} */
/**************************************************************************/
***************
*** 885,912 ****
*/
! /** @brief Description of a single blob. */
! typedef struct
! {
! /** The blob id; e.g. the color class this blob belongs to. */
! unsigned int id;
!
! /** A descriptive color for the blob. Stored as packed RGB 32, i.e.:
! 0x00RRGGBB. */
! uint32_t color;
!
! /** Blob centroid (image coordinates). */
! unsigned int x, y;
!
! /** Bounding box for blob (image coordinates). */
! unsigned int left, top, right, bottom;
!
! /** Blob area (pixels). */
! unsigned int area;
!
! /** Blob range (m). */
! double range;
!
! } playerc_blobfinder_blob_t;
!
/** @brief Blobfinder device data. */
--- 897,901 ----
*/
! typedef player_blobfinder_blob_t playerc_blobfinder_blob_t;
/** @brief Blobfinder device data. */
***************
*** 921,925 ****
/** A list of detected blobs. */
unsigned int blobs_count;
! playerc_blobfinder_blob_t blobs[PLAYERC_BLOBFINDER_MAX_BLOBS];
} playerc_blobfinder_t;
--- 910,914 ----
/** A list of detected blobs. */
unsigned int blobs_count;
! playerc_blobfinder_blob_t blobs[PLAYER_BLOBFINDER_MAX_BLOBS];
} playerc_blobfinder_t;
***************
*** 1068,1071 ****
--- 1057,1105 ----
/**************************************************************************/
+
+ /**************************************************************************/
+ /** @ingroup playerc_proxies
+ * @defgroup playerc_proxy_dio dio
+
+ The dio proxy provides an interface to the digital input/output sensors.
+
+ @{
+ */
+
+ /** Dio proxy data. */
+ typedef struct
+ {
+ /** Device info; must be at the start of all device structures. */
+ playerc_device_t info;
+
+ /// The number of valid digital inputs.
+ uint8_t count;
+
+ /// A bitfield of the current digital inputs.
+ uint32_t digin;
+
+ } playerc_dio_t;
+
+
+ /** Create a dio proxy. */
+ playerc_dio_t *playerc_dio_create(playerc_client_t *client, int index);
+
+ /** Destroy a dio proxy. */
+ void playerc_dio_destroy(playerc_dio_t *device);
+
+ /** Subscribe to the dio device. */
+ int playerc_dio_subscribe(playerc_dio_t *device, int access);
+
+ /** Un-subscribe from the dio device. */
+ int playerc_dio_unsubscribe(playerc_dio_t *device);
+
+ /** Set the output for the dio device. */
+ int playerc_dio_set_output(playerc_dio_t *device, uint8_t output_count,
uint32_t digout);
+
+
+ /** @} */
+ /***************************************************************************/
+
+
/***************************************************************************/
/** @ingroup playerc_proxies
***************
*** 1250,1253 ****
--- 1284,1336 ----
/***************************************************************************/
/** @ingroup playerc_proxies
+ * @defgroup playerc_proxy_graphics3d graphics3d
+
+ The graphics3d proxy provides an interface to the graphics3d
+
+ @{
+ */
+
+ /** @brief Graphics3d device data. */
+ typedef struct
+ {
+ /** Device info; must be at the start of all device structures. */
+ playerc_device_t info;
+
+ /** current drawing color */
+ player_color_t color;
+
+ } playerc_graphics3d_t;
+
+
+ /** @brief Create a graphics3d device proxy. */
+ playerc_graphics3d_t *playerc_graphics3d_create(playerc_client_t *client, int
index);
+
+ /** @brief Destroy a graphics3d device proxy. */
+ void playerc_graphics3d_destroy(playerc_graphics3d_t *device);
+
+ /** @brief Subscribe to the graphics3d device */
+ int playerc_graphics3d_subscribe(playerc_graphics3d_t *device, int access);
+
+ /** @brief Un-subscribe from the graphics3d device */
+ int playerc_graphics3d_unsubscribe(playerc_graphics3d_t *device);
+
+ /** @brief Set the current drawing color */
+ int playerc_graphics3d_setcolor(playerc_graphics3d_t *device,
+ player_color_t col );
+
+ /** @brief Draw some points in the given mode */
+ int playerc_graphics3d_draw(playerc_graphics3d_t *device,
+ player_graphics3d_draw_mode_t mode,
+ player_point_3d_t pts[],
+ int count );
+
+ /** @brief Clear the canvas */
+ int playerc_graphics3d_clear(playerc_graphics3d_t *device );
+
+
+ /** @} */
+
+ /***************************************************************************/
+ /** @ingroup playerc_proxies
* @defgroup playerc_proxy_gripper gripper
***************
*** 1651,1655 ****
int playerc_localize_set_pose(playerc_localize_t *device, double pose[3],
double cov[3]);
! /* @brief Get the particle set. Caller must supply sufficient storage for
the result. */
int playerc_localize_get_particles(playerc_localize_t *device);
--- 1734,1738 ----
int playerc_localize_set_pose(playerc_localize_t *device, double pose[3],
double cov[3]);
! /** @brief Request the particle set. Caller must supply sufficient storage
for
the result. */
int playerc_localize_get_particles(playerc_localize_t *device);
***************
*** 1784,1788 ****
The opaque proxy provides an interface for generic messages to drivers.
!
@{
*/
--- 1867,1872 ----
The opaque proxy provides an interface for generic messages to drivers.
! See examples/plugins/opaquedriver for an example of using this interface in
! combination with a custom plugin.
@{
*/
***************
*** 1968,1975 ****
double vel, int state);
! /** Set the target position. */
int playerc_position1d_set_cmd_pos(playerc_position1d_t *device,
double pos, int state);
/** Set the odometry offset */
int playerc_position1d_set_odom(playerc_position1d_t *device,
--- 2052,2068 ----
double vel, int state);
! /** @brief Set the target position.
! [EMAIL PROTECTED] pos The position to move to
! */
int playerc_position1d_set_cmd_pos(playerc_position1d_t *device,
double pos, int state);
+ /** @brief Set the target position with movement velocity
+ [EMAIL PROTECTED] pos The position to move to
+ [EMAIL PROTECTED] vel The speed at which to move to the position
+ */
+ int playerc_position1d_set_cmd_pos_with_vel(playerc_position1d_t *device,
+ double pos, double vel, int
state);
+
/** Set the odometry offset */
int playerc_position1d_set_odom(playerc_position1d_t *device,
***************
*** 2043,2046 ****
--- 2136,2145 ----
double vx, double vy, double va, int
state);
+ /** Set the target pose with given motion vel */
+ int playerc_position2d_set_cmd_pose_with_vel(playerc_position2d_t *device,
+ player_pose_t pos,
+ player_pose_t vel,
+ int state);
+
/** Set the target pose (gx, gy, ga) is the target pose in the
odometric coordinate system. */
***************
*** 2050,2054 ****
/** Set the target cmd for car like position */
int playerc_position2d_set_cmd_car(playerc_position2d_t *device,
! double vx,double a);
/** Set the odometry offset */
--- 2149,2153 ----
/** Set the target cmd for car like position */
int playerc_position2d_set_cmd_car(playerc_position2d_t *device,
! double vx, double a);
/** Set the odometry offset */
***************
*** 2105,2109 ****
/** Create a position3d device proxy. */
playerc_position3d_t *playerc_position3d_create(playerc_client_t *client,
! int index);
/** Destroy a position3d device proxy. */
--- 2204,2208 ----
/** Create a position3d device proxy. */
playerc_position3d_t *playerc_position3d_create(playerc_client_t *client,
! int index);
/** Destroy a position3d device proxy. */
***************
*** 2129,2133 ****
int playerc_position3d_set_velocity(playerc_position3d_t *device,
double vx, double vy, double vz,
! double vr, double vp, double vt, int
state);
/** For compatibility with old position3d interface */
--- 2228,2233 ----
int playerc_position3d_set_velocity(playerc_position3d_t *device,
double vx, double vy, double vz,
! double vr, double vp, double vt,
! int state);
/** For compatibility with old position3d interface */
***************
*** 2141,2148 ****
--- 2241,2265 ----
double gr, double gp, double gt);
+
+ /** Set the target pose (pos,vel) define desired position and motion speed */
+ int playerc_position3d_set_pose_with_vel(playerc_position3d_t *device,
+ player_pose3d_t pos,
+ player_pose3d_t vel);
+
/** For compatibility with old position3d interface */
int playerc_position3d_set_cmd_pose(playerc_position3d_t *device,
double gx, double gy, double gz);
+ /** Set the velocity mode. This is driver dependent. */
+ int playerc_position3d_set_vel_mode(playerc_position3d_t *device, int mode);
+
+ /** Set the odometry offset */
+ int playerc_position3d_set_odom(playerc_position3d_t *device,
+ double ox, double oy, double oz,
+ double oroll, double opitch, double oyaw);
+
+ /** Reset the odometry offset */
+ int playerc_position3d_reset_odom(playerc_position3d_t *device);
+
/** @} */
/**************************************************************************/
***************
*** 2393,2396 ****
--- 2510,2527 ----
+ /** @} */
+ /**************************************************************************/
+
+ /***************************************************************************/
+ /** @ingroup playerc_proxies
+ * @defgroup playerc_proxy_simulation simulation
+
+ The simulation proxy is used to interact with objects in a simulation.
+
+ @todo write playerc_proxy_simulation description
+
+ @{
+ */
+
/** @brief Simulation device proxy. */
typedef struct
***************
*** 2444,2493 ****
-
-
- /**************************************************************************/
- /** @ingroup playerc_proxies
- * @defgroup playerc_proxy_dio dio
-
- The dio proxy provides an interface to the digital input/output sensors.
-
- @{
- */
-
- /** Dio proxy data. */
- typedef struct
- {
- /** Device info; must be at the start of all device structures. */
- playerc_device_t info;
-
- /// The number of valid digital inputs.
- uint8_t count;
-
- /// A bitfield of the current digital inputs.
- uint32_t digin;
-
- } playerc_dio_t;
-
-
- /** Create a dio proxy. */
- playerc_dio_t *playerc_dio_create(playerc_client_t *client, int index);
-
- /** Destroy a dio proxy. */
- void playerc_dio_destroy(playerc_dio_t *device);
-
- /** Subscribe to the dio device. */
- int playerc_dio_subscribe(playerc_dio_t *device, int access);
-
- /** Un-subscribe from the dio device. */
- int playerc_dio_unsubscribe(playerc_dio_t *device);
-
- /** Set the output for the dio device. */
- int playerc_dio_set_output(playerc_dio_t *device, uint8_t output_count,
uint32_t digout);
-
-
- /** @} */
- /***************************************************************************/
-
-
/**************************************************************************/
/** @ingroup playerc_proxies
--- 2575,2578 ----
***************
*** 2527,2531 ****
/**************************************************************************/
! /** @defgroup playerc_proxy_rfid rfid
The rfid proxy provides an interface to a RFID reader.
--- 2612,2617 ----
/**************************************************************************/
! /** @ingroup playerc_proxies
! @defgroup playerc_proxy_rfid rfid
The rfid proxy provides an interface to a RFID reader.
***************
*** 2575,2579 ****
/**************************************************************************/
! /** @defgroup playerc_proxy_wsn wsn
The wsn proxy provides an interface to a Wireless Sensor Network.
--- 2661,2666 ----
/**************************************************************************/
! /** @ingroup playerc_proxies
! @defgroup playerc_proxy_wsn wsn
The wsn proxy provides an interface to a Wireless Sensor Network.
***************
*** 2582,2586 ****
*/
! /** Note: the structure describing the WSN node's data packet is declared in
Player. */
--- 2669,2673 ----
*/
! /** Note: the structure describing the WSN node's data packet is declared in
Player. */
***************
*** 2615,2623 ****
/** Set the device state. */
! int playerc_wsn_set_devstate(playerc_wsn_t *device, int node_id,
int group_id, int devnr, int state);
!
/** Put the node in sleep mode (0) or wake it up (1). */
! int playerc_wsn_power(playerc_wsn_t *device, int node_id, int group_id,
int value);
--- 2702,2710 ----
/** Set the device state. */
! int playerc_wsn_set_devstate(playerc_wsn_t *device, int node_id,
int group_id, int devnr, int state);
!
/** Put the node in sleep mode (0) or wake it up (1). */
! int playerc_wsn_power(playerc_wsn_t *device, int node_id, int group_id,
int value);
***************
*** 2626,2630 ****
/** Change data delivery frequency. */
! int playerc_wsn_datafreq(playerc_wsn_t *device, int node_id, int group_id,
double frequency);
--- 2713,2717 ----
/** Change data delivery frequency. */
! int playerc_wsn_datafreq(playerc_wsn_t *device, int node_id, int group_id,
double frequency);
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit