git-svn-id: svn://db.shs.com.ru/pip@565 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-12-06 08:20:07 +00:00
parent bf7c714cc7
commit a0595c7674
14 changed files with 39 additions and 4 deletions

View File

@@ -69,7 +69,14 @@ public:
BlockingWrite /*! \a write block until data is sent, default off */ = 0x02
};
//! \brief Characteristics of PIIODevice subclass
enum DeviceInfoFlag {
Sequential /*! Continuous channel */ = 0x01,
Reliable /*! Channel is safe */ = 0x02
};
typedef PIFlags<DeviceOption> DeviceOptions;
typedef PIFlags<DeviceInfoFlag> DeviceInfoFlags;
explicit PIIODevice(const PIString & path, DeviceMode mode = ReadWrite);
virtual ~PIIODevice();
@@ -92,6 +99,9 @@ public:
//! Set device option "o" to "yes" and return previous state
bool setOption(DeviceOption o, bool yes = true);
//! Returns device characteristic flags
DeviceInfoFlags infoFlags() const {return deviceInfoFlags();}
//! Current path of device
PIString path() const {return property(PIStringAscii("path")).toString();}
@@ -336,6 +346,9 @@ protected:
//! Reimplement to apply new device options
virtual void optionsChanged() {;}
//! Reimplement to return correct \a DeviceInfoFlags. Default implementation returns 0
virtual DeviceInfoFlags deviceInfoFlags() const {return 0;}
//! Reimplement to apply new \a threadedReadBufferSize()
virtual void threadedReadBufferSizeChanged() {;}