From b120861a3115c46f25d3cc687dcb560d1e80b71a Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Wed, 28 May 2003 14:54:47 +0000 Subject: [PATCH] R3.14.2 compatible. --- motorApp/MclennanSrc/Makefile | 23 +++++++-- motorApp/MclennanSrc/MclennanRegister.cc | 63 +++++++++++++++++++++++ motorApp/MclennanSrc/MclennanRegister.h | 46 +++++++++++++++++ motorApp/MclennanSrc/devMclennanMotor.dbd | 1 + 4 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 motorApp/MclennanSrc/MclennanRegister.cc create mode 100644 motorApp/MclennanSrc/MclennanRegister.h diff --git a/motorApp/MclennanSrc/Makefile b/motorApp/MclennanSrc/Makefile index 0380f4bf..39155748 100644 --- a/motorApp/MclennanSrc/Makefile +++ b/motorApp/MclennanSrc/Makefile @@ -1,3 +1,20 @@ -TOP=../.. -include $(TOP)/config/CONFIG_APP -include $(TOP)/config/RULES_ARCHS +# Makefile +TOP = ../.. +include $(TOP)/configure/CONFIG + +# The following are used for debugging messages. +#USR_CXXFLAGS += -DDEBUG + +DBD += devMclennanMotor.dbd + +LIBRARY_IOC = Mclennan + +# Intelligent Motion Systems driver support. +SRCS += MclennanRegister.cc +SRCS += devPM304.cc drvPM304.cc + +Mclennan_LIBS += motor motorCOM_mpf +Mclennan_LIBS += $(EPICS_BASE_IOC_LIBS) + +include $(TOP)/configure/RULES + diff --git a/motorApp/MclennanSrc/MclennanRegister.cc b/motorApp/MclennanSrc/MclennanRegister.cc new file mode 100644 index 00000000..c77f2671 --- /dev/null +++ b/motorApp/MclennanSrc/MclennanRegister.cc @@ -0,0 +1,63 @@ +/* +FILENAME... MclennanRegister.cc +USAGE... Register Mclennan motor device driver shell commands. + +Version: $Revision: 1.1 $ +Modified By: $Author: sluiter $ +Last Modified: $Date: 2003-05-28 14:49:52 $ +*/ + +/***************************************************************** + COPYRIGHT NOTIFICATION +***************************************************************** + +(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO + +This software was developed under a United States Government license +described on the COPYRIGHT_UniversityOfChicago file included as part +of this distribution. +**********************************************************************/ + +#include +#include "MclennanRegister.h" +#include "epicsExport.h" + +extern "C" +{ + +// ACS Setup arguments +static const iocshArg setupArg0 = {"Max. controller count", iocshArgInt}; +static const iocshArg setupArg1 = {"N/A", iocshArgInt}; +static const iocshArg setupArg2 = {"Polling rate", iocshArgInt}; +// ACS Config arguments +static const iocshArg configArg0 = {"Card being configured", iocshArgInt}; +static const iocshArg configArg1 = {"MPF server location", iocshArgInt}; +static const iocshArg configArg2 = {"MPF server task name", iocshArgString}; +static const iocshArg configArg3 = {"Number of axes", iocshArgInt}; + +static const iocshArg * const PM304SetupArgs[3] = {&setupArg0, &setupArg1, + &setupArg2}; +static const iocshArg * const PM304ConfigArgs[4] = {&configArg0, &configArg1, + &configArg2}; + +static const iocshFuncDef setupPM304 = {"PM304Setup", 3, PM304SetupArgs}; +static const iocshFuncDef configPM304 = {"PM304Config", 4, PM304ConfigArgs}; + +static void setupPM304CallFunc(const iocshArgBuf *args) +{ + PM304Setup(args[0].ival, args[1].ival, args[2].ival); +} +static void configPM304CallFunc(const iocshArgBuf *args) +{ + PM304Config(args[0].ival, args[1].ival, args[2].sval, args[3].ival); +} + +static void MclennanRegister(void) +{ + iocshRegister(&setupPM304, setupPM304CallFunc); + iocshRegister(&configPM304, configPM304CallFunc); +} + +epicsExportRegistrar(MclennanRegister); + +} // extern "C" diff --git a/motorApp/MclennanSrc/MclennanRegister.h b/motorApp/MclennanSrc/MclennanRegister.h new file mode 100644 index 00000000..268c286f --- /dev/null +++ b/motorApp/MclennanSrc/MclennanRegister.h @@ -0,0 +1,46 @@ +/* +FILENAME... MclennanRegister.h +USAGE... This file contains function prototypes for Mclennan motor controller + IOC shell commands. + +Version: $Revision: 1.1 $ +Modified By: $Author: sluiter $ +Last Modified: $Date: 2003-05-28 14:49:53 $ +*/ + +/* + * Original Author: Ron Sluiter + * Date: 05/27/03 + * + * Experimental Physics and Industrial Control System (EPICS) + * + * Copyright 1991, the Regents of the University of California, + * and the University of Chicago Board of Governors. + * + * This software was produced under U.S. Government contracts: + * (W-7405-ENG-36) at the Los Alamos National Laboratory, + * and (W-31-109-ENG-38) at Argonne National Laboratory. + * + * Initial development by: + * The Controls and Automation Group (AT-8) + * Ground Test Accelerator + * Accelerator Technology Division + * Los Alamos National Laboratory + * + * Co-developed with + * The Controls and Computing Group + * Accelerator Systems Division + * Advanced Photon Source + * Argonne National Laboratory + * + * Modification Log: + * ----------------- + */ + +#include "motor.h" +#include "motordrvCom.h" + +/* Function prototypes. */ +extern RTN_STATUS PM304Setup(int, int, int); +extern RTN_STATUS PM304Config(int, int, const char *, int); + diff --git a/motorApp/MclennanSrc/devMclennanMotor.dbd b/motorApp/MclennanSrc/devMclennanMotor.dbd index 723bd2fb..1d6151d8 100644 --- a/motorApp/MclennanSrc/devMclennanMotor.dbd +++ b/motorApp/MclennanSrc/devMclennanMotor.dbd @@ -1,5 +1,6 @@ # Advanced Control Systems driver support. device(motor,VME_IO,devPM304,"Mclennan PM304") driver(drvPM304) +registrar(MclennanRegister)