ArmbandInterface.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include "stdafx.h"
  3. extern "C" {
  4. #include "MotorHeader/BodyActuator.h"
  5. }
  6. #include <ctime>
  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 actuate(int tactor, double intensity, int duration);
  13. class ArmbandInterface
  14. {
  15. /*
  16. typedef void(__cdecl *InitFunctionType)(BodyActuator*, BodyActuator_Type, char*, int);
  17. static InitFunctionType initFunctionHandle;
  18. typedef void(__cdecl *StartFunctionType)(BodyActuator*, uint8_t, float);
  19. static StartFunctionType startFunctionHandle;
  20. typedef void(__cdecl *StopFunctionType)(BodyActuator*, uint8_t);
  21. static StopFunctionType stopFunctionHandle; */
  22. public:
  23. __declspec(dllexport) int __cdecl setupArmband();
  24. __declspec(dllexport) void __cdecl startVibrate(int tactor, float intensity);
  25. __declspec(dllexport) void __cdecl stopVibrate(int tactor);
  26. __declspec(dllexport) void __cdecl actuate(int tactor, double intensity, int duration);
  27. void setupMotors();
  28. };