Beispiel #1
0
        static IDisposable?InitMetricsAndViz(
            IEnumerable <HostConfig> configObj,
            IObservable <NetInfo> netInfo,
            bool usePrometheus = true,
            bool noConsole     = false)
        {
            var reports = CheckerBuilder.Build(configObj);

            if (usePrometheus)
            {
                PrometheusPublisher.SetReportSource(reports);
            }

            IDisposable?vizSubscription = null;

            if (!noConsole)
            {
                var viz = new VizEngine(reports, netInfo);
                vizSubscription = viz.Frames
                                  .Subscribe(frame => {
                    Console.Clear();
                    System.Console.WriteLine(frame);
                });
            }

            reports.Connect();
            return(vizSubscription);
        }
Beispiel #2
0
 /// <summary>
 /// It creates all the necessary object for the model to be loaded
 /// </summary>
 private void PrepareForTheShow()
 {
     TheConfig                = new Config(Settings.Default.ServerIp, Settings.Default.ServerPort, Settings.Default.ScenePath, Settings.Default.FeedbackPort);
     iPad                     = new iPad(Settings.Default.iPadIP, Settings.Default.iPadPort);
     VizPgm                   = new VizEngine(TheConfig.EngineIp, TheConfig.EnginePort);
     CurrentSession.Config    = TheConfig;
     CurrentSession.VizEngine = VizPgm;
     CurrentSession.IPad      = iPad;
     CurrentSession.Teams     = CurrentSession.GetTeams();
     _feedback                = new FeedbackCoordinator(TheConfig);
     mainWindow               = new MainWindow();
     mainWindow.Show();
 }
Beispiel #3
0
 /// <summary>
 /// It creates all the necessary object for the model to be loaded
 /// </summary>
 private void PrepareForTheShow()
 {
     SettingsHelper.InitializeSettings();
     TheConfig = new Config(ConfigurationManager.AppSettings["VizIp"],
                            Convert.ToInt32(ConfigurationManager.AppSettings["VizPort"]),
                            "",
                            Convert.ToInt32(ConfigurationManager.AppSettings["FeedbackPort"]));
     VizPgm = new VizEngine(TheConfig.EngineIp, TheConfig.EnginePort);
     User   = new SelectedUser();
     CurrentSession.Config    = TheConfig;
     CurrentSession.VizEngine = VizPgm;
     CurrentSession.User      = User;
     CurrentSession.Player    = new ClipPlayerServiceAgent();
     _feedback    = new FeedbackCoordinator(TheConfig);
     SignInWindow = new SignInWindow();
     //mainWindow = new MainWindow();
 }