Difference between revisions of "V4 DB RecordCommon"

From EPICSWIKI
Line 1: Line 1:
EPICS V4: Standard Support September 27 2005  
EPICS V4: Standard Support September 28 2005  
----
----


Line 31: Line 31:
         field(process,boolean)
         field(process,boolean)
         field(wait,boolean)
         field(wait,boolean)
        field(timeout,float64)
         field(block,boolean)
         field(block,boolean)
         field(inheritSeverity,boolean)
         field(inheritSeverity,boolean)
Line 38: Line 39:
         field(process,boolean)
         field(process,boolean)
         field(wait,boolean)
         field(wait,boolean)
        field(timeout,float64)
         field(block,boolean)
         field(block,boolean)
         field(inheritSeverity,boolean)
         field(inheritSeverity,boolean)
Line 44: Line 46:
         field(pvname,string) { link}
         field(pvname,string) { link}
         field(wait,boolean)
         field(wait,boolean)
        field(timeout,float64)
         field(block,boolean)
         field(block,boolean)
     }
     }
Line 61: Line 64:
* arrays of primitive types and strings
* arrays of primitive types and strings


     link(in,"monitorLinkOctet","monitorLinkOctet",MonitorLinkData);
     link(process,processLink,ProcessLink,ProcessLinkData);
    link(in,"monitorLinkBoolean","monitorLinkBoolean",MonitorLinkData);
    link(in,"monitorLinkInt16","monitorLinkInt16",MonitorLinkData);
    link(in,"monitorLinkInt32","monitorLinkInt32",MonitorLinkData);
    link(in,"monitorLinkInt64","monitorLinkInt64",MonitorLinkData);
    link(in,"monitorLinkFloat32","monitorLinkFloat32",MonitorLinkData);
    link(in,"monitorLinkFloat64","monitorLinkFloat64",MonitorLinkData);
    link(in,"monitorLinkString","monitorLinkString",MonitorLinkData);
    link(in,"inputLinkOctet","inputLinkOctet",InputLinkData);
    link(in,"inputLinkBoolean","inputLinkBoolean",InputLinkData);
    link(in,"inputLinkInt16","inputLinkInt16",InputLinkData);
    link(in,"inputLinkInt32","inputLinkInt32",InputLinkData);
    link(in,"inputLinkInt64","inputLinkInt64",InputLinkData);
    link(in,"inputLinkFloat32","inputLinkFloat32",InputLinkData);
    link(in,"inputLinkFloat64","inputLinkFloat64",InputLinkData);
    link(in,"inputLinkString","inputLinkString",InputLinkData);
    link(out,"outputLinkOctet","outputLinkOctet",OutputLinkData);
    link(out,"outputLinkBoolean","outputLinkBoolean",OutputLinkData);
    link(out,"outputLinkInt16","outputLinkInt16",OutputLinkData);
    link(out,"outputLinkInt32","outputLinkInt32",OutputLinkData);
    link(out,"outputLinkInt64","outputLinkInt64",OutputLinkData);
    link(out,"outputLinkFloat32","outputLinkFloat32",OutputLinkData);
    link(out,"outputLinkFloat64","outputLinkFloat64",OutputLinkData);
    link(out,"outputLinkString","outputLinkString",OutputLinkData);


     link(in,"monitorLinkArrayOctet","monitorLinkArrayOctet",MonitorLinkData);
     link(in,monitorLinkArrayOctet,LinkArrayOctet,MonitorLinkData);
     link(in,"monitorLinkArrayBoolean","monitorLinkArrayBoolean",MonitorLinkData);
    link(in,inputLinkArrayOctet,LinkArrayOctet,InputLinkData);
     link(in,"monitorLinkArrayInt16","monitorLinkArrayInt16",MonitorLinkData);
    link(out,outputLinkArrayOctet,LinkArrayOctet,OutputLinkData);
     link(in,"monitorLinkArrayInt32","monitorLinkArrayInt32",MonitorLinkData);
 
     link(in,"monitorLinkArrayInt64","monitorLinkArrayInt64",MonitorLinkData);
    link(in,monitorLinkBoolean,LinkBoolean,MonitorLinkData);
     link(in,"monitorLinkArrayFloat32","monitorLinkArrayFloat32",MonitorLinkData);
     link(in,monitorLinkArrayBoolean,LinkArrayBoolean,MonitorLinkData);
     link(in,"monitorLinkArrayFloat64","monitorLinkArrayFloat64",MonitorLinkData);
     link(in,inputLinkBoolean,LinkBoolean,InputLinkData);
     link(in,"monitorLinkArrayString","monitorLinkArrayString",MonitorLinkData);
     link(in,inputLinkArrayBoolean,LinkArrayBoolean,InputLinkData);
     link(in,"inputLinkArrayOctet","inputLinkArrayOctet",InputLinkData);
    link(out,outputLinkBoolean,LinkBoolean,OutputLinkData);
     link(in,"inputLinkArrayBoolean","inputLinkArrayBoolean",InputLinkData);
    link(out,outputLinkArrayBoolean,LinkArrayBooleanData);
     link(in,"inputLinkArrayInt16","inputLinkArrayInt16",InputLinkData);
 
     link(in,"inputLinkArrayInt32","inputLinkArrayInt32",InputLinkData);
     link(in,monitorLinkInt16,LinkInt16,MonitorLinkData);
     link(in,"inputLinkArrayInt64","inputLinkArrayInt64",InputLinkData);
     link(in,monitorLinkInt32,LinkInt32,MonitorLinkData);
     link(in,"inputLinkArrayFloat32","inputLinkArrayFloat32",InputLinkData);
     link(in,monitorLinkInt64,LinkInt64,MonitorLinkData);
     link(in,"inputLinkArrayFloat64","inputLinkArrayFloat64",InputLinkData);
     link(in,inputLinkInt16,LinkInt16,InputLinkData);
     link(in,"inputLinkArrayString","inputLinkArrayString",InputLinkData);
     link(in,inputLinkInt32,LinkInt32,InputLinkData);
     link(out,"outputLinkArrayOctet","outputLinkArrayOctetData);
     link(in,inputLinkInt64,LinkInt64,InputLinkData);
     link(out,"outputLinkArrayBoolean","outputLinkArrayBooleanData);
    link(out,outputLinkInt16,LinkInt16,OutputLinkData);
     link(out,"outputLinkArrayInt16","outputLinkArrayInt16",OutputLinkData);
    link(out,outputLinkInt32,LinkInt32,OutputLinkData);
     link(out,"outputLinkArrayInt32","outputLinkArrayInt32",OutputLinkData);
    link(out,outputLinkInt64,LinkInt64,OutputLinkData);
     link(out,"outputLinkArrayInt64","outputLinkArrayInt64",OutputLinkData);
    link(in,monitorLinkArrayInt16,LinkArrayInt16,MonitorLinkData);
     link(out,"outputLinkArrayFloat32","outputLinkArrayFloat32",OutputLinkData);
    link(in,monitorLinkArrayInt32,LinkArrayInt32,MonitorLinkData);
     link(out,"outputLinkArrayFloat64","outputLinkArrayFloat64",OutputLinkData);
    link(in,monitorLinkArrayInt64,LinkArrayInt64,MonitorLinkData);
     link(out,"outputLinkArrayString","outputLinkArrayString",OutputLinkData);
     link(in,inputLinkArrayInt16,LinkArrayInt16,InputLinkData);
     link(in,inputLinkArrayInt32,LinkArrayInt32,InputLinkData);
     link(in,inputLinkArrayInt64,LinkArrayInt64,InputLinkData);
    link(out,outputLinkArrayInt16,LinkArrayInt16,OutputLinkData);
    link(out,outputLinkArrayInt32,LinkArrayInt32,OutputLinkData);
    link(out,outputLinkArrayInt64,LinkArrayInt64,OutputLinkData);
 
     link(in,monitorLinkFloat32,LinkFloat32,MonitorLinkData);
    link(in,monitorLinkFloat64,LinkFloat64,MonitorLinkData);
    link(in,monitorLinkString,LinkString,MonitorLinkData);
    link(in,inputLinkFloat32,LinkFloat32,InputLinkData);
     link(in,inputLinkFloat64,LinkFloat64,InputLinkData);
     link(in,inputLinkString,LinkString,InputLinkData);
     link(out,outputLinkFloat32,LinkFloat32,OutputLinkData);
     link(out,outputLinkFloat64,LinkFloat64,OutputLinkData);
     link(out,outputLinkString,LinkString,OutputLinkData);
     link(in,inputLinkArrayFloat32,LinkArrayFloat32,InputLinkData);
     link(in,inputLinkArrayFloat64,LinkArrayFloat64,InputLinkData);
     link(out,outputLinkArrayFloat32,LinkArrayFloat32,OutputLinkData);
     link(out,outputLinkArrayFloat64,LinkArrayFloat64,OutputLinkData);
 
 
    link(in,monitorLinkArrayString,LinkArrayString,MonitorLinkData);
    link(in,inputLinkArrayString,LinkArrayString,InputLinkData);
     link(out,outputLinkArrayString,LinkArrayString,OutputLinkData);


    link(process,"processLink",ProcessLink,ProcessLinkData);


== asynDriver link support ==
== asynDriver link support ==
=== Data Definitions ===
=== Data Definitions ===
 
     struct(AsynLinkData) {
     struct(AsynDevice) }
         field(portName,string)
         field(portName,string)
         field(addr,int32)
         field(addr,int32)
Line 122: Line 124:
         field(drvPvt,string)
         field(drvPvt,string)
     }
     }
=== link definitions ===
=== link definitions ===


     link(in,"asynInt32","inputLinkInt32",AsynDevice)
     link(inout,asynInt32,LinkInt32,AsynLinkData)
     link(in,"asynInt32Average","inputLinkInt32",AsynDevice)
     link(in,asynInt32Average,LinkInt32,AsynLinkData)
     link(in,"asynInt32Monitor","monitorLinkInt32",AsynDevice)
     link(in,asynInt32Monitor,LinkInt32,AsynLinkData)
     link(in,"asynFloat64","inputLinkFloat64",AsynDevice)
     link(inout,asynFloat64,LinkFloat64,AsynLinkData)
     link(in,"asynFloat64Average","inputLinkFloat64",AsynDevice)
     link(in,asynFloat64Average,LinkFloat64,AsynLinkData)
     link(in,"asynFloat64Monitor","monitorLinkFloat64",AsynDevice)
     link(in,asynFloat64Monitor,LinkFloat64,AsynLinkData)
    link(out,"asynInt32","outputLinkInt32",AsynDevice)
     link(in,asynDigitalMonitor,AsynDigital,AsynLinkData)
    link(out,"asynFloat64","outputLinkFloat64",AsynDevice)
     link(inout,asynDigital,AsynDigital,AsynLinkData)
    link(in,"asynDigital","asynDigital",AsynDevice)
     link(inout,asynInt32Array,LinkArrayInt32,AsynLinkData)
     link(in,"asynDigitalMonitor","asynDigitalMonitor",AsynDevice)
     link(inout,asynFloat64Array,LinkArrayFloat64,AsynLinkData)
     link(out,"asynDigital","asynDigital",AsynDevice)
     link(inout,asynOctet,AsynOctet,AsynLinkData)
    link(in,"asynInt32Array","inputLinkArrayInt32",AsynDevice)
     link(out,"asynInt32Array","outputLinkArrayInt32",AsynDevice)
     link(in,"asynFloat64Array","inputLinkArrayFloat64",AsynDevice)
    link(out,"asynFloat64Array","outputLinkArrayFloat64",AsynDevice)
    link(in,"asynOctetArray","asynOctetArray",AsynDevice)
     link(out,"asynOctetArray","asynOctetArray",AsynDevice)
== Other common definitions ==
== Other common definitions ==


Line 151: Line 148:


     # usefull struct definitions
     # usefull struct definitions


     struct(LinearConvert) {
     struct(LinearConvert) {
Line 232: Line 230:
         }
         }
         field(timeStampEvent,int16)
         field(timeStampEvent,int16)
         field(timeStampLink,link(in))
         field(timeStampLink,link(in,interface(????))
     }
     }


Line 240: Line 238:
         }
         }
         field(disableInput,int16)
         field(disableInput,int16)
         field(disableLink,link(in))
         field(disableLink,link(in,interface(LinkBoolean)))
         field(disableAlarmSeverity,menu(menuAlarmSevr))
         field(disableAlarmSeverity,menu(menuAlarmSevr))
     }
     }


== RecordCommon Record Definition ==
== RecordCommon Record Definition ==
    struct(RecordCommonProcessLink) {
        field(link,link(process,interface(ProcessLink)))
    }


     record(RecordCommon) {
     record(RecordCommon) {
Line 280: Line 282:
             default("Invalid")
             default("Invalid")
         }
         }
         field(processLink,array(link[])) {
         field(processLink,array(RecordCommonProcessLink[])) {
             special(yes)
             special(yes)
         }
         }

Revision as of 19:29, 28 September 2005

EPICS V4: Standard Support September 28 2005


Overview

For V4 dbCommon.dbd and RecordCommon.dbd replace the V3 dbCommon.dbd. dbCommon.dbd defines 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:

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

dbCommon

Channel/Database Access Support

Data Structures

    struct(MonitorLinkData) {
        field(pvname,string) { link}
        field(process,boolean) // process this record when monitor occurs
        field(inheritSeverity,boolean) 
    }
    struct(InputLinkData) {
        field(pvname,string) { link}
        field(process,boolean)
        field(wait,boolean)
        field(timeout,float64)
        field(block,boolean)
        field(inheritSeverity,boolean)
    }
    struct(OutputLinkData) {
        field(pvname,string) { link}
        field(process,boolean)
        field(wait,boolean)
        field(timeout,float64)
        field(block,boolean)
        field(inheritSeverity,boolean)
    }
    struct(ProcessLinkData) {
        field(pvname,string) { link}
        field(wait,boolean)
        field(timeout,float64)
        field(block,boolean)
    }

link support definitions

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,ProcessLink,ProcessLinkData);
    link(in,monitorLinkArrayOctet,LinkArrayOctet,MonitorLinkData);
    link(in,inputLinkArrayOctet,LinkArrayOctet,InputLinkData);
    link(out,outputLinkArrayOctet,LinkArrayOctet,OutputLinkData);
    link(in,monitorLinkBoolean,LinkBoolean,MonitorLinkData);
    link(in,monitorLinkArrayBoolean,LinkArrayBoolean,MonitorLinkData);
    link(in,inputLinkBoolean,LinkBoolean,InputLinkData);
    link(in,inputLinkArrayBoolean,LinkArrayBoolean,InputLinkData);
    link(out,outputLinkBoolean,LinkBoolean,OutputLinkData);
    link(out,outputLinkArrayBoolean,LinkArrayBooleanData);
    link(in,monitorLinkInt16,LinkInt16,MonitorLinkData);
    link(in,monitorLinkInt32,LinkInt32,MonitorLinkData);
    link(in,monitorLinkInt64,LinkInt64,MonitorLinkData);
    link(in,inputLinkInt16,LinkInt16,InputLinkData);
    link(in,inputLinkInt32,LinkInt32,InputLinkData);
    link(in,inputLinkInt64,LinkInt64,InputLinkData);
    link(out,outputLinkInt16,LinkInt16,OutputLinkData);
    link(out,outputLinkInt32,LinkInt32,OutputLinkData);
    link(out,outputLinkInt64,LinkInt64,OutputLinkData);
    link(in,monitorLinkArrayInt16,LinkArrayInt16,MonitorLinkData);
    link(in,monitorLinkArrayInt32,LinkArrayInt32,MonitorLinkData);
    link(in,monitorLinkArrayInt64,LinkArrayInt64,MonitorLinkData);
    link(in,inputLinkArrayInt16,LinkArrayInt16,InputLinkData);
    link(in,inputLinkArrayInt32,LinkArrayInt32,InputLinkData);
    link(in,inputLinkArrayInt64,LinkArrayInt64,InputLinkData);
    link(out,outputLinkArrayInt16,LinkArrayInt16,OutputLinkData);
    link(out,outputLinkArrayInt32,LinkArrayInt32,OutputLinkData);
    link(out,outputLinkArrayInt64,LinkArrayInt64,OutputLinkData);
    link(in,monitorLinkFloat32,LinkFloat32,MonitorLinkData);
    link(in,monitorLinkFloat64,LinkFloat64,MonitorLinkData);
    link(in,monitorLinkString,LinkString,MonitorLinkData);
    link(in,inputLinkFloat32,LinkFloat32,InputLinkData);
    link(in,inputLinkFloat64,LinkFloat64,InputLinkData);
    link(in,inputLinkString,LinkString,InputLinkData);
    link(out,outputLinkFloat32,LinkFloat32,OutputLinkData);
    link(out,outputLinkFloat64,LinkFloat64,OutputLinkData);
    link(out,outputLinkString,LinkString,OutputLinkData);
    link(in,inputLinkArrayFloat32,LinkArrayFloat32,InputLinkData);
    link(in,inputLinkArrayFloat64,LinkArrayFloat64,InputLinkData);
    link(out,outputLinkArrayFloat32,LinkArrayFloat32,OutputLinkData);
    link(out,outputLinkArrayFloat64,LinkArrayFloat64,OutputLinkData);


    link(in,monitorLinkArrayString,LinkArrayString,MonitorLinkData);
    link(in,inputLinkArrayString,LinkArrayString,InputLinkData);
    link(out,outputLinkArrayString,LinkArrayString,OutputLinkData);


asynDriver link support

Data Definitions

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

link definitions

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

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)) 
    }

RecordCommon

Menu Definitions

    # 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 RecordSupport

    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))
    }

RecordCommon Record Definition

    struct(RecordCommonProcessLink) {
        field(link,link(process,interface(ProcessLink)))
    }
    record(RecordCommon) {
        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(alarmAckTransient,boolean) {
            readonly(yes)
            default("YES")
        }
        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.