kstmApp/src/O.linux-arm/kstm_registerRecordDeviceDriver.cpp
changeset 4 68a4f654dc00
equal deleted inserted replaced
3:ec018606c207 4:68a4f654dc00
       
     1 /* THIS IS A GENERATED FILE. DO NOT EDIT! */
       
     2 /* Generated from ../O.Common/kstm.dbd */
       
     3 
       
     4 #include <string.h>
       
     5 
       
     6 #include "epicsStdlib.h"
       
     7 #include "iocsh.h"
       
     8 #include "iocshRegisterCommon.h"
       
     9 #include "registryCommon.h"
       
    10 
       
    11 extern "C" {
       
    12 
       
    13 epicsShareExtern rset *pvar_rset_aSubRSET, *pvar_rset_aaiRSET,
       
    14     *pvar_rset_aaoRSET, *pvar_rset_acalcoutRSET, *pvar_rset_aiRSET,
       
    15     *pvar_rset_aoRSET, *pvar_rset_asynRSET, *pvar_rset_biRSET,
       
    16     *pvar_rset_boRSET, *pvar_rset_calcRSET, *pvar_rset_calcoutRSET,
       
    17     *pvar_rset_compressRSET, *pvar_rset_dfanoutRSET, *pvar_rset_eventRSET,
       
    18     *pvar_rset_fanoutRSET, *pvar_rset_histogramRSET,
       
    19     *pvar_rset_longinRSET, *pvar_rset_longoutRSET, *pvar_rset_lsiRSET,
       
    20     *pvar_rset_lsoRSET, *pvar_rset_mbbiRSET, *pvar_rset_mbbiDirectRSET,
       
    21     *pvar_rset_mbboRSET, *pvar_rset_mbboDirectRSET,
       
    22     *pvar_rset_permissiveRSET, *pvar_rset_printfRSET,
       
    23     *pvar_rset_scalcoutRSET, *pvar_rset_selRSET, *pvar_rset_seqRSET,
       
    24     *pvar_rset_sseqRSET, *pvar_rset_stateRSET, *pvar_rset_stringinRSET,
       
    25     *pvar_rset_stringoutRSET, *pvar_rset_subRSET, *pvar_rset_subArrayRSET,
       
    26     *pvar_rset_swaitRSET, *pvar_rset_transformRSET,
       
    27     *pvar_rset_waveformRSET;
       
    28 
       
    29 typedef int (*rso_func)(dbRecordType *pdbRecordType);
       
    30 epicsShareExtern rso_func pvar_func_aSubRecordSizeOffset,
       
    31     pvar_func_aaiRecordSizeOffset, pvar_func_aaoRecordSizeOffset,
       
    32     pvar_func_acalcoutRecordSizeOffset, pvar_func_aiRecordSizeOffset,
       
    33     pvar_func_aoRecordSizeOffset, pvar_func_asynRecordSizeOffset,
       
    34     pvar_func_biRecordSizeOffset, pvar_func_boRecordSizeOffset,
       
    35     pvar_func_calcRecordSizeOffset, pvar_func_calcoutRecordSizeOffset,
       
    36     pvar_func_compressRecordSizeOffset, pvar_func_dfanoutRecordSizeOffset,
       
    37     pvar_func_eventRecordSizeOffset, pvar_func_fanoutRecordSizeOffset,
       
    38     pvar_func_histogramRecordSizeOffset, pvar_func_longinRecordSizeOffset,
       
    39     pvar_func_longoutRecordSizeOffset, pvar_func_lsiRecordSizeOffset,
       
    40     pvar_func_lsoRecordSizeOffset, pvar_func_mbbiRecordSizeOffset,
       
    41     pvar_func_mbbiDirectRecordSizeOffset, pvar_func_mbboRecordSizeOffset,
       
    42     pvar_func_mbboDirectRecordSizeOffset,
       
    43     pvar_func_permissiveRecordSizeOffset,
       
    44     pvar_func_printfRecordSizeOffset, pvar_func_scalcoutRecordSizeOffset,
       
    45     pvar_func_selRecordSizeOffset, pvar_func_seqRecordSizeOffset,
       
    46     pvar_func_sseqRecordSizeOffset, pvar_func_stateRecordSizeOffset,
       
    47     pvar_func_stringinRecordSizeOffset,
       
    48     pvar_func_stringoutRecordSizeOffset, pvar_func_subRecordSizeOffset,
       
    49     pvar_func_subArrayRecordSizeOffset, pvar_func_swaitRecordSizeOffset,
       
    50     pvar_func_transformRecordSizeOffset,
       
    51     pvar_func_waveformRecordSizeOffset;
       
    52 
       
    53 static const char * const recordTypeNames[] = {
       
    54     "aSub", "aai", "aao", "acalcout", "ai", "ao", "asyn", "bi", "bo",
       
    55     "calc", "calcout", "compress", "dfanout", "event", "fanout",
       
    56     "histogram", "longin", "longout", "lsi", "lso", "mbbi", "mbbiDirect",
       
    57     "mbbo", "mbboDirect", "permissive", "printf", "scalcout", "sel",
       
    58     "seq", "sseq", "state", "stringin", "stringout", "sub", "subArray",
       
    59     "swait", "transform", "waveform"
       
    60 };
       
    61 
       
    62 static const recordTypeLocation rtl[] = {
       
    63     {pvar_rset_aSubRSET, pvar_func_aSubRecordSizeOffset},
       
    64     {pvar_rset_aaiRSET, pvar_func_aaiRecordSizeOffset},
       
    65     {pvar_rset_aaoRSET, pvar_func_aaoRecordSizeOffset},
       
    66     {pvar_rset_acalcoutRSET, pvar_func_acalcoutRecordSizeOffset},
       
    67     {pvar_rset_aiRSET, pvar_func_aiRecordSizeOffset},
       
    68     {pvar_rset_aoRSET, pvar_func_aoRecordSizeOffset},
       
    69     {pvar_rset_asynRSET, pvar_func_asynRecordSizeOffset},
       
    70     {pvar_rset_biRSET, pvar_func_biRecordSizeOffset},
       
    71     {pvar_rset_boRSET, pvar_func_boRecordSizeOffset},
       
    72     {pvar_rset_calcRSET, pvar_func_calcRecordSizeOffset},
       
    73     {pvar_rset_calcoutRSET, pvar_func_calcoutRecordSizeOffset},
       
    74     {pvar_rset_compressRSET, pvar_func_compressRecordSizeOffset},
       
    75     {pvar_rset_dfanoutRSET, pvar_func_dfanoutRecordSizeOffset},
       
    76     {pvar_rset_eventRSET, pvar_func_eventRecordSizeOffset},
       
    77     {pvar_rset_fanoutRSET, pvar_func_fanoutRecordSizeOffset},
       
    78     {pvar_rset_histogramRSET, pvar_func_histogramRecordSizeOffset},
       
    79     {pvar_rset_longinRSET, pvar_func_longinRecordSizeOffset},
       
    80     {pvar_rset_longoutRSET, pvar_func_longoutRecordSizeOffset},
       
    81     {pvar_rset_lsiRSET, pvar_func_lsiRecordSizeOffset},
       
    82     {pvar_rset_lsoRSET, pvar_func_lsoRecordSizeOffset},
       
    83     {pvar_rset_mbbiRSET, pvar_func_mbbiRecordSizeOffset},
       
    84     {pvar_rset_mbbiDirectRSET, pvar_func_mbbiDirectRecordSizeOffset},
       
    85     {pvar_rset_mbboRSET, pvar_func_mbboRecordSizeOffset},
       
    86     {pvar_rset_mbboDirectRSET, pvar_func_mbboDirectRecordSizeOffset},
       
    87     {pvar_rset_permissiveRSET, pvar_func_permissiveRecordSizeOffset},
       
    88     {pvar_rset_printfRSET, pvar_func_printfRecordSizeOffset},
       
    89     {pvar_rset_scalcoutRSET, pvar_func_scalcoutRecordSizeOffset},
       
    90     {pvar_rset_selRSET, pvar_func_selRecordSizeOffset},
       
    91     {pvar_rset_seqRSET, pvar_func_seqRecordSizeOffset},
       
    92     {pvar_rset_sseqRSET, pvar_func_sseqRecordSizeOffset},
       
    93     {pvar_rset_stateRSET, pvar_func_stateRecordSizeOffset},
       
    94     {pvar_rset_stringinRSET, pvar_func_stringinRecordSizeOffset},
       
    95     {pvar_rset_stringoutRSET, pvar_func_stringoutRecordSizeOffset},
       
    96     {pvar_rset_subRSET, pvar_func_subRecordSizeOffset},
       
    97     {pvar_rset_subArrayRSET, pvar_func_subArrayRecordSizeOffset},
       
    98     {pvar_rset_swaitRSET, pvar_func_swaitRecordSizeOffset},
       
    99     {pvar_rset_transformRSET, pvar_func_transformRecordSizeOffset},
       
   100     {pvar_rset_waveformRSET, pvar_func_waveformRecordSizeOffset}
       
   101 };
       
   102 
       
   103 epicsShareExtern dset *pvar_dset_devAaiSoft, *pvar_dset_devaaiStream,
       
   104     *pvar_dset_devAaoSoft, *pvar_dset_devaaoStream,
       
   105     *pvar_dset_devaCalcoutSoft, *pvar_dset_devAiSoft,
       
   106     *pvar_dset_devAiSoftRaw, *pvar_dset_devAiSoftCallback,
       
   107     *pvar_dset_devTimestampAI, *pvar_dset_devAiGeneralTime,
       
   108     *pvar_dset_asynAiInt32, *pvar_dset_asynAiInt32Average,
       
   109     *pvar_dset_asynAiFloat64, *pvar_dset_asynAiFloat64Average,
       
   110     *pvar_dset_devaiStream, *pvar_dset_devAoSoft, *pvar_dset_devAoSoftRaw,
       
   111     *pvar_dset_devAoSoftCallback, *pvar_dset_asynAoInt32,
       
   112     *pvar_dset_asynAoFloat64, *pvar_dset_devaoStream,
       
   113     *pvar_dset_asynRecordDevice, *pvar_dset_devBiSoft,
       
   114     *pvar_dset_devBiSoftRaw, *pvar_dset_devBiSoftCallback,
       
   115     *pvar_dset_devBiDbState, *pvar_dset_asynBiInt32,
       
   116     *pvar_dset_asynBiUInt32Digital, *pvar_dset_devbiStream,
       
   117     *pvar_dset_devBoSoft, *pvar_dset_devBoSoftRaw,
       
   118     *pvar_dset_devBoSoftCallback, *pvar_dset_devBoGeneralTime,
       
   119     *pvar_dset_devBoDbState, *pvar_dset_asynBoInt32,
       
   120     *pvar_dset_asynBoUInt32Digital, *pvar_dset_devboStream,
       
   121     *pvar_dset_devCalcoutSoft, *pvar_dset_devCalcoutSoftCallback,
       
   122     *pvar_dset_devcalcoutStream, *pvar_dset_devEventSoft,
       
   123     *pvar_dset_devHistogramSoft, *pvar_dset_devLiSoft,
       
   124     *pvar_dset_devLiSoftCallback, *pvar_dset_devLiGeneralTime,
       
   125     *pvar_dset_asynLiInt32, *pvar_dset_asynLiUInt32Digital,
       
   126     *pvar_dset_devlonginStream, *pvar_dset_devLoSoft,
       
   127     *pvar_dset_devLoSoftCallback, *pvar_dset_asynLoInt32,
       
   128     *pvar_dset_asynLoUInt32Digital, *pvar_dset_devlongoutStream,
       
   129     *pvar_dset_devLsiSoft, *pvar_dset_devLsoSoft,
       
   130     *pvar_dset_devLsoSoftCallback, *pvar_dset_devLsoStdio,
       
   131     *pvar_dset_devMbbiSoft, *pvar_dset_devMbbiSoftRaw,
       
   132     *pvar_dset_devMbbiSoftCallback, *pvar_dset_asynMbbiInt32,
       
   133     *pvar_dset_asynMbbiUInt32Digital, *pvar_dset_devmbbiStream,
       
   134     *pvar_dset_devMbbiDirectSoft, *pvar_dset_devMbbiDirectSoftRaw,
       
   135     *pvar_dset_devMbbiDirectSoftCallback,
       
   136     *pvar_dset_asynMbbiDirectUInt32Digital,
       
   137     *pvar_dset_devmbbiDirectStream, *pvar_dset_devMbboSoft,
       
   138     *pvar_dset_devMbboSoftRaw, *pvar_dset_devMbboSoftCallback,
       
   139     *pvar_dset_asynMbboInt32, *pvar_dset_asynMbboUInt32Digital,
       
   140     *pvar_dset_devmbboStream, *pvar_dset_devMbboDirectSoft,
       
   141     *pvar_dset_devMbboDirectSoftRaw, *pvar_dset_devMbboDirectSoftCallback,
       
   142     *pvar_dset_asynMbboDirectUInt32Digital,
       
   143     *pvar_dset_devmbboDirectStream, *pvar_dset_devPrintfSoft,
       
   144     *pvar_dset_devPrintfSoftCallback, *pvar_dset_devPrintfStdio,
       
   145     *pvar_dset_devsCalcoutSoft, *pvar_dset_devSiSoft,
       
   146     *pvar_dset_devSiSoftCallback, *pvar_dset_devTimestampSI,
       
   147     *pvar_dset_devSiGeneralTime, *pvar_dset_asynSiOctetCmdResponse,
       
   148     *pvar_dset_asynSiOctetWriteRead, *pvar_dset_asynSiOctetRead,
       
   149     *pvar_dset_devstringinStream, *pvar_dset_devSoSoft,
       
   150     *pvar_dset_devSoSoftCallback, *pvar_dset_devSoStdio,
       
   151     *pvar_dset_asynSoOctetWrite, *pvar_dset_devstringoutStream,
       
   152     *pvar_dset_devSASoft, *pvar_dset_devSWaitIoEvent,
       
   153     *pvar_dset_devWfSoft, *pvar_dset_asynWfOctetCmdResponse,
       
   154     *pvar_dset_asynWfOctetWriteRead, *pvar_dset_asynWfOctetRead,
       
   155     *pvar_dset_asynWfOctetWrite, *pvar_dset_asynInt8ArrayWfIn,
       
   156     *pvar_dset_asynInt8ArrayWfOut, *pvar_dset_asynInt16ArrayWfIn,
       
   157     *pvar_dset_asynInt16ArrayWfOut, *pvar_dset_asynInt32ArrayWfIn,
       
   158     *pvar_dset_asynInt32ArrayWfOut, *pvar_dset_asynInt32TimeSeries,
       
   159     *pvar_dset_asynFloat32ArrayWfIn, *pvar_dset_asynFloat32ArrayWfOut,
       
   160     *pvar_dset_asynFloat64ArrayWfIn, *pvar_dset_asynFloat64ArrayWfOut,
       
   161     *pvar_dset_asynFloat64TimeSeries, *pvar_dset_devwaveformStream;
       
   162 
       
   163 static const char * const deviceSupportNames[] = {
       
   164     "devAaiSoft", "devaaiStream", "devAaoSoft", "devaaoStream",
       
   165     "devaCalcoutSoft", "devAiSoft", "devAiSoftRaw", "devAiSoftCallback",
       
   166     "devTimestampAI", "devAiGeneralTime", "asynAiInt32",
       
   167     "asynAiInt32Average", "asynAiFloat64", "asynAiFloat64Average",
       
   168     "devaiStream", "devAoSoft", "devAoSoftRaw", "devAoSoftCallback",
       
   169     "asynAoInt32", "asynAoFloat64", "devaoStream", "asynRecordDevice",
       
   170     "devBiSoft", "devBiSoftRaw", "devBiSoftCallback", "devBiDbState",
       
   171     "asynBiInt32", "asynBiUInt32Digital", "devbiStream", "devBoSoft",
       
   172     "devBoSoftRaw", "devBoSoftCallback", "devBoGeneralTime",
       
   173     "devBoDbState", "asynBoInt32", "asynBoUInt32Digital", "devboStream",
       
   174     "devCalcoutSoft", "devCalcoutSoftCallback", "devcalcoutStream",
       
   175     "devEventSoft", "devHistogramSoft", "devLiSoft", "devLiSoftCallback",
       
   176     "devLiGeneralTime", "asynLiInt32", "asynLiUInt32Digital",
       
   177     "devlonginStream", "devLoSoft", "devLoSoftCallback", "asynLoInt32",
       
   178     "asynLoUInt32Digital", "devlongoutStream", "devLsiSoft", "devLsoSoft",
       
   179     "devLsoSoftCallback", "devLsoStdio", "devMbbiSoft", "devMbbiSoftRaw",
       
   180     "devMbbiSoftCallback", "asynMbbiInt32", "asynMbbiUInt32Digital",
       
   181     "devmbbiStream", "devMbbiDirectSoft", "devMbbiDirectSoftRaw",
       
   182     "devMbbiDirectSoftCallback", "asynMbbiDirectUInt32Digital",
       
   183     "devmbbiDirectStream", "devMbboSoft", "devMbboSoftRaw",
       
   184     "devMbboSoftCallback", "asynMbboInt32", "asynMbboUInt32Digital",
       
   185     "devmbboStream", "devMbboDirectSoft", "devMbboDirectSoftRaw",
       
   186     "devMbboDirectSoftCallback", "asynMbboDirectUInt32Digital",
       
   187     "devmbboDirectStream", "devPrintfSoft", "devPrintfSoftCallback",
       
   188     "devPrintfStdio", "devsCalcoutSoft", "devSiSoft", "devSiSoftCallback",
       
   189     "devTimestampSI", "devSiGeneralTime", "asynSiOctetCmdResponse",
       
   190     "asynSiOctetWriteRead", "asynSiOctetRead", "devstringinStream",
       
   191     "devSoSoft", "devSoSoftCallback", "devSoStdio", "asynSoOctetWrite",
       
   192     "devstringoutStream", "devSASoft", "devSWaitIoEvent", "devWfSoft",
       
   193     "asynWfOctetCmdResponse", "asynWfOctetWriteRead", "asynWfOctetRead",
       
   194     "asynWfOctetWrite", "asynInt8ArrayWfIn", "asynInt8ArrayWfOut",
       
   195     "asynInt16ArrayWfIn", "asynInt16ArrayWfOut", "asynInt32ArrayWfIn",
       
   196     "asynInt32ArrayWfOut", "asynInt32TimeSeries", "asynFloat32ArrayWfIn",
       
   197     "asynFloat32ArrayWfOut", "asynFloat64ArrayWfIn",
       
   198     "asynFloat64ArrayWfOut", "asynFloat64TimeSeries", "devwaveformStream"
       
   199 };
       
   200 
       
   201 static const dset * const devsl[] = {
       
   202     pvar_dset_devAaiSoft, pvar_dset_devaaiStream, pvar_dset_devAaoSoft,
       
   203     pvar_dset_devaaoStream, pvar_dset_devaCalcoutSoft,
       
   204     pvar_dset_devAiSoft, pvar_dset_devAiSoftRaw,
       
   205     pvar_dset_devAiSoftCallback, pvar_dset_devTimestampAI,
       
   206     pvar_dset_devAiGeneralTime, pvar_dset_asynAiInt32,
       
   207     pvar_dset_asynAiInt32Average, pvar_dset_asynAiFloat64,
       
   208     pvar_dset_asynAiFloat64Average, pvar_dset_devaiStream,
       
   209     pvar_dset_devAoSoft, pvar_dset_devAoSoftRaw,
       
   210     pvar_dset_devAoSoftCallback, pvar_dset_asynAoInt32,
       
   211     pvar_dset_asynAoFloat64, pvar_dset_devaoStream,
       
   212     pvar_dset_asynRecordDevice, pvar_dset_devBiSoft,
       
   213     pvar_dset_devBiSoftRaw, pvar_dset_devBiSoftCallback,
       
   214     pvar_dset_devBiDbState, pvar_dset_asynBiInt32,
       
   215     pvar_dset_asynBiUInt32Digital, pvar_dset_devbiStream,
       
   216     pvar_dset_devBoSoft, pvar_dset_devBoSoftRaw,
       
   217     pvar_dset_devBoSoftCallback, pvar_dset_devBoGeneralTime,
       
   218     pvar_dset_devBoDbState, pvar_dset_asynBoInt32,
       
   219     pvar_dset_asynBoUInt32Digital, pvar_dset_devboStream,
       
   220     pvar_dset_devCalcoutSoft, pvar_dset_devCalcoutSoftCallback,
       
   221     pvar_dset_devcalcoutStream, pvar_dset_devEventSoft,
       
   222     pvar_dset_devHistogramSoft, pvar_dset_devLiSoft,
       
   223     pvar_dset_devLiSoftCallback, pvar_dset_devLiGeneralTime,
       
   224     pvar_dset_asynLiInt32, pvar_dset_asynLiUInt32Digital,
       
   225     pvar_dset_devlonginStream, pvar_dset_devLoSoft,
       
   226     pvar_dset_devLoSoftCallback, pvar_dset_asynLoInt32,
       
   227     pvar_dset_asynLoUInt32Digital, pvar_dset_devlongoutStream,
       
   228     pvar_dset_devLsiSoft, pvar_dset_devLsoSoft,
       
   229     pvar_dset_devLsoSoftCallback, pvar_dset_devLsoStdio,
       
   230     pvar_dset_devMbbiSoft, pvar_dset_devMbbiSoftRaw,
       
   231     pvar_dset_devMbbiSoftCallback, pvar_dset_asynMbbiInt32,
       
   232     pvar_dset_asynMbbiUInt32Digital, pvar_dset_devmbbiStream,
       
   233     pvar_dset_devMbbiDirectSoft, pvar_dset_devMbbiDirectSoftRaw,
       
   234     pvar_dset_devMbbiDirectSoftCallback,
       
   235     pvar_dset_asynMbbiDirectUInt32Digital, pvar_dset_devmbbiDirectStream,
       
   236     pvar_dset_devMbboSoft, pvar_dset_devMbboSoftRaw,
       
   237     pvar_dset_devMbboSoftCallback, pvar_dset_asynMbboInt32,
       
   238     pvar_dset_asynMbboUInt32Digital, pvar_dset_devmbboStream,
       
   239     pvar_dset_devMbboDirectSoft, pvar_dset_devMbboDirectSoftRaw,
       
   240     pvar_dset_devMbboDirectSoftCallback,
       
   241     pvar_dset_asynMbboDirectUInt32Digital, pvar_dset_devmbboDirectStream,
       
   242     pvar_dset_devPrintfSoft, pvar_dset_devPrintfSoftCallback,
       
   243     pvar_dset_devPrintfStdio, pvar_dset_devsCalcoutSoft,
       
   244     pvar_dset_devSiSoft, pvar_dset_devSiSoftCallback,
       
   245     pvar_dset_devTimestampSI, pvar_dset_devSiGeneralTime,
       
   246     pvar_dset_asynSiOctetCmdResponse, pvar_dset_asynSiOctetWriteRead,
       
   247     pvar_dset_asynSiOctetRead, pvar_dset_devstringinStream,
       
   248     pvar_dset_devSoSoft, pvar_dset_devSoSoftCallback,
       
   249     pvar_dset_devSoStdio, pvar_dset_asynSoOctetWrite,
       
   250     pvar_dset_devstringoutStream, pvar_dset_devSASoft,
       
   251     pvar_dset_devSWaitIoEvent, pvar_dset_devWfSoft,
       
   252     pvar_dset_asynWfOctetCmdResponse, pvar_dset_asynWfOctetWriteRead,
       
   253     pvar_dset_asynWfOctetRead, pvar_dset_asynWfOctetWrite,
       
   254     pvar_dset_asynInt8ArrayWfIn, pvar_dset_asynInt8ArrayWfOut,
       
   255     pvar_dset_asynInt16ArrayWfIn, pvar_dset_asynInt16ArrayWfOut,
       
   256     pvar_dset_asynInt32ArrayWfIn, pvar_dset_asynInt32ArrayWfOut,
       
   257     pvar_dset_asynInt32TimeSeries, pvar_dset_asynFloat32ArrayWfIn,
       
   258     pvar_dset_asynFloat32ArrayWfOut, pvar_dset_asynFloat64ArrayWfIn,
       
   259     pvar_dset_asynFloat64ArrayWfOut, pvar_dset_asynFloat64TimeSeries,
       
   260     pvar_dset_devwaveformStream
       
   261 };
       
   262 
       
   263 epicsShareExtern drvet *pvar_drvet_drvAsyn, *pvar_drvet_stream;
       
   264 
       
   265 static const char *driverSupportNames[] = {
       
   266     "drvAsyn", "stream"};
       
   267 
       
   268 static struct drvet *drvsl[] = {
       
   269     pvar_drvet_drvAsyn,
       
   270     pvar_drvet_stream};
       
   271 
       
   272 typedef void (*reg_func)(void);
       
   273 epicsShareExtern reg_func pvar_func_arrInitialize,
       
   274     pvar_func_arrayTestRegister, pvar_func_asSub,
       
   275     pvar_func_asynInterposeEosRegister,
       
   276     pvar_func_asynInterposeFlushRegister, pvar_func_asynRegister,
       
   277     pvar_func_dbndInitialize, pvar_func_drvAsynIPPortRegisterCommands,
       
   278     pvar_func_drvAsynIPServerPortRegisterCommands,
       
   279     pvar_func_editSseqRegistrar, pvar_func_interpRegister,
       
   280     pvar_func_streamRegistrar, pvar_func_subAveRegister,
       
   281     pvar_func_syncInitialize, pvar_func_tsInitialize,
       
   282     pvar_func_register_func_aSubReadDHTInit,
       
   283     pvar_func_register_func_aSubReadDHTProcess;
       
   284 
       
   285 epicsShareExtern int * const pvar_int_aCalcAsyncThreshold;
       
   286 epicsShareExtern int * const pvar_int_aCalcLoopMax;
       
   287 epicsShareExtern int * const pvar_int_aCalcPerformDebug;
       
   288 epicsShareExtern int * const pvar_int_aCalcPostfixDebug;
       
   289 epicsShareExtern int * const pvar_int_aCalcoutRecordDebug;
       
   290 epicsShareExtern int * const pvar_int_aSubReadDHTDebug;
       
   291 epicsShareExtern int * const pvar_int_arrayTestDebug;
       
   292 epicsShareExtern int * const pvar_int_asCaDebug;
       
   293 epicsShareExtern int * const pvar_int_atExitDebug;
       
   294 epicsShareExtern double * const pvar_double_boHIGHlimit;
       
   295 epicsShareExtern int * const pvar_int_boHIGHprecision;
       
   296 epicsShareExtern double * const pvar_double_calcoutODLYlimit;
       
   297 epicsShareExtern int * const pvar_int_calcoutODLYprecision;
       
   298 epicsShareExtern int * const pvar_int_callbackParallelThreadsDefault;
       
   299 epicsShareExtern int * const pvar_int_dbBptNotMonotonic;
       
   300 epicsShareExtern int * const pvar_int_dbRecordsOnceOnly;
       
   301 epicsShareExtern int * const pvar_int_dbTemplateMaxVars;
       
   302 epicsShareExtern int * const pvar_int_debugSubAve;
       
   303 epicsShareExtern int * const pvar_int_devaCalcoutSoftDebug;
       
   304 epicsShareExtern int * const pvar_int_devsCalcoutSoftDebug;
       
   305 epicsShareExtern int * const pvar_int_histogramSDELprecision;
       
   306 epicsShareExtern int * const pvar_int_interpDebug;
       
   307 epicsShareExtern int * const pvar_int_sCalcLoopMax;
       
   308 epicsShareExtern int * const pvar_int_sCalcPerformDebug;
       
   309 epicsShareExtern int * const pvar_int_sCalcPostfixDebug;
       
   310 epicsShareExtern int * const pvar_int_sCalcStackHW;
       
   311 epicsShareExtern int * const pvar_int_sCalcStackLW;
       
   312 epicsShareExtern int * const pvar_int_sCalcoutRecordDebug;
       
   313 epicsShareExtern double * const pvar_double_seqDLYlimit;
       
   314 epicsShareExtern int * const pvar_int_seqDLYprecision;
       
   315 epicsShareExtern int * const pvar_int_sseqRecDebug;
       
   316 epicsShareExtern int * const pvar_int_streamDebug;
       
   317 epicsShareExtern int * const pvar_int_swaitRecordDebug;
       
   318 epicsShareExtern int * const pvar_int_transformRecordDebug;
       
   319 
       
   320 static struct iocshVarDef vardefs[] = {
       
   321     {"aCalcAsyncThreshold", iocshArgInt, pvar_int_aCalcAsyncThreshold},
       
   322     {"aCalcLoopMax", iocshArgInt, pvar_int_aCalcLoopMax},
       
   323     {"aCalcPerformDebug", iocshArgInt, pvar_int_aCalcPerformDebug},
       
   324     {"aCalcPostfixDebug", iocshArgInt, pvar_int_aCalcPostfixDebug},
       
   325     {"aCalcoutRecordDebug", iocshArgInt, pvar_int_aCalcoutRecordDebug},
       
   326     {"aSubReadDHTDebug", iocshArgInt, pvar_int_aSubReadDHTDebug},
       
   327     {"arrayTestDebug", iocshArgInt, pvar_int_arrayTestDebug},
       
   328     {"asCaDebug", iocshArgInt, pvar_int_asCaDebug},
       
   329     {"atExitDebug", iocshArgInt, pvar_int_atExitDebug},
       
   330     {"boHIGHlimit", iocshArgDouble, pvar_double_boHIGHlimit},
       
   331     {"boHIGHprecision", iocshArgInt, pvar_int_boHIGHprecision},
       
   332     {"calcoutODLYlimit", iocshArgDouble, pvar_double_calcoutODLYlimit},
       
   333     {"calcoutODLYprecision", iocshArgInt, pvar_int_calcoutODLYprecision},
       
   334     {"callbackParallelThreadsDefault", iocshArgInt, pvar_int_callbackParallelThreadsDefault},
       
   335     {"dbBptNotMonotonic", iocshArgInt, pvar_int_dbBptNotMonotonic},
       
   336     {"dbRecordsOnceOnly", iocshArgInt, pvar_int_dbRecordsOnceOnly},
       
   337     {"dbTemplateMaxVars", iocshArgInt, pvar_int_dbTemplateMaxVars},
       
   338     {"debugSubAve", iocshArgInt, pvar_int_debugSubAve},
       
   339     {"devaCalcoutSoftDebug", iocshArgInt, pvar_int_devaCalcoutSoftDebug},
       
   340     {"devsCalcoutSoftDebug", iocshArgInt, pvar_int_devsCalcoutSoftDebug},
       
   341     {"histogramSDELprecision", iocshArgInt, pvar_int_histogramSDELprecision},
       
   342     {"interpDebug", iocshArgInt, pvar_int_interpDebug},
       
   343     {"sCalcLoopMax", iocshArgInt, pvar_int_sCalcLoopMax},
       
   344     {"sCalcPerformDebug", iocshArgInt, pvar_int_sCalcPerformDebug},
       
   345     {"sCalcPostfixDebug", iocshArgInt, pvar_int_sCalcPostfixDebug},
       
   346     {"sCalcStackHW", iocshArgInt, pvar_int_sCalcStackHW},
       
   347     {"sCalcStackLW", iocshArgInt, pvar_int_sCalcStackLW},
       
   348     {"sCalcoutRecordDebug", iocshArgInt, pvar_int_sCalcoutRecordDebug},
       
   349     {"seqDLYlimit", iocshArgDouble, pvar_double_seqDLYlimit},
       
   350     {"seqDLYprecision", iocshArgInt, pvar_int_seqDLYprecision},
       
   351     {"sseqRecDebug", iocshArgInt, pvar_int_sseqRecDebug},
       
   352     {"streamDebug", iocshArgInt, pvar_int_streamDebug},
       
   353     {"swaitRecordDebug", iocshArgInt, pvar_int_swaitRecordDebug},
       
   354     {"transformRecordDebug", iocshArgInt, pvar_int_transformRecordDebug},
       
   355     {NULL, iocshArgInt, NULL}
       
   356 };
       
   357 
       
   358 int kstm_registerRecordDeviceDriver(DBBASE *pbase)
       
   359 {
       
   360     static int executed = 0;
       
   361     const char *bldTop = "/home/epics/FHI/zweikstm";
       
   362     const char *envTop = getenv("TOP");
       
   363 
       
   364     if (envTop && strcmp(envTop, bldTop)) {
       
   365         printf("Warning: IOC is booting with TOP = \"%s\"\n"
       
   366                "          but was built with TOP = \"%s\"\n",
       
   367                envTop, bldTop);
       
   368     }
       
   369 
       
   370     if (!pbase) {
       
   371         printf("pdbbase is NULL; you must load a DBD file first.\n");
       
   372         return -1;
       
   373     }
       
   374 
       
   375     if (executed) {
       
   376         printf("Warning: Registration already done.\n");
       
   377     }
       
   378     executed = 1;
       
   379 
       
   380     registerRecordTypes(pbase, NELEMENTS(rtl), recordTypeNames, rtl);
       
   381     registerDevices(pbase, NELEMENTS(devsl), deviceSupportNames, devsl);
       
   382     registerDrivers(pbase, NELEMENTS(drvsl), driverSupportNames, drvsl);
       
   383     pvar_func_arrInitialize();
       
   384     pvar_func_arrayTestRegister();
       
   385     pvar_func_asSub();
       
   386     pvar_func_asynInterposeEosRegister();
       
   387     pvar_func_asynInterposeFlushRegister();
       
   388     pvar_func_asynRegister();
       
   389     pvar_func_dbndInitialize();
       
   390     pvar_func_drvAsynIPPortRegisterCommands();
       
   391     pvar_func_drvAsynIPServerPortRegisterCommands();
       
   392     pvar_func_editSseqRegistrar();
       
   393     pvar_func_interpRegister();
       
   394     pvar_func_streamRegistrar();
       
   395     pvar_func_subAveRegister();
       
   396     pvar_func_syncInitialize();
       
   397     pvar_func_tsInitialize();
       
   398     pvar_func_register_func_aSubReadDHTInit();
       
   399     pvar_func_register_func_aSubReadDHTProcess();
       
   400     iocshRegisterVariable(vardefs);
       
   401     return 0;
       
   402 }
       
   403 
       
   404 /* kstm_registerRecordDeviceDriver */
       
   405 static const iocshArg rrddArg0 = {"pdbbase", iocshArgPdbbase};
       
   406 static const iocshArg *rrddArgs[] = {&rrddArg0};
       
   407 static const iocshFuncDef rrddFuncDef =
       
   408     {"kstm_registerRecordDeviceDriver", 1, rrddArgs};
       
   409 static void rrddCallFunc(const iocshArgBuf *)
       
   410 {
       
   411     kstm_registerRecordDeviceDriver(*iocshPpdbbase);
       
   412 }
       
   413 
       
   414 } // extern "C"
       
   415 
       
   416 /*
       
   417  * Register commands on application startup
       
   418  */
       
   419 static int Registration() {
       
   420     iocshRegisterCommon();
       
   421     iocshRegister(&rrddFuncDef, rrddCallFunc);
       
   422     return 0;
       
   423 }
       
   424 
       
   425 static int done = Registration();