Stage 1 reorganization
Directory moves. src/RTEMS/ => src/libCom/RTEMS/ src/as/ => src/ioc/as/ src/bpt/ => src/ioc/bpt/ src/ca/ => src/ca/client/ src/cap5/ => src/ca/client/perl/ src/cas/ => src/ca/legacy/pcas/ src/catools/ => src/ca/client/tools/ src/db/ => src/ioc/db/ src/dbStatic/ => src/ioc/dbStatic/ src/dbtools/ => src/ioc/dbtemplate/ src/dev/softDev/ => src/std/dev/ src/dev/testDev/ => src/std/test/ src/excas/ => src/ca/legacy/pcas/ex/ src/gdd/ => src/ca/legacy/gdd/ src/makeBaseApp/ => src/template/base/ src/makeBaseExt/ => src/template/ext/ src/misc/ => src/ioc/misc/ src/rec/ => src/std/rec/ src/registry/ => src/ioc/registry/ src/rsrv/ => src/ioc/rsrv/ src/softIoc/ => src/std/softIoc/ src/toolsComm/ => src/libCom/tools/
This commit is contained in:
committed by
Andrew Johnson
parent
4a18db9f99
commit
2a36a3906d
@@ -0,0 +1,22 @@
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
TOP=../../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
DBD += devTestAsyn.dbd
|
||||
|
||||
LIBSRCS += devHistogramTestAsyn.c
|
||||
LIBSRCS += devTestAsyn.c
|
||||
|
||||
LIBRARY_IOC = testDevIoc
|
||||
testDevIoc_LIBS += miscIoc recIoc asIoc dbIoc registryIoc dbStaticIoc ca Com
|
||||
testDevIoc_RCS = testDevIoc.rc
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
@@ -0,0 +1,107 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* devHistogramTestAsyn.c */
|
||||
/* base/src/dev $Revision-Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 07/02/91
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alarm.h"
|
||||
#include "callback.h"
|
||||
#include "cvtTable.h"
|
||||
#include "dbDefs.h"
|
||||
#include "dbAccess.h"
|
||||
#include "recGbl.h"
|
||||
#include "recSup.h"
|
||||
#include "devSup.h"
|
||||
#include "link.h"
|
||||
#include "dbCommon.h"
|
||||
#include "histogramRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devHistogramTestAsyn */
|
||||
static long init_record(struct histogramRecord *phistogram);
|
||||
static long read_histogram(struct histogramRecord *phistogram);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_histogram;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devHistogramTestAsyn={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_histogram,
|
||||
NULL
|
||||
};
|
||||
epicsExportAddress(dset,devHistogramTestAsyn);
|
||||
|
||||
static long init_record(struct histogramRecord *prec)
|
||||
{
|
||||
CALLBACK *pcallback;
|
||||
|
||||
/* histogram.svl must be a CONSTANT*/
|
||||
switch (prec->svl.type) {
|
||||
case (CONSTANT) :
|
||||
pcallback = (CALLBACK *)(calloc(1,sizeof(CALLBACK)));
|
||||
prec->dpvt = (void *)pcallback;
|
||||
if(recGblInitConstantLink(&prec->svl,DBF_DOUBLE,&prec->sgnl))
|
||||
prec->udf = FALSE;
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)prec,
|
||||
"devHistogramTestAsyn (init_record) Illegal SVL field");
|
||||
prec->pact=TRUE;
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_histogram(struct histogramRecord *prec)
|
||||
{
|
||||
CALLBACK *pcallback=(CALLBACK *)(prec->dpvt);
|
||||
|
||||
/* histogram.svl must be a CONSTANT*/
|
||||
switch (prec->svl.type) {
|
||||
case (CONSTANT) :
|
||||
if(prec->pact) {
|
||||
printf("Completed asynchronous processing: %s\n",
|
||||
prec->name);
|
||||
return(0); /*add count*/
|
||||
} else {
|
||||
if(prec->disv<=0) return(2);
|
||||
printf("Starting asynchronous processing: %s\n",
|
||||
prec->name);
|
||||
prec->pact=TRUE;
|
||||
callbackRequestProcessCallbackDelayed(
|
||||
pcallback,prec->prio,prec,
|
||||
(double)prec->disv);
|
||||
return(0);
|
||||
}
|
||||
default :
|
||||
if(recGblSetSevr(prec,SOFT_ALARM,INVALID_ALARM)){
|
||||
if(prec->stat!=SOFT_ALARM) {
|
||||
recGblRecordError(S_db_badField,(void *)prec,
|
||||
"devHistogramTestAsyn (read_histogram) Illegal SVL field");
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* $Revision-Id$ */
|
||||
|
||||
/* Device Support for testing asynchronous processing
|
||||
*
|
||||
* This is a universal device support, it should work with
|
||||
* almost any record type, but it doesn't actually do any
|
||||
* I/O operations so it's not particularly useful other than
|
||||
* for testing asynchronous record processing.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "callback.h"
|
||||
#include "devSup.h"
|
||||
#include "dbCommon.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
static long addRec(struct dbCommon *prec)
|
||||
{
|
||||
prec->dpvt = calloc(1, sizeof(CALLBACK));
|
||||
return !prec->dpvt;
|
||||
}
|
||||
|
||||
static long delRec(struct dbCommon *prec)
|
||||
{
|
||||
if (prec->dpvt) {
|
||||
callbackCancelDelayed((CALLBACK *)prec->dpvt);
|
||||
free(prec->dpvt);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dsxt dsxtTestAsyn = {
|
||||
addRec, delRec
|
||||
};
|
||||
|
||||
static long init(int pass)
|
||||
{
|
||||
if (!pass) devExtend(&dsxtTestAsyn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long process(struct dbCommon *prec)
|
||||
{
|
||||
if (prec->pact) {
|
||||
printf("Completed asynchronous processing: %s\n", prec->name);
|
||||
return 0;
|
||||
}
|
||||
if (prec->disv <= 0) return 2;
|
||||
|
||||
printf("Starting asynchronous processing: %s\n", prec->name);
|
||||
prec->pact = TRUE;
|
||||
if (prec->dpvt) {
|
||||
callbackRequestProcessCallbackDelayed((CALLBACK *)prec->dpvt,
|
||||
prec->prio, prec, (double)prec->disv);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Create the dset for devTestAsyn */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read;
|
||||
DEVSUPFUN misc;
|
||||
} devTestAsyn = {
|
||||
{6, NULL, init, NULL, NULL}, process, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devTestAsyn);
|
||||
@@ -0,0 +1,20 @@
|
||||
# $Revision-Id$
|
||||
|
||||
device(ai,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(aai,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(ao,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(aao,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(bi,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(bo,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(calcout,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(event,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(longin,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(longout,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(mbbi,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(mbbiDirect,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(mbbo,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(mbboDirect,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(stringin,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(stringout,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(subArray,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
device(waveform,CONSTANT,devTestAsyn,"Test Asyn")
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#include <Winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION EPICS_VERSION,EPICS_REVISION,EPICS_MODIFICATION,EPICS_PATCH_LEVEL
|
||||
PRODUCTVERSION EPICS_VERSION,EPICS_REVISION,EPICS_MODIFICATION,EPICS_PATCH_LEVEL
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_UNKNOWN
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments","Test Device Support Library for EPICS\0"
|
||||
VALUE "CompanyName", "The EPICS collaboration\0"
|
||||
VALUE "FileDescription", "Test Device Support Library\0"
|
||||
VALUE "FileVersion", EPICS_VERSION_STRING "\0"
|
||||
VALUE "InternalName", "testDevIoc\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) Univ. of California, Univ. of Chicago\0"
|
||||
VALUE "OriginalFilename", "testDevIoc.dll\0"
|
||||
VALUE "ProductName", "Experimental Physics and Industrial Control System (EPICS)\0"
|
||||
VALUE "ProductVersion", EPICS_VERSION_STRING "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
Reference in New Issue
Block a user