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