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(); } }
static void Main(string[] args) { using (var manager = new RtcManager(args)) { manager.Run(); } }
public static void Main(string[] args) { using (var manager = new RtcManager(args)) { var comp = new ConsoleIn(); manager.RegisterComponent(comp); manager.Run(); } }
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); }
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"); }
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(); } }
public RtcListViewModel(RtcManager manager) { _rtcManager = manager; }
public void Initialize() { _manager = new RtcManager(new[] { "-f", @"..\..\TestData\catalog.yaml" }); }