diff --git a/src/ioc/PVAServerRegister.cpp b/src/ioc/PVAServerRegister.cpp index 24903aa..bc9c135 100644 --- a/src/ioc/PVAServerRegister.cpp +++ b/src/ioc/PVAServerRegister.cpp @@ -30,6 +30,7 @@ #include #include +#include #include @@ -53,17 +54,9 @@ static void startitup() { .build())); } -static const iocshArg startPVAServerArg0 = { "providerNames", iocshArgString }; -static const iocshArg *startPVAServerArgs[] = { - &startPVAServerArg0}; - -static const iocshFuncDef startPVAServerFuncDef = { - "startPVAServer", 1, startPVAServerArgs -}; -static void startPVAServer(const iocshArgBuf *args) +static void startPVAServer(const char *names) { try { - char *names = args[0].sval; if(names && names[0]!='\0') { printf("Warning: startPVAServer() no longer accepts provider list as argument.\n" " Instead place the following before calling startPVAServer() and iocInit()\n" @@ -81,11 +74,7 @@ static void startPVAServer(const iocshArgBuf *args) } } -static const iocshArg *stopPVAServerArgs[1] = {}; -static const iocshFuncDef stopPVAServerFuncDef = { - "stopPVAServer", 0, stopPVAServerArgs -}; -static void stopPVAServer(const iocshArgBuf *args) +static void stopPVAServer() { try { pvd::Lock G(the_server_lock); @@ -99,11 +88,7 @@ static void stopPVAServer(const iocshArgBuf *args) } } -static const iocshArg *statusPVAServerArgs[1] = {}; -static const iocshFuncDef statusPVAServerFuncDef = { - "statusPVAServer", 0, statusPVAServerArgs -}; -static void statusPVAServer(const iocshArgBuf *args) +static void statusPVAServer() { try { pvd::Lock G(the_server_lock); @@ -132,9 +117,9 @@ static void initStartPVAServer(initHookState state) static void registerStartPVAServer(void) { - iocshRegister(&startPVAServerFuncDef, startPVAServer); - iocshRegister(&stopPVAServerFuncDef, stopPVAServer); - iocshRegister(&statusPVAServerFuncDef, statusPVAServer); + epics::iocshRegister("startPVAServer", "provider names"); + epics::iocshRegister<&statusPVAServer>("statusPVAServer"); + epics::iocshRegister<&stopPVAServer>("stopPVAServer"); initHookRegister(&initStartPVAServer); }