本文整理汇总了C++中pvstructure::shared_pointer::getStringField方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_pointer::getStringField方法的具体用法?C++ shared_pointer::getStringField怎么用?C++ shared_pointer::getStringField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pvstructure::shared_pointer
的用法示例。
在下文中一共展示了shared_pointer::getStringField方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copy_DBR_CTRL
void copy_DBR_CTRL(const void * dbr, unsigned count, PVStructure::shared_pointer const & pvStructure)
{
const T* data = static_cast<const T*>(dbr);
PVStructure::shared_pointer alarm = pvStructure->getStructureField("alarm");
alarm->getIntField("status")->put(0);
alarm->getIntField("severity")->put(data->severity);
alarm->getStringField("message")->put(dbrStatus2alarmMessage[data->status]);
PVStructure::shared_pointer disp = pvStructure->getStructureField("display");
disp->getStringField("units")->put(std::string(data->units));
disp->getDoubleField("limitHigh")->put(data->upper_disp_limit);
disp->getDoubleField("limitLow")->put(data->lower_disp_limit);
copy_format<T>(dbr, disp);
PVStructure::shared_pointer va = pvStructure->getStructureField("valueAlarm");
std::tr1::static_pointer_cast<sF>(va->getSubField("highAlarmLimit"))->put(data->upper_alarm_limit);
std::tr1::static_pointer_cast<sF>(va->getSubField("highWarningLimit"))->put(data->upper_warning_limit);
std::tr1::static_pointer_cast<sF>(va->getSubField("lowWarningLimit"))->put(data->lower_warning_limit);
std::tr1::static_pointer_cast<sF>(va->getSubField("lowAlarmLimit"))->put(data->lower_alarm_limit);
PVStructure::shared_pointer ctrl = pvStructure->getStructureField("control");
ctrl->getDoubleField("limitHigh")->put(data->upper_ctrl_limit);
ctrl->getDoubleField("limitLow")->put(data->lower_ctrl_limit);
copy_DBR<pT, sT, sF, aF>(&data->value, count, pvStructure);
}
示例2: request
PVStructure::shared_pointer request(PVStructure::shared_pointer const & args)
throw (RPCRequestException)
{
// TODO error handling
double a = atof(args->getStringField("a")->get().c_str());
double b = atof(args->getStringField("b")->get().c_str());
PVStructure::shared_pointer result = getPVDataCreate()->createPVStructure(resultStructure);
result->getDoubleField("c")->put(a+b);
return result;
}
示例3: copy_DBR_STS
void copy_DBR_STS(const void * dbr, unsigned count, PVStructure::shared_pointer const & pvStructure)
{
const T* data = static_cast<const T*>(dbr);
PVStructure::shared_pointer alarm = pvStructure->getStructureField("alarm");
// no mapping needed
alarm->getIntField("status")->put(0);
alarm->getIntField("severity")->put(data->severity);
alarm->getStringField("message")->put(dbrStatus2alarmMessage[data->status]);
copy_DBR<pT, sT, sF, aF>(&data->value, count, pvStructure);
}
示例4:
void copy_format<dbr_time_string>(const void * /*dbr*/, PVStructure::shared_pointer const & pvDisplayStructure)
{
pvDisplayStructure->getStringField("format")->put("%s");
}