Difference between revisions of "V4 DB RecordCommon"
From EPICSWIKI
MartyKraimer (talk | contribs) |
MartyKraimer (talk | contribs) |
||
Line 1: | Line 1: | ||
EPICS V4: RecordCommon September | EPICS V4: RecordCommon September 22 2005 | ||
---- | ---- | ||
Line 82: | Line 82: | ||
} | } | ||
link(in," | link(in,"monitorLink",MonitorLink); | ||
link(in," | link(in,"inputLink",InputLink); | ||
link(out," | link(out,"outputLink",OutputLink); | ||
link(process," | link(process,"processLink",ProcessLink); | ||
#definitions for common properties | #definitions for common properties | ||
Line 110: | Line 110: | ||
field(timeStampEvent,int16) | field(timeStampEvent,int16) | ||
field(timeStampLink,link(in)) | field(timeStampLink,link(in)) | ||
} | |||
# usefull struct definitions | |||
struct(LinearConvert) { | |||
field(full,float64) | |||
field(egul,float64) | |||
field(slope,float64) | |||
field(intercept,float64) | |||
} | |||
struct(DisplayLimit) { | |||
field(low,float64) | |||
field(high,float64) | |||
} | |||
struct(ControlLimit) { | |||
field(low,float64) | |||
field(high,float64) | |||
} | |||
struct(AlarmLimit) { | |||
field(low,float64) | |||
field(lowSevr,menu(menuAlarmSevr)) | |||
field(lowWarning,float64) | |||
field(lowWarningSevr,menu(menuAlarmSevr)) | |||
field(highWarning,float64) | |||
field(highWarningSevr,menu(menuAlarmSevr)) | |||
field(high,float64) | |||
field(highSevr,menu(menuAlarmSevr)) | |||
} | } | ||
Line 147: | Line 175: | ||
default("1") | default("1") | ||
} | } | ||
field(time,struct( | field(time,struct(TimeStamp)) { | ||
design(no) | design(no) | ||
dynamic(yes) | dynamic(yes) | ||
Line 162: | Line 190: | ||
default("Invalid") | default("Invalid") | ||
} | } | ||
field(processLink,array([] | field(processLink,array(link[])) { | ||
special(yes) | special(yes) | ||
} | } |
Revision as of 13:08, 22 September 2005
EPICS V4: RecordCommon September 22 2005
Overview
For V4 dbCommon.dbd and RecordCommon.dbd replace the V3 dbCommon.dbd. dbCommon.dbd define widely used definitions and RecordCommon.dbd defines the fields that are common to all record types.
This document requires that the reader be familiar with:
- V3 iocCore
- V4 Design: Record Processing
- V4 Design: dbdInterfaces
Unless the reader is familiar with these most of this document will be very difficult to understand.
dbCommon
dbCommon.dbd defines the following:
# menu definitions for RecordCommon fields menu(menuPriority) { choice(menuPriorityLow, "Low") choice(menuPriorityMedium, "Medium") choice(menuPriorityHigh, "High") }
menu(menuScan) { choice(menuScanPassive, "Passive") choice(menuScanEvent, "Event") choice(menuScanInterrupt, "Interrupt") choice(menuScan10second, "10 second") choice(menuScan5second, "5 second") choice(menuScan2second, "2 second") choice(menuScan1second, "1 second") choice(menuScan_5second, ".5 second") choice(menuScan_2second, ".2 second") choice(menuScan_1second, ".1 second") }
menu(menuAlarmSevr) { choice(menuAlarmSevrNone, "None") choice(menuAlarmSevrMinor, "Minor") choice(menuAlarmSevrMajor, "Major") choice(menuAlarmSevrInvalid, "Invalid") }
menu(menuConvert) { choice(menuConvertRaw, "Raw") choice(menuConvertLinear, "Linear") choice(menuConvertTable, "Table") }
struct(MonitorLink) { field(pvname,string) { link} field(process,bool) // process this record when monitor occurs field(inheritSeverity,bool) } struct(InputLink) { field(pvname,string) { link} field(parallel,bool) field(process,bool) field(wait,bool) field(inheritSeverity,bool) } struct(OutputLink) { field(pvname,string) { link} field(parallel,bool) field(process,bool) field(wait,bool) field(inheritSeverity,bool) } struct(ProcessLink) { field(pvname,string) { link} field(parallel,bool) field(wait,bool) }
link(in,"monitorLink",MonitorLink); link(in,"inputLink",InputLink); link(out,"outputLink",OutputLink); link(process,"processLink",ProcessLink);
#definitions for common properties struct(TimeStamp) { field(secondsPastEpoch,int64) field(nanoSeconds,int32) }
struct Scan { field(scan,menu(menuScan)) { special(yes) } field(phase,int16) field(priority,menu(menuPriority)) { special(yes) } }
Event NEEDS NEW DEFINITIONS
struct Event { field(eventNumber,int16) { special(yes) } field(timeStampEvent,int16) field(timeStampLink,link(in)) }
# usefull struct definitions
struct(LinearConvert) { field(full,float64) field(egul,float64) field(slope,float64) field(intercept,float64) }
struct(DisplayLimit) { field(low,float64) field(high,float64) } struct(ControlLimit) { field(low,float64) field(high,float64) } struct(AlarmLimit) { field(low,float64) field(lowSevr,menu(menuAlarmSevr)) field(lowWarning,float64) field(lowWarningSevr,menu(menuAlarmSevr)) field(highWarning,float64) field(highWarningSevr,menu(menuAlarmSevr)) field(high,float64) field(highSevr,menu(menuAlarmSevr)) }
RecordCommon
RecordCommon.dbd must be part of every record, and defines the following:
struct Disable { field(disableValue,int16) { default("1") } field(disableInput,int16) field(disableLink,link(in)) field(disableAlarmSeverity,menu(menuAlarmSevr)) }
record(RecordCommon) { field(description,string) field(scan,struct(Scan)) field(event,struct(Event)) field(accessSecurityGroup,string) field(pini,bool) field(disablePutField,bool) field(alarmAckSeverity,menu(menuAlarmSevr)) { design(no) readonly(yes) } field(alarmAckTransient,bool) { readonly(yes) default("YES") } field(udf,bool) { dynamic(yes) default("1") } field(time,struct(TimeStamp)) { design(no) dynamic(yes) readonly(yes) } field(disable,struct(Disable)) { special(yes) } field(alarmStatus,string) { default("UDF") } field(alarmSeverity,menu(menuAlarmSevr)) { readonly(yes) default("Invalid") } field(processLink,array(link[])) { special(yes) } }
Although it has many fewer fields, RecordCommon.dbd is a complete replacement for the V3 dbCommon. The following V3 fields are no longer needed:
- private fields - Private fields will truly be privaye to the implementation
- previous value fields - All puts to database fields will be posted. The layer above will decide if clients should be notified of changes.