This is Unofficial EPICS BASE Doxygen Site
devBoSoftCallback.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 /* devBoCallbackSoft.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 "dbLock.h"
24 #include "dbAccess.h"
25 #include "recGbl.h"
26 #include "recSup.h"
27 #include "devSup.h"
28 #include "boRecord.h"
29 #include "epicsExport.h"
30 
31 /* Create the dset for devBoCallbackSoft */
32 static long write_bo(boRecord *prec);
33 
35  {5, NULL, NULL, NULL, NULL},
36  write_bo
37 };
39 
40 static long write_bo(boRecord *prec)
41 {
42  struct link *plink = &prec->out;
43  long status;
44 
45  if (prec->pact)
46  return 0;
47 
48  status = dbPutLinkAsync(plink, DBR_USHORT, &prec->val, 1);
49  if (!status)
50  prec->pact = TRUE;
51  else if (status == S_db_noLSET)
52  status = dbPutLink(plink, DBR_USHORT, &prec->val, 1);
53 
54  return status;
55 }
pvd::Status status
#define DBR_USHORT
Definition: dbFldTypes.h:80
#define NULL
Definition: catime.c:38
Miscellaneous macro definitions.
Device support routines.
Definition: devSup.h:140
bodset devBoSoftCallback
#define TRUE
Definition: dbDefs.h:27
epicsExportAddress(dset, devBoSoftCallback)
int prec
Definition: reader.c:29
Exporting IOC objects.