本文整理汇总了C++中pvstructure::shared_pointer::getStructureField方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_pointer::getStructureField方法的具体用法?C++ shared_pointer::getStructureField怎么用?C++ shared_pointer::getStructureField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pvstructure::shared_pointer
的用法示例。
在下文中一共展示了shared_pointer::getStructureField方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: copy_DBR_TIME
void copy_DBR_TIME(const void * dbr, unsigned count, PVStructure::shared_pointer const & pvStructure)
{
const T* data = static_cast<const T*>(dbr);
PVStructure::shared_pointer ts = pvStructure->getStructureField("timeStamp");
epics::pvData::int64 spe = data->stamp.secPastEpoch;
spe += 7305*86400;
ts->getLongField("secondsPastEpoch")->put(spe);
ts->getIntField("nanoseconds")->put(data->stamp.nsec);
copy_DBR_STS<T, pT, sT, sF, aF>(dbr, count, pvStructure);
}
示例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);
}