This is Unofficial EPICS BASE Doxygen Site
devI64outSoftCallback.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2016 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  * Original Author: Marty Kraimer
12  * Date: 04NOV2003
13  */
14 
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <string.h>
18 
19 #include "alarm.h"
20 #include "dbDefs.h"
21 #include "dbAccess.h"
22 #include "recGbl.h"
23 #include "recSup.h"
24 #include "devSup.h"
25 #include "int64outRecord.h"
26 #include "epicsExport.h"
27 
28 static long write_int64out(int64outRecord *prec)
29 {
30  struct link *plink = &prec->out;
31  long status;
32 
33  if (prec->pact)
34  return 0;
35 
36  status = dbPutLinkAsync(plink, DBR_INT64, &prec->val, 1);
37  if (!status)
38  prec->pact = TRUE;
39  else if (status == S_db_noLSET)
40  status = dbPutLink(plink, DBR_INT64, &prec->val, 1);
41 
42  return status;
43 }
44 
45 /* Create the dset for devI64outSoftCallback */
46 int64outdset devI64outSoftCallback = {
47  { 5, NULL, NULL, NULL, NULL }, write_int64out
48 };
49 epicsExportAddress(dset, devI64outSoftCallback);
epicsExportAddress(dset, devI64outSoftCallback)
pvd::Status status
#define DBR_INT64
Definition: dbFldTypes.h:83
#define NULL
Definition: catime.c:38
Miscellaneous macro definitions.
Device support routines.
Definition: devSup.h:140
#define TRUE
Definition: dbDefs.h:27
int prec
Definition: reader.c:29
int64outdset devI64outSoftCallback
Exporting IOC objects.