LocalArmbandInterface.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Runtime.InteropServices;
  7. namespace SketchAssistantWPF
  8. {
  9. public static class LocalArmbandInterface
  10. {
  11. [DllImport (@"../Debug/StaticLibMotors.dll", EntryPoint = "?setupArmband@ArmbandInterface@@QAAHXZ",
  12. CallingConvention = CallingConvention.Cdecl)]
  13. public static extern int setupArmband();
  14. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?startVibrate@ArmbandInterface@@QAAXHM@Z",
  15. CallingConvention = CallingConvention.Cdecl)]
  16. public static extern void startVibrate(int motorNumber, float intensity);
  17. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?stopVibrate@ArmbandInterface@@QAAXH@Z",
  18. CallingConvention = CallingConvention.Cdecl)]
  19. public static extern void stopVibration(int motorNumber);
  20. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate100@ArmbandInterface@@QAAXXZ",
  21. CallingConvention = CallingConvention.Cdecl)]
  22. public static extern void actuate100();
  23. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate66@ArmbandInterface@@QAAXXZ",
  24. CallingConvention = CallingConvention.Cdecl)]
  25. public static extern void actuate66();
  26. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate33@ArmbandInterface@@QAAXXZ",
  27. CallingConvention = CallingConvention.Cdecl)]
  28. public static extern void actuate33();
  29. /* [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?deleteArmband@ArmbandInterface@@QAAXXZ",
  30. CallingConvention = CallingConvention.Cdecl)]
  31. public static extern void deleteArmband(); */
  32. //public void Vibrate()
  33. }
  34. }