Esempio n. 1
0
    public static void Main(string[] args)
    {
        using (var manager = new RtcManager(args))
        {
            var comp = manager.GetComponent("ConsoleOut0.rtc");

            var obs = comp.StateChangedAsObservable()
              .Where(state => state.State == LifeCycleState.ACTIVE_STATE)
              .PublishLast();

            obs.Connect();

            var ret = comp.ActivateAsync().Result;

            //obs.First();

            obs.Timeout(TimeSpan.FromSeconds(5))
              .Catch((TimeoutException ex) => {
                // 例外処理
                return Observable.Empty<StateChangedEventArgs>();
              })
              .First();

        }
    }
Esempio n. 2
0
 static void Main(string[] args)
 {
     using (var manager = new RtcManager(args))
     {
         manager.Run();
     }
 }
Esempio n. 3
0
    public static void Main(string[] args)
    {
        using (var manager = new RtcManager(args))
        {
            var comp = new ConsoleIn();

            manager.RegisterComponent(comp);

            manager.Run();
        }
    }
Esempio n. 4
0
        public DiagramViewModel(RtcManager rtcManager)
        {
            _rtcManager = rtcManager;

            RtcListViewModel = new RtcListViewModel(_rtcManager);

            Components = new ReactiveCollection<RtcDiagramViewModel>();

            Connectors = new ReactiveCollection<ConnectorLineViewModel>();

            ConnectingLine = new ConnectorLineViewModel(100, 100, 300, 300);

            //Connectors.Add(testLine);
        }
Esempio n. 5
0
    public static void Main(string[] args)
    {
        using (var manager = new RtcManager("localhost", 2809))
        {
            var comp = manager.GetComponent("ConsoleIn0.rtc");

            var prof = comp.GetStateAsync().First();
            Console.WriteLine(prof);
        }

        //var inport = new ReactiveInPort<TimedLong>("test");

        //inport.Subscribe(x => Console.WriteLine(x.data));

        //inport.ConnectAsync("ConsoleIn.rtc:ConsoleIn.out");
    }
Esempio n. 6
0
    public static void Main(string[] args)
    {
        using (var manager = new RtcManager(args))
        {
            var comp = new SimpleComponent("HelloWorld")
                           {
                               OnExecute = _ => {
                                   Console.WriteLine("Hello Wolrd!");
                                   return ReturnCode_t.RTC_OK;
                               }
                           };

            manager.RegisterComponent(comp);

            manager.Run();
        }
    }
Esempio n. 7
0
 public RtcListViewModel(RtcManager manager)
 {
     _rtcManager = manager;
 }
 public void Initialize()
 {
     _manager = new RtcManager(new[] { "-f", @"..\..\TestData\catalog.yaml" });
 }