This is Unofficial EPICS BASE Doxygen Site
devMbboSoftCallback.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 /* devMbboSoftCallback.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 "mbboRecord.h"
27 #include "epicsExport.h"
28 
29 /* Create the dset for devMbboSoftCallback */
30 static long write_mbbo(mbboRecord *prec);
31 
32 mbbodset devMbboSoftCallback = {
33  {5, NULL, NULL, NULL, NULL},
34  write_mbbo
35 };
37 
38 static long write_mbbo(mbboRecord *prec)
39 {
40  struct link *plink = &prec->out;
41  long status;
42 
43  if (prec->pact)
44  return 0;
45 
46  status = dbPutLinkAsync(plink, DBR_USHORT, &prec->val, 1);
47  if (!status)
48  prec->pact = TRUE;
49  else if (status == S_db_noLSET)
50  status = dbPutLink(plink, DBR_USHORT, &prec->val, 1);
51 
52  return status;
53 }
54 
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
epicsExportAddress(dset, devMbboSoftCallback)
#define TRUE
Definition: dbDefs.h:27
int prec
Definition: reader.c:29
mbbodset devMbboSoftCallback
Exporting IOC objects.