本文整理汇总了C++中DipData::extractInt方法的典型用法代码示例。如果您正苦于以下问题:C++ DipData::extractInt方法的具体用法?C++ DipData::extractInt怎么用?C++ DipData::extractInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DipData
的用法示例。
在下文中一共展示了DipData::extractInt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: convert
VariablePtr convert(const std::string & tag, DipData & data) const{
DipInt value;
if (tag.length() == 0){
value = data.extractInt();
} else {
value = data.extractInt(const_cast<char *>(tag.c_str()));
}
return new IntegerVar(value);
}
示例2: handleMessage
void handleMessage(DipSubscription *sub, DipData &message) {
// Source parameters
if((string)sub->getTopicName() == "dip/GIFFppGPN/Irradiator/EmergencyStop") EmergencyStop = message.extractBool("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Irradiator/Moving") Moving = message.extractBool("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Irradiator/Siren") Siren = message.extractBool("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Irradiator/SourceOFF") SourceOFF = message.extractBool("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Irradiator/SourceON") SourceON = message.extractBool("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Irradiator/Veto") Veto = message.extractBool("__DIP_DEFAULT__");
// Attenuator parameters
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/DownStreamPos/A") AttDA = message.extractInt("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/DownStreamPos/B") AttDB = message.extractInt("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/DownStreamPos/C") AttDC = message.extractInt("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/DownStreamPos/EffectiveAttenuation") AttDEff = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/UpStreamPos/A") AttUA = message.extractInt("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/UpStreamPos/B") AttUB = message.extractInt("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/UpStreamPos/C") AttUC = message.extractInt("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Attenuators/UpStreamPos/EffectiveAttenuation") AttUEff = message.extractFloat("__DIP_DEFAULT__");
// Radmon parameters
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/1/Dose") D1 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/1/Temperature") T1 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/2/Dose") D2 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/2/Temperature") T2 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/3/Dose") D3 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/3/Temperature") T3 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/4/Dose") D4 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/4/Temperature") T4 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/5/Dose") D5 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/5/Temperature") T5 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/6/Dose") D6 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/6/Temperature") T6 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/7/Dose") D7 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/7/Temperature") T7 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/8/Dose") D8 = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Radmon/8/Temperature") T8 = message.extractFloat("__DIP_DEFAULT__");
// Environmental parameters
if((string)sub->getTopicName() == "dip/GIFFppGPN/Atmospheric_Pressure") P = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Temp_Inside_Bunker") TIN = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Temp_Outside_Bunker") TOUT = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Humidity_Inside_Bunker") RHIN = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "dip/GIFFppGPN/Humidity_Outside_Bunker") RHOUT = message.extractFloat("__DIP_DEFAULT__");
if((string)sub->getTopicName() == "EnvSensors/203/ZONE5") {
P203 = message.extractFloat("P");
T203 = message.extractFloat("T");
RH203 = message.extractFloat("RH");
}
if((string)sub->getTopicName() == "EnvSensors/202/ZONE1") {
P202 = message.extractFloat("P");
T202 = message.extractFloat("T");
RH202 = message.extractFloat("RH");
}
if((string)sub->getTopicName() == "EnvSensors/201/ZONE2") {
P201 = message.extractFloat("P");
T201 = message.extractFloat("T");
RH201 = message.extractFloat("RH");
}
// Gas parameters
if((string)sub->getTopicName() == "dip/GIFFppGPN/gas/RPC_MFC_Humidity") RPC_MFC_Humidity = message.extractFloat("H2O");
if((string)sub->getTopicName() == "dip/GIFFppGPN/gas/IRsensor") {
iC4H10_BINOS1 = message.extractFloat("iC4H10_BINOS1");
iC4H10_BINOS2 = message.extractFloat("iC4H10_BINOS2");
}
if((string)sub->getTopicName() == "dip/GIFFppGPN/gas/RPC_MFC") {
C2H2F4 = message.extractFloat("C2H2F4");
iC4H10 = message.extractFloat("iC4H10");
mixture_with_water = message.extractFloat("mixture_with_water");
mixture_without_water = message.extractFloat("mixture_without_water");
SF6 = message.extractFloat("SF6");
}
if((string)sub->getTopicName() == "GasSensors/106/ZONE5") {
P106 = message.extractFloat("P");
T106 = message.extractFloat("T");
RH106 = message.extractFloat("RH");
}
if((string)sub->getTopicName() == "GasSensors/105/ZONE2") {
P105 = message.extractFloat("P");
T105 = message.extractFloat("T");
RH105 = message.extractFloat("RH");
}
if((string)sub->getTopicName() == "GasSensors/103/ZONE5") {
P103 = message.extractFloat("P");
T103 = message.extractFloat("T");
RH103 = message.extractFloat("RH");
}
if((string)sub->getTopicName() == "GasSensors/102/ZONE2") {
P102 = message.extractFloat("P");
T102 = message.extractFloat("T");
//.........这里部分代码省略.........