LocalArmbandInterface.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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 = "?actuate@ArmbandInterface@@QAAXHNH@Z",
  21. CallingConvention = CallingConvention.Cdecl)]
  22. public static extern void actuate(int motorNumber, double intensity, int duration);
  23. [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?deleteArmband@ArmbandInterface@@QAAXXZ",
  24. CallingConvention = CallingConvention.Cdecl)]
  25. public static extern void deleteArmband();
  26. //public void Vibrate()
  27. }
  28. }