git-svn-id: svn://db.shs.com.ru/pip@213 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -323,6 +323,7 @@ PIIODevice * PIConnection::addDevice(const PIString & full_path, PIIODevice::Dev
|
||||
d->setInterval(10.);
|
||||
diags_[dev] = d;
|
||||
CONNECTU(d, qualityChanged, this, diagQualityChanged);
|
||||
__device_pool__->init();
|
||||
}
|
||||
__device_pool__->unlock();
|
||||
}
|
||||
@@ -857,6 +858,19 @@ bool PIConnection::isFakeMode() {
|
||||
|
||||
|
||||
|
||||
PIConnection::DevicePool::DevicePool(): PIThread(false, 10) {
|
||||
setName("PIConnection::DevicePool");
|
||||
needLockRun(true);
|
||||
fake = false;
|
||||
}
|
||||
|
||||
|
||||
void PIConnection::DevicePool::init() {
|
||||
if (!isRunning())
|
||||
start(10);
|
||||
}
|
||||
|
||||
|
||||
PIIODevice * PIConnection::DevicePool::addDevice(PIConnection * parent, const PIString & fp, PIIODevice::DeviceMode mode, bool start) {
|
||||
DeviceData * dd = devices[fp];
|
||||
int pmode(0);
|
||||
|
||||
@@ -278,8 +278,9 @@ public:
|
||||
PIOBJECT_SUBCLASS(DevicePool, PIThread)
|
||||
friend class PIConnection;
|
||||
public:
|
||||
DevicePool(): PIThread(true, 10) {setName("PIConnection::DevicePool"); needLockRun(true); fake = false;}
|
||||
DevicePool();
|
||||
|
||||
void init();
|
||||
PIIODevice * addDevice(PIConnection * parent, const PIString & fp, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite, bool start = true);
|
||||
bool removeDevice(PIConnection * parent, const PIString & fp);
|
||||
void unboundConnection(PIConnection * parent);
|
||||
|
||||
Reference in New Issue
Block a user