本文整理汇总了C++中PVAlarm::get方法的典型用法代码示例。如果您正苦于以下问题:C++ PVAlarm::get方法的具体用法?C++ PVAlarm::get怎么用?C++ PVAlarm::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PVAlarm
的用法示例。
在下文中一共展示了PVAlarm::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getAlarm
Status PvValue::getAlarm(Alarm &alarm)
{
if(pvGetStructure.get()==NULL) {
return Status(Status::STATUSTYPE_ERROR, "no alarm field");
}
PVAlarm pvAlarm;
PVFieldPtr pvField = pvGetStructure->getSubField("alarm");
if(pvField.get()==NULL) {
return Status(Status::STATUSTYPE_ERROR, "no alarm field");
}
if(!pvAlarm.attach(pvField)) {
return Status(Status::STATUSTYPE_ERROR, "no alarm field");
}
pvAlarm.get(alarm);
return Status::Ok;
}
示例2: Expected
static PyObject * _getAlarm(PyObject *willBeNull, PyObject *args)
{
PyObject *pcapsule = 0;
PyObject *palarm = 0;
if(!PyArg_ParseTuple(args,"OO:nttablePy",
&pcapsule,
&palarm))
{
PyErr_SetString(PyExc_SyntaxError,
"Bad argument. Expected (pvt,palarm)");
return NULL;
}
void *pvoid = PyCapsule_GetPointer(pcapsule,"nttablePvt");
if(pvoid==0) {
PyErr_SetString(PyExc_SyntaxError,
"first arg must be return from _init");
return NULL;
}
NTTablePvt *pvt = static_cast<NTTablePvt *>(pvoid);
pvoid = PyCapsule_GetPointer(palarm,"alarm");
if(pvoid==0) {
PyErr_SetString(PyExc_SyntaxError,
"second argument is not an alarm capsule");
return NULL;
}
Alarm *xxx = static_cast<Alarm *>(pvoid);
PVStructurePtr pvStructure = pvt->nttable->getAlarm();
//if(pvStructure!=0) {
if(!pvStructure) {
PVAlarm pvAlarm;
pvAlarm.attach(pvStructure);
pvAlarm.get(*xxx);
}
Py_INCREF(Py_None);
return Py_None;
}