You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
775 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __TRANSPORT_BUS_HEADERS__
  2. #define __TRANSPORT_BUS_HEADERS__
  3. #include "../../components/base/basicDualThread.h"
  4. #include "../../components/base/basicTransport.h"
  5. #define MAXIMAL_BUS_PACKET_LENGTH 2048
  6. class transportBus : public basicTransport, public basicDualThread
  7. {
  8. private:
  9. basicLogCollection * m_pLog;
  10. protected:
  11. U8 * m_pInputBuffer;
  12. int m_nInputBufferSize;
  13. U8 * m_pOutputBuffer;
  14. int m_nOutputBufferSize;
  15. virtual int sendBlock(unsigned char * Data, int DataSize)
  16. {
  17. return 0;
  18. }
  19. virtual int recptBlock(unsigned char * Buffer, int * BufferLength)
  20. {
  21. return 0;
  22. }
  23. public:
  24. transportBus();
  25. ~transportBus();
  26. bool sendData(unsigned char * Data, int DataSize);
  27. bool getData(unsigned char * Data, int DataSize);
  28. };
  29. #endif