This is Unofficial EPICS BASE Doxygen Site
devAaoSoft.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /*
11  * devAaoSoft.c - Device Support Routines for soft Waveform Records
12  *
13  * Original Author: Bob Dalesio
14  * Current Author: Dirk Zimoch
15  * Date: 27-MAY-2010
16  */
17 
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <string.h>
21 
22 #include "alarm.h"
23 #include "dbDefs.h"
24 #include "dbAccess.h"
25 #include "recGbl.h"
26 #include "devSup.h"
27 #include "cantProceed.h"
28 #include "menuYesNo.h"
29 #include "aaoRecord.h"
30 #include "epicsExport.h"
31 
32 /* Create the dset for devAaoSoft */
33 static long init_record(dbCommon *pcommon);
34 static long write_aao(aaoRecord *prec);
35 
36 aaodset devAaoSoft = {
37  {5, NULL, NULL, init_record, NULL},
38  write_aao
39 };
41 
42 static long init_record(dbCommon *pcommon)
43 {
44  aaoRecord *prec = (aaoRecord *)pcommon;
45 
46  if (dbLinkIsConstant(&prec->out)) {
47  prec->nord = 0;
48  }
49  return 0;
50 }
51 
52 static long write_aao(aaoRecord *prec)
53 {
54  long nRequest = prec->nord;
55  dbPutLink(prec->simm == menuYesNoYES ? &prec->siol : &prec->out,
56  prec->ftvl, prec->bptr, nRequest);
57 
58  return 0;
59 }
#define init_record
epicsExportAddress(dset, devAaoSoft)
#define NULL
Definition: catime.c:38
Miscellaneous macro definitions.
Device support routines.
Definition: devSup.h:140
aaodset devAaoSoft
Definition: devAaoSoft.c:36
Routines for code that can&#39;t continue or return after an error.
int prec
Definition: reader.c:29
Exporting IOC objects.