ArmbandInterface.h 1006 B

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. class ArmbandInterface
  13. {
  14. static BodyActuator* armband;
  15. //static char *port =
  16. static HINSTANCE lib;
  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. void setupMotors();
  28. };