ArmbandInterface.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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. DllExport void deleteArmband();
  14. class ArmbandInterface
  15. {
  16. /*
  17. typedef void(__cdecl *InitFunctionType)(BodyActuator*, BodyActuator_Type, char*, int);
  18. static InitFunctionType initFunctionHandle;
  19. typedef void(__cdecl *StartFunctionType)(BodyActuator*, uint8_t, float);
  20. static StartFunctionType startFunctionHandle;
  21. typedef void(__cdecl *StopFunctionType)(BodyActuator*, uint8_t);
  22. static StopFunctionType stopFunctionHandle; */
  23. public:
  24. __declspec(dllexport) int __cdecl setupArmband();
  25. __declspec(dllexport) void __cdecl startVibrate(int tactor, float intensity);
  26. __declspec(dllexport) void __cdecl stopVibrate(int tactor);
  27. __declspec(dllexport) void __cdecl actuate(int tactor, double intensity, int duration);
  28. __declspec(dllexport) void __cdecl deleteArmband();
  29. void setupMotors();
  30. };