This is Unofficial EPICS BASE Doxygen Site
devAoSoftCallback.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, 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 Versions 3.13.7
7 * and higher are distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /* devAoSoftCallbackCallback.c */
11 /*
12  * Author: Marty Kraimer
13  * Date: 04NOV2003
14  */
15 
16 #include <stdlib.h>
17 #include <stdio.h>
18 #include <string.h>
19 
20 #include "alarm.h"
21 #include "dbDefs.h"
22 #include "dbAccess.h"
23 #include "recGbl.h"
24 #include "recSup.h"
25 #include "devSup.h"
26 #include "dbCa.h"
27 #include "link.h"
28 #include "special.h"
29 #include "aoRecord.h"
30 #include "epicsExport.h"
31 
32 /* Create the dset for devAoSoftCallback */
33 static long write_ao(aoRecord *prec);
34 
36  {6, NULL, NULL, NULL, NULL},
37  write_ao, NULL
38 };
40 
41 static long write_ao(aoRecord *prec)
42 {
43  struct link *plink = &prec->out;
44  long status;
45 
46  if (prec->pact)
47  return 0;
48 
49  status = dbPutLinkAsync(plink, DBR_DOUBLE, &prec->oval, 1);
50  if (!status)
51  prec->pact = TRUE;
52  else if (status == S_db_noLSET)
53  status = dbPutLink(plink, DBR_DOUBLE, &prec->oval, 1);
54 
55  return status;
56 }
57 
aodset devAoSoftCallback
pvd::Status status
#define NULL
Definition: catime.c:38
Miscellaneous macro definitions.
Device support routines.
Definition: devSup.h:140
#define DBR_DOUBLE
Definition: db_access.h:76
#define TRUE
Definition: dbDefs.h:27
int prec
Definition: reader.c:29
Exporting IOC objects.
epicsExportAddress(dset, devAoSoftCallback)