Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9318/client_libs/libplayerc

Modified Files:
        dev_simulation.c dev_speech_recognition.c playerc.h 
Log Message:
several changes to make Python bindings work

Index: dev_simulation.c
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_simulation.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** dev_simulation.c    19 Aug 2006 01:17:53 -0000      1.11
--- dev_simulation.c    21 Sep 2006 05:07:06 -0000      1.12
***************
*** 155,161 ****
    req.name_count = strlen(req.name) + 1;
    
!   strncpy(req.property, property, PLAYER_SIMULATION_IDENTIFIER_MAXLEN);
!   req.property[PLAYER_SIMULATION_IDENTIFIER_MAXLEN-1]='\0';
!   req.property_count = strlen(req.property) + 1;
  
    if( value_len > PLAYER_SIMULATION_PROPERTY_DATA_MAXLEN )
--- 155,161 ----
    req.name_count = strlen(req.name) + 1;
    
!   strncpy(req.prop, property, PLAYER_SIMULATION_IDENTIFIER_MAXLEN);
!   req.prop[PLAYER_SIMULATION_IDENTIFIER_MAXLEN-1]='\0';
!   req.prop_count = strlen(req.prop) + 1;
  
    if( value_len > PLAYER_SIMULATION_PROPERTY_DATA_MAXLEN )

Index: dev_speech_recognition.c
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc/dev_speech_recognition.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** dev_speech_recognition.c    3 Aug 2006 05:30:49 -0000       1.1
--- dev_speech_recognition.c    21 Sep 2006 05:07:06 -0000      1.2
***************
*** 8,20 ****
  
  // Local declarations
! void playerc_speech_recognition_putmsg(playerc_speech_recognition_t *device, 
player_msghdr_t *header,player_speech_recognition_data_t *data, size_t len);
  
  // Create a new speech_recognition proxy
! playerc_speech_recognition_t 
*playerc_speech_recognition_create(playerc_client_t *client, int index)
  {
!   playerc_speech_recognition_t *device;
  
!   device = malloc(sizeof(playerc_speech_recognition_t));
!   memset(device, 0, sizeof(playerc_speech_recognition_t));
    playerc_device_init(&device->info, client, PLAYER_SPEECH_RECOGNITION_CODE, 
index,
                        (playerc_putmsg_fn_t) 
playerc_speech_recognition_putmsg);
--- 8,20 ----
  
  // Local declarations
! void playerc_speech_recognition_putmsg(playerc_speechrecognition_t *device, 
player_msghdr_t *header,player_speech_recognition_data_t *data, size_t len);
  
  // Create a new speech_recognition proxy
! playerc_speechrecognition_t 
*playerc_speechrecognition_create(playerc_client_t *client, int index)
  {
!   playerc_speechrecognition_t *device;
  
!   device = malloc(sizeof(playerc_speechrecognition_t));
!   memset(device, 0, sizeof(playerc_speechrecognition_t));
    playerc_device_init(&device->info, client, PLAYER_SPEECH_RECOGNITION_CODE, 
index,
                        (playerc_putmsg_fn_t) 
playerc_speech_recognition_putmsg);
***************
*** 24,28 ****
  
  // Destroy a speech_recognition proxy
! void playerc_speech_recognition_destroy(playerc_speech_recognition_t *device)
  {
    playerc_device_term(&device->info);
--- 24,28 ----
  
  // Destroy a speech_recognition proxy
! void playerc_speechrecognition_destroy(playerc_speechrecognition_t *device)
  {
    playerc_device_term(&device->info);
***************
*** 32,36 ****
  
  // Subscribe to the speech_recognition device
! int playerc_speech_recognition_subscribe(playerc_speech_recognition_t 
*device, int access)
  {
    return playerc_device_subscribe(&device->info, access);
--- 32,36 ----
  
  // Subscribe to the speech_recognition device
! int playerc_speechrecognition_subscribe(playerc_speechrecognition_t *device, 
int access)
  {
    return playerc_device_subscribe(&device->info, access);
***************
*** 38,47 ****
  
  // Un-subscribe from the speech_recognition device
! int playerc_speech_recognition_unsubscribe(playerc_speech_recognition_t 
*device)
  {
    return playerc_device_unsubscribe(&device->info);
  }
  
! void playerc_speech_recognition_putmsg(playerc_speech_recognition_t *device, 
player_msghdr_t *hdr, player_speech_recognition_data_t *buffer, size_t len)
  {
    memset(device->words,0,30*20);
--- 38,47 ----
  
  // Un-subscribe from the speech_recognition device
! int playerc_speechrecognition_unsubscribe(playerc_speechrecognition_t *device)
  {
    return playerc_device_unsubscribe(&device->info);
  }
  
! void playerc_speech_recognition_putmsg(playerc_speechrecognition_t *device, 
player_msghdr_t *hdr, player_speech_recognition_data_t *buffer, size_t len)
  {
    memset(device->words,0,30*20);

Index: playerc.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.208
retrieving revision 1.209
diff -C2 -d -r1.208 -r1.209
*** playerc.h   13 Sep 2006 18:40:16 -0000      1.208
--- playerc.h   21 Sep 2006 05:07:06 -0000      1.209
***************
*** 2765,2786 ****
            double *x, double *y, double *a);
  
! /** @brief Set the value of a named integer property of a named
!     simulation object */
! int playerc_simulation_set_property_int(playerc_simulation_t *device,
!                                       char* name,
!                                       char* property,
!                                       int value );
! /** @brief Set the value of a named floating point property of a named
!     simulation object */
! int playerc_simulation_set_property_double(playerc_simulation_t *device,
!                                          char* name,
!                                          char* property,
!                                          double value );
! /** @brief Set the value of a named string property of a named
!     simulation object */
! int playerc_simulation_set_property_string(playerc_simulation_t *device,
!                                          char* name,
!                                          char* property,
!                                          char* value );
  /** @} */
  /***************************************************************************/
--- 2765,2774 ----
            double *x, double *y, double *a);
  
! /** @brief Set a property value */
! int playerc_simulation_set_property(playerc_simulation_t *device, 
!                                     char* name,
!                                     char* property,
!                                     void* value,
!                                   size_t value_len);
  /** @} */
  /***************************************************************************/
***************
*** 2843,2860 ****
    char words[20][30];
    int wordCount;
! } playerc_speech_recognition_t;
  
  
  /** Create a speech recognition proxy. */
! playerc_speech_recognition_t 
*playerc_speech_recognition_create(playerc_client_t *client, int index);
  
  /** Destroy a speech recognition proxy. */
! void playerc_speech_recognition_destroy(playerc_speech_recognition_t *device);
  
  /** Subscribe to the speech recognition device. */
! int playerc_speech_recognition_subscribe(playerc_speech_recognition_t 
*device, int access);
  
  /** Un-subscribe from the speech recognition device */
! int playerc_speech_recognition_unsubscribe(playerc_speech_recognition_t 
*device);
  
  /** @} */
--- 2831,2848 ----
    char words[20][30];
    int wordCount;
! } playerc_speechrecognition_t;
  
  
  /** Create a speech recognition proxy. */
! playerc_speechrecognition_t 
*playerc_speechrecognition_create(playerc_client_t *client, int index);
  
  /** Destroy a speech recognition proxy. */
! void playerc_speechrecognition_destroy(playerc_speechrecognition_t *device);
  
  /** Subscribe to the speech recognition device. */
! int playerc_speechrecognition_subscribe(playerc_speechrecognition_t *device, 
int access);
  
  /** Un-subscribe from the speech recognition device */
! int playerc_speechrecognition_unsubscribe(playerc_speechrecognition_t 
*device);
  
  /** @} */


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to