本文整理汇总了C++中Sensor::publicID方法的典型用法代码示例。如果您正苦于以下问题:C++ Sensor::publicID方法的具体用法?C++ Sensor::publicID怎么用?C++ Sensor::publicID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sensor
的用法示例。
在下文中一共展示了Sensor::publicID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Sensor *Check::findSensor(const string &id) const {
for ( size_t i = 0; i < _inv->sensorCount(); ++i ) {
Sensor *sensor = _inv->sensor(i);
if ( sensor->publicID() == id ) return sensor;
}
return NULL;
}
示例2: prepareSession
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void InventoryTask::prepareSession(const Seiscomp::DataModel::Inventory *inv) {
// Create lookup tables
_session.dataloggerLookup.clear();
for ( size_t i = 0; i < inv->dataloggerCount(); ++i ) {
Datalogger *d = inv->datalogger(i);
_session.dataloggerLookup[d->publicID()] = d;
}
_session.sensorLookup.clear();
for ( size_t i = 0; i < inv->sensorCount(); ++i ) {
Sensor *s = inv->sensor(i);
_session.sensorLookup[s->publicID()] = s;
}
_session.auxDeviceLookup.clear();
for ( size_t i = 0; i < inv->auxDeviceCount(); ++i ) {
AuxDevice *d = inv->auxDevice(i);
_session.auxDeviceLookup[d->publicID()] = d;
}
_session.firLookup.clear();
for ( size_t i = 0; i < inv->responseFIRCount(); ++i ) {
ResponseFIR *r = inv->responseFIR(i);
_session.firLookup[r->publicID()] = r;
}
_session.pazLookup.clear();
for ( size_t i = 0; i < inv->responsePAZCount(); ++i ) {
ResponsePAZ *r = inv->responsePAZ(i);
_session.pazLookup[r->publicID()] = r;
}
_session.polyLookup.clear();
for ( size_t i = 0; i < inv->responsePolynomialCount(); ++i ) {
ResponsePolynomial *r = inv->responsePolynomial(i);
_session.polyLookup[r->publicID()] = r;
}
}