コード例 #1
0
        public Dal200Control(int dtdtPort, int dwellRadius, int dwellTime)
        {
            activeUsers = new Dictionary <int, DtdtSubject>();

            dtdtHandler = new KinetOSCHandler(dtdtPort);
            dtdtHandler.OnDataReceived += DtdtDataReceived;
            dtdtHandler.StartReceiving();


            wsServer = new WebSocketServer($"ws://{NetworkUtils.GetLocalIPAddress()}");
            wsServer.AddWebSocketService <Dall200Messages>("/Dal200");
            wsServer.Start();
        }
コード例 #2
0
        public Dal200Control(int dtdtPort, int dwellRadius, int dwellTime)
        {
            activeUsers         = new Dictionary <int, DtdtSubject>();
            DwellableCollection = new DwellableCollection(dwellRadius, TimeSpan.FromSeconds(dwellTime));

            oldTrackingData = new JsonData();

            dtdtHandler = new KinetOSCHandler(dtdtPort);
            dtdtHandler.OnDataReceived += DtdtDataReceived;
            dtdtHandler.StartReceiving();

            wsServer = new WebSocketServer($"ws://{NetworkUtils.GetLocalIPAddress()}");
            wsServer.AddWebSocketService <Dall200Messages>("/Dal200");
            wsServer.Start();
        }
コード例 #3
0
        public Dal200Control(int dtdtPort, int dwellRadius, int dwellTime, int screensverTimeInSeconds)
        {
            activeUsers         = new Dictionary <int, DtdtSubject>();
            DwellableCollection = new DwellableCollection(dwellRadius, TimeSpan.FromSeconds(dwellTime));

            oldTrackingData = new JsonData();

            dtdtHandler = new KinetOSCHandler(dtdtPort);
            dtdtHandler.OnDataReceived += DtdtDataReceived;
            dtdtHandler.StartReceiving();

            wsServer = new WebSocketServer($"ws://{NetworkUtils.GetLocalIPAddress()}");
            wsServer.AddWebSocketService <Dall200Messages>("/Dal200");
            wsServer.Start();

            screensaverInterval        = screensverTimeInSeconds * 1000;
            screenSaverTimer           = new Timer(screensaverInterval);
            screenSaverTimer.AutoReset = false;
            screenSaverTimer.Elapsed  += ScreenSaverTimerElapsed;
            screenSaverTimer.Start();
        }