ArmbandInterface.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "stdafx.h"
  3. extern "C" {
  4. #include "MotorHeader/BodyActuator.h"
  5. }
  6. #include <time.h>
  7. #include <stdio.h>
  8. #define DllExport extern "C" __declspec( dllexport )
  9. DllExport int setupArmband();
  10. DllExport void startVibrate(int tactor, float intensity);
  11. DllExport void stopVibrate(int tactor);
  12. DllExport void actuate100();
  13. DllExport void actuate66();
  14. DllExport void actuate33();
  15. DllExport void deleteArmband();
  16. class ArmbandInterface
  17. {
  18. /*
  19. typedef void(__cdecl *InitFunctionType)(BodyActuator*, BodyActuator_Type, char*, int);
  20. static InitFunctionType initFunctionHandle;
  21. typedef void(__cdecl *StartFunctionType)(BodyActuator*, uint8_t, float);
  22. static StartFunctionType startFunctionHandle;
  23. typedef void(__cdecl *StopFunctionType)(BodyActuator*, uint8_t);
  24. static StopFunctionType stopFunctionHandle; */
  25. public:
  26. __declspec(dllexport) int __cdecl setupArmband();
  27. __declspec(dllexport) void __cdecl startVibrate(int tactor, float intensity);
  28. __declspec(dllexport) void __cdecl stopVibrate(int tactor);
  29. __declspec(dllexport) void __cdecl actuate100();
  30. __declspec(dllexport) void __cdecl actuate66();
  31. __declspec(dllexport) void __cdecl actuate33();
  32. __declspec(dllexport) void __cdecl deleteArmband();
  33. void setupMotors();
  34. // void actuate(int tactor, double intensity, int duration);
  35. };