Esempio n. 1
0
        public void ポート接続確認()
        {
            var inport = new ReactiveInPort<TimedLong>("inport");
            var outport = new ReactiveOutPort<TimedLong>("outport");

            var connector = new PortConnector(inport.PortService, outport.PortService);

            connector.ConnectAsync().Result.Is(ReturnCode_t.RTC_OK);
        }
Esempio n. 2
0
        public void 疎通確認()
        {
            var inport = new ReactiveInPort<TimedLong>("inport");
            var outport = new ReactiveOutPort<TimedLong>("outport");

            var testScheduler = new TestScheduler();
            var recorder = testScheduler.CreateObserver<TimedLong>();

            var connector = new PortConnector(inport.PortService, outport.PortService);

            connector.ConnectAsync().Result.Is(ReturnCode_t.RTC_OK);

            inport.Subscribe(recorder);

            var testData = new TimedLong() { Tm = DateTime.Now, Data = 123 };

            outport.Write(testData);

            //scheduler.AdvanceBy(TimeSpan.FromSeconds(10).Ticks);

            recorder.Messages.Count.Is(1);
            recorder.Messages.Is(OnNext(0, testData));
        }
Esempio n. 3
0
 public TargetComponent()
     : base("TargetComponent")
 {
     InPort = new ReactiveInPort<TimedLong>("in");
     OutPort = new ReactiveOutPort<TimedLong>("out");
 }