|
|
|
|
@@ -20,385 +20,36 @@ using std::tr1::static_pointer_cast;
|
|
|
|
|
|
|
|
|
|
namespace epics { namespace pvData {
|
|
|
|
|
|
|
|
|
|
static String notImplemented("not implemented");
|
|
|
|
|
static FieldCreatePtr fieldCreate;
|
|
|
|
|
static String valueFieldName("value");
|
|
|
|
|
|
|
|
|
|
// following are preallocated structures
|
|
|
|
|
StandardField::StandardField()
|
|
|
|
|
: fieldCreate(getFieldCreate()),
|
|
|
|
|
notImplemented("not implemented"),
|
|
|
|
|
valueFieldName("value")
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
static StructureConstPtr alarmField;
|
|
|
|
|
static StructureConstPtr timeStampField;
|
|
|
|
|
static StructureConstPtr displayField;
|
|
|
|
|
static StructureConstPtr controlField;
|
|
|
|
|
static StructureConstPtr booleanAlarmField;
|
|
|
|
|
static StructureConstPtr byteAlarmField;
|
|
|
|
|
static StructureConstPtr shortAlarmField;
|
|
|
|
|
static StructureConstPtr intAlarmField;
|
|
|
|
|
static StructureConstPtr longAlarmField;
|
|
|
|
|
static StructureConstPtr ubyteAlarmField;
|
|
|
|
|
static StructureConstPtr ushortAlarmField;
|
|
|
|
|
static StructureConstPtr uintAlarmField;
|
|
|
|
|
static StructureConstPtr ulongAlarmField;
|
|
|
|
|
static StructureConstPtr floatAlarmField;
|
|
|
|
|
static StructureConstPtr doubleAlarmField;
|
|
|
|
|
static StructureConstPtr enumeratedAlarmField;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void createAlarm() {
|
|
|
|
|
size_t num = 3;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "severity";
|
|
|
|
|
names[1] = "status";
|
|
|
|
|
names[2] = "message";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvString);
|
|
|
|
|
alarmField = fieldCreate->createStructure("alarm_t",names,fields);
|
|
|
|
|
void StandardField::init()
|
|
|
|
|
{
|
|
|
|
|
createAlarm();
|
|
|
|
|
createTimeStamp();
|
|
|
|
|
createDisplay();
|
|
|
|
|
createControl();
|
|
|
|
|
createBooleanAlarm();
|
|
|
|
|
createByteAlarm();
|
|
|
|
|
createShortAlarm();
|
|
|
|
|
createIntAlarm();
|
|
|
|
|
createLongAlarm();
|
|
|
|
|
createUByteAlarm();
|
|
|
|
|
createUShortAlarm();
|
|
|
|
|
createUIntAlarm();
|
|
|
|
|
createULongAlarm();
|
|
|
|
|
createFloatAlarm();
|
|
|
|
|
createDoubleAlarm();
|
|
|
|
|
createEnumeratedAlarm();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createTimeStamp() {
|
|
|
|
|
size_t num = 3;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "secondsPastEpoch";
|
|
|
|
|
names[1] = "nanoSeconds";
|
|
|
|
|
names[2] = "userTag";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
timeStampField = fieldCreate->createStructure("timeStamp_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
StandardField::~StandardField(){}
|
|
|
|
|
|
|
|
|
|
static void createDisplay() {
|
|
|
|
|
size_t num = 5;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "limitLow";
|
|
|
|
|
names[1] = "limitHigh";
|
|
|
|
|
names[2] = "description";
|
|
|
|
|
names[3] = "format";
|
|
|
|
|
names[4] = "units";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvString);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvString);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvString);
|
|
|
|
|
displayField = fieldCreate->createStructure("display_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createControl() {
|
|
|
|
|
size_t num = 3;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "limitLow";
|
|
|
|
|
names[1] = "limitHigh";
|
|
|
|
|
names[2] = "minStep";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
controlField = fieldCreate->createStructure("control_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createBooleanAlarm() {
|
|
|
|
|
size_t numFields = 4;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "falseSeverity";
|
|
|
|
|
names[2] = "trueSeverity";
|
|
|
|
|
names[3] = "changeStateSeverity";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
booleanAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createByteAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
byteAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createShortAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
shortAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createIntAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
intAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createLongAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
longAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createUByteAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
ubyteAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createUShortAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
ushortAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createUIntAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
uintAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createULongAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
ulongAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createFloatAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
floatAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createDoubleAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
doubleAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void createEnumeratedAlarm() {
|
|
|
|
|
size_t numFields = 3;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "stateSeverity";
|
|
|
|
|
names[2] = "changeStateSeverity";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalarArray(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
enumeratedAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static StructureConstPtr createProperties(String id,FieldConstPtr field,String properties)
|
|
|
|
|
StructureConstPtr StandardField::createProperties(String id,FieldConstPtr field,String properties)
|
|
|
|
|
{
|
|
|
|
|
bool gotAlarm = false;
|
|
|
|
|
bool gotTimeStamp = false;
|
|
|
|
|
@@ -414,7 +65,7 @@ static StructureConstPtr createProperties(String id,FieldConstPtr field,String p
|
|
|
|
|
StructureConstPtr valueAlarm;
|
|
|
|
|
Type type= field->getType();
|
|
|
|
|
while(gotValueAlarm) {
|
|
|
|
|
if(type==scalar) {
|
|
|
|
|
if(type==epics::pvData::scalar) {
|
|
|
|
|
ScalarConstPtr scalar = static_pointer_cast<const Scalar>(field);
|
|
|
|
|
ScalarType scalarType = scalar->getScalarType();
|
|
|
|
|
switch(scalarType) {
|
|
|
|
|
@@ -446,8 +97,8 @@ static StructureConstPtr createProperties(String id,FieldConstPtr field,String p
|
|
|
|
|
int compareFirst = nameFirst.compare("index");
|
|
|
|
|
int compareSecond = nameSecond.compare("choices");
|
|
|
|
|
if(compareFirst==0 && compareSecond==0) {
|
|
|
|
|
if(first->getType()==scalar
|
|
|
|
|
&& second->getType()==scalarArray) {
|
|
|
|
|
if(first->getType()==epics::pvData::scalar
|
|
|
|
|
&& second->getType()==epics::pvData::scalarArray) {
|
|
|
|
|
ScalarConstPtr scalarFirst = static_pointer_cast<const Scalar>(first);
|
|
|
|
|
ScalarArrayConstPtr scalarArraySecond =
|
|
|
|
|
static_pointer_cast<const ScalarArray>(second);
|
|
|
|
|
@@ -491,6 +142,360 @@ static StructureConstPtr createProperties(String id,FieldConstPtr field,String p
|
|
|
|
|
return fieldCreate->createStructure(id,names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createAlarm() {
|
|
|
|
|
size_t num = 3;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "severity";
|
|
|
|
|
names[1] = "status";
|
|
|
|
|
names[2] = "message";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvString);
|
|
|
|
|
alarmField = fieldCreate->createStructure("alarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createTimeStamp() {
|
|
|
|
|
size_t num = 3;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "secondsPastEpoch";
|
|
|
|
|
names[1] = "nanoSeconds";
|
|
|
|
|
names[2] = "userTag";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
timeStampField = fieldCreate->createStructure("timeStamp_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createDisplay() {
|
|
|
|
|
size_t num = 5;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "limitLow";
|
|
|
|
|
names[1] = "limitHigh";
|
|
|
|
|
names[2] = "description";
|
|
|
|
|
names[3] = "format";
|
|
|
|
|
names[4] = "units";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvString);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvString);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvString);
|
|
|
|
|
displayField = fieldCreate->createStructure("display_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createControl() {
|
|
|
|
|
size_t num = 3;
|
|
|
|
|
FieldConstPtrArray fields(num);
|
|
|
|
|
StringArray names(num);
|
|
|
|
|
names[0] = "limitLow";
|
|
|
|
|
names[1] = "limitHigh";
|
|
|
|
|
names[2] = "minStep";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
controlField = fieldCreate->createStructure("control_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createBooleanAlarm() {
|
|
|
|
|
size_t numFields = 4;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "falseSeverity";
|
|
|
|
|
names[2] = "trueSeverity";
|
|
|
|
|
names[3] = "changeStateSeverity";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
booleanAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createByteAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvByte);
|
|
|
|
|
byteAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createShortAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvShort);
|
|
|
|
|
shortAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createIntAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
intAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createLongAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvLong);
|
|
|
|
|
longAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createUByteAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvUByte);
|
|
|
|
|
ubyteAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createUShortAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvUShort);
|
|
|
|
|
ushortAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createUIntAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvUInt);
|
|
|
|
|
uintAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createULongAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvULong);
|
|
|
|
|
ulongAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createFloatAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvFloat);
|
|
|
|
|
floatAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createDoubleAlarm() {
|
|
|
|
|
size_t numFields = 10;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "lowAlarmLimit";
|
|
|
|
|
names[2] = "lowWarningLimit";
|
|
|
|
|
names[3] = "highWarningLimit";
|
|
|
|
|
names[4] = "highAlarmLimit";
|
|
|
|
|
names[5] = "lowAlarmSeverity";
|
|
|
|
|
names[6] = "lowWarningSeverity";
|
|
|
|
|
names[7] = "highWarningSeverity";
|
|
|
|
|
names[8] = "highAlarmSeverity";
|
|
|
|
|
names[9] = "hystersis";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[3] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[4] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
fields[5] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[6] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[7] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[8] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
fields[9] = fieldCreate->createScalar(pvDouble);
|
|
|
|
|
doubleAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StandardField::createEnumeratedAlarm() {
|
|
|
|
|
size_t numFields = 3;
|
|
|
|
|
FieldConstPtrArray fields(numFields);
|
|
|
|
|
StringArray names(numFields);
|
|
|
|
|
names[0] = "active";
|
|
|
|
|
names[1] = "stateSeverity";
|
|
|
|
|
names[2] = "changeStateSeverity";
|
|
|
|
|
fields[0] = fieldCreate->createScalar(pvBoolean);
|
|
|
|
|
fields[1] = fieldCreate->createScalarArray(pvInt);
|
|
|
|
|
fields[2] = fieldCreate->createScalar(pvInt);
|
|
|
|
|
enumeratedAlarmField = fieldCreate->createStructure("valueAlarm_t",names,fields);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StructureConstPtr StandardField::scalar(
|
|
|
|
|
ScalarType type,String const &properties)
|
|
|
|
|
@@ -621,30 +626,12 @@ StandardFieldPtr StandardField::getStandardField()
|
|
|
|
|
|
|
|
|
|
if(standardFieldCreate.get()==0)
|
|
|
|
|
{
|
|
|
|
|
fieldCreate = getFieldCreate();
|
|
|
|
|
createAlarm();
|
|
|
|
|
createTimeStamp();
|
|
|
|
|
createDisplay();
|
|
|
|
|
createControl();
|
|
|
|
|
createBooleanAlarm();
|
|
|
|
|
createByteAlarm();
|
|
|
|
|
createShortAlarm();
|
|
|
|
|
createIntAlarm();
|
|
|
|
|
createLongAlarm();
|
|
|
|
|
createUByteAlarm();
|
|
|
|
|
createUShortAlarm();
|
|
|
|
|
createUIntAlarm();
|
|
|
|
|
createULongAlarm();
|
|
|
|
|
createFloatAlarm();
|
|
|
|
|
createDoubleAlarm();
|
|
|
|
|
createEnumeratedAlarm();
|
|
|
|
|
standardFieldCreate = StandardFieldPtr(new StandardField());
|
|
|
|
|
standardFieldCreate->init();
|
|
|
|
|
}
|
|
|
|
|
return standardFieldCreate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StandardField::StandardField(){}
|
|
|
|
|
StandardField::~StandardField(){}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StandardFieldPtr getStandardField() {
|
|
|
|
|
|