This is Unofficial EPICS BASE Doxygen Site
devHistogramSoft.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 /* devHistogramSoft.c */
11 /*
12  * Author: Janet Anderson
13  * Date: 07/02/91
14  */
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <string.h>
18 
19 #include "alarm.h"
20 #include "cvtTable.h"
21 #include "dbDefs.h"
22 #include "dbAccess.h"
23 #include "recGbl.h"
24 #include "recSup.h"
25 #include "devSup.h"
26 #include "link.h"
27 #include "histogramRecord.h"
28 #include "epicsExport.h"
29 
30 /* Create the dset for devHistogramSoft */
31 static long init_record(dbCommon *pcommon);
32 static long read_histogram(histogramRecord *prec);
33 
34 histogramdset devHistogramSoft = {
35  {6, NULL, NULL, init_record, NULL},
36  read_histogram, NULL
37 };
39 
40 static long init_record(dbCommon *pcommon)
41 {
42  histogramRecord *prec = (histogramRecord *)pcommon;
43 
44  if (recGblInitConstantLink(&prec->svl,DBF_DOUBLE,&prec->sgnl))
45  prec->udf = FALSE;
46 
47  return 0;
48 }
49 
50 static long read_histogram(histogramRecord *prec)
51 {
52  dbGetLink(&prec->svl, DBR_DOUBLE, &prec->sgnl, 0, 0);
53  return 0; /*add count*/
54 }
#define FALSE
Definition: dbDefs.h:32
histogramdset devHistogramSoft
#define init_record
#define NULL
Definition: catime.c:38
Miscellaneous macro definitions.
Device support routines.
Definition: devSup.h:140
#define DBR_DOUBLE
Definition: db_access.h:76
epicsExportAddress(dset, devHistogramSoft)
int prec
Definition: reader.c:29
Exporting IOC objects.