#*************************************************************************
# Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
#     National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************



recordtype(lsi) {


    include "dbCommon.dbd"
    %
    %/* Declare Device Support Entry Table */
    %struct lsiRecord;
    %typedef struct lsidset {
    %    dset common;
    %    long (*read_string)(struct lsiRecord *prec);
    %} lsidset;
    %#define HAS_lsidset
    %
    field(VAL,DBF_NOACCESS) {
        prompt("Current Value")
        asl(ASL0)
        pp(TRUE)
        special(SPC_DBADDR)
        extra("char *val")
        #=type STRING or CHAR[SIZV]
        #=read Yes
        #=write Yes
    }
    field(OVAL,DBF_NOACCESS) {
        prompt("Old Value")
        special(SPC_DBADDR)
        interest(3)
        extra("char *oval")
        #=type STRING or [SIZV]
        #=read Yes
        #=write No
    }
    field(SIZV,DBF_USHORT) {
        prompt("Size of buffers")
        promptgroup("40 - Input")
        special(SPC_NOMOD)
        interest(1)
        initial("41")
    }
    field(LEN,DBF_ULONG) {
        prompt("Length of VAL")
        special(SPC_NOMOD)
    }
    field(OLEN,DBF_ULONG) {
        prompt("Length of OVAL")
        special(SPC_NOMOD)
    }
    field(INP,DBF_INLINK) {
        prompt("Input Specification")
        promptgroup("40 - Input")
        interest(1)
    }


    field(MPST,DBF_MENU) {
        prompt("Post Value Monitors")
        promptgroup("80 - Display")
        interest(1)
        menu(menuPost)
    }
    field(APST,DBF_MENU) {
        prompt("Post Archive Monitors")
        promptgroup("80 - Display")
        interest(1)
        menu(menuPost)
    }


    field(SIML,DBF_INLINK) {
        prompt("Simulation Mode Link")
        promptgroup("90 - Simulate")
        interest(1)
    }
    field(SIMM,DBF_MENU) {
        prompt("Simulation Mode")
        special(SPC_MOD)
        interest(1)
        menu(menuYesNo)
    }
    field(SIMS,DBF_MENU) {
        prompt("Simulation Mode Severity")
        promptgroup("90 - Simulate")
        interest(2)
        menu(menuAlarmSevr)
    }
    field(SIOL,DBF_INLINK) {
        prompt("Simulation Input Link")
        promptgroup("90 - Simulate")
        interest(1)
    }
    field(OLDSIMM,DBF_MENU) {
        prompt("Prev. Simulation Mode")
        special(SPC_NOMOD)
        interest(4)
        menu(menuSimm)
    }
    field(SSCN,DBF_MENU) {
        prompt("Sim. Mode Scan")
        promptgroup("90 - Simulate")
        interest(1)
        menu(menuScan)
        initial("65535")
    }
    field(SDLY,DBF_DOUBLE) {
        prompt("Sim. Mode Async Delay")
        promptgroup("90 - Simulate")
        interest(2)
        initial("-1.0")
    }
    %#include "callback.h"
    field(SIMPVT,DBF_NOACCESS) {
        prompt("Sim. Mode Private")
        special(SPC_NOMOD)
        interest(4)
        extra("epicsCallback            *simpvt")
    }
}



