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.

26 lines
749 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. protected:
  8. U8 *m_pInputBuffer;
  9. int m_nInputBufferSize;
  10. U8 *m_pOutputBuffer;
  11. int m_nOutputBufferSize;
  12. virtual int sendBlock(unsigned char *Data, int DataSize){ return 0;};
  13. virtual int recptBlock(unsigned char *Buffer, int *BufferLength){ return 0;};
  14. public:
  15. transportBus();
  16. ~transportBus();
  17. bool sendData( unsigned char *Data, int DataSize );
  18. bool getData( unsigned char *Data, int DataSize );
  19. };
  20. #endif