DummyDriverDLL.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* This file implements a Dummy Robot driver using
  2. * the new Nero Robo driver scheme */
  3. #include "DummyDriverConfig.h"
  4. #include "DummyDriverFirmwareCheck.h"
  5. #ifdef WIN32 /* Let Windows have it's sick ways */
  6. BOOL APIENTRY DllMain( HANDLE hModule,
  7. DWORD ul_reason_for_call,
  8. LPVOID lpReserved)
  9. {
  10. return TRUE;
  11. };
  12. #endif
  13. const char *NERO_PLUGIN_GetPluginName()
  14. {
  15. return DUMMYDRIVER_ID;
  16. };
  17. DWORD NERO_PLUGIN_GetVersion()
  18. {
  19. return (DUMMYDRIVER_MAJOR<<16)+DUMMYDRIVER_MINOR;
  20. };
  21. DWORD NERO_PLUGIN_GetInterfaceVersion()
  22. {
  23. return ROBODRIVER_CURRENTVERSION;
  24. };
  25. const char *NERO_PLUGIN_GetPluginType()
  26. {
  27. return ROBODRIVER_PLUGINTYPE;
  28. };
  29. void NERO_PLUGIN_SetVendorInformations(const char *szCompany, const char *szProductName)
  30. {
  31. /* Just a dummy, we don't need this */
  32. };
  33. CNeroRoboDriver *nerorobodriver_createdriver(IRoboCommNode *commnode)
  34. {
  35. return new CDummyRoboDriver(commnode);
  36. };
  37. void nerorobodriver_configuredriver(IUserDialogFactory *pDialogFactory)
  38. {
  39. CDummyRoboDriverConfig dummyConfig(pDialogFactory);
  40. dummyConfig.Exec();
  41. }
  42. CNeroRoboDriver *nerorobodriverV2_createdriver(IRoboCommNode *pCommNode, const char *pcRecorderName)
  43. {
  44. return nerorobodriver_createdriver(pCommNode);
  45. }
  46. void nerorobodriverV2_configuredriver(IUserDialogFactory *pDialogFactory, const char *pcRecorderName)
  47. {
  48. nerorobodriver_configuredriver(pDialogFactory);
  49. }
  50. CNeroRoboFirmwareCheck *nerorobodriver_firmwarecheck(CSerial *pInterface)
  51. {
  52. return new CDummyRoboDriverFirmwareCheck(pInterface);
  53. }