playerc.h
00001 /*
00002  *  libplayerc : a Player client library
00003  *  Copyright (C) Andrew Howard and contributors 2002-2007
00004  *
00005  *  This program is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU General Public License
00007  *  as published by the Free Software Foundation; either version 2
00008  *  of the License, or (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018  *
00019  */
00020 
00021 /***************************************************************************
00022  * Desc: Player client
00023  * Author: Andrew Howard
00024  * Date: 24 Aug 2001
00025  # CVS: $Id: playerc.h 9053 2011-05-25 02:39:25Z jpgr87 $
00026  **************************************************************************/
00027 
00028 
00051 #ifndef PLAYERC_H
00052 #define PLAYERC_H
00053 
00054 #if !defined (WIN32)
00055   #include <netinet/in.h> /* need this for struct sockaddr_in */
00056 #endif
00057 #include <stddef.h> /* size_t */
00058 #include <stdio.h>
00059 
00060 #include <playerconfig.h>
00061 
00062 /* Get the message structures from Player*/
00063 #include <libplayercommon/playercommon.h>
00064 #include <libplayerinterface/player.h>
00065 #include <libplayercommon/playercommon.h>
00066 #include <libplayerinterface/interface_util.h>
00067 #include <libplayerinterface/playerxdr.h>
00068 #include <libplayerinterface/functiontable.h>
00069 #include <libplayerwkb/playerwkb.h>
00070 #if defined (WIN32)
00071   #include <winsock2.h>
00072 #endif
00073 
00074 #ifndef MIN
00075   #define MIN(a,b) ((a < b) ? a : b)
00076 #endif
00077 #ifndef MAX
00078   #define MAX(a,b) ((a > b) ? a : b)
00079 #endif
00080 
00081 #if defined (WIN32)
00082   #if defined (PLAYER_STATIC)
00083     #define PLAYERC_EXPORT
00084   #elif defined (playerc_EXPORTS)
00085     #define PLAYERC_EXPORT    __declspec (dllexport)
00086   #else
00087     #define PLAYERC_EXPORT    __declspec (dllimport)
00088   #endif
00089 #else
00090   #define PLAYERC_EXPORT
00091 #endif
00092 
00093 
00094 #ifdef __cplusplus
00095 extern "C" {
00096 #endif
00097 
00098 
00099 /***************************************************************************
00100  * Useful constants (re-defined here so SWIG can pick them up easily)
00101  **************************************************************************/
00102 
00104 #define PLAYERC_OPEN_MODE     PLAYER_OPEN_MODE
00105 #define PLAYERC_CLOSE_MODE    PLAYER_CLOSE_MODE
00106 #define PLAYERC_ERROR_MODE    PLAYER_ERROR_MODE
00107 
00108 
00110 #define PLAYERC_DATAMODE_PUSH PLAYER_DATAMODE_PUSH
00111 #define PLAYERC_DATAMODE_PULL PLAYER_DATAMODE_PULL
00112 
00114 #define PLAYERC_TRANSPORT_TCP 1
00115 #define PLAYERC_TRANSPORT_UDP 2
00116 
00117 #define PLAYERC_QUEUE_RING_SIZE 512
00118 
00380 /***************************************************************************/
00386 /***************************************************************************/
00387 
00392 PLAYERC_EXPORT const char *playerc_error_str(void);
00393 
00395 /*const char *playerc_lookup_name(int code);*/
00396 
00398 /*int playerc_lookup_code(const char *name);*/
00399 
00401 PLAYERC_EXPORT int playerc_add_xdr_ftable(playerxdr_function_t *flist, int replace);
00402 
00404 /***************************************************************************/
00405 
00406 
00407 /* Forward declare types*/
00408 struct _playerc_client_t;
00409 struct _playerc_device_t;
00410 
00411 
00412 /* forward declaration to avoid including <sys/poll.h>, which may not be
00413    available when people are building clients against this lib*/
00414 struct pollfd;
00415 
00416 
00417 /***************************************************************************/
00428 /* Items in incoming data queue.*/
00429 typedef struct
00430 {
00431   player_msghdr_t header;
00432   void *data;
00433 } playerc_client_item_t;
00434 
00435 
00436 /* Multi-client data*/
00437 typedef struct
00438 {
00439   /* List of clients being managed*/
00440   int client_count;
00441   struct _playerc_client_t *client[128];
00442 
00443   /* Poll info*/
00444   struct pollfd* pollfd;
00445 
00446   /* Latest time received from any server*/
00447   double time;
00448 
00449 } playerc_mclient_t;
00450 
00451 /* Create a multi-client object*/
00452 PLAYERC_EXPORT playerc_mclient_t *playerc_mclient_create(void);
00453 
00454 /* Destroy a multi-client object*/
00455 PLAYERC_EXPORT void playerc_mclient_destroy(playerc_mclient_t *mclient);
00456 
00457 /* Add a client to the multi-client (private).*/
00458 PLAYERC_EXPORT int playerc_mclient_addclient(playerc_mclient_t *mclient, struct _playerc_client_t *client);
00459 
00460 /* Test to see if there is pending data.
00461    Returns -1 on error, 0 or 1 otherwise.*/
00462 PLAYERC_EXPORT int playerc_mclient_peek(playerc_mclient_t *mclient, int timeout);
00463 
00464 /* Read incoming data.  The timeout is in ms.  Set timeout to a
00465    negative value to wait indefinitely.*/
00466 PLAYERC_EXPORT int playerc_mclient_read(playerc_mclient_t *mclient, int timeout);
00467 
00469 /***************************************************************************/
00470 
00471 
00472 /***************************************************************************/
00485 PLAYERC_EXPORT typedef void (*playerc_putmsg_fn_t) (void *device, char *header, char *data);
00486 
00488 PLAYERC_EXPORT typedef void (*playerc_callback_fn_t) (void *data);
00489 
00490 
00494 typedef struct
00495 {
00497   player_devaddr_t addr;
00498 
00500   char drivername[PLAYER_MAX_DRIVER_STRING_LEN];
00501 
00502 } playerc_device_info_t;
00503 
00504 
00506 typedef struct _playerc_client_t
00507 {
00510   void *id;
00511 
00513   char *host;
00514   int port;
00515   int transport;
00516   struct sockaddr_in server;
00517 
00520   int connected;
00521 
00525   int retry_limit;
00526 
00529   double retry_time;
00530 
00532   uint32_t overflow_count;
00533 
00534 
00536   int sock;
00537 
00539   uint8_t mode;
00540 
00543   int data_requested;
00544 
00547   int data_received;
00548 
00549 
00552   playerc_device_info_t devinfos[PLAYER_MAX_DEVICES];
00553   int devinfo_count;
00554 
00556   struct _playerc_device_t *device[PLAYER_MAX_DEVICES];
00557   int device_count;
00558 
00560   playerc_client_item_t qitems[PLAYERC_QUEUE_RING_SIZE];
00561   int qfirst, qlen, qsize;
00562 
00564   char *data;
00565   char *write_xdrdata;
00566   char *read_xdrdata;
00567   size_t read_xdrdata_len;
00568 
00569 
00571   double datatime;
00573   double lasttime;
00574 
00575   double request_timeout;
00576 
00577 } playerc_client_t;
00578 
00579 
00595 PLAYERC_EXPORT playerc_client_t *playerc_client_create(playerc_mclient_t *mclient,
00596                                         const char *host, int port);
00597 
00603 PLAYERC_EXPORT void playerc_client_destroy(playerc_client_t *client);
00604 
00610 PLAYERC_EXPORT void playerc_client_set_transport(playerc_client_t* client,
00611                                   unsigned int transport);
00612 
00621 PLAYERC_EXPORT int playerc_client_connect(playerc_client_t *client);
00622 
00631 PLAYERC_EXPORT int playerc_client_disconnect(playerc_client_t *client);
00632 
00639 PLAYERC_EXPORT int playerc_client_disconnect_retry(playerc_client_t *client);
00640 
00655 PLAYERC_EXPORT int playerc_client_datamode(playerc_client_t *client, uint8_t mode);
00656 
00668 PLAYERC_EXPORT int playerc_client_requestdata(playerc_client_t* client);
00669 
00692 PLAYERC_EXPORT int playerc_client_set_replace_rule(playerc_client_t *client, int interf, int index, int type, int subtype, int replace);
00693 
00694 
00697 PLAYERC_EXPORT int playerc_client_adddevice(playerc_client_t *client, struct _playerc_device_t *device);
00698 
00699 
00702 PLAYERC_EXPORT int playerc_client_deldevice(playerc_client_t *client, struct _playerc_device_t *device);
00703 
00706 PLAYERC_EXPORT int  playerc_client_addcallback(playerc_client_t *client, struct _playerc_device_t *device,
00707                                 playerc_callback_fn_t callback, void *data);
00708 
00711 PLAYERC_EXPORT int  playerc_client_delcallback(playerc_client_t *client, struct _playerc_device_t *device,
00712                                 playerc_callback_fn_t callback, void *data);
00713 
00725 PLAYERC_EXPORT int playerc_client_get_devlist(playerc_client_t *client);
00726 
00729 PLAYERC_EXPORT int playerc_client_subscribe(playerc_client_t *client, int code, int index,
00730                              int access, char *drivername, size_t len);
00731 
00734 PLAYERC_EXPORT int playerc_client_unsubscribe(playerc_client_t *client, int code, int index);
00735 
00746 PLAYERC_EXPORT int playerc_client_request(playerc_client_t *client,
00747                            struct _playerc_device_t *device, uint8_t reqtype,
00748                            const void *req_data, void **rep_data);
00749 
00750 
00751 /* @brief Wait for response from server (blocking).
00752 
00753 @param client Pointer to client object.
00754 @param device
00755 @param index
00756 @param sequence
00757 
00758 @returns Will return data size for ack, -1 for nack and -2 for failure
00759 
00760 
00761 int playerc_client_getresponse(playerc_client_t *client, uint16_t device,
00762     uint16_t index, uint16_t sequence, uint8_t * resptype, uint8_t * resp_data, int resp_len);
00763 */
00764 
00765 
00777 PLAYERC_EXPORT int playerc_client_peek(playerc_client_t *client, int timeout);
00778 
00791 PLAYERC_EXPORT int playerc_client_internal_peek(playerc_client_t *client, int timeout);
00792 
00807 PLAYERC_EXPORT void *playerc_client_read(playerc_client_t *client);
00808 
00811 PLAYERC_EXPORT int playerc_client_read_nonblock(playerc_client_t *client);
00814 PLAYERC_EXPORT int playerc_client_read_nonblock_withproxy(playerc_client_t *client, void ** proxy);
00815 
00822 PLAYERC_EXPORT void playerc_client_set_request_timeout(playerc_client_t* client, uint32_t seconds);
00823 
00830 PLAYERC_EXPORT void playerc_client_set_retry_limit(playerc_client_t* client, int limit);
00831 
00837 PLAYERC_EXPORT void playerc_client_set_retry_time(playerc_client_t* client, double time);
00838 
00841 PLAYERC_EXPORT int playerc_client_write(playerc_client_t *client,
00842                          struct _playerc_device_t *device,
00843                          uint8_t subtype,
00844                          void *cmd, double* timestamp);
00845 
00846 
00848 /**************************************************************************/
00849 
00850 
00851 /***************************************************************************/
00864 typedef struct _playerc_device_t
00865 {
00869   void *id;
00870 
00872   playerc_client_t *client;
00873 
00875   player_devaddr_t addr;
00876 
00878   char drivername[PLAYER_MAX_DRIVER_STRING_LEN];
00879 
00882   int subscribed;
00883 
00885   double datatime;
00886 
00888   double lasttime;
00889 
00893   int fresh;
00897   int freshgeom;
00901   int freshconfig;
00902 
00904   playerc_putmsg_fn_t putmsg;
00905 
00907   void *user_data;
00908 
00910   int callback_count;
00911   playerc_callback_fn_t callback[4];
00912   void *callback_data[4];
00913 
00914 } playerc_device_t;
00915 
00916 
00918 PLAYERC_EXPORT void playerc_device_init(playerc_device_t *device, playerc_client_t *client,
00919                          int code, int index, playerc_putmsg_fn_t putmsg);
00920 
00922 PLAYERC_EXPORT void playerc_device_term(playerc_device_t *device);
00923 
00925 PLAYERC_EXPORT int playerc_device_subscribe(playerc_device_t *device, int access);
00926 
00928 PLAYERC_EXPORT int playerc_device_unsubscribe(playerc_device_t *device);
00929 
00931 PLAYERC_EXPORT int playerc_device_hascapability(playerc_device_t *device, uint32_t type, uint32_t subtype);
00932 
00934 PLAYERC_EXPORT int playerc_device_get_boolprop(playerc_device_t *device, char *property, BOOL *value);
00935 
00937 PLAYERC_EXPORT int playerc_device_set_boolprop(playerc_device_t *device, char *property, BOOL value);
00938 
00940 PLAYERC_EXPORT int playerc_device_get_intprop(playerc_device_t *device, char *property, int32_t *value);
00941 
00943 PLAYERC_EXPORT int playerc_device_set_intprop(playerc_device_t *device, char *property, int32_t value);
00944 
00946 PLAYERC_EXPORT int playerc_device_get_dblprop(playerc_device_t *device, char *property, double *value);
00947 
00949 PLAYERC_EXPORT int playerc_device_set_dblprop(playerc_device_t *device, char *property, double value);
00950 
00952 PLAYERC_EXPORT int playerc_device_get_strprop(playerc_device_t *device, char *property, char **value);
00953 
00955 PLAYERC_EXPORT int playerc_device_set_strprop(playerc_device_t *device, char *property, char *value);
00956 
00957 
00959 /**************************************************************************/
00960 
00961 
00962 /***************************************************************************/
00967 /***************************************************************************/
00968 
00969 /**************************************************************************/
00979 typedef struct
00980 {
00982   playerc_device_t info;
00983 
00984   /* The number of valid analog inputs.*/
00985   uint8_t voltages_count;
00986 
00987   /* A bitfield of the current digital inputs.*/
00988   float *voltages;
00989 
00990 } playerc_aio_t;
00991 
00992 
00994 PLAYERC_EXPORT playerc_aio_t *playerc_aio_create(playerc_client_t *client, int index);
00995 
00997 PLAYERC_EXPORT void playerc_aio_destroy(playerc_aio_t *device);
00998 
01000 PLAYERC_EXPORT int playerc_aio_subscribe(playerc_aio_t *device, int access);
01001 
01003 PLAYERC_EXPORT int playerc_aio_unsubscribe(playerc_aio_t *device);
01004 
01006 PLAYERC_EXPORT int playerc_aio_set_output(playerc_aio_t *device, uint8_t id, float volt);
01007 
01009 PLAYERC_EXPORT float playerc_aio_get_data(playerc_aio_t *device, uint32_t index);
01010 
01012 /***************************************************************************/
01013 
01014 
01015 /***************************************************************************/
01026 #define PLAYERC_ACTARRAY_NUM_ACTUATORS PLAYER_ACTARRAY_NUM_ACTUATORS
01027 #define PLAYERC_ACTARRAY_ACTSTATE_IDLE PLAYER_ACTARRAY_ACTSTATE_IDLE
01028 #define PLAYERC_ACTARRAY_ACTSTATE_MOVING PLAYER_ACTARRAY_ACTSTATE_MOVING
01029 #define PLAYERC_ACTARRAY_ACTSTATE_BRAKED PLAYER_ACTARRAY_ACTSTATE_BRAKED
01030 #define PLAYERC_ACTARRAY_ACTSTATE_STALLED PLAYER_ACTARRAY_ACTSTATE_STALLED
01031 #define PLAYERC_ACTARRAY_TYPE_LINEAR PLAYER_ACTARRAY_TYPE_LINEAR
01032 #define PLAYERC_ACTARRAY_TYPE_ROTARY PLAYER_ACTARRAY_TYPE_ROTARY
01033 
01034 
01036 typedef struct
01037 {
01039   playerc_device_t info;
01040 
01042   uint32_t actuators_count;
01044   player_actarray_actuator_t *actuators_data;
01046   uint32_t actuators_geom_count;
01047   player_actarray_actuatorgeom_t *actuators_geom;
01049   uint8_t motor_state;
01051   player_point_3d_t base_pos;
01053   player_orientation_3d_t base_orientation;
01054 } playerc_actarray_t;
01055 
01057 PLAYERC_EXPORT playerc_actarray_t *playerc_actarray_create(playerc_client_t *client, int index);
01058 
01060 PLAYERC_EXPORT void playerc_actarray_destroy(playerc_actarray_t *device);
01061 
01063 PLAYERC_EXPORT int playerc_actarray_subscribe(playerc_actarray_t *device, int access);
01064 
01066 PLAYERC_EXPORT int playerc_actarray_unsubscribe(playerc_actarray_t *device);
01067 
01069 PLAYERC_EXPORT player_actarray_actuator_t playerc_actarray_get_actuator_data(playerc_actarray_t *device, uint32_t index);
01070 
01072 PLAYERC_EXPORT player_actarray_actuatorgeom_t playerc_actarray_get_actuator_geom(playerc_actarray_t *device, uint32_t index);
01073 
01076 PLAYERC_EXPORT int playerc_actarray_get_geom(playerc_actarray_t *device);
01077 
01079 PLAYERC_EXPORT int playerc_actarray_position_cmd(playerc_actarray_t *device, int joint, float position);
01080 
01082 PLAYERC_EXPORT int playerc_actarray_multi_position_cmd(playerc_actarray_t *device, float *positions, int positions_count);
01083 
01085 PLAYERC_EXPORT int playerc_actarray_speed_cmd(playerc_actarray_t *device, int joint, float speed);
01086 
01088 PLAYERC_EXPORT int playerc_actarray_multi_speed_cmd(playerc_actarray_t *device, float *speeds, int speeds_count);
01089 
01091 PLAYERC_EXPORT int playerc_actarray_home_cmd(playerc_actarray_t *device, int joint);
01092 
01094 PLAYERC_EXPORT int playerc_actarray_current_cmd(playerc_actarray_t *device, int joint, float current);
01095 
01097 PLAYERC_EXPORT int playerc_actarray_multi_current_cmd(playerc_actarray_t *device, float *currents, int currents_count);
01098 
01099 
01103 PLAYERC_EXPORT int playerc_actarray_power(playerc_actarray_t *device, uint8_t enable);
01104 
01106 PLAYERC_EXPORT int playerc_actarray_brakes(playerc_actarray_t *device, uint8_t enable);
01107 
01109 PLAYERC_EXPORT int playerc_actarray_speed_config(playerc_actarray_t *device, int joint, float speed);
01110 
01111 /* Set the accelration of a joint (-1 for all joints) for all subsequent movement commands*/
01112 PLAYERC_EXPORT int playerc_actarray_accel_config(playerc_actarray_t *device, int joint, float accel);
01113 
01114 
01116 /**************************************************************************/
01117 
01118 /***************************************************************************/
01130 typedef struct
01131 {
01133   playerc_device_t info;
01134 
01136   player_audio_mixer_channel_list_detail_t channel_details_list;
01137 
01139   player_audio_wav_t wav_data;
01140 
01142   player_audio_seq_t seq_data;
01143 
01145   player_audio_mixer_channel_list_t mixer_data;
01146 
01148   uint32_t state;
01149 
01150   int last_index;
01151 
01152 } playerc_audio_t;
01153 
01155 PLAYERC_EXPORT playerc_audio_t *playerc_audio_create(playerc_client_t *client, int index);
01156 
01158 PLAYERC_EXPORT void playerc_audio_destroy(playerc_audio_t *device);
01159 
01161 PLAYERC_EXPORT int playerc_audio_subscribe(playerc_audio_t *device, int access);
01162 
01164 PLAYERC_EXPORT int playerc_audio_unsubscribe(playerc_audio_t *device);
01165 
01167 PLAYERC_EXPORT int playerc_audio_wav_play_cmd(playerc_audio_t *device, uint32_t data_count, uint8_t data[], uint32_t format);
01168 
01170 PLAYERC_EXPORT int playerc_audio_wav_stream_rec_cmd(playerc_audio_t *device, uint8_t state);
01171 
01173 PLAYERC_EXPORT int playerc_audio_sample_play_cmd(playerc_audio_t *device, int index);
01174 
01176 PLAYERC_EXPORT int playerc_audio_seq_play_cmd(playerc_audio_t *device, player_audio_seq_t * tones);
01177 
01179 PLAYERC_EXPORT int playerc_audio_mixer_multchannels_cmd(playerc_audio_t *device, player_audio_mixer_channel_list_t * levels);
01180 
01182 PLAYERC_EXPORT int playerc_audio_mixer_channel_cmd(playerc_audio_t *device, uint32_t index, float amplitude, uint8_t active);
01183 
01186 PLAYERC_EXPORT int playerc_audio_wav_rec(playerc_audio_t *device);
01187 
01189 PLAYERC_EXPORT int playerc_audio_sample_load(playerc_audio_t *device, int index, uint32_t data_count, uint8_t data[], uint32_t format);
01190 
01193 PLAYERC_EXPORT int playerc_audio_sample_retrieve(playerc_audio_t *device, int index);
01194 
01196 PLAYERC_EXPORT int playerc_audio_sample_rec(playerc_audio_t *device, int index, uint32_t length);
01197 
01200 PLAYERC_EXPORT int playerc_audio_get_mixer_levels(playerc_audio_t *device);
01201 
01204 PLAYERC_EXPORT int playerc_audio_get_mixer_details(playerc_audio_t *device);
01205 
01207 /**************************************************************************/
01208 
01218 #define PLAYERC_BLACKBOARD_DATA_TYPE_NONE       0
01219 #define PLAYERC_BLACKBOARD_DATA_TYPE_SIMPLE     1
01220 #define PLAYERC_BLACKBOARD_DATA_TYPE_COMPLEX    2
01221 
01222 #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_NONE    0
01223 #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_STRING  1
01224 #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_INT     2
01225 #define PLAYERC_BLACKBOARD_DATA_SUBTYPE_DOUBLE  3
01226 
01228 typedef struct playerc_blackboard
01229 {
01231   playerc_device_t info;
01233   void (*on_blackboard_event)(struct playerc_blackboard*, player_blackboard_entry_t);
01235   void *py_private;
01236 } playerc_blackboard_t;
01237 
01239 PLAYERC_EXPORT playerc_blackboard_t *playerc_blackboard_create(playerc_client_t *client, int index);
01240 
01242 PLAYERC_EXPORT void playerc_blackboard_destroy(playerc_blackboard_t *device);
01243 
01245 PLAYERC_EXPORT int playerc_blackboard_subscribe(playerc_blackboard_t *device, int access);
01246 
01248 PLAYERC_EXPORT int playerc_blackboard_unsubscribe(playerc_blackboard_t *device);
01249 
01252 PLAYERC_EXPORT int playerc_blackboard_subscribe_to_key(playerc_blackboard_t *device, const char* key, const char* group, player_blackboard_entry_t** entry);
01253 
01256 PLAYERC_EXPORT int playerc_blackboard_get_entry(playerc_blackboard_t *device, const char* key, const char* group, player_blackboard_entry_t** entry);
01257 
01259 PLAYERC_EXPORT int playerc_blackboard_unsubscribe_from_key(playerc_blackboard_t *device, const char* key, const char* group);
01260 
01262 PLAYERC_EXPORT int playerc_blackboard_subscribe_to_group(playerc_blackboard_t *device, const char* group);
01263 
01265 PLAYERC_EXPORT int playerc_blackboard_unsubscribe_from_group(playerc_blackboard_t *device, const char* group);
01266 
01268 PLAYERC_EXPORT int playerc_blackboard_set_entry(playerc_blackboard_t *device, player_blackboard_entry_t* entry);
01269 
01270 PLAYERC_EXPORT int playerc_blackboard_set_string(playerc_blackboard_t *device, const char* key, const char* group, const char* value);
01271 
01272 PLAYERC_EXPORT int playerc_blackboard_set_int(playerc_blackboard_t *device, const char* key, const char* group, const int value);
01273 
01274 PLAYERC_EXPORT int playerc_blackboard_set_double(playerc_blackboard_t *device, const char* key, const char* group, const double value);
01275 
01278 /**************************************************************************/
01289 typedef struct
01290 {
01292   playerc_device_t info;
01293 
01294   uint32_t enabled;
01295   double duty_cycle;
01296   double period;
01297   uint8_t red, green, blue;
01298 } playerc_blinkenlight_t;
01299 
01300 
01302 PLAYERC_EXPORT playerc_blinkenlight_t *playerc_blinkenlight_create(playerc_client_t *client, int index);
01303 
01305 PLAYERC_EXPORT void playerc_blinkenlight_destroy(playerc_blinkenlight_t *device);
01306 
01308 PLAYERC_EXPORT int playerc_blinkenlight_subscribe(playerc_blinkenlight_t *device, int access);
01309 
01311 PLAYERC_EXPORT int playerc_blinkenlight_unsubscribe(playerc_blinkenlight_t *device);
01312 
01314 PLAYERC_EXPORT int playerc_blinkenlight_enable( playerc_blinkenlight_t *device,
01315                                  uint32_t enable );
01316 
01318 PLAYERC_EXPORT int playerc_blinkenlight_color( playerc_blinkenlight_t *device,
01319                                 uint32_t id,
01320                                 uint8_t red,
01321                                 uint8_t green,
01322                                 uint8_t blue );
01325 PLAYERC_EXPORT int playerc_blinkenlight_blink( playerc_blinkenlight_t *device,
01326                                 uint32_t id,
01327                                 float period,
01328                                 float duty_cycle );
01331 /***************************************************************************/
01342 typedef player_blobfinder_blob_t playerc_blobfinder_blob_t;
01343 
01345 typedef struct
01346 {
01348   playerc_device_t info;
01349 
01351   unsigned int width, height;
01352 
01354   unsigned int blobs_count;
01355   playerc_blobfinder_blob_t *blobs;
01356 
01357 } playerc_blobfinder_t;
01358 
01359 
01361 PLAYERC_EXPORT playerc_blobfinder_t *playerc_blobfinder_create(playerc_client_t *client, int index);
01362 
01364 PLAYERC_EXPORT void playerc_blobfinder_destroy(playerc_blobfinder_t *device);
01365 
01367 PLAYERC_EXPORT int playerc_blobfinder_subscribe(playerc_blobfinder_t *device, int access);
01368 
01370 PLAYERC_EXPORT int playerc_blobfinder_unsubscribe(playerc_blobfinder_t *device);
01371 
01372 
01374 /**************************************************************************/
01375 
01376 
01377 /**************************************************************************/
01388 typedef struct
01389 {
01391   playerc_device_t info;
01392 
01394   int pose_count;
01395 
01399   player_bumper_define_t *poses;
01400 
01402   int bumper_count;
01403 
01405   uint8_t *bumpers;
01406 
01407 } playerc_bumper_t;
01408 
01409 
01411 PLAYERC_EXPORT playerc_bumper_t *playerc_bumper_create(playerc_client_t *client, int index);
01412 
01414 PLAYERC_EXPORT void playerc_bumper_destroy(playerc_bumper_t *device);
01415 
01417 PLAYERC_EXPORT int playerc_bumper_subscribe(playerc_bumper_t *device, int access);
01418 
01420 PLAYERC_EXPORT int playerc_bumper_unsubscribe(playerc_bumper_t *device);
01421 
01428 PLAYERC_EXPORT int playerc_bumper_get_geom(playerc_bumper_t *device);
01429 
01430 
01432 /***************************************************************************/
01433 
01434 
01435 /***************************************************************************/
01445 typedef struct
01446 {
01448   playerc_device_t info;
01449 
01451   int width, height;
01452 
01454   int bpp;
01455 
01457   int format;
01458 
01462   int fdiv;
01463 
01465   int compression;
01466 
01468   int image_count;
01469 
01474   uint8_t *image;
01475 
01477   char norm[16];
01478   int source;
01479 
01480 } playerc_camera_t;
01481 
01482 
01484 PLAYERC_EXPORT playerc_camera_t *playerc_camera_create(playerc_client_t *client, int index);
01485 
01487 PLAYERC_EXPORT void playerc_camera_destroy(playerc_camera_t *device);
01488 
01490 PLAYERC_EXPORT int playerc_camera_subscribe(playerc_camera_t *device, int access);
01491 
01493 PLAYERC_EXPORT int playerc_camera_unsubscribe(playerc_camera_t *device);
01494 
01496 PLAYERC_EXPORT void playerc_camera_decompress(playerc_camera_t *device);
01497 
01499 PLAYERC_EXPORT void playerc_camera_save(playerc_camera_t *device, const char *filename);
01500 
01502 PLAYERC_EXPORT int playerc_camera_set_source(playerc_camera_t *device, int source, const char *norm);
01503 
01505 PLAYERC_EXPORT int playerc_camera_get_source(playerc_camera_t *device);
01506 
01508 PLAYERC_EXPORT int playerc_camera_get_image(playerc_camera_t *device);
01509 
01511 PLAYERC_EXPORT void playerc_camera_copy_image(playerc_camera_t * device, void * dst, size_t dst_size);
01512 
01514 PLAYERC_EXPORT unsigned playerc_camera_get_pixel_component(playerc_camera_t * device, unsigned int x, unsigned int y, int component);
01515 
01517 /**************************************************************************/
01518 
01519 
01520 /**************************************************************************/
01530 typedef struct
01531 {
01533   playerc_device_t info;
01534 
01535     /*/ The number of valid digital inputs.*/
01536     uint8_t count;
01537 
01538     /*/ A bitfield of the current digital inputs.*/
01539     uint32_t digin;
01540 
01541 } playerc_dio_t;
01542 
01543 
01545 PLAYERC_EXPORT playerc_dio_t *playerc_dio_create(playerc_client_t *client, int index);
01546 
01548 PLAYERC_EXPORT void playerc_dio_destroy(playerc_dio_t *device);
01549 
01551 PLAYERC_EXPORT int playerc_dio_subscribe(playerc_dio_t *device, int access);
01552 
01554 PLAYERC_EXPORT int playerc_dio_unsubscribe(playerc_dio_t *device);
01555 
01557 PLAYERC_EXPORT int playerc_dio_set_output(playerc_dio_t *device, uint8_t output_count, uint32_t digout);
01558 
01559 
01561 /***************************************************************************/
01562 
01563 
01564 /***************************************************************************/
01579 typedef struct
01580 {
01582   playerc_device_t info;
01583 
01588   player_fiducial_geom_t fiducial_geom;
01589 
01591   int fiducials_count;
01592   player_fiducial_item_t *fiducials;
01593 
01594 } playerc_fiducial_t;
01595 
01596 
01598 PLAYERC_EXPORT playerc_fiducial_t *playerc_fiducial_create(playerc_client_t *client, int index);
01599 
01601 PLAYERC_EXPORT void playerc_fiducial_destroy(playerc_fiducial_t *device);
01602 
01604 PLAYERC_EXPORT int playerc_fiducial_subscribe(playerc_fiducial_t *device, int access);
01605 
01607 PLAYERC_EXPORT int playerc_fiducial_unsubscribe(playerc_fiducial_t *device);
01608 
01615 PLAYERC_EXPORT int playerc_fiducial_get_geom(playerc_fiducial_t *device);
01616 
01617 
01619 /**************************************************************************/
01620 
01621 /***************************************************************************/
01632 typedef struct
01633 {
01635   playerc_device_t info;
01636 
01638   double utc_time;
01639 
01643   double lat, lon;
01644 
01647   double alt;
01648 
01650   double utm_e, utm_n;
01651 
01653   double hdop;
01654 
01656   double vdop;
01657 
01659   double err_horz, err_vert;
01660 
01662   int quality;
01663 
01665   int sat_count;
01666 
01667 } playerc_gps_t;
01668 
01669 
01671 PLAYERC_EXPORT playerc_gps_t *playerc_gps_create(playerc_client_t *client, int index);
01672 
01674 PLAYERC_EXPORT void playerc_gps_destroy(playerc_gps_t *device);
01675 
01677 PLAYERC_EXPORT int playerc_gps_subscribe(playerc_gps_t *device, int access);
01678 
01680 PLAYERC_EXPORT int playerc_gps_unsubscribe(playerc_gps_t *device);
01681 
01682 
01684 /**************************************************************************/
01685 
01686 /***************************************************************************/
01696 typedef struct
01697 {
01699   playerc_device_t info;
01700 
01702   player_color_t color;
01703 
01704 } playerc_graphics2d_t;
01705 
01706 
01708 PLAYERC_EXPORT playerc_graphics2d_t *playerc_graphics2d_create(playerc_client_t *client, int index);
01709 
01711 PLAYERC_EXPORT void playerc_graphics2d_destroy(playerc_graphics2d_t *device);
01712 
01714 PLAYERC_EXPORT int playerc_graphics2d_subscribe(playerc_graphics2d_t *device, int access);
01715 
01717 PLAYERC_EXPORT int playerc_graphics2d_unsubscribe(playerc_graphics2d_t *device);
01718 
01720 PLAYERC_EXPORT int playerc_graphics2d_setcolor(playerc_graphics2d_t *device,
01721                                 player_color_t col );
01722 
01724 PLAYERC_EXPORT int playerc_graphics2d_draw_points(playerc_graphics2d_t *device,
01725            player_point_2d_t pts[],
01726            int count );
01727 
01729 PLAYERC_EXPORT int playerc_graphics2d_draw_polyline(playerc_graphics2d_t *device,
01730              player_point_2d_t pts[],
01731              int count );
01732 
01734 PLAYERC_EXPORT int playerc_graphics2d_draw_multiline(playerc_graphics2d_t *device,
01735              player_point_2d_t pts[],
01736              int count );
01737 
01738 
01739 
01741 PLAYERC_EXPORT int playerc_graphics2d_draw_polygon(playerc_graphics2d_t *device,
01742             player_point_2d_t pts[],
01743             int count,
01744             int filled,
01745             player_color_t fill_color );
01746 
01748 PLAYERC_EXPORT int playerc_graphics2d_clear(playerc_graphics2d_t *device );
01749 
01750 
01753 /***************************************************************************/
01763 typedef struct
01764 {
01766   playerc_device_t info;
01767 
01769   player_color_t color;
01770 
01771 } playerc_graphics3d_t;
01772 
01773 
01775 PLAYERC_EXPORT playerc_graphics3d_t *playerc_graphics3d_create(playerc_client_t *client, int index);
01776 
01778 PLAYERC_EXPORT void playerc_graphics3d_destroy(playerc_graphics3d_t *device);
01779 
01781 PLAYERC_EXPORT int playerc_graphics3d_subscribe(playerc_graphics3d_t *device, int access);
01782 
01784 PLAYERC_EXPORT int playerc_graphics3d_unsubscribe(playerc_graphics3d_t *device);
01785 
01787 PLAYERC_EXPORT int playerc_graphics3d_setcolor(playerc_graphics3d_t *device,
01788                                 player_color_t col );
01789 
01791 PLAYERC_EXPORT int playerc_graphics3d_draw(playerc_graphics3d_t *device,
01792            player_graphics3d_draw_mode_t mode,
01793            player_point_3d_t pts[],
01794            int count );
01795 
01797 PLAYERC_EXPORT int playerc_graphics3d_clear(playerc_graphics3d_t *device );
01798 
01800 PLAYERC_EXPORT int playerc_graphics3d_translate(playerc_graphics3d_t *device,
01801                                  double x, double y, double z );
01802 
01803 
01805 PLAYERC_EXPORT int playerc_graphics3d_rotate( playerc_graphics3d_t *device,
01806                                double a, double x, double y, double z );
01809 /***************************************************************************/
01819 typedef struct
01820 {
01822   playerc_device_t info;
01823 
01830   player_pose3d_t pose;
01831   player_bbox3d_t outer_size;
01832   player_bbox3d_t inner_size;
01834   uint8_t num_beams;
01836   uint8_t capacity;
01837 
01841   uint8_t state;
01843   uint32_t beams;
01845   uint8_t stored;
01846 } playerc_gripper_t;
01847 
01849 PLAYERC_EXPORT playerc_gripper_t *playerc_gripper_create(playerc_client_t *client, int index);
01850 
01852 PLAYERC_EXPORT void playerc_gripper_destroy(playerc_gripper_t *device);
01853 
01855 PLAYERC_EXPORT int playerc_gripper_subscribe(playerc_gripper_t *device, int access);
01856 
01858 PLAYERC_EXPORT int playerc_gripper_unsubscribe(playerc_gripper_t *device);
01859 
01861 PLAYERC_EXPORT int playerc_gripper_open_cmd(playerc_gripper_t *device);
01862 
01864 PLAYERC_EXPORT int playerc_gripper_close_cmd(playerc_gripper_t *device);
01865 
01867 PLAYERC_EXPORT int playerc_gripper_stop_cmd(playerc_gripper_t *device);
01868 
01870 PLAYERC_EXPORT int playerc_gripper_store_cmd(playerc_gripper_t *device);
01871 
01873 PLAYERC_EXPORT int playerc_gripper_retrieve_cmd(playerc_gripper_t *device);
01874 
01877 PLAYERC_EXPORT void playerc_gripper_printout(playerc_gripper_t *device, const char* prefix);
01878 
01883 PLAYERC_EXPORT int playerc_gripper_get_geom(playerc_gripper_t *device);
01884 
01886 /**************************************************************************/
01887 
01888 /***************************************************************************/
01902 typedef struct
01903 {
01905     playerc_device_t info;
01907     player_health_cpu_t cpu_usage;
01909     player_health_memory_t mem;
01911     player_health_memory_t swap;
01912 } playerc_health_t;
01913 
01914 
01916 PLAYERC_EXPORT playerc_health_t *playerc_health_create(playerc_client_t *client, int index);
01917 
01919 PLAYERC_EXPORT void playerc_health_destroy(playerc_health_t *device);
01920 
01922 PLAYERC_EXPORT int playerc_health_subscribe(playerc_health_t *device, int access);
01923 
01925 PLAYERC_EXPORT int playerc_health_unsubscribe(playerc_health_t *device);
01926 
01927 
01929 /***************************************************************************/
01930 
01931 
01932 /***************************************************************************/
01943 typedef struct
01944 {
01946   playerc_device_t info;
01947 
01948   /* data*/
01949   player_ir_data_t data;
01950 
01951   /* config*/
01952   player_ir_pose_t poses;
01953 
01954 } playerc_ir_t;
01955 
01956 
01958 PLAYERC_EXPORT playerc_ir_t *playerc_ir_create(playerc_client_t *client, int index);
01959 
01961 PLAYERC_EXPORT void playerc_ir_destroy(playerc_ir_t *device);
01962 
01964 PLAYERC_EXPORT int playerc_ir_subscribe(playerc_ir_t *device, int access);
01965 
01967 PLAYERC_EXPORT int playerc_ir_unsubscribe(playerc_ir_t *device);
01968 
01975 PLAYERC_EXPORT int playerc_ir_get_geom(playerc_ir_t *device);
01976 
01977 
01979 /***************************************************************************/
01980 
01981 
01982 /***************************************************************************/
01992 typedef struct
01993 {
01995   playerc_device_t info;
01996   int32_t axes_count;
01997   int32_t pos[8];
01998   uint32_t buttons;
01999   int * axes_max;
02000   int * axes_min;
02001   double * scale_pos;
02002 
02003 
02004 } playerc_joystick_t;
02005 
02006 
02008 PLAYERC_EXPORT playerc_joystick_t *playerc_joystick_create(playerc_client_t *client, int index);
02009 
02011 PLAYERC_EXPORT void playerc_joystick_destroy(playerc_joystick_t *device);
02012 
02014 PLAYERC_EXPORT int playerc_joystick_subscribe(playerc_joystick_t *device, int access);
02015 
02017 PLAYERC_EXPORT int playerc_joystick_unsubscribe(playerc_joystick_t *device);
02018 
02020 /**************************************************************************/
02021 
02022 
02023 /***************************************************************************/
02037 typedef struct
02038 {
02040   playerc_device_t info;
02041 
02045   double pose[3];
02046   double size[2];
02047 
02049   double robot_pose[3];
02050 
02052   int intensity_on;
02053 
02055   int scan_count;
02056 
02058   double scan_start;
02059 
02061   double scan_res;
02062 
02064   double range_res;
02065 
02067   double max_range;
02068 
02070   double scanning_frequency;
02071 
02073   double *ranges;
02074 
02076   double (*scan)[2];
02077 
02079   player_point_2d_t *point;
02080 
02084   int *intensity;
02085 
02087   int scan_id;
02088 
02090   int laser_id;
02091 
02095   double min_right;
02096 
02100   double min_left;
02101 } playerc_laser_t;
02102 
02103 
02105 PLAYERC_EXPORT playerc_laser_t *playerc_laser_create(playerc_client_t *client, int index);
02106 
02108 PLAYERC_EXPORT void playerc_laser_destroy(playerc_laser_t *device);
02109 
02111 PLAYERC_EXPORT int playerc_laser_subscribe(playerc_laser_t *device, int access);
02112 
02114 PLAYERC_EXPORT int playerc_laser_unsubscribe(playerc_laser_t *device);
02115 
02138 PLAYERC_EXPORT int playerc_laser_set_config(playerc_laser_t *device,
02139                              double min_angle, double max_angle,
02140                              double resolution,
02141                              double range_res,
02142                              unsigned char intensity,
02143                              double scanning_frequency);
02144 
02167 PLAYERC_EXPORT int playerc_laser_get_config(playerc_laser_t *device,
02168                              double *min_angle,
02169                              double *max_angle,
02170                              double *resolution,
02171                              double *range_res,
02172                              unsigned char *intensity,
02173                              double *scanning_frequency);
02174 
02181 PLAYERC_EXPORT int playerc_laser_get_geom(playerc_laser_t *device);
02182 
02187 PLAYERC_EXPORT int playerc_laser_get_id (playerc_laser_t *device);
02188 
02191 PLAYERC_EXPORT void playerc_laser_printout( playerc_laser_t * device,
02192         const char* prefix );
02193 
02195 /**************************************************************************/
02196 
02197 
02209 typedef struct
02210 {
02212   playerc_device_t info;
02213 
02214   player_limb_data_t data;
02215   player_limb_geom_req_t geom;
02216 } playerc_limb_t;
02217 
02219 PLAYERC_EXPORT playerc_limb_t *playerc_limb_create(playerc_client_t *client, int index);
02220 
02222 PLAYERC_EXPORT void playerc_limb_destroy(playerc_limb_t *device);
02223 
02225 PLAYERC_EXPORT int playerc_limb_subscribe(playerc_limb_t *device, int access);
02226 
02228 PLAYERC_EXPORT int playerc_limb_unsubscribe(playerc_limb_t *device);
02229 
02232 PLAYERC_EXPORT int playerc_limb_get_geom(playerc_limb_t *device);
02233 
02235 PLAYERC_EXPORT int playerc_limb_home_cmd(playerc_limb_t *device);
02236 
02238 PLAYERC_EXPORT int playerc_limb_stop_cmd(playerc_limb_t *device);
02239 
02241 PLAYERC_EXPORT int playerc_limb_setpose_cmd(playerc_limb_t *device, float pX, float pY, float pZ, float aX, float aY, float aZ, float oX, float oY, float oZ);
02242 
02245 PLAYERC_EXPORT int playerc_limb_setposition_cmd(playerc_limb_t *device, float pX, float pY, float pZ);
02246 
02249 PLAYERC_EXPORT int playerc_limb_vecmove_cmd(playerc_limb_t *device, float x, float y, float z, float length);
02250 
02254 PLAYERC_EXPORT int playerc_limb_power(playerc_limb_t *device, uint32_t enable);
02255 
02257 PLAYERC_EXPORT int playerc_limb_brakes(playerc_limb_t *device, uint32_t enable);
02258 
02260 PLAYERC_EXPORT int playerc_limb_speed_config(playerc_limb_t *device, float speed);
02261 
02263 /**************************************************************************/
02264 
02265 
02266 /***************************************************************************/
02283 typedef struct playerc_localize_particle
02284 {
02285   double pose[3];
02286   double weight;
02287 } playerc_localize_particle_t;
02288 
02289 
02291 typedef struct
02292 {
02294   playerc_device_t info;
02295 
02297   int map_size_x, map_size_y;
02298 
02300   double map_scale;
02301 
02303   int map_tile_x, map_tile_y;
02304 
02306   int8_t *map_cells;
02307 
02309   int pending_count;
02310 
02312   double pending_time;
02313 
02315   int hypoth_count;
02316   player_localize_hypoth_t *hypoths;
02317 
02318   double mean[3];
02319   double variance;
02320   int num_particles;
02321   playerc_localize_particle_t *particles;
02322 
02323 } playerc_localize_t;
02324 
02325 
02327 PLAYERC_EXPORT playerc_localize_t *playerc_localize_create(playerc_client_t *client, int index);
02328 
02330 PLAYERC_EXPORT void playerc_localize_destroy(playerc_localize_t *device);
02331 
02333 PLAYERC_EXPORT int playerc_localize_subscribe(playerc_localize_t *device, int access);
02334 
02336 PLAYERC_EXPORT int playerc_localize_unsubscribe(playerc_localize_t *device);
02337 
02339 PLAYERC_EXPORT int playerc_localize_set_pose(playerc_localize_t *device, double pose[3], double cov[6]);
02340 
02343 PLAYERC_EXPORT int playerc_localize_get_particles(playerc_localize_t *device);
02344 
02346 /**************************************************************************/
02347 
02348 
02349 /***************************************************************************/
02359 typedef struct
02360 {
02362   playerc_device_t info;
02363 
02366   int type;
02367 
02370   int state;
02371 } playerc_log_t;
02372 
02373 
02375 PLAYERC_EXPORT playerc_log_t *playerc_log_create(playerc_client_t *client, int index);
02376 
02378 PLAYERC_EXPORT void playerc_log_destroy(playerc_log_t *device);
02379 
02381 PLAYERC_EXPORT int playerc_log_subscribe(playerc_log_t *device, int access);
02382 
02384 PLAYERC_EXPORT int playerc_log_unsubscribe(playerc_log_t *device);
02385 
02387 PLAYERC_EXPORT int playerc_log_set_write_state(playerc_log_t* device, int state);
02388 
02390 PLAYERC_EXPORT int playerc_log_set_read_state(playerc_log_t* device, int state);
02391 
02393 PLAYERC_EXPORT int playerc_log_set_read_rewind(playerc_log_t* device);
02394 
02400 PLAYERC_EXPORT int playerc_log_get_state(playerc_log_t* device);
02401 
02403 PLAYERC_EXPORT int playerc_log_set_filename(playerc_log_t* device, const char* fname);
02404 
02405 
02409 /***************************************************************************/
02419 typedef struct
02420 {
02422   playerc_device_t info;
02423 
02425   double resolution;
02426 
02428   int width, height;
02429 
02431   double origin[2];
02432 
02434   int8_t data_range;
02435 
02437   char* cells;
02438  
02441   double vminx, vminy, vmaxx, vmaxy;
02442   int num_segments;
02443   player_segment_t* segments;
02444 } playerc_map_t;
02445 
02448 #define PLAYERC_MAP_INDEX(dev, i, j) ((dev->width) * (j) + (i))
02449 
02451 PLAYERC_EXPORT playerc_map_t *playerc_map_create(playerc_client_t *client, int index);
02452 
02454 PLAYERC_EXPORT void playerc_map_destroy(playerc_map_t *device);
02455 
02457 PLAYERC_EXPORT int playerc_map_subscribe(playerc_map_t *device, int access);
02458 
02460 PLAYERC_EXPORT int playerc_map_unsubscribe(playerc_map_t *device);
02461 
02463 PLAYERC_EXPORT int playerc_map_get_map(playerc_map_t* device);
02464 
02466 PLAYERC_EXPORT int playerc_map_get_vector(playerc_map_t* device);
02467 
02469 /**************************************************************************/
02470 
02479 typedef struct
02480 {
02482   playerc_device_t info;
02484   uint32_t srid;
02486   player_extent2d_t extent;
02488   uint32_t layers_count;
02490   player_vectormap_layer_data_t** layers_data;
02492   player_vectormap_layer_info_t** layers_info;
02494   playerwkbprocessor_t wkbprocessor;
02495 
02496 } playerc_vectormap_t;
02497 
02499 PLAYERC_EXPORT playerc_vectormap_t *playerc_vectormap_create(playerc_client_t *client, int index);
02500 
02502 PLAYERC_EXPORT void playerc_vectormap_destroy(playerc_vectormap_t *device);
02503 
02505 PLAYERC_EXPORT int playerc_vectormap_subscribe(playerc_vectormap_t *device, int access);
02506 
02508 PLAYERC_EXPORT int playerc_vectormap_unsubscribe(playerc_vectormap_t *device);
02509 
02511 PLAYERC_EXPORT int playerc_vectormap_get_map_info(playerc_vectormap_t* device);
02512 
02514 PLAYERC_EXPORT int playerc_vectormap_get_layer_data(playerc_vectormap_t *device, unsigned layer_index);
02515 
02517 PLAYERC_EXPORT int playerc_vectormap_write_layer(playerc_vectormap_t *device, const player_vectormap_layer_data_t * data);
02518 
02520 PLAYERC_EXPORT void playerc_vectormap_cleanup(playerc_vectormap_t *device);
02521 
02524 PLAYERC_EXPORT uint8_t * playerc_vectormap_get_feature_data(playerc_vectormap_t *device, unsigned layer_index, unsigned feature_index);
02525 PLAYERC_EXPORT size_t playerc_vectormap_get_feature_data_count(playerc_vectormap_t *device, unsigned layer_index, unsigned feature_index);
02526 
02529 /***************************************************************************/
02540 typedef struct
02541 {
02543   playerc_device_t info;
02544 
02546   int data_count;
02547 
02549   uint8_t *data;
02550 } playerc_opaque_t;
02551 
02553 PLAYERC_EXPORT playerc_opaque_t *playerc_opaque_create(playerc_client_t *client, int index);
02554 
02556 PLAYERC_EXPORT void playerc_opaque_destroy(playerc_opaque_t *device);
02557 
02559 PLAYERC_EXPORT int playerc_opaque_subscribe(playerc_opaque_t *device, int access);
02560 
02562 PLAYERC_EXPORT int playerc_opaque_unsubscribe(playerc_opaque_t *device);
02563 
02565 PLAYERC_EXPORT int playerc_opaque_cmd(playerc_opaque_t *device, player_opaque_data_t *data);
02566 
02573 PLAYERC_EXPORT int playerc_opaque_req(playerc_opaque_t *device, player_opaque_data_t *request, player_opaque_data_t **reply);
02574 
02576 /**************************************************************************/
02577 
02578 
02579 /***************************************************************************/
02589 typedef struct
02590 {
02592   playerc_device_t info;
02593 
02595   int path_valid;
02596 
02598   int path_done;
02599 
02601   double px, py, pa;
02602 
02604   double gx, gy, ga;
02605 
02607   double wx, wy, wa;
02608 
02612   int curr_waypoint;
02613 
02615   int waypoint_count;
02616 
02619   double (*waypoints)[3];
02620 
02621 } playerc_planner_t;
02622 
02624 PLAYERC_EXPORT playerc_planner_t *playerc_planner_create(playerc_client_t *client, int index);
02625 
02627 PLAYERC_EXPORT void playerc_planner_destroy(playerc_planner_t *device);
02628 
02630 PLAYERC_EXPORT int playerc_planner_subscribe(playerc_planner_t *device, int access);
02631 
02633 PLAYERC_EXPORT int playerc_planner_unsubscribe(playerc_planner_t *device);
02634 
02636 PLAYERC_EXPORT int playerc_planner_set_cmd_pose(playerc_planner_t *device,
02637                                   double gx, double gy, double ga);
02638 
02645 PLAYERC_EXPORT int playerc_planner_get_waypoints(playerc_planner_t *device);
02646 
02652 PLAYERC_EXPORT int playerc_planner_enable(playerc_planner_t *device, int state);
02653 
02655 /**************************************************************************/
02656 
02657 /***************************************************************************/
02668 typedef struct
02669 {
02671   playerc_device_t info;
02672 
02676   double pose[3];
02677   double size[2];
02678 
02680   double pos;
02681 
02683   double vel;
02684 
02686   int stall;
02687 
02699   int status;
02700 
02701 } playerc_position1d_t;
02702 
02704 PLAYERC_EXPORT playerc_position1d_t *playerc_position1d_create(playerc_client_t *client,
02705                                                 int index);
02706 
02708 PLAYERC_EXPORT void playerc_position1d_destroy(playerc_position1d_t *device);
02709 
02711 PLAYERC_EXPORT int playerc_position1d_subscribe(playerc_position1d_t *device, int access);
02712 
02714 PLAYERC_EXPORT int playerc_position1d_unsubscribe(playerc_position1d_t *device);
02715 
02717 PLAYERC_EXPORT int playerc_position1d_enable(playerc_position1d_t *device, int enable);
02718 
02721 PLAYERC_EXPORT int playerc_position1d_get_geom(playerc_position1d_t *device);
02722 
02724 PLAYERC_EXPORT int playerc_position1d_set_cmd_vel(playerc_position1d_t *device,
02725                                    double vel, int state);
02726 
02730 PLAYERC_EXPORT int playerc_position1d_set_cmd_pos(playerc_position1d_t *device,
02731                                    double pos, int state);
02732 
02737 PLAYERC_EXPORT int playerc_position1d_set_cmd_pos_with_vel(playerc_position1d_t *device,
02738                                             double pos, double vel, int state);
02739 
02741 PLAYERC_EXPORT int playerc_position1d_set_odom(playerc_position1d_t *device,
02742                                 double odom);
02743 
02745 /**************************************************************************/
02746 
02747 
02748 /***************************************************************************/
02762 typedef struct
02763 {
02765   playerc_device_t info;
02766 
02770   double pose[3];
02771   double size[2];
02772 
02774   double px, py, pa;
02775 
02777   double vx, vy, va;
02778 
02780   int stall;
02781 
02782 } playerc_position2d_t;
02783 
02785 PLAYERC_EXPORT playerc_position2d_t *playerc_position2d_create(playerc_client_t *client,
02786                                                 int index);
02787 
02789 PLAYERC_EXPORT void playerc_position2d_destroy(playerc_position2d_t *device);
02790 
02792 PLAYERC_EXPORT int playerc_position2d_subscribe(playerc_position2d_t *device, int access);
02793 
02795 PLAYERC_EXPORT int playerc_position2d_unsubscribe(playerc_position2d_t *device);
02796 
02798 PLAYERC_EXPORT int playerc_position2d_enable(playerc_position2d_t *device, int enable);
02799 
02802 PLAYERC_EXPORT int playerc_position2d_get_geom(playerc_position2d_t *device);
02803 
02808 PLAYERC_EXPORT int playerc_position2d_set_cmd_vel(playerc_position2d_t *device,
02809                                    double vx, double vy, double va, int state);
02810 
02812 PLAYERC_EXPORT int playerc_position2d_set_cmd_pose_with_vel(playerc_position2d_t *device,
02813                                              player_pose2d_t pos,
02814                                              player_pose2d_t vel,
02815                                              int state);
02816 
02821 PLAYERC_EXPORT int playerc_position2d_set_cmd_vel_head(playerc_position2d_t *device,
02822                                    double vx, double vy, double pa, int state);
02823 
02824 
02825 
02828 PLAYERC_EXPORT int playerc_position2d_set_cmd_pose(playerc_position2d_t *device,
02829                                     double gx, double gy, double ga, int state);
02830 
02832 PLAYERC_EXPORT int playerc_position2d_set_cmd_car(playerc_position2d_t *device,
02833                                     double vx, double a);
02834 
02836 PLAYERC_EXPORT int playerc_position2d_set_odom(playerc_position2d_t *device,
02837                                 double ox, double oy, double oa);
02838 
02840 /**************************************************************************/
02841 
02842 /***************************************************************************/
02857 typedef struct
02858 {
02860   playerc_device_t info;
02861 
02865   double pose[3];
02866   double size[2];
02867 
02869   double pos_x, pos_y, pos_z;
02870 
02872   double pos_roll, pos_pitch, pos_yaw;
02873 
02875   double vel_x, vel_y, vel_z;
02876 
02878   double vel_roll, vel_pitch, vel_yaw;
02879 
02881   int stall;
02882 
02883 } playerc_position3d_t;
02884 
02885 
02887 PLAYERC_EXPORT playerc_position3d_t *playerc_position3d_create(playerc_client_t *client,
02888                                                 int index);
02889 
02891 PLAYERC_EXPORT void playerc_position3d_destroy(playerc_position3d_t *device);
02892 
02894 PLAYERC_EXPORT int playerc_position3d_subscribe(playerc_position3d_t *device, int access);
02895 
02897 PLAYERC_EXPORT int playerc_position3d_unsubscribe(playerc_position3d_t *device);
02898 
02900 PLAYERC_EXPORT int playerc_position3d_enable(playerc_position3d_t *device, int enable);
02901 
02904 PLAYERC_EXPORT int playerc_position3d_get_geom(playerc_position3d_t *device);
02905 
02910 PLAYERC_EXPORT int playerc_position3d_set_velocity(playerc_position3d_t *device,
02911                                     double vx, double vy, double vz,
02912                                     double vr, double vp, double vt,
02913                                     int state);
02914 
02916 PLAYERC_EXPORT int playerc_position3d_set_speed(playerc_position3d_t *device,
02917                                  double vx, double vy, double vz, int state);
02918 
02921 PLAYERC_EXPORT int playerc_position3d_set_pose(playerc_position3d_t *device,
02922                                 double gx, double gy, double gz,
02923                                 double gr, double gp, double gt);
02924 
02925 
02927 PLAYERC_EXPORT int playerc_position3d_set_pose_with_vel(playerc_position3d_t *device,
02928                                          player_pose3d_t pos,
02929                                          player_pose3d_t vel);
02930 
02932 PLAYERC_EXPORT int playerc_position3d_set_cmd_pose(playerc_position3d_t *device,
02933                                     double gx, double gy, double gz);
02934 
02936 PLAYERC_EXPORT int playerc_position3d_set_vel_mode(playerc_position3d_t *device, int mode);
02937 
02939 PLAYERC_EXPORT int playerc_position3d_set_odom(playerc_position3d_t *device,
02940                                 double ox, double oy, double oz,
02941                                 double oroll, double opitch, double oyaw);
02942 
02944 PLAYERC_EXPORT int playerc_position3d_reset_odom(playerc_position3d_t *device);
02945 
02947 /**************************************************************************/
02948 
02949 
02950 /***************************************************************************/
02961 typedef struct
02962 {
02964   playerc_device_t info;
02965 
02968   int valid;
02969 
02971   double charge;
02972 
02974   double percent;
02975 
02977   double joules;
02978 
02981   double watts;
02982 
02984   int charging;
02985 
02986 } playerc_power_t;
02987 
02988 
02990 PLAYERC_EXPORT playerc_power_t *playerc_power_create(playerc_client_t *client, int index);
02991 
02993 PLAYERC_EXPORT void playerc_power_destroy(playerc_power_t *device);
02994 
02996 PLAYERC_EXPORT int playerc_power_subscribe(playerc_power_t *device, int access);
02997 
02999 PLAYERC_EXPORT int playerc_power_unsubscribe(playerc_power_t *device);
03000 
03001 
03003 /**************************************************************************/
03004 
03005 
03006 
03007 /***************************************************************************/
03018 typedef struct
03019 {
03021   playerc_device_t info;
03022 
03026   double pan, tilt;
03027 
03029   double zoom;
03030 
03032   int status;
03033 } playerc_ptz_t;
03034 
03035 
03037 PLAYERC_EXPORT playerc_ptz_t *playerc_ptz_create(playerc_client_t *client, int index);
03038 
03040 PLAYERC_EXPORT void playerc_ptz_destroy(playerc_ptz_t *device);
03041 
03043 PLAYERC_EXPORT int playerc_ptz_subscribe(playerc_ptz_t *device, int access);
03044 
03046 PLAYERC_EXPORT int playerc_ptz_unsubscribe(playerc_ptz_t *device);
03047 
03056 PLAYERC_EXPORT int playerc_ptz_set(playerc_ptz_t *device, double pan, double tilt, double zoom);
03057 
03063 PLAYERC_EXPORT int playerc_ptz_query_status(playerc_ptz_t *device);
03064 
03075 PLAYERC_EXPORT int playerc_ptz_set_ws(playerc_ptz_t *device, double pan, double tilt, double zoom,
03076                        double panspeed, double tiltspeed);
03077 
03085 PLAYERC_EXPORT int playerc_ptz_set_control_mode(playerc_ptz_t *device, int mode);
03086 
03088 /**************************************************************************/
03089 
03090 /***************************************************************************/
03100 typedef struct
03101 {
03103   playerc_device_t info;
03104 
03106   uint32_t element_count;
03107 
03109   double min_angle;
03111   double max_angle;
03113   double angular_res;
03116   double min_range;
03118   double max_range;
03120   double range_res;
03122   double frequency;
03123 
03127   player_pose3d_t device_pose;
03128   player_bbox3d_t device_size;
03132   player_pose3d_t *element_poses;
03133   player_bbox3d_t *element_sizes;
03134 
03136   uint32_t ranges_count;
03138   double *ranges;
03139 
03141   uint32_t intensities_count;
03145   double *intensities;
03146 
03148   uint32_t bearings_count;
03151   double *bearings;
03152 
03154   uint32_t points_count;
03156   player_point_3d_t *points;
03157 
03158 } playerc_ranger_t;
03159 
03161 PLAYERC_EXPORT playerc_ranger_t *playerc_ranger_create(playerc_client_t *client, int index);
03162 
03164 PLAYERC_EXPORT void playerc_ranger_destroy(playerc_ranger_t *device);
03165 
03167 PLAYERC_EXPORT int playerc_ranger_subscribe(playerc_ranger_t *device, int access);
03168 
03170 PLAYERC_EXPORT int playerc_ranger_unsubscribe(playerc_ranger_t *device);
03171 
03176 PLAYERC_EXPORT int playerc_ranger_get_geom(playerc_ranger_t *device);
03177 
03182 PLAYERC_EXPORT int playerc_ranger_power_config(playerc_ranger_t *device, uint8_t value);
03183 
03188 PLAYERC_EXPORT int playerc_ranger_intns_config(playerc_ranger_t *device, uint8_t value);
03189 
03200 PLAYERC_EXPORT int playerc_ranger_set_config(playerc_ranger_t *device, double min_angle,
03201                               double max_angle, double angular_res,
03202                               double min_range, double max_range,
03203                               double range_res, double frequency);
03204 
03215 PLAYERC_EXPORT int playerc_ranger_get_config(playerc_ranger_t *device, double *min_angle,
03216                               double *max_angle, double *angular_res,
03217                               double *min_range, double *max_range,
03218                               double *range_res, double *frequency);
03219 
03221 /**************************************************************************/
03222 
03223 /***************************************************************************/
03234 typedef struct
03235 {
03237   playerc_device_t info;
03238 
03240   int pose_count;
03241 
03244   player_pose3d_t *poses;
03245 
03247   int scan_count;
03248 
03250   double *scan;
03251 
03252 } playerc_sonar_t;
03253 
03254 
03256 PLAYERC_EXPORT playerc_sonar_t *playerc_sonar_create(playerc_client_t *client, int index);
03257 
03259 PLAYERC_EXPORT void playerc_sonar_destroy(playerc_sonar_t *device);
03260 
03262 PLAYERC_EXPORT int playerc_sonar_subscribe(playerc_sonar_t *device, int access);
03263 
03265 PLAYERC_EXPORT int playerc_sonar_unsubscribe(playerc_sonar_t *device);
03266 
03272 PLAYERC_EXPORT int playerc_sonar_get_geom(playerc_sonar_t *device);
03273 
03275 /**************************************************************************/
03276 
03277 /***************************************************************************/
03289 typedef struct
03290 {
03292   uint8_t mac[32];
03293 
03295   uint8_t ip[32];
03296 
03298   uint8_t essid[32];
03299 
03301   int mode;
03302 
03304   int encrypt;
03305 
03307   double freq;
03308 
03310   int qual, level, noise;
03311 
03312 } playerc_wifi_link_t;
03313 
03314 
03316 typedef struct
03317 {
03319   playerc_device_t info;
03320 
03322   playerc_wifi_link_t *links;
03323   int link_count;
03324   char ip[32];
03325 } playerc_wifi_t;
03326 
03327 
03329 PLAYERC_EXPORT playerc_wifi_t *playerc_wifi_create(playerc_client_t *client, int index);
03330 
03332 PLAYERC_EXPORT void playerc_wifi_destroy(playerc_wifi_t *device);
03333 
03335 PLAYERC_EXPORT int playerc_wifi_subscribe(playerc_wifi_t *device, int access);
03336 
03338 PLAYERC_EXPORT int playerc_wifi_unsubscribe(playerc_wifi_t *device);
03339 
03341 PLAYERC_EXPORT playerc_wifi_link_t *playerc_wifi_get_link(playerc_wifi_t *device, int link);
03342 
03343 
03345 /**************************************************************************/
03346 
03347 /***************************************************************************/
03359 typedef struct
03360 {
03362   playerc_device_t info;
03363 
03364 } playerc_simulation_t;
03365 
03366 
03368 PLAYERC_EXPORT playerc_simulation_t *playerc_simulation_create(playerc_client_t *client, int index);
03369 
03371 PLAYERC_EXPORT void playerc_simulation_destroy(playerc_simulation_t *device);
03372 
03374 PLAYERC_EXPORT int playerc_simulation_subscribe(playerc_simulation_t *device, int access);
03375 
03377 PLAYERC_EXPORT int playerc_simulation_unsubscribe(playerc_simulation_t *device);
03378 
03380 PLAYERC_EXPORT int playerc_simulation_set_pose2d(playerc_simulation_t *device, char* name,
03381                                   double gx, double gy, double ga);
03382 
03384 PLAYERC_EXPORT int playerc_simulation_get_pose2d(playerc_simulation_t *device, char* identifier,
03385                                   double *x, double *y, double *a);
03386 
03388 PLAYERC_EXPORT int playerc_simulation_set_pose3d(playerc_simulation_t *device, char* name,
03389                                   double gx, double gy, double gz,
03390                                   double groll, double gpitch, double gyaw);
03391 
03393 PLAYERC_EXPORT int playerc_simulation_get_pose3d(playerc_simulation_t *device, char* identifier,
03394                                   double *x, double *y, double *z,
03395                                   double *roll, double *pitch, double *yaw, double *time);
03396 
03398 PLAYERC_EXPORT int playerc_simulation_set_property(playerc_simulation_t *device,
03399                                     char* name,
03400                                     char* property,
03401                                     void* value,
03402                                     size_t value_len);
03403 
03405 PLAYERC_EXPORT int playerc_simulation_get_property(playerc_simulation_t *device,
03406                                     char* name,
03407                                     char* property,
03408                                     void* value,
03409                                     size_t value_len);
03410 
03412 PLAYERC_EXPORT int playerc_simulation_pause(playerc_simulation_t *device );
03413 
03415 PLAYERC_EXPORT int playerc_simulation_reset(playerc_simulation_t *device );
03416 
03418 PLAYERC_EXPORT int playerc_simulation_save(playerc_simulation_t *device );
03419 
03420 
03422 /***************************************************************************/
03423 
03424 
03425 /**************************************************************************/
03435 typedef struct
03436 {
03438   playerc_device_t info;
03439 } playerc_speech_t;
03440 
03441 
03443 PLAYERC_EXPORT playerc_speech_t *playerc_speech_create(playerc_client_t *client, int index);
03444 
03446 PLAYERC_EXPORT void playerc_speech_destroy(playerc_speech_t *device);
03447 
03449 PLAYERC_EXPORT int playerc_speech_subscribe(playerc_speech_t *device, int access);
03450 
03452 PLAYERC_EXPORT int playerc_speech_unsubscribe(playerc_speech_t *device);
03453 
03455 PLAYERC_EXPORT int playerc_speech_say (playerc_speech_t *device, char *);
03456 
03457 
03459 /***************************************************************************/
03460 
03461 /**************************************************************************/
03471 typedef struct
03472 {
03474   playerc_device_t info;
03475 
03476   char *rawText;
03477   /* Just estimating that no more than 20 words will be spoken between updates.
03478    Assuming that the longest word is <= 30 characters.*/
03479   char **words;
03480   int wordCount;
03481 } playerc_speechrecognition_t;
03482 
03483 
03485 PLAYERC_EXPORT playerc_speechrecognition_t *playerc_speechrecognition_create(playerc_client_t *client, int index);
03486 
03488 PLAYERC_EXPORT void playerc_speechrecognition_destroy(playerc_speechrecognition_t *device);
03489 
03491 PLAYERC_EXPORT int playerc_speechrecognition_subscribe(playerc_speechrecognition_t *device, int access);
03492 
03494 PLAYERC_EXPORT int playerc_speechrecognition_unsubscribe(playerc_speechrecognition_t *device);
03495 
03497 /***************************************************************************/
03498 
03499 /**************************************************************************/
03509 typedef struct
03510 {
03512     uint32_t type;
03514     uint32_t guid_count;
03516     uint8_t *guid;
03517 }  playerc_rfidtag_t;
03518 
03520 typedef struct
03521 {
03523   playerc_device_t info;
03524 
03526   uint16_t tags_count;
03527 
03529   playerc_rfidtag_t *tags;
03530 } playerc_rfid_t;
03531 
03532 
03534 PLAYERC_EXPORT playerc_rfid_t *playerc_rfid_create(playerc_client_t *client, int index);
03535 
03537 PLAYERC_EXPORT void playerc_rfid_destroy(playerc_rfid_t *device);
03538 
03540 PLAYERC_EXPORT int playerc_rfid_subscribe(playerc_rfid_t *device, int access);
03541 
03543 PLAYERC_EXPORT int playerc_rfid_unsubscribe(playerc_rfid_t *device);
03544 
03546 /***************************************************************************/
03547 
03548 /**************************************************************************/
03558 typedef player_pointcloud3d_element_t playerc_pointcloud3d_element_t;
03559 
03561 typedef struct
03562 {
03564   playerc_device_t info;
03565 
03567   uint16_t points_count;
03568 
03570   playerc_pointcloud3d_element_t *points;
03571 } playerc_pointcloud3d_t;
03572 
03573 
03575 PLAYERC_EXPORT playerc_pointcloud3d_t *playerc_pointcloud3d_create (playerc_client_t *client, int index);
03576 
03578 PLAYERC_EXPORT void playerc_pointcloud3d_destroy (playerc_pointcloud3d_t *device);
03579 
03581 PLAYERC_EXPORT int playerc_pointcloud3d_subscribe (playerc_pointcloud3d_t *device, int access);
03582 
03584 PLAYERC_EXPORT int playerc_pointcloud3d_unsubscribe (playerc_pointcloud3d_t *device);
03585 
03587 /***************************************************************************/
03588 
03589 /**************************************************************************/
03598 typedef player_pointcloud3d_stereo_element_t playerc_pointcloud3d_stereo_element_t;
03599 
03601 typedef struct
03602 {
03604   playerc_device_t info;
03605 
03606   /* Left channel image */
03607   playerc_camera_t left_channel;
03608   /* Right channel image */
03609   playerc_camera_t right_channel;
03610 
03611   /* Disparity image */
03612   playerc_camera_t disparity;
03613   
03614   /* 3-D stereo point cloud */
03615   uint32_t points_count;
03616   playerc_pointcloud3d_stereo_element_t *points;
03617 //  player_pointcloud3d_data_t pointcloud;
03618 } playerc_stereo_t;
03619 
03620 
03622 PLAYERC_EXPORT playerc_stereo_t *playerc_stereo_create (playerc_client_t *client, int index);
03623 
03625 PLAYERC_EXPORT void playerc_stereo_destroy (playerc_stereo_t *device);
03626 
03628 PLAYERC_EXPORT int playerc_stereo_subscribe (playerc_stereo_t *device, int access);
03629 
03631 PLAYERC_EXPORT int playerc_stereo_unsubscribe (playerc_stereo_t *device);
03632 
03634 /***************************************************************************/
03635 
03636 /**************************************************************************/
03646 typedef struct
03647 {
03649     playerc_device_t info;
03650 
03652     player_pose3d_t pose;
03653         player_pose3d_t vel;
03654         player_pose3d_t acc;
03655 
03657     player_imu_data_calib_t calib_data;
03658 
03660     float q0, q1, q2, q3;
03661 } playerc_imu_t;
03662 
03664 PLAYERC_EXPORT playerc_imu_t *playerc_imu_create (playerc_client_t *client, int index);
03665 
03667 PLAYERC_EXPORT void playerc_imu_destroy (playerc_imu_t *device);
03668 
03670 PLAYERC_EXPORT int playerc_imu_subscribe (playerc_imu_t *device, int access);
03671 
03673 PLAYERC_EXPORT int playerc_imu_unsubscribe (playerc_imu_t *device);
03674 
03676 PLAYERC_EXPORT int playerc_imu_datatype (playerc_imu_t *device, int value);
03677 
03679 PLAYERC_EXPORT int playerc_imu_reset_orientation (playerc_imu_t *device, int value);
03680 
03682 /***************************************************************************/
03683 
03684 /**************************************************************************/
03697 typedef struct
03698 {
03700     playerc_device_t info;
03701 
03703     uint32_t node_type;
03705     uint32_t node_id;
03707     uint32_t node_parent_id;
03709     player_wsn_node_data_t data_packet;
03710 } playerc_wsn_t;
03711 
03712 
03714 PLAYERC_EXPORT playerc_wsn_t *playerc_wsn_create(playerc_client_t *client, int index);
03715 
03717 PLAYERC_EXPORT void playerc_wsn_destroy(playerc_wsn_t *device);
03718 
03720 PLAYERC_EXPORT int playerc_wsn_subscribe(playerc_wsn_t *device, int access);
03721 
03723 PLAYERC_EXPORT int playerc_wsn_unsubscribe(playerc_wsn_t *device);
03724 
03726 PLAYERC_EXPORT int playerc_wsn_set_devstate(playerc_wsn_t *device, int node_id,
03727                              int group_id, int devnr, int state);
03728 
03730 PLAYERC_EXPORT int playerc_wsn_power(playerc_wsn_t *device, int node_id, int group_id,
03731                       int value);
03732 
03734 PLAYERC_EXPORT int playerc_wsn_datatype(playerc_wsn_t *device, int value);
03735 
03737 PLAYERC_EXPORT int playerc_wsn_datafreq(playerc_wsn_t *device, int node_id, int group_id,
03738                          double frequency);
03739 
03741 /***************************************************************************/
03742 
03743 #ifdef __cplusplus
03744 }
03745 #endif
03746 
03747 #endif