Ejemplo n.º 1
0
 public void SetRawData(string bluetoothDeviceName, bool status)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SetRawData(bluetoothDeviceName, status));
     }
 }
Ejemplo n.º 2
0
 public void SetIMUChoosingData(string bluetoothDeviceName, int value)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SetIMUChoosingData(bluetoothDeviceName, value));
     }
 }
Ejemplo n.º 3
0
 public void ConfirmCalibration(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ConfirmCalibration(bluetoothDeviceName));
     }
 }
Ejemplo n.º 4
0
 public void ResetFlexors(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ResetFlexors(bluetoothDeviceName));
     }
 }
Ejemplo n.º 5
0
 public void GetOpenGloveArduinoVersionSoftware(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.GetOpenGloveArduinoVersionSoftware(bluetoothDeviceName));
     }
 }
Ejemplo n.º 6
0
 public void RemoveFlexors(string bluetoothDeviceName, List <int> regions)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.RemoveFlexors(bluetoothDeviceName, regions));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 8
0
 public void TurnOffIMU(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.TurnOffIMU(bluetoothDeviceName));
     }
 }
Ejemplo n.º 9
0
 public void StopCaptureDataFromServer(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.StopCaptureDataFromServer(bluetoothDeviceName));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 11
0
 public void DisconnectFromBluetoothDevice(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.DisconnectFromBluetoothDevice(bluetoothDeviceName));
     }
 }
Ejemplo n.º 12
0
 public void SaveOpenGloveConfiguration(string bluetoothDeviceName, string configurationName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SaveOpenGloveConfiguration(bluetoothDeviceName, configurationName));
     }
 }
Ejemplo n.º 13
0
 public void RemoveOpenGloveDeviceFromServer(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.RemoveOpenGloveDeviceFromServer(bluetoothDeviceName));
     }
 }
Ejemplo n.º 14
0
 public void AddOpenGloveDeviceToServer(string bluetoothDeviceName, string configurationName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.AddOpenGloveDeviceToServer(bluetoothDeviceName, configurationName));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 16
0
 public void ReadAllDataFromIMU(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ReadAllDataFromIMU(bluetoothDeviceName));
     }
 }
Ejemplo n.º 17
0
 public void RemoveFlexor(string bluetoothDeviceName, int region)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.RemoveFlexor(bluetoothDeviceName, region));
     }
 }
Ejemplo n.º 18
0
 public void SetLoopDelay(string bluetoothDeviceName, int value)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.SetLoopDelay(bluetoothDeviceName, value));
     }
 }
Ejemplo n.º 19
0
 public void ReadOnlyMagnetometerFromIMU(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.ReadOnlyMagnetometerFromIMU(bluetoothDeviceName));
     }
 }
Ejemplo n.º 20
0
 public void StopOpenGlove(string bluetoothDeviceName)
 {
     if (this.WebSocket.IsAlive)
     {
         this.WebSocket.Send(MessageGenerator.StopOpenGlove(bluetoothDeviceName));
     }
 }
Ejemplo n.º 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: "");
        }
Ejemplo n.º 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: "");
        }
Ejemplo n.º 23
0
 public void ConnectToBluetoothDevice(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.ConnectToBluetoothDevice(bluetoothDeviceName));
 }
Ejemplo n.º 24
0
 public void RemoveOpenGloveDevice(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.AddOpenGloveDevice(bluetoothDeviceName));
 }
Ejemplo n.º 25
0
 public void StartOpenGlove(string bluetoothDeviceName, string configurationName)
 {
     this.WebSocket.Send(MessageGenerator.StartOpenGlove(bluetoothDeviceName, configurationName));
 }
Ejemplo n.º 26
0
 public void CalibrateIMU(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.CalibrateIMU(bluetoothDeviceName));
 }
Ejemplo n.º 27
0
 public void SetIMUStatus(string bluetoothDeviceName, bool status)
 {
     this.WebSocket.Send(MessageGenerator.SetIMUStatus(bluetoothDeviceName, status));
 }
Ejemplo n.º 28
0
 public void StartIMU(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.StartIMU(bluetoothDeviceName));
 }
Ejemplo n.º 29
0
 public void TurnOffFlexors(string bluetoothDeviceName)
 {
     this.WebSocket.Send(MessageGenerator.TurnOffFlexors(bluetoothDeviceName));
 }
Ejemplo n.º 30
0
 public void SetThreshold(string bluetoothDeviceName, int value)
 {
     this.WebSocket.Send(MessageGenerator.SetThreshold(bluetoothDeviceName, value));
 }