Update of /cvsroot/playerstage/code/player/server/drivers/mixed/reb
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30199/server/drivers/mixed/reb

Modified Files:
        reb.cc 
Log Message:
overhaul of the player interface definitions
interfaces are now defined with a very light weight IDL allowing them to be 
edited in a single file
some subtype names were also modified as a side effect, making them more 
consistent globally


Index: reb.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/reb/reb.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** reb.cc      23 Feb 2006 18:54:55 -0000      1.13
--- reb.cc      20 Aug 2007 06:37:29 -0000      1.14
***************
*** 109,124 ****
  
  - The @ref interface_position2d interface supports:
!   - PLAYER_POSITION_GET_GEOM_REQ
!   - PLAYER_POSITION_MOTOR_POWER_REQ
!   - PLAYER_POSITION_VELOCITY_MODE_REQ
!   - PLAYER_POSITION_RESET_ODOM_REQ
!   - PLAYER_POSITION_POSITION_MODE_REQ
!   - PLAYER_POSITION_SET_ODOM_REQ
!   - PLAYER_POSITION_SPEED_PID_REQ
!   - PLAYER_POSITION_POSITION_PID_REQ
!   - PLAYER_POSITION_SPEED_PROF_REQ
  - The @ref interface_ir interface supports:
!   - PLAYER_IR_POWER_REQ
!   - PLAYER_IR_POSE_REQ
  
  @par Configuration file options
--- 109,124 ----
  
  - The @ref interface_position2d interface supports:
!   - PLAYER_POSITION2D_REQ_GET_GEOM
!   - PLAYER_POSITION2D_REQ_MOTOR_POWER
!   - PLAYER_POSITION2D_REQ_VELOCITY_MODE
!   - PLAYER_POSITION2D_REQ_RESET_ODOM
!   - PLAYER_POSITION2D_REQ_POSITION_MODE
!   - PLAYER_POSITION2D_REQ_SET_ODOM
!   - PLAYER_POSITION2D_REQ_SPEED_PID
!   - PLAYER_POSITION2D_REQ_POSITION_PID
!   - PLAYER_POSITION2D_REQ_SPEED_PROF
  - The @ref interface_ir interface supports:
!   - PLAYER_IR_REQ_POWER
!   - PLAYER_IR_REQ_POSE
  
  @par Configuration file options
***************
*** 222,226 ****
    // Do we create a robot position interface?
    if(cf->ReadDeviceId(&(this->position_id), section, "provides", 
!                       PLAYER_POSITION_CODE, -1, NULL) == 0)
    {
      if(this->AddInterface(this->position_id, PLAYER_ALL_MODE) != 0)
--- 222,226 ----
    // Do we create a robot position interface?
    if(cf->ReadDeviceId(&(this->position_id), section, "provides", 
!                       PLAYER_POSITION2D_CODE, -1, NULL) == 0)
    {
      if(this->AddInterface(this->position_id, PLAYER_ALL_MODE) != 0)
***************
*** 376,380 ****
      switch(id.code)
      {
!       case PLAYER_POSITION_CODE:
          this->position_subscriptions++;
          break;
--- 376,380 ----
      switch(id.code)
      {
!       case PLAYER_POSITION2D_CODE:
          this->position_subscriptions++;
          break;
***************
*** 399,403 ****
      switch(id.code)
      {
!       case PLAYER_POSITION_CODE:
          assert(--this->position_subscriptions >= 0);
          break;
--- 399,403 ----
      switch(id.code)
      {
!       case PLAYER_POSITION2D_CODE:
          assert(--this->position_subscriptions >= 0);
          break;
***************
*** 751,755 ****
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_IR_POWER, ir_id))
    {
        assert(hdr->size == sizeof(player_ir_power_req_t));
--- 751,755 ----
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_IR_REQ_POWER, ir_id))
    {
        assert(hdr->size == sizeof(player_ir_power_req_t));
***************
*** 765,769 ****
    }
    
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_IR_POSE, ir_id))
    {
        assert(*resp_len >= sizeof(player_ir_pose_t));
--- 765,769 ----
    }
    
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_IR_REQ_POSE, ir_id))
    {
        assert(*resp_len >= sizeof(player_ir_pose_t));
***************
*** 783,787 ****
    }
    
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_GET_GEOM, 
position_id))
    {
  /*    assert(hdr->size == sizeof(player_position_geom_t));
--- 783,787 ----
    }
    
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER2D_POSITION_REQ_GET_GEOM, 
position_id))
    {
  /*    assert(hdr->size == sizeof(player_position_geom_t));
***************
*** 800,804 ****
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_MOTOR_POWER, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_power_config_t));
--- 800,804 ----
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_MOTOR_POWER, position_id))
    {
        assert(hdr->size == sizeof(player_position_power_config_t));
***************
*** 818,822 ****
            // 0 for direct velocity control (trans and rot applied directly)
            // 1 for builtin velocity based heading PD controller
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_VELOCITY_MODE, 
position_id))
    {
      assert(hdr->size == sizeof(player_position_velocitymode_config_t));
--- 818,822 ----
            // 0 for direct velocity control (trans and rot applied directly)
            // 1 for builtin velocity based heading PD controller
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_VELOCITY_MODE, position_id))
    {
      assert(hdr->size == sizeof(player_position_velocitymode_config_t));
***************
*** 836,840 ****
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_RESET_ODOM, 
position_id))
    {
      SetOdometry(0,0,0);
--- 836,840 ----
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION2D_REQ_RESET_ODOM, 
position_id))
    {
      SetOdometry(0,0,0);
***************
*** 844,848 ****
    }
    
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_POSITION_MODE, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_position_mode_req_t));
--- 844,848 ----
    }
    
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_POSITION_MODE, position_id))
    {
        assert(hdr->size == sizeof(player_position_position_mode_req_t));
***************
*** 859,863 ****
    }
            
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_SET_ODOM, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_set_odom_req_t));
--- 859,863 ----
    }
            
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION2D_REQ_SET_ODOM, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_set_odom_req_t));
***************
*** 879,883 ****
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_SPEED_PID, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_speed_pid_req_t));
--- 879,883 ----
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION2D_REQ_SPEED_PID, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_speed_pid_req_t));
***************
*** 899,903 ****
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_POSITION_PID, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_position_pid_req_t));
--- 899,903 ----
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_POSITION2D_REQ_POSITION_PID, position_id))
    {
        assert(hdr->size == sizeof(player_position_position_pid_req_t));
***************
*** 919,923 ****
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION_SPEED_PROF, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_speed_prof_req_t));
--- 919,923 ----
    }
  
!   if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_POSITION2D_REQ_SPEED_PROF, 
position_id))
    {
        assert(hdr->size == sizeof(player_position_speed_prof_req_t));
***************
*** 988,992 ****
      switch(config_buffer[0]) 
      {
!       case PLAYER_IR_POWER_REQ: 
          {
            // request to change IR state
--- 988,992 ----
      switch(config_buffer[0]) 
      {
!       case PLAYER_IR_REQ_POWER: 
          {
            // request to change IR state
***************
*** 1017,1021 ****
          break;
        
!       case PLAYER_IR_POSE_REQ: 
          {
            // request the pose of the IR sensors in robot-centric coords
--- 1017,1021 ----
          break;
        
!       case PLAYER_IR_REQ_POSE: 
          {
            // request the pose of the IR sensors in robot-centric coords
***************
*** 1069,1073 ****
      switch (config_buffer[0]) 
      {
!       case PLAYER_POSITION_GET_GEOM_REQ: 
          {
            // get geometry of robot
--- 1069,1073 ----
      switch (config_buffer[0]) 
      {
!       case PLAYER_POSITION2D_REQ_GET_GEOM: 
          {
            // get geometry of robot
***************
*** 1086,1090 ****
  
            player_position_geom_t geom;
!           geom.subtype = PLAYER_POSITION_GET_GEOM_REQ;
            geom.pose[0] = htons(0);
            geom.pose[1] = htons(0);
--- 1086,1090 ----
  
            player_position_geom_t geom;
!           geom.subtype = PLAYER_POSITION2D_REQ_GET_GEOM;
            geom.pose[0] = htons(0);
            geom.pose[1] = htons(0);
***************
*** 1099,1103 ****
          break;
  
!       case PLAYER_POSITION_MOTOR_POWER_REQ: 
          {
            // change motor state
--- 1099,1103 ----
          break;
  
!       case PLAYER_POSITION2D_REQ_MOTOR_POWER: 
          {
            // change motor state
***************
*** 1133,1137 ****
          break;
  
!       case PLAYER_POSITION_VELOCITY_MODE_REQ: 
          {
            // select method of velocity control
--- 1133,1137 ----
          break;
  
!       case PLAYER_POSITION2D_REQ_VELOCITY_MODE: 
          {
            // select method of velocity control
***************
*** 1169,1173 ****
          break;
  
!       case PLAYER_POSITION_RESET_ODOM_REQ: 
          {
            // reset the odometry
--- 1169,1173 ----
          break;
  
!       case PLAYER_POSITION2D_REQ_RESET_ODOM: 
          {
            // reset the odometry
***************
*** 1193,1197 ****
          break;
        
!       case PLAYER_POSITION_POSITION_MODE_REQ: 
          {
            // select velocity or position mode
--- 1193,1197 ----
          break;
        
!       case PLAYER_POSITION2D_REQ_POSITION_MODE: 
          {
            // select velocity or position mode
***************
*** 1224,1228 ****
          break;
  
!       case PLAYER_POSITION_SET_ODOM_REQ: 
          {
            // set the odometry to a given position
--- 1224,1228 ----
          break;
  
!       case PLAYER_POSITION2D_REQ_SET_ODOM: 
          {
            // set the odometry to a given position
***************
*** 1257,1261 ****
          break;
  
!       case PLAYER_POSITION_SPEED_PID_REQ: 
          {
            // set up the velocity PID on the REB
--- 1257,1261 ----
          break;
  
!       case PLAYER_POSITION2D_REQ_SPEED_PID: 
          {
            // set up the velocity PID on the REB
***************
*** 1289,1293 ****
          break;
        
!       case PLAYER_POSITION_POSITION_PID_REQ: 
          {
            // set up the position PID on the REB
--- 1289,1293 ----
          break;
        
!       case PLAYER_POSITION2D_REQ_POSITION_PID: 
          {
            // set up the position PID on the REB
***************
*** 1321,1325 ****
          break;
  
!       case PLAYER_POSITION_SPEED_PROF_REQ: 
          {
            // set the speed profile for position mode 
--- 1321,1325 ----
          break;
  
!       case PLAYER_POSITION2D_REQ_SPEED_PROF: 
          {
            // set the speed profile for position mode 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to