git-svn-id: svn://db.shs.com.ru/pip@565 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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() {;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user