PIMap some doc
This commit is contained in:
@@ -378,14 +378,14 @@ bool PIConnection::removeDevice(const PIString & full_path) {
|
||||
for (const PIString & n : dntd) {
|
||||
device_names.remove(n);
|
||||
}
|
||||
for (auto s = senders.constBegin(); s != senders.constEnd(); s++) {
|
||||
for (auto s = senders.begin(); s != senders.end(); s++) {
|
||||
if (!s.value()) continue;
|
||||
s.value()->lock();
|
||||
s.value()->devices.removeAll(dev);
|
||||
s.value()->unlock();
|
||||
}
|
||||
device_modes.remove(dev);
|
||||
for (auto i = extractors.constBegin(); i != extractors.constEnd(); i++) {
|
||||
for (auto i = extractors.begin(); i != extractors.end(); i++) {
|
||||
if (!i.value()) continue;
|
||||
i.value()->devices.removeAll(dev);
|
||||
}
|
||||
@@ -409,7 +409,7 @@ void PIConnection::removeAllDevices() {
|
||||
PIVector<PIIODevice * > bdevs(__device_pool__->boundedDevices(this));
|
||||
__device_pool__->lock();
|
||||
for (PIIODevice * d : bdevs) {
|
||||
for (auto s = senders.constBegin(); s != senders.constEnd(); s++) {
|
||||
for (auto s = senders.begin(); s != senders.end(); s++) {
|
||||
if (!s.value()) continue;
|
||||
s.value()->lock();
|
||||
s.value()->devices.removeAll(d);
|
||||
@@ -428,7 +428,7 @@ void PIConnection::removeAllDevices() {
|
||||
__device_pool__->unlock();
|
||||
device_modes.clear();
|
||||
bounded_extractors.clear();
|
||||
for (auto i = extractors.constBegin(); i != extractors.constEnd(); i++) {
|
||||
for (auto i = extractors.begin(); i != extractors.end(); i++) {
|
||||
if (!i.value()) continue;
|
||||
i.value()->devices.clear();
|
||||
}
|
||||
@@ -567,7 +567,7 @@ bool PIConnection::removeFilter(const PIString & name_) {
|
||||
|
||||
void PIConnection::removeAllFilters() {
|
||||
__device_pool__->lock();
|
||||
for (auto i = extractors.constBegin(); i != extractors.constEnd(); i++) {
|
||||
for (auto i = extractors.begin(); i != extractors.end(); i++) {
|
||||
if (!i.value()) continue;
|
||||
channels_.remove(i.value()->extractor);
|
||||
auto it = channels_.makeIterator();
|
||||
@@ -588,7 +588,7 @@ void PIConnection::removeAllFilters() {
|
||||
|
||||
PIVector<PIPacketExtractor * > PIConnection::filters() const {
|
||||
PIVector<PIPacketExtractor * > ret;
|
||||
for (auto i = extractors.constBegin(); i != extractors.constEnd(); i++) {
|
||||
for (auto i = extractors.begin(); i != extractors.end(); i++) {
|
||||
if (i.value()) {
|
||||
if (i.value()->extractor) ret << i.value()->extractor;
|
||||
}
|
||||
@@ -599,7 +599,7 @@ PIVector<PIPacketExtractor * > PIConnection::filters() const {
|
||||
|
||||
PIStringList PIConnection::filterNames() const {
|
||||
PIStringList ret;
|
||||
for (auto i = extractors.constBegin(); i != extractors.constEnd(); i++) {
|
||||
for (auto i = extractors.begin(); i != extractors.end(); i++) {
|
||||
if (i.value())
|
||||
if (i.value()->extractor) ret << i.key();
|
||||
}
|
||||
@@ -609,7 +609,7 @@ PIStringList PIConnection::filterNames() const {
|
||||
|
||||
PIPacketExtractor * PIConnection::filter(const PIString & name_) const {
|
||||
PIString fname_ = name_.trimmed();
|
||||
for (auto i = extractors.constBegin(); i != extractors.constEnd(); i++) {
|
||||
for (auto i = extractors.begin(); i != extractors.end(); i++) {
|
||||
if (i.value()) {
|
||||
if ((i.value()->extractor) && (i.key() == fname_)) return i.value()->extractor;
|
||||
}
|
||||
@@ -806,7 +806,7 @@ float PIConnection::senderFrequency(const PIString & name) const {
|
||||
|
||||
|
||||
void PIConnection::removeAllSenders() {
|
||||
for (auto s = senders.constBegin(); s != senders.constEnd(); s++) {
|
||||
for (auto s = senders.begin(); s != senders.end(); s++) {
|
||||
if (s.value()) delete s.value();
|
||||
}
|
||||
senders.clear();
|
||||
@@ -824,7 +824,7 @@ void PIConnection::startThreadedRead(const PIString & full_path_name) {
|
||||
|
||||
|
||||
void PIConnection::startAllThreadedReads() {
|
||||
for (auto d = __device_pool__->devices.constBegin(); d != __device_pool__->devices.constEnd(); d++) {
|
||||
for (auto d = __device_pool__->devices.begin(); d != __device_pool__->devices.end(); d++) {
|
||||
startThreadedRead(d.key());
|
||||
}
|
||||
}
|
||||
@@ -838,7 +838,7 @@ void PIConnection::startSender(const PIString & name) {
|
||||
|
||||
|
||||
void PIConnection::startAllSenders() {
|
||||
for (auto s = senders.constBegin(); s != senders.constEnd(); s++) {
|
||||
for (auto s = senders.begin(); s != senders.end(); s++) {
|
||||
if (!s.value()) continue;
|
||||
if (!s.value()->isRunning() && !__device_pool__->fake) {
|
||||
s.value()->start(s.value()->int_);
|
||||
@@ -858,7 +858,7 @@ void PIConnection::stopThreadedRead(const PIString & full_path_name) {
|
||||
|
||||
|
||||
void PIConnection::stopAllThreadedReads() {
|
||||
for (auto d = __device_pool__->devices.constBegin(); d != __device_pool__->devices.constEnd(); d++) {
|
||||
for (auto d = __device_pool__->devices.begin(); d != __device_pool__->devices.end(); d++) {
|
||||
stopThreadedRead(d.key());
|
||||
}
|
||||
}
|
||||
@@ -872,7 +872,7 @@ void PIConnection::stopSender(const PIString & name) {
|
||||
|
||||
|
||||
void PIConnection::stopAllSenders() {
|
||||
for (auto s = senders.constBegin(); s != senders.constEnd(); s++) {
|
||||
for (auto s = senders.begin(); s != senders.end(); s++) {
|
||||
if (!s.value()) continue;
|
||||
if (s.value()->isRunning()) s.value()->stop();
|
||||
}
|
||||
@@ -1032,7 +1032,7 @@ bool PIConnection::DevicePool::removeDevice(PIConnection * parent, const PIStrin
|
||||
|
||||
void PIConnection::DevicePool::unboundConnection(PIConnection * parent) {
|
||||
PIStringList rem;
|
||||
for (auto i = devices.constBegin(); i != devices.constEnd(); i++) {
|
||||
for (auto i = devices.begin(); i != devices.end(); i++) {
|
||||
if (!i.value()) {
|
||||
rem << i.key();
|
||||
continue;
|
||||
@@ -1129,7 +1129,7 @@ PIConnection::DevicePool::DeviceData::~DeviceData() {
|
||||
void PIConnection::DevicePool::run() {
|
||||
PIVector<PIConnection * > conns(PIConnection::allConnections());
|
||||
for (PIConnection * c : conns) {
|
||||
for (auto d = c->diags_.constBegin(); d != c->diags_.constEnd(); d++) {
|
||||
for (auto d = c->diags_.begin(); d != c->diags_.end(); d++) {
|
||||
if (!d.value()) continue;
|
||||
d.value()->tick(0, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user