locked
TryPostOperation. Queue limit exceeded problem. Generic Differential Drive MS-RDS 2008 R3 RRS feed

  • Question

  • I am using the 

    What can be the reason of this warning and how can I avoid it?

    ### DsspForwarder:DsspReqRspForwarder.TryPostOperation. Queue limit exceeded, discarding inbound operation. Operation type: Microsoft.Robotics.Services.Encoder.UpdateTickCount. Service:dssp.tcp://:50001/drivedifferentialtwowheel/fa9899b7-f410-417e-9be1-815dd35edceaCategory StdOut 
    Level q1:None 
    Time 2011-01-13T16:14:19.3604+01:00 
    Subject ### DsspForwarder:DsspReqRspForwarder.TryPostOperation. Queue limit exceeded, discarding inbound operation. Operation type: Microsoft.Robotics.Services.Encoder.UpdateTickCount. Service:dssp.tcp://:50001/drivedifferentialtwowheel/fa9899b7-f410-417e-9be1-815dd35edcea 
    Source 
    CodeSite 
    

    cvl-ft
    Thursday, January 13, 2011 9:20 PM

Answers

  • Hmm. Thanks for the feedback. I will pass it on to the developers.

    Trevor

     

    • Marked as answer by cvl-ft Saturday, April 2, 2011 1:02 PM
    Monday, January 31, 2011 2:08 AM
  • There is also a problem in relation with the "Wait for Drive Completion"
    Because of this, the standard example will not function either.
    I resolve this some houres ago. I will send you the simple solution by e-mail later today.
    cvl-ft
    • Marked as answer by cvl-ft Saturday, April 2, 2011 1:02 PM
    Monday, January 31, 2011 7:39 AM

All replies

  • Did you reset the encoder? I think this message indicates that the drive service does not have a handler for encoder updates.

    Trevor

     

    Sunday, January 16, 2011 4:04 AM
  • My Generic Encoder implementation is based on the FT16 Encoder example.
    Al the requiered actions are implemented (see the Generic encoder description in the MSDN)
    Hereby a copy of the reset handler. The reset works.

    After the 5the time that the Generic Drive calls this reset, the TRyPost message starts. (With or without the additional notification.)

     

      /// <summary>
      /// Resets the encoder's tick count or indicates a change to the encoder's tick count.
      /// Must send a notification
      /// </summary>
      /// <param name="reset"></param>
      /// <returns></returns>
      [ServiceHandler(ServiceHandlerBehavior.Exclusive)]
      public IEnumerator<ITask> ResetHandler(encoder.Reset reset)
      {
       _state.TicksSinceReset = 0;
       _state.TimeStamp = DateTime.UtcNow;
       
       //Reset also the hardware counter on the interface; <br/>   // the encoder is using a copy of this counter.
       fttx.ResetCounterRequest request = new fttx.ResetCounterRequest();
       LogInfo("FtTxEncoder#ResetHandler :" + request.CounterID);
       request.CounterID = ((fttx.TXCdef.BinputID)_state.HardwareIdentifier).ToString();
    
       yield return Arbiter.Choice(
        _fttxPort.ResetCounter(request),
        delegate(DefaultUpdateResponseType ret)
        {
        //Notify the users that the counter is resetted.<br/>    // 
        // encoder.UpdateTickCountRequest update =
        //  new encoder.UpdateTickCountRequest(_state.TimeStamp, _state.TicksSinceReset);
         //      SendNotification<encoder.UpdateTickCount>(_subMgrPort, update);
         encoder.ResetCounter update =
           new encoder.ResetCounter();
               SendNotification<encoder.Reset>(_subMgrPort, update);
         reset.ResponsePort.Post(DefaultUpdateResponseType.Instance);
        },
        delegate(Fault fault)
        {
         LogError("FtTxEncoder#ResetHandler :" + fault.ToString());
         reset.ResponsePort.Post(
         W3C.Soap.Fault.FromCodeSubcodeReason(W3C.Soap.FaultCodes.Receiver,
         Microsoft.Dss.ServiceModel.Dssp.DsspFaultCodes.OperationFailed,
         "FtTxEncoder#ResetHandler:" + fault.ToString()));
        }
       );
    
       yield break;
      }
    
    

    cvl-ft
    Sunday, January 16, 2011 7:18 PM
  • Here a possible solution, see below.

    My questions:

    -)
    The way to change the size of the queues has been changed since 1.5.
    Were can I find documantation about this?

    -)
    How can I make the actuale depth of a queue visable?

    -)
    What is the meaning of NotificationCount?

     

    /* Example from the forum:
    * TestOperationsPort notificationTarget =
    new TestOperationsPort();
    subReq.NotificationPort = notificationTarget;
    subReq.Body.NotificationCount = _notificationCount;
    subReq.NotificationPortConfiguration = new DsspOperationPortConfiguration(
    DsspOperationQueuingPolicy.Discard,50,0);
    _serverPort.Post(subReq);
    */

    ===============================================================

    I create a own version of the original Drive:

    After increasing the Queue size to 500 (default =128), the messages came not back.

    //===============================          

    using

     

    drive = Microsoft.Robotics.Services.Drive.Proxy;
    using Drive = Microsoft.Robotics.Services.Drive;
    using encoder = Microsoft.Robotics.Services.Encoder.Proxy;
    //using Encoder = Microsoft.Robotics.Services.Encoder;
    using motor = Microsoft.Robotics.Services.Motor.Proxy;
    //using Motor = Microsoft.Robotics.Services.Motor;
    //******************************************

    //Code snip: I did this on 4 places! 

    encoder.Subscribe op2 = new encoder.Subscribe();
                op2.Body = new SubscribeRequestType();
                op2.NotificationPort = rightNotificationPort;
                LogError("FtTxDrive# right count =" + op2.Body.NotificationCount);
                op2.NotificationPortConfiguration = new DsspOperationPortConfiguration(
                   DsspOperationQueuingPolicy.DiscardWithFault,
                   _rightEncoderPort,
                   500);
                _leftEncoderPort.Post(op2);
      //===============================

    Problely is the recursion in the StopMotorWithEncoderHandler the sources.

     //=====================
        void StopMotorWithEncoderHandler(encoder.EncoderOperations encoderNotificationPort, encoder.UpdateTickCount msg, motor.MotorOperations motorPort, int stopWheelAt)
        {
          if (msg.Body.Count >= stopWheelAt)
          {
            motor.SetMotorPower stop = new motor.SetMotorPower(new motor.SetMotorPowerRequest(0.0)) ;
            motorPort.Post(stop);
            Arbiter.Choice(stop.ResponsePort,
              delegate(DefaultUpdateResponseType resp) { },
              delegate(Fault fault) { LogError(fault); }
            );
          }
          else
          {
            // Call self to continue waiting for notifications
            Activate(Arbiter.Receive<encoder.UpdateTickCount>(false, encoderNotificationPort,
              delegate(encoder.UpdateTickCount update)
              {
                StopMotorWithEncoderHandler(encoderNotificationPort, update, motorPort, stopWheelAt);
              }
            ));
          }
        }
     //=====================
    
    

     


    cvl-ft
    Tuesday, January 18, 2011 10:10 AM
  • I discover a small but essential mistake in /common/Drive.cs.

    Active( ) is missing, so there is no resolving of the response from the motor.

    Probaly this is the eason for the "Queue limit exceeded" problem?
    Could some confirm this.

    There are more small logical mistakes in this source file.

    void StopMotorWithEncoderHandler(encoder.EncoderOperations encoderNotificationPort, encoder.UpdateTickCount msg, motor.MotorOperations motorPort, int stopWheelAt)
     {
     if (msg.Body.Count >= stopWheelAt)
     {
     motor.SetMotorPower stop = new motor.SetMotorPower(new motor.SetMotorPowerRequest(0.0)) ;
     motorPort.Post(stop);
     Arbiter.Choice(stop.ResponsePort,
    delegate(DefaultUpdateResponseType resp) { }, delegate(Fault fault) { LogError(fault); } ); }

     


    cvl-ft

    • Edited by cvl-ft Monday, January 31, 2011 7:35 AM
    Sunday, January 30, 2011 3:29 PM
  • Hmm. Thanks for the feedback. I will pass it on to the developers.

    Trevor

     

    • Marked as answer by cvl-ft Saturday, April 2, 2011 1:02 PM
    Monday, January 31, 2011 2:08 AM
  • There is also a problem in relation with the "Wait for Drive Completion"
    Because of this, the standard example will not function either.
    I resolve this some houres ago. I will send you the simple solution by e-mail later today.
    cvl-ft
    • Marked as answer by cvl-ft Saturday, April 2, 2011 1:02 PM
    Monday, January 31, 2011 7:39 AM