Difference between revisions of "V4 DBD Examples"

From EPICSWIKI
Line 1: Line 1:
= Example Record Types =
Example Record Types Sept 16 2005
= Overview =
This document present proposed V4 replacements for a few of the
V3 record types.


== aoRecord ==
<center>
= aoRecord =
</center>


aoRecord.dbd might be defined as follows:
aoRecord.dbd might be defined as follows:


  include "dbCommon.dbd"
  include "dbCommon.dbd"
  record(ao) extends iocRecord {
  record(ao) extends RecordCommon {
     field(value, float64) {
     field(value, float64) {
         asl(0)
         asl(0)
        dynamic(yes)
     }
     }
     field(outValue, float64) {
     field(outValue, float64) {
         readonly(yes)
         readonly(yes)
        dynamic(yes)
     }
     }
     field(out, device(out,analogOut))
     field(out, device(out,analogOut))
Line 27: Line 30:
     }
     }
     field(units, string)
     field(units, string)
     field(displayLimit, struct(displayLimitF64))
     field(displayLimit, struct(displayLimit))
     field(controlLimit, struct(controlLimitF64))
     field(controlLimit, struct(controlLimit))
     field(alarmLimit, struct(alarmLimitF64))
     field(alarmLimit, struct(alarmLimit))
     field(alarmDeadband, float64)
     field(alarmDeadband, float64)
     field(rawValue, int32) {
     field(rawValue, int32) {
         design(no)
         design(no)
        dynamic(yes)
     }
     }
     field(prevRawValue, int32) {
     field(prevRawValue, int32) {
         design(no)
         design(no)
         readonly(yes)
         readonly(yes)
        dynamic(yes)
     }
     }
     field(readBackValue, int32) {
     field(readBackValue, int32) {
         design(no)
         design(no)
         readonly(yes)
         readonly(yes)
        dynamic(yes)
     }
     }
    field(oldReadBackValue, int32) {
        design(no)
        readonly(yes)
        dynamic(yes)
    }
    field(prevValue, float64) {
        design(no)
        readonly(yes)
        dynamic(yes)
    }
    field(lastValueAlarmed, float64) {
        design(no)
        readonly(yes)
        dynamic(yes)
    }
    field(pbrk, private("void *"))
     field(init, bool) {
     field(init, bool) {
         design(no)
         design(no)
         readonly(yes)
         readonly(yes)
    }
    field(lbrk, int16) {
        design(no)
        readonly(yes)
        dynamic(yes)
     }
     }
     field(simOutputLink, link(out))
     field(simOutputLink, link(out))
     field(simModeLink, link(in))
     field(simModeLink, link(in))
     field(simMode, bool) {
     field(simMode, bool)  
        dynamic(yes)
    }
     field(simSevr, menu(menuAlarmSevr))
     field(simSevr, menu(menuAlarmSevr))
     field(invalidAction, menu(menuIvoa))
     field(invalidAction, menu(menuIvoa))
Line 115: Line 92:




== calcRecord ==
<center>
= calcRecord =
</center>


calcRecord.dbd defines the following:
calcRecord.dbd defines the following:
Line 124: Line 103:
     field(value,float64)
     field(value,float64)
  }
  }
  record(calc) extends iocRecord {
  record(calc) extends RecordCommon {
     field(result,float64) {
     field(result,float64) {
         asl(0)
         asl(0)
        dynamic(yes)
     }
     }
     field(calc,string) {
     field(calc,string) {
         special(yes)
         special(yes)
     }
     }
     field(inp,array(struct(calcInpLink)[])) {
     field(inp,array(struct(calcInpLink)[]))  
        dynamic(yes)
    }
     field(units,string)
     field(units,string)
     field(displayLimit,struct(displayLimitF64))
     field(displayLimit,struct(displayLimit))
     field(alarmLimit,struct(alarmLimitF64))
     field(alarmLimit,struct(alarmLimit))
     field(alarmDeadband,float64)
     field(alarmDeadband,float64)
     field(lastValueAlarmed,float64) {
     field(lastValueAlarmed,float64) {
         design(no)
         design(no)
         readonly(yes)
         readonly(yes)
        dynamic(yes)
     }
     }
     field(rpcl,private("char *"))
     field(rpcl,private("char *"))
Line 161: Line 136:




== mbbiRecord ==
<center>
= mbbiRecord =
</center>


mbbiRecord.dbd could be:
mbbiRecord.dbd could be:
Line 167: Line 144:
  include "dbCommon.dbd"
  include "dbCommon.dbd"
  struct(mbbiState) {
  struct(mbbiState) {
    field(name, string)
    field(value, array(octet[]))
     field(severity, menu(menuAlarmSevr))
     field(severity, menu(menuAlarmSevr))
    field(rawValue, uint64)
    field(value, int16) {
        design(no)
        readonly(yes)
    }
  }
  }
  record(mbbi) extends iocRecord {
  record(mbbi) extends RecordCommon {
     field(states, map(struct(mbbiState))) {
     field(states, array(struct(mbbiState)[])) {
         special(yes)
         special(yes)
     }
     }
     field(value, enum(states)) {
     field(value, enum(states)) {
         asl(0)
         asl(0)
        dynamic(yes)
     }
     }
     field(unknownStateSeverity, menu(menuAlarmSevr))
     field(unknownStateSeverity, menu(menuAlarmSevr))
     field(changeStateSeverity, menu(menuAlarmSevr))
     field(changeStateSeverity, menu(menuAlarmSevr))
     field(inp, device(in, digitalInput))
     field(inp, device(in, digitalInput))
     field(rawValue, uint64) {
     field(rawValue, array(octet[])) {
         design(no)
         design(no)
         readonly(yes)
         readonly(yes)
        dynamic(yes)
     }
     }
     field(oldRawValue, uint64) {
     field(hardwareShift, int16) {
        design(no)
         readonly(yes)
         readonly(yes)
        dynamic(yes)
     }
     }
     field(hardwareShift, uint16) {
     field(hardwareMask, array(octet[]) {
         readonly(yes)
         readonly(yes)
    }
    field(hardwareMask, uint64 {
        readonly(yes)
    }
    field(lastValueAlarmed, int16) {
        design(no)
        readonly(yes)
        dynamic(yes)
     }
     }
     field(simInputLink, link(in))
     field(simInputLink, link(in))
     field(simValue, uint64) {
     field(simValue, array(octet[])  
        dynamic(yes)
    }
     field(simModeLink, link(in))
     field(simModeLink, link(in))
     field(simMode, menu(menuYesNo)) {
     field(simMode, menu(menuYesNo))  
        dynamic(yes)
    }
     field(simSevr, menu(menuAlarmSevr))
     field(simSevr, menu(menuAlarmSevr))
     view(choice) {
     view(choice) {
Line 229: Line 187:
  }
  }


== waveformRecord ==
<center>
= waveformRecord =
</center>


waveformRecord.dbd defines the following:
waveformRecord.dbd defines the following:


  include "dbCommon.dbd"
  include "dbCommon.dbd"
  record(waveform) extends iocRecord {
  record(waveform) extends RecordCommon {
     field(value, array([])) {
     field(value, array([])) {
         asl(0)
         asl(0)
         special(yes)
         special(yes)
        dynamic(yes)
     }
     }
     field(reArm,bool)
     field(reArm,bool)
Line 250: Line 209:
     field(simInputLink,link(in))
     field(simInputLink,link(in))
     field(simModeLink,link(in))
     field(simModeLink,link(in))
     field(simMode,menu(menuYesNo)) {
     field(simMode,menu(menuYesNo))  
        dynamic(yes)
    }
     field(simSevr,menu(menuYesNo))
     field(simSevr,menu(menuYesNo))
     view(value) {
     view(value) {

Revision as of 15:27, 16 September 2005

Example Record Types Sept 16 2005

Overview

This document present proposed V4 replacements for a few of the V3 record types.

aoRecord

aoRecord.dbd might be defined as follows:

include "dbCommon.dbd"
record(ao) extends RecordCommon {
    field(value, float64) {
        asl(0)
    }
    field(outValue, float64) {
        readonly(yes)
    }
    field(out, device(out,analogOut))
    field(outputRateOfChange, float64)
    field(desiredOutputLink, link(in))
    field(closedLoop, bool)
    field(outputIncremental, bool)
    field(convert, menu(menuConvert)) {
        special(yes)
    }
    field(linearConvert, struct(linearConvert)) {
        special(yes)
    }
    field(units, string)
    field(displayLimit, struct(displayLimit))
    field(controlLimit, struct(controlLimit))
    field(alarmLimit, struct(alarmLimit))
    field(alarmDeadband, float64)
    field(rawValue, int32) {
        design(no)
    }
    field(prevRawValue, int32) {
        design(no)
        readonly(yes)
    }
    field(readBackValue, int32) {
        design(no)
        readonly(yes)
    }
    field(init, bool) {
        design(no)
        readonly(yes)
    }
    field(simOutputLink, link(out))
    field(simModeLink, link(in))
    field(simMode, bool) 
    field(simSevr, menu(menuAlarmSevr))
    field(invalidAction, menu(menuIvoa))
    field(invalidValue, float64)
    field(outValueModified, bool) {
        design(no)
        readonly(yes)
    }
    view(value) {
        property(value, value) {
            property(units, units)
            property(timeStamp, time)
            property(alarmSeverity, alarmSeverity)
            property(alarmStatus, alarmStatus)
            property(displayLimit, displayLimit)
            property(controlLimit, controlLimit)
            property(alarmLimit, alarmLimit)
        }
    }
    view(output) {
        property(value, outValue) {
            property(units, units)
            property(timeStamp, time)
            property(alarmSeverity, alarmSeverity)
            property(alarmStatus, alarmStatus)
            property(displayLimit, displayLimit)
        }
    }
    view(raw) {
        property(value, rawValue) {
            property(timeStamp, time)
        }
    }
    view(readback) {
        property(value, readBackValue) {
            property(timeStamp, time)
        }
    }
}


calcRecord

calcRecord.dbd defines the following:

include "dbCommon.dbd"
struct(calcInpLink) {
    field(link,link(in))
    field(value,float64)
}
record(calc) extends RecordCommon {
    field(result,float64) {
        asl(0)
    }
    field(calc,string) {
        special(yes)
    }
    field(inp,array(struct(calcInpLink)[])) 
    field(units,string)
    field(displayLimit,struct(displayLimit))
    field(alarmLimit,struct(alarmLimit))
    field(alarmDeadband,float64)
    field(lastValueAlarmed,float64) {
        design(no)
        readonly(yes)
    }
    field(rpcl,private("char *"))
    view(result) {
        property(value, result) {
            property(units, units)
            property(timeStamp, time)
            property(alarmSeverity, alarmSeverity)
            property(alarmStatus, alarmStatus)
            property(displayLimit, displayLimit)
            property(alarmLimit, alarmLimit)
        }
    }
    view(expression) {
        property(value, calc)
    }
}


mbbiRecord

mbbiRecord.dbd could be:

include "dbCommon.dbd"
struct(mbbiState) {
    field(name, string)
    field(value, array(octet[]))
    field(severity, menu(menuAlarmSevr))
}
record(mbbi) extends RecordCommon {
    field(states, array(struct(mbbiState)[])) {
        special(yes)
    }
    field(value, enum(states)) {
        asl(0)
    }
    field(unknownStateSeverity, menu(menuAlarmSevr))
    field(changeStateSeverity, menu(menuAlarmSevr))
    field(inp, device(in, digitalInput))
    field(rawValue, array(octet[])) {
        design(no)
        readonly(yes)
    }
    field(hardwareShift, int16) {
        readonly(yes)
    }
    field(hardwareMask, array(octet[]) {
        readonly(yes)
    }
    field(simInputLink, link(in))
    field(simValue,  array(octet[]) 
    field(simModeLink, link(in))
    field(simMode, menu(menuYesNo)) 
    field(simSevr, menu(menuAlarmSevr))
    view(choice) {
        property(value, value) {
            property(timeStamp, time)
            property(alarmSeverity, alarmSeverity)
            property(alarmStatus, alarmStatus)
        }
    }
    view(raw) {
        property(value, raw) {
            property(timeStamp, time)
        }
    }
}

waveformRecord

waveformRecord.dbd defines the following:

include "dbCommon.dbd"
record(waveform) extends RecordCommon {
    field(value, array([])) {
        asl(0)
        special(yes)
    }
    field(reArm,bool)
    field(inp,device(in,waveformIO))
    field(units,string)
    field(displayLimit,struct(displayLimit))
    field(busy,bool) {
        design(no)
        readonly(yes)
    }
    field(simInputLink,link(in))
    field(simModeLink,link(in))
    field(simMode,menu(menuYesNo)) 
    field(simSevr,menu(menuYesNo))
    view(value) {
        property(value, value) {
            property(units, units)
            property(timeStamp, time)
            property(alarmSeverity, alarmSeverity)
            property(alarmStatus, alarmStatus)
            property(displayLimit, displayLimit)
        }
    }
}