Esempio n. 1
0
        // Constructor
        public DataStream()
        {
            _authorizer      = new Authorizer();
            _headsetFinder   = new HeadsetFinder();
            _sessionCreator  = new SessionCreator();
            _cortexToken     = "";
            _sessionId       = "";
            _isActiveSession = false;

            _streams = new List <string>();
            // Event register
            _ctxClient = CortexClient.Instance;
            _ctxClient.OnErrorMsgReceived   += MessageErrorRecieved;
            _ctxClient.OnStreamDataReceived += StreamDataReceived;
            _ctxClient.OnSubscribeData      += SubscribeDataOK;
            _ctxClient.OnUnSubscribeData    += UnSubscribeDataOK;

            _authorizer.OnAuthorized          += AuthorizedOK;
            _headsetFinder.OnHeadsetConnected += HeadsetConnectedOK;
            _sessionCreator.OnSessionCreated  += SessionCreatedOk;
            _sessionCreator.OnSessionClosed   += SessionClosedOK;
        }