DeviceBus.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // DeviceBus.cpp : 定义 DLL 应用程序的导出函数。
  2. //
  3. #include "DeviceBus.h"
  4. /*
  5. DeviceBUS::DeviceBUS(void)
  6. {
  7. m_Connected = false;
  8. m_pPacketReceiveThread = NULL;
  9. m_pP2PModule = NULL;
  10. }
  11. DeviceBUS::~DeviceBUS(void)
  12. {
  13. if (IsConnected())
  14. {
  15. DisConnect();
  16. }
  17. }
  18. void DeviceBUS::SetReceiveThread(Work_Thread *pThread)
  19. {
  20. m_pPacketReceiveThread = pThread;
  21. }
  22. bool DeviceBUS::Connect(ResDataObject &connection)
  23. {
  24. return false;
  25. }
  26. void DeviceBUS::Quit()
  27. {
  28. }
  29. void DeviceBUS::InitP2P(const char *pszIp, const char *pszLocalBusId, bool AsServer)
  30. {
  31. }
  32. void DeviceBUS::DisConnect()
  33. {
  34. }
  35. bool DeviceBUS::IsConnected()
  36. {
  37. return m_Connected;
  38. }
  39. void DeviceBUS::SetLogPath(const char *pPath)
  40. {
  41. }
  42. bool DeviceBUS::SendSMPacket(const char *pTargetID, const char *pContext, unsigned long long nShareMemID)
  43. {
  44. return false;
  45. }
  46. bool DeviceBUS::SendPacket(const char *pTargetID, const char *pContext, const char *pBlock, DWORD BlockSize)
  47. {
  48. return false;
  49. }
  50. bool DeviceBUS::SendRawPacket(const char *pTargetID, const char *pContext, DWORD ChannelId)
  51. {
  52. return false;
  53. }
  54. void DeviceBUS::PacketArrived(ResDataObject &packet)
  55. {
  56. if (m_pPacketReceiveThread)
  57. {
  58. m_pPacketReceiveThread->PushReqDataObject(packet);
  59. }
  60. else
  61. {
  62. //put error log here
  63. }
  64. }
  65. void DeviceBUS::BlobDataArrived(const char *pMsg, unsigned char *pBlockData, DWORD BlockDataLen)
  66. {
  67. }
  68. void DeviceBUS::UnRegistThread(DWORD Tid)
  69. {
  70. }
  71. */