コード例 #1
0
 public void SetRawData(string bluetoothDeviceName, bool status)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SetRawData(bluetoothDeviceName, status));
     }
 }
コード例 #2
0
 public void SetIMUChoosingData(string bluetoothDeviceName, int value)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SetIMUChoosingData(bluetoothDeviceName, value));
     }
 }
コード例 #3
0
 public void ConfirmCalibration(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ConfirmCalibration(bluetoothDeviceName));
     }
 }
コード例 #4
0
 public void ResetFlexors(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ResetFlexors(bluetoothDeviceName));
     }
 }
コード例 #5
0
 public void GetOpenGloveArduinoVersionSoftware(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.GetOpenGloveArduinoVersionSoftware(bluetoothDeviceName));
     }
 }
コード例 #6
0
 public void RemoveFlexors(string bluetoothDeviceName, List <int> regions)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.RemoveFlexors(bluetoothDeviceName, regions));
     }
 }
コード例 #7
0
 public void AddActuators(string bluetoothDeviceName, List <int> regions, List <int> positivePins, List <int> negativePins)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.AddActuators(bluetoothDeviceName, regions, positivePins, negativePins));
     }
 }
コード例 #8
0
 public void TurnOffIMU(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.TurnOffIMU(bluetoothDeviceName));
     }
 }
コード例 #9
0
 public void StopCaptureDataFromServer(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.StopCaptureDataFromServer(bluetoothDeviceName));
     }
 }
コード例 #10
0
 public void AddActuator(string bluetoothDeviceName, int region, int positivePin, int negativePin)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.AddActuator(bluetoothDeviceName, region, positivePin, negativePin));
     }
 }
コード例 #11
0
 public void DisconnectFromBluetoothDevice(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.DisconnectFromBluetoothDevice(bluetoothDeviceName));
     }
 }
コード例 #12
0
 public void SaveOpenGloveConfiguration(string bluetoothDeviceName, string configurationName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SaveOpenGloveConfiguration(bluetoothDeviceName, configurationName));
     }
 }
コード例 #13
0
 public void RemoveOpenGloveDeviceFromServer(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.RemoveOpenGloveDeviceFromServer(bluetoothDeviceName));
     }
 }
コード例 #14
0
 public void AddOpenGloveDeviceToServer(string bluetoothDeviceName, string configurationName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.AddOpenGloveDeviceToServer(bluetoothDeviceName, configurationName));
     }
 }
コード例 #15
0
 public void ActivateActuatorsTimeTest(string bluetoothDeviceName, List <int> regions, List <string> intensities)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ActivateActuatorsTimeTest(bluetoothDeviceName, regions, intensities));
     }
 }
コード例 #16
0
 public void ReadAllDataFromIMU(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ReadAllDataFromIMU(bluetoothDeviceName));
     }
 }
コード例 #17
0
 public void RemoveFlexor(string bluetoothDeviceName, int region)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.RemoveFlexor(bluetoothDeviceName, region));
     }
 }
コード例 #18
0
 public void SetLoopDelay(string bluetoothDeviceName, int value)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SetLoopDelay(bluetoothDeviceName, value));
     }
 }
コード例 #19
0
 public void ReadOnlyMagnetometerFromIMU(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ReadOnlyMagnetometerFromIMU(bluetoothDeviceName));
     }
 }
コード例 #20
0
 public void StopOpenGlove(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.StopOpenGlove(bluetoothDeviceName));
     }
 }
コード例 #21
0
        public Communication(string bluetoothDeviceName, string configurationName, string url)
        {
            this.WebSocket            = new WebSocket(url);
            this.WebSocket.OnOpen    += OnOpen;
            this.WebSocket.OnMessage += OnMessage;
            this.WebSocket.OnClose   += OnClose;
            this.WebSocket.OnError   += OnError;
            this.BluetoothDeviceName  = bluetoothDeviceName;
            this.ConfigurationName    = configurationName;

            MessageGenerator = new MessageGenerator(mainSeparator: ";", secondarySeparator: ",", empty: "");
        }
コード例 #22
0
        public Communication(string bluetoothDeviceName, string url)
        {
            WebSocket            = new WebSocket(url);
            WebSocket.OnOpen    += OnOpen;
            WebSocket.OnMessage += OnMessage;
            WebSocket.OnClose   += OnClose;
            WebSocket.OnError   += OnError;

            _IsConnectedToBluetoothDevice = false;
            BluetoothDeviceName           = bluetoothDeviceName;

            MessageGenerator = new MessageGenerator(mainSeparator: ";", secondarySeparator: ",", empty: "");
        }
コード例 #23
0
 public void ConnectToBluetoothDevice(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.ConnectToBluetoothDevice(bluetoothDeviceName));
 }
コード例 #24
0
 public void RemoveOpenGloveDevice(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.AddOpenGloveDevice(bluetoothDeviceName));
 }
コード例 #25
0
 public void StartOpenGlove(string bluetoothDeviceName, string configurationName)
 {
     this.WebSocket.Send(MessageGenerator.StartOpenGlove(bluetoothDeviceName, configurationName));
 }
コード例 #26
0
 public void CalibrateIMU(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.CalibrateIMU(bluetoothDeviceName));
 }
コード例 #27
0
 public void SetIMUStatus(string bluetoothDeviceName, bool status)
 {
     this.WebSocket.Send(MessageGenerator.SetIMUStatus(bluetoothDeviceName, status));
 }
コード例 #28
0
 public void StartIMU(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.StartIMU(bluetoothDeviceName));
 }
コード例 #29
0
 public void TurnOffFlexors(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.TurnOffFlexors(bluetoothDeviceName));
 }
コード例 #30
0
 public void SetThreshold(string bluetoothDeviceName, int value)
 {
     this.WebSocket.Send(MessageGenerator.SetThreshold(bluetoothDeviceName, value));
 }