예제 #1
0
        public void Enable()
        {
            Debug.Log("Enabling Frame Publisher");

            subsCtrl.SubscribeTo("frame.eye.", CustomReceiveData);
            requestCtrl.StartPlugin("Frame_Publisher");
        }
예제 #2
0
        void Setup()
        {
            requestCtrl.StartPlugin("Annotation_Capture");

            publisher = new Publisher(requestCtrl);

            isSetup = true;
        }
예제 #3
0
        void Setup()
        {
            requestCtrl.StartPlugin("HMD_Streaming_Source");

            publisher = new Publisher(requestCtrl);

            isSetup = true;
        }
예제 #4
0
        void Setup()
        {
            requestCtrl.StartPlugin("HMD_Streaming_Source");

            string connectionStr = requestCtrl.GetPubConnectionString();

            pubSocket = new PublisherSocket(connectionStr);

            isSetup = true;
        }
예제 #5
0
        public void StartCalibration(CalibrationSettings settings, SubscriptionsController subsCtrl)
        {
            this.settings    = settings;
            this.subsCtrl    = subsCtrl;
            this.requestCtrl = subsCtrl.requestCtrl;


            requestCtrl.SetPupilTimestamp(Time.time);

            if (OnCalibrationStarted != null)
            {
                OnCalibrationStarted();
            }

            IsCalibrating = true;

            subsCtrl.SubscribeTo("notify.calibration.successful", ReceiveSuccess);
            subsCtrl.SubscribeTo("notify.calibration.failed", ReceiveFailure);

            requestCtrl.StartPlugin(settings.PluginName);

            UpdateEyesTranslation();

            requestCtrl.Send(new Dictionary <string, object> {
                { "subject", "calibration.should_start" },
                {
                    "hmd_video_frame_size",
                    new float[] {
                        1000,
                        1000
                    }
                },
                {
                    "outlier_threshold",
                    35
                },
                {
                    "translation_eye0",
                    rightEyeTranslation
                },
                {
                    "translation_eye1",
                    leftEyeTranslation
                }
            });

            Debug.Log("Calibration Started");

            calibrationData.Clear();
        }
        public void Enable()
        {
            Debug.Log("Enabling Blink Listener");

            subsCtrl.SubscribeTo("blinks", CustomReceiveData);

            requestCtrl.StartPlugin(
                "Blink_Detection",
                new Dictionary <string, object> {
                { "history_length", 0.2f },
                { "onset_confidence_threshold", 0.5f },
                { "offset_confidence_threshold", 0.5f }
            }
                );
        }
예제 #7
0
        public void StartCalibration(CalibrationSettings settings, SubscriptionsController subsCtrl)
        {
            this.settings    = settings;
            this.subsCtrl    = subsCtrl;
            this.requestCtrl = subsCtrl.requestCtrl;

            if (OnCalibrationStarted != null)
            {
                OnCalibrationStarted();
            }

            IsCalibrating = true;

            subsCtrl.SubscribeTo("notify.calibration.successful", ReceiveSuccess);
            subsCtrl.SubscribeTo("notify.calibration.failed", ReceiveFailure);

            requestCtrl.StartPlugin(settings.PluginName);
            publisher = new Publisher(requestCtrl);

            UpdateEyesTranslation();

            requestCtrl.Send(new Dictionary <string, object> {
                { "subject", "calibration.should_start" },
                {
                    "translation_eye0",
                    rightEyeTranslation
                },
                {
                    "translation_eye1",
                    leftEyeTranslation
                },
                {
                    "record",
                    true
                }
            });

            Debug.Log("Calibration Started");

            calibrationData.Clear();
        }