示例#1
0
 public IEnumerator <ITask> ReliableSubscribeHandler(bumper.ReliableSubscribe subscribe)
 {
     yield return(Arbiter.Choice(
                      SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort),
                      delegate(SuccessResult success)
     {
         _subMgrPort.Post(new submgr.Submit(
                              subscribe.Body.Subscriber, DsspActions.ReplaceRequest, _state, null));
     },
                      null
                      ));
 }
示例#2
0
 public IEnumerator <ITask> ReliableSubscribeHandler(pxContactSensor.ReliableSubscribe subscribe)
 {
     yield return(Arbiter.Choice(
                      SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort),
                      delegate(SuccessResult success)
     {
         _subMgrPort.Post(new submgr.Submit(
                              subscribe.Body.Subscriber, dssp.DsspActions.ReplaceRequest, _state, null));
     },
                      delegate(Exception ex) { LogError(ex); }
                      ));
 }
示例#3
0
 public IEnumerator <ITask> ReliableSubscribeHandler(bumper.ReliableSubscribe subscribe)
 {
     yield return(Arbiter.Choice(
                      SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort),
                      delegate(SuccessResult success)
     {
         ProcessSubscribeResponse(subscribe.Body.Subscriber);
     },
                      delegate(Exception fault)
     {
         LogError(fault);
     }
                      ));
 }
 public virtual IEnumerator <ITask> GenericReliableSubscribeHandler(contactsensor.ReliableSubscribe subscribe)
 {
     yield return((Choice)base.SubscribeHelper(_genericSubMgrPort, subscribe.Body, subscribe.ResponsePort));
 }
示例#5
0
 public virtual IEnumerator <ITask> ReliableSubscribeHandler(bumper.ReliableSubscribe subscribe)
 {
     SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort);
     yield break;
 }
        /// <summary>
        /// Handles Bumper service connection request
        /// </summary>
        /// <param name="onConnectBumpers">Bumper connection request</param>
        /// <returns></returns>
        IEnumerator<ITask> OnConnectBumpersHandler(OnConnectBumpers onConnectBumpers)
        {
            if (onConnectBumpers.DriveControl != _driveControl)
                yield break;
            _bumpersPort = ServiceForwarder<pxbumper.ContactSensorArrayOperations>(onConnectBumpers.Service);
            _bumpersShutdown = new Port<Shutdown>();

            pxbumper.ReliableSubscribe subscribe = new pxbumper.ReliableSubscribe(
                new ReliableSubscribeRequestType(5)
            );

            subscribe.NotificationPort = _bumpersNotify;
            subscribe.NotificationShutdownPort = _bumpersShutdown;

            _bumpersPort.Post(subscribe);

            yield return Arbiter.Choice(
                subscribe.ResponsePort,
                delegate(SubscribeResponseType response)
                {
                    LogInfo("Subscribed to " + onConnectBumpers.Service);
                },
                delegate(Fault fault)
                {
                    _bumpersShutdown = null;
                    LogError(fault);
                }
            );
        }
示例#7
0
 public virtual IEnumerator<ITask> ReliableSubscribeHandler(pxbumper.ReliableSubscribe subscribe)
 {
     LogInfo("TrackRoamerBumper received Reliable Subscription request from Subscriber=" + subscribe.Body.Subscriber);
     base.SubscribeHelper(_subMgrPort, subscribe.Body, subscribe.ResponsePort);
     yield break;
 }