Esempio n. 1
0
        //Constructor
        public Training()
        {
            _authorizer      = new Authorizer();
            _headsetFinder   = new HeadsetFinder();
            _sessionCreator  = new SessionCreator();
            _cortexToken     = "";
            _sessionId       = "";
            _isProfileLoaded = false;
            _availActions    = new List <string>();
            _profileLists    = new List <string>();

            // Event register
            _ctxClient = CortexClient.Instance;
            _ctxClient.OnErrorMsgReceived   += MessageErrorRecieved;
            _ctxClient.OnGetDetectionInfo   += GetDetectionOk;
            _ctxClient.OnStreamDataReceived += StreamDataReceived;
            _ctxClient.OnSubscribeData      += SubscribeDataOK;
            _ctxClient.OnCreateProfile      += ProfileCreatedOK;
            _ctxClient.OnLoadProfile        += ProfileLoadedOK;
            _ctxClient.OnSaveProfile        += ProfileSavedOK;
            _ctxClient.OnUnloadProfile      += ProfileUnloadedOK;
            _ctxClient.OnTraining           += TrainingOK;
            _ctxClient.OnQueryProfile       += QueryProfileOK;

            _authorizer.OnAuthorized          += AuthorizedOK;
            _headsetFinder.OnHeadsetConnected += HeadsetConnectedOK;
            _sessionCreator.OnSessionCreated  += SessionCreatedOk;
            _sessionCreator.OnSessionClosed   += SessionClosedOK;
        }
Esempio n. 2
0
        // Constructor
        public DataStreamExample()
        {
            _authorizer     = new Authorizer();
            _headsetFinder  = new HeadsetFinder();
            _sessionCreator = new SessionCreator();
            _cortexToken    = "";
            _sessionId      = "";
            _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.OnSessionActivated += SessionActivatedOk;
            _sessionCreator.OnSessionClosed    += SessionClosedOK;
        }