This is Unofficial EPICS BASE Doxygen Site
devLoSoftCallback.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 is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /* devLoSoftCallback.c */
11 /*
12  * Author: Marty Kraimer
13  * Date: 04NOV2003
14  */
15 
16 
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <string.h>
20 
21 #include "alarm.h"
22 #include "dbDefs.h"
23 #include "dbAccess.h"
24 #include "recGbl.h"
25 #include "recSup.h"
26 #include "devSup.h"
27 #include "longoutRecord.h"
28 #include "epicsExport.h"
29 
30 /* Create the dset for devLoSoftCallback */
31 static long write_longout(longoutRecord *prec);
32 
33 longoutdset devLoSoftCallback = {
34  {5, NULL, NULL, NULL, NULL},
35  write_longout
36 };
38 
39 static long write_longout(longoutRecord *prec)
40 {
41  struct link *plink = &prec->out;
42  long status;
43 
44  if (prec->pact)
45  return 0;
46 
47  status = dbPutLinkAsync(plink, DBR_LONG, &prec->val, 1);
48  if (!status)
49  prec->pact = TRUE;
50  else if (status == S_db_noLSET)
51  status = dbPutLink(plink, DBR_LONG, &prec->val, 1);
52 
53  return status;
54 }
pvd::Status status
longoutdset devLoSoftCallback
#define NULL
Definition: catime.c:38
Miscellaneous macro definitions.
Device support routines.
Definition: devSup.h:140
#define DBR_LONG
Definition: db_access.h:75
#define TRUE
Definition: dbDefs.h:27
int prec
Definition: reader.c:29
epicsExportAddress(dset, devLoSoftCallback)
Exporting IOC objects.