Difference between revisions of "V4 DB RecordCommon"

From EPICSWIKI
Line 1: Line 1:
EPICS V4: Standard Support September 30 2005  
EPICS V4: Standard Support October 25 2005  
----
----


= Overview =
= Overview =


For V4 dbCommon.dbd and RecordCommon.dbd replace the V3 dbCommon.dbd.
This document describes three base supplied components for EPICS V4 databases.
dbCommon.dbd defines widely used definitions and RecordCommon.dbd defines
# menuStructBase.dbd - menu and struct definitions  
the fields that are common to all record types.
# recordCommon.dbd - common fields for record definitions
 
# baseSupport.dbd - link definitions for base supplied support


This document requires that the reader be familiar with:
This document requires that the reader be familiar with:
Line 14: Line 14:
# V4 DB Record Instance Syntax
# V4 DB Record Instance Syntax


NOTE: This document is ahead of the two above V4 documents so it may use
slightly different syntax.
----
----
<center>
<center>
= dbCommon =
= menuStructBase.dbd =
  </center>
  </center>


== Channel/Database Access Support ==
== Channel/Database Access Links ==


=== Data Structures ===
     struct(PvMonitorLink) {
     struct(MonitorLinkData) {
         field(pvname,string) { link}
         field(pvname,string) { link}
         field(process,boolean) // process this record when monitor occurs
         field(process,boolean) // process this record when monitor occurs
         field(inheritSeverity,boolean)  
         field(inheritSeverity,boolean)  
     }
     }
     struct(InputLinkData) {
     struct(PvInputLink) {
         field(pvname,string) { link}
         field(pvname,string) { link}
         field(process,boolean)
         field(process,boolean)
         field(wait,boolean)
         field(wait,boolean)
         field(timeout,float64)
         field(timeout,float64)
        field(block,boolean)
         field(inheritSeverity,boolean)
         field(inheritSeverity,boolean)
     }
     }
     struct(OutputLinkData) {
     struct(PvOutputLink) {
         field(pvname,string) { link}
         field(pvname,string) { link}
         field(process,boolean)
         field(process,boolean)
         field(wait,boolean)
         field(wait,boolean)
         field(timeout,float64)
         field(timeout,float64)
        field(block,boolean)
         field(inheritSeverity,boolean)
         field(inheritSeverity,boolean)
     }
     }
     struct(ProcessLinkData) {
     struct(PvProcessLink) {
         field(pvname,string) { link}
         field(pvname,string) { link}
         field(wait,boolean)
         field(wait,boolean)
         field(timeout,float64)
         field(timeout,float64)
        field(block,boolean)
     }
     }


=== link support definitions ===
== asynDriver Link ==
 
     struct(AsynLink) {
Link support is provided for
* input
** monitor support
** input support
* output
* process
 
For input and output The following data types are supported:
* primitive types
* string
* arrays of primitive types and strings
 
    link(process,processLink,ProcessLinkData,interface(ProcessLink))
 
    link(in,monitorLink,MonitorLinkData interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,monitorLinkArray,MonitorLinkData interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
    link(in,inputLink,InputLinkData interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,inputLinkArray,InputLinkData interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
    link(in,outputLink,OutputLinkData interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,outputLinkArray,OutputLinkData interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
 
 
== asynDriver link support ==
=== Data Definitions ===
     struct(AsynLinkData) {
         field(portName,string)
         field(portName,string)
         field(addr,int32)
         field(addr,int32)
Line 113: Line 56:
     }
     }


=== link definitions ===
== Definitions for recordCommon ==
 
    link(inout,asynInt32,AsynLinkData,interface(LinkInt32))
    link(in,asynInt32Average,AsynLinkData,interface(LinkInt32))
    link(in,asynInt32Monitor,AsynLinkData,interface(LinkInt32))
    link(inout,asynFloat64,AsynLinkData,interface(LinkFloat64))
    link(in,asynFloat64Average,AsynLinkData,interface(LinkFloat64))
    link(in,asynFloat64Monitor,AsynLinkData,interface(LinkFloat64))
    link(in,asynDigitalMonitor,AsynLinkData,interface(AsynDigital))
    link(inout,asynDigital,AsynLinkData,interface(AsynDigital)))
    link(inout,asynInt32Array,AsynLinkData,interface(LinkArrayInt32)))
    link(inout,asynFloat64Array,AsynLinkData,interface(LinkArrayFloat64)))
    link(inout,asynOctet,AsynLinkData,interface(AsynOctet)))
== Other common definitions ==
 
    menu(menuConvert) {
        choice(menuConvertRaw, "Raw")
        choice(menuConvertLinear, "Linear")
        choice(menuConvertTable, "Table")
    }
 
 
    # 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))
    }
 
----
<center>
= RecordCommon =
</center>


== Menu Definitions ==
     # menu definitions for recordCommon fields
 
     # menu definitions for RecordCommon fields
     menu(menuPriority) {
     menu(menuPriority) {
         choice(menuPriorityLow, "Low")
         choice(menuPriorityLow, "Low")
Line 197: Line 84:
         choice(menuAlarmSevrInvalid, "Invalid")
         choice(menuAlarmSevrInvalid, "Invalid")
     }
     }
== struct definitions for RecordSupport ==
 
    #struct definitions for recordCommon
     struct(TimeStamp) {
     struct(TimeStamp) {
         field(secondsPastEpoch,int64)
         field(secondsPastEpoch,int64)
Line 230: Line 118:
     }
     }


== RecordCommon Record Definition ==
    struct(ProcessLink) {
        field(block,boolean)
        field(link,link(process,interface(ProcessLink)))
    }
 
== Other common definitions ==
 
    menu(menuConvert) {
        choice(menuConvertRaw, "Raw")
        choice(menuConvertLinear, "Linear")
        choice(menuConvertTable, "Table")
    }
 
    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))
    }


     struct(RecordCommonProcessLink) {
----
        field(link,link(process,interface(ProcessLink)))
<center>
= recordCommon.dbd =
</center>
This is a file that is included by most of the record types provided by
base. For example
    #include "menuStructBase.dbd"
     record(AiRecord) {
    #include "recordCommon.dbd"
    ...
     }
     }


    record(RecordCommon) {
<tt>recordCommon.dbd</tt> contains the following definitions
         field(description,string)
         field(description,string)
         field(scan,struct(Scan))
         field(scan,struct(Scan))
Line 247: Line 180:
             readonly(yes)
             readonly(yes)
         }
         }
         field(alarmAckTransient,boolean) {
         field(alarmNoAckTransient,menu(menuAlarmSevr)) {
            readonly(yes)
        # highest level of alarm that does not have to be acknowledged"
            default("YES")
         }
         }
         field(udf,boolean) {
         field(udf,boolean) {
Line 273: Line 205:
             special(yes)
             special(yes)
         }
         }
    }


Although it has many fewer fields,
Although it has many fewer fields,
RecordCommon.dbd is a complete replacement for the V3 dbCommon.
recordCommon.dbd is a complete replacement for the V3 dbCommon.
The following V3 fields are no longer needed:
The following V3 fields are no longer needed:
* private fields - Private fields will truly be privaye to the implementation
* 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.
* previous value fields - All puts to database fields will be posted. The layer above will decide if clients should be notified of changes.
----
<center>
= baseSupport.dbd =
</center>
== Channel/Database Access Support ==
Link support is provided for
* monitor support
* input support
* output
* process
For monitor, input, and output The following data types are supported:
* primitive types
* string
* arrays of primitive types and strings
    link(process,processLink,PvProcessLink,interface(LinkProcess))
    link(in,monitorLink,PvMonitorLink,interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,monitorLinkArray,PvMonitorLink,interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
    link(in,inputLink,PvInputLink, interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,inputLinkArray,PvInputLink, interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
    link(out,outputLink,PvOutputLink, interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(out,outputLinkArray,PvOutputLink, interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
== asynDriver support ==
    link(inout,asynInt32,AsynLink,interface(LinkInt32))
    link(in,asynInt32Average,AsynLink,interface(LinkInt32))
    link(in,asynInt32Monitor,AsynLink,interface(LinkInt32))
    link(inout,asynFloat64,AsynLink,interface(LinkFloat64))
    link(in,asynFloat64Average,AsynLink,interface(LinkFloat64))
    link(in,asynFloat64Monitor,AsynLink,interface(LinkFloat64))
    link(in,asynDigitalMonitor,AsynLink,interface(AsynDigital))
    link(inout,asynDigital,AsynLink,interface(AsynDigital)))
    link(inout,asynInt32Array,AsynLink,interface(LinkArrayInt32)))
    link(inout,asynFloat64Array,AsynLink,interface(LinkArrayFloat64)))
    link(inout,asynOctet,AsynLink,interface(AsynOctet)))

Revision as of 18:33, 25 October 2005

EPICS V4: Standard Support October 25 2005


Overview

This document describes three base supplied components for EPICS V4 databases.

  1. menuStructBase.dbd - menu and struct definitions
  2. recordCommon.dbd - common fields for record definitions
  3. baseSupport.dbd - link definitions for base supplied support

This document requires that the reader be familiar with:

  1. V3 iocCore
  2. V4 DBD Statement Syntax
  3. V4 DB Record Instance Syntax

NOTE: This document is ahead of the two above V4 documents so it may use slightly different syntax.


menuStructBase.dbd

Channel/Database Access Links

    struct(PvMonitorLink) {
        field(pvname,string) { link}
        field(process,boolean) // process this record when monitor occurs
        field(inheritSeverity,boolean) 
    }
    struct(PvInputLink) {
        field(pvname,string) { link}
        field(process,boolean)
        field(wait,boolean)
        field(timeout,float64)
        field(inheritSeverity,boolean)
    }
    struct(PvOutputLink) {
        field(pvname,string) { link}
        field(process,boolean)
        field(wait,boolean)
        field(timeout,float64)
        field(inheritSeverity,boolean)
    }
    struct(PvProcessLink) {
        field(pvname,string) { link}
        field(wait,boolean)
        field(timeout,float64)
    }

asynDriver Link

    struct(AsynLink) {
        field(portName,string)
        field(addr,int32)
        field(timeout,float64)
        field(drvPvt,string)
    }

Definitions for recordCommon

    # 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")
    }
    #struct definitions for recordCommon
    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,interface(????))
    }
    struct Disable {
        field(disableValue,int16) {
            default("1")
        }
        field(disableInput,int16)
        field(disableLink,link(in,interface(LinkBoolean)))
        field(disableAlarmSeverity,menu(menuAlarmSevr))
    }
    struct(ProcessLink) {
        field(block,boolean)
        field(link,link(process,interface(ProcessLink)))
    }

Other common definitions

    menu(menuConvert) {
        choice(menuConvertRaw, "Raw")
        choice(menuConvertLinear, "Linear")
        choice(menuConvertTable, "Table")
    }
    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.dbd

This is a file that is included by most of the record types provided by base. For example

    #include "menuStructBase.dbd"
    record(AiRecord) {
    #include "recordCommon.dbd"
    ...
    }

recordCommon.dbd contains the following definitions

        field(description,string)
        field(scan,struct(Scan))
        field(event,struct(Event))
        field(accessSecurityGroup,string)
        field(pini,boolean)
        field(disablePutField,boolean)
        field(alarmAckSeverity,menu(menuAlarmSevr)) {
            design(no)
            readonly(yes)
        }
        field(alarmNoAckTransient,menu(menuAlarmSevr)) {
        # highest level of alarm that does not have to be acknowledged"
        }
        field(udf,boolean) {
            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(RecordCommonProcessLink[])) {
            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.

baseSupport.dbd


Channel/Database Access Support

Link support is provided for

  • monitor support
  • input support
  • output
  • process

For monitor, input, and output The following data types are supported:

  • primitive types
  • string
  • arrays of primitive types and strings
    link(process,processLink,PvProcessLink,interface(LinkProcess))
    link(in,monitorLink,PvMonitorLink,interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,monitorLinkArray,PvMonitorLink,interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
    link(in,inputLink,PvInputLink, interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(in,inputLinkArray,PvInputLink, interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))
    link(out,outputLink,PvOutputLink, interface(
        LinkBoolean,
        LinkInt16,LinkInt32,LinkInt64,
        LinkFloat32,LinkFloat64,
        LinkString
    ))
    link(out,outputLinkArray,PvOutputLink, interface(
        LinkArrayOctet,LinkArrayBoolean,
        LinkArrayInt16,LinkArrayInt32,LinkArrayInt64,
        LinkArrayFloat32,LinkArrayFloat64,
        LinkArrayString
    ))


asynDriver support

    link(inout,asynInt32,AsynLink,interface(LinkInt32))
    link(in,asynInt32Average,AsynLink,interface(LinkInt32))
    link(in,asynInt32Monitor,AsynLink,interface(LinkInt32))
    link(inout,asynFloat64,AsynLink,interface(LinkFloat64))
    link(in,asynFloat64Average,AsynLink,interface(LinkFloat64))
    link(in,asynFloat64Monitor,AsynLink,interface(LinkFloat64))
    link(in,asynDigitalMonitor,AsynLink,interface(AsynDigital))
    link(inout,asynDigital,AsynLink,interface(AsynDigital)))
    link(inout,asynInt32Array,AsynLink,interface(LinkArrayInt32)))
    link(inout,asynFloat64Array,AsynLink,interface(LinkArrayFloat64)))
    link(inout,asynOctet,AsynLink,interface(AsynOctet)))