OemBusUnitDevice.cpp 632 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include "OemBusUnit.h"
  2. #include "OemBusUnitDevice.h"
  3. #include "LocalConfig.h"
  4. OemBusUnitDevice::OemBusUnitDevice()
  5. {
  6. }
  7. OemBusUnitDevice::~OemBusUnitDevice()
  8. {
  9. }
  10. int DATA_ACTION OemBusUnitDevice::ExitDriverProc()
  11. {
  12. //Get DPC
  13. BusUnitDPC *pDPC = (BusUnitDPC*)GetDrvDPC();
  14. //set exit flag
  15. pDPC->SetExitFlag();
  16. CCOS_PROC_TYPE Mode = GetConfigMode();
  17. if (Mode == CCOS_PROC_CHANNEL)
  18. {
  19. //unload Drivers
  20. UnloadAllRegistedDrivers();
  21. }
  22. return BusUnitLogic::ExitDriverProc();
  23. }
  24. void OemBusUnitDevice::SubscribeSelf() {
  25. //±ØÐë¶©ÔÄ
  26. BusUnitLogic::SubscribeSelf();
  27. SubscribeTopic(m_pMqttConntion, m_strEBusRoot.c_str());
  28. }