enhanced printout, enum_t/time_t support
This commit is contained in:
@ -112,13 +112,13 @@ std::ostream& terse(std::ostream& o, PVField::shared_pointer const & pv)
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& printEnumT(std::ostream& o, epics::pvData::PVStructure::shared_pointer const & pvEnumT)
|
||||
std::ostream& printEnumT(std::ostream& o, epics::pvData::PVStructure const & pvEnumT)
|
||||
{
|
||||
PVInt::shared_pointer pvIndex = pvEnumT->getSubField<PVInt>("index");
|
||||
PVInt::shared_pointer pvIndex = pvEnumT.getSubField<PVInt>("index");
|
||||
if (!pvIndex)
|
||||
throw std::runtime_error("enum_t structure does not have 'int index' field");
|
||||
|
||||
PVStringArray::shared_pointer pvChoices = pvEnumT->getSubField<PVStringArray>("choices");
|
||||
PVStringArray::shared_pointer pvChoices = pvEnumT.getSubField<PVStringArray>("choices");
|
||||
if (!pvChoices)
|
||||
throw std::runtime_error("enum_t structure does not have 'string choices[]' field");
|
||||
|
||||
@ -136,6 +136,11 @@ std::ostream& printEnumT(std::ostream& o, epics::pvData::PVStructure::shared_poi
|
||||
return o;
|
||||
}
|
||||
|
||||
std::ostream& printEnumT(std::ostream& o, epics::pvData::PVStructure::shared_pointer const & pvEnumT)
|
||||
{
|
||||
return printEnumT(o, *pvEnumT);
|
||||
}
|
||||
|
||||
std::ostream& printTimeT(std::ostream& o, epics::pvData::PVStructure::shared_pointer const & pvTimeT)
|
||||
{
|
||||
#define TIMETEXTLEN 32
|
||||
|
Reference in New Issue
Block a user