7 #ifndef __PVDEVICESERIALPORT_H__
8 #define __PVDEVICESERIALPORT_H__
10 #include <PvSerialLib.h>
12 #include <IPvDeviceAdapter.h>
18 class DeviceSerialPort;
33 PvResult Write(
const uint8_t *aBuffer, uint32_t aSize, uint32_t &aBytesWritten );
34 PvResult GetWriteProgress( uint32_t &aWritten, uint32_t &aTotal );
35 PvResult Read( uint8_t *aBuffer, uint32_t aBufferSize, uint32_t &aBytesRead, uint32_t aTimeout = 0 );
39 PvResult GetRxBytesReady( uint32_t &aBytes );
40 PvResult GetRxBufferSize( uint32_t &aSize );
41 PvResult SetRxBufferSize( uint32_t aSize );
48 uint64_t GetBytesSent()
const;
49 uint64_t GetBytesReceived()
const;
50 void ResetStatistics();
58 PvSerialLib::DeviceSerialPort * mThis;
62 #endif // __PVDEVICESERIALPORT_H__