Wristband.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using System.Threading;
  4. namespace SketchAssistantWPF
  5. {
  6. internal class Wristband
  7. {
  8. //[StructLayout(LayoutKind.Sequential)]
  9. //public class BodyActuator
  10. //{
  11. // enum BodyActuator_Type
  12. // {
  13. // BODYACTUATOR_TYPE_NONE,
  14. // BODYACTUATOR_TYPE_EAI,
  15. // BODYACTUATOR_TYPE_PIEZO,
  16. // BODYACTUATOR_TYPE_ERM,
  17. // BODYACTUATOR_TYPE_EMS
  18. // };
  19. // bool valid;
  20. // ushort actuatorCount;
  21. // BodyActuator_Type type;
  22. // ArduinoHub arduinoHub;
  23. // EAIHub eaiHub;
  24. //}
  25. //[StructLayout(LayoutKind.Sequential)]
  26. //public class EAIHub
  27. //{
  28. // bool valid;
  29. // pthread_mutex_t mutex; //TODO fix this
  30. // pthread_t thread;
  31. // Actuator* actuators; //TODO
  32. // uint tactorType;
  33. // uint modulation;
  34. // int deviceID;
  35. //}
  36. //[StructLayout(LayoutKind.Sequential)]
  37. //public class ArduinoHub
  38. //{
  39. // enum ArduinoHub_Type
  40. // {
  41. // ARDUINOHUB_TYPE_PIEZO = 'P',
  42. // ARDUINOHUB_TYPE_ERM = 'E',
  43. // ARDUINOHUB_TYPE_EMS = 'M'
  44. // }
  45. // bool valid;
  46. // pthread_mutex_t mutex; //TODO fix this
  47. // pthread_t thread;
  48. // ArduinoHub_Type arduinoType;
  49. // Serial* serial;
  50. // Actuator* actuators;
  51. //}
  52. //[DllImport("BodyActuator.dll", EntryPoint = "BodyActuator_actuate")]
  53. //static extern void pushForward(ref BodyActuator self, byte tactor, double intensity, ulong duration);
  54. /// <summary>
  55. /// Function to call when the wristband should push forwards.
  56. /// </summary>
  57. internal void pushForward()
  58. {
  59. Console.WriteLine("FORWARD_PUSH");
  60. }
  61. /// <summary>
  62. /// Function to call when the wristband should push backwards.
  63. /// </summary>
  64. internal void pushBackward()
  65. {
  66. Console.WriteLine("BACKWARD_PUSH");
  67. }
  68. }
  69. }