From 1106ecd81842028b522cfb0c51a01075dab34a14 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Tue, 23 Sep 2003 21:19:28 +0000 Subject: [PATCH] Added Registration code changed info. --- documentation/ConvertingR3.13AppsToR3.14.html | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/documentation/ConvertingR3.13AppsToR3.14.html b/documentation/ConvertingR3.13AppsToR3.14.html index 7f4e88b43..993bfcd27 100644 --- a/documentation/ConvertingR3.13AppsToR3.14.html +++ b/documentation/ConvertingR3.13AppsToR3.14.html @@ -233,6 +233,68 @@ file. +

Registration code changed

+ +
+ Registration code for application specific functions, e.g. subroutine + record init and process functions, has been changed as follows + +

1) Include the registration support header files:

+ +
+
#include "dbDefs.h"
+#include "registryFunction.h"
+
+ 2) Include the export definitions header file after including all other + header files: + +
+
#include "epicsExport.h"
+
+ 3) Make the application specific functions static functions, e.g. + +
+
static long mySubInit(subRecord *precord,processMethod process)
+static long mySubProcess(subRecord *precord)
+
+ 4) Define a registryFunctionRef array of the application specific functions + to be registered, e.g. + +
+
static registryFunctionRef mySubRef[] = {
+    {"mySubInit",(REGISTRYFUNCTION)mySubInit},
+    {"mySubProcess",(REGISTRYFUNCTION)mySubProcess}
+};
+
+ 5) Add a new function to do the registration of the registryFunctionRef + array elements, e.g. + +
+
void mySub(void)
+{
+    registryFunctionRefAdd(mySubRef,NELEMENTS(mySubRef));
+}
+
+ 6) Call the epicsExportRegistrar with the new registration function: e.g. + +
+
epicsExportRegistrar(mySub);
+
+ 7) Remove the existing function lines in <appname>Include.dbd: e.g. + remove + +
+
function("mySubInit")
+function("mySubProcess")
+
+ 8) Add a registrar statement to <name>Include.dbd with the new + registration function as parameter: e.g. add + +
+
registrar("mySub")
+
+
+

Modify the Makefiles in <top>/iocBoot directory.

Change " include $(TOP)/config/CONFIG_APP" to "include