![]() |
This is Unofficial EPICS BASE Doxygen Site
|
Exporting IOC objects. More...
#include <shareLib.h>
Include dependency graph for epicsExport.h:Go to the source code of this file.
Macros | |
| #define | epicsExportSharedSymbols |
| #define | EPICS_EXPORT_POBJ(typ, obj) pvar_ ## typ ## _ ## obj |
| #define | EPICS_EXPORT_PFUNC(fun) EPICS_EXPORT_POBJ(func, fun) |
| #define | epicsExportAddress(typ, obj) |
| Declare an object for exporting. More... | |
| #define | epicsExportRegistrar(fun) epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(fun) = (REGISTRAR) &fun |
| Declare a registrar function for exporting. More... | |
| #define | epicsRegisterFunction(fun) |
| Declare and register a function for exporting. More... | |
Typedefs | |
| typedef void(* | REGISTRAR) (void) |
Exporting IOC objects.
This header is unique, as it defines epicsExportSharedSymbols and thus triggers a transition between importing declarations from other libraries, to exporting symbols from our own library. The comments in shareLib.h provide more information.
This header should be included with a trailing comment to make it stand out from other includes, something like this:
Definition in file epicsExport.h.
| #define EPICS_EXPORT_PFUNC | ( | fun | ) | EPICS_EXPORT_POBJ(func, fun) |
Definition at line 39 of file epicsExport.h.
| #define EPICS_EXPORT_POBJ | ( | typ, | |
| obj | |||
| ) | pvar_ ## typ ## _ ## obj |
Definition at line 38 of file epicsExport.h.
| #define epicsExportAddress | ( | typ, | |
| obj | |||
| ) |
Declare an object for exporting.
The epicsExportAddress() macro must be used to declare any IOC object that is also named in a DBD file. For example a record support source file must contain a statement like:
A device support source file must contain a statement like:
Note that the typ parameter for a device support entry table must be spelled dset even if the obj was actually declared as some other type, say using typed_dset .
A driver support source file must contain a statement like:
A variable named in a DBD variable statement must be declared with:
Only int and double are currently supported for DBD variables.
| typ | Object's data type. |
| obj | Object's name. |
Definition at line 75 of file epicsExport.h.
| #define epicsExportRegistrar | ( | fun | ) | epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(fun) = (REGISTRAR) &fun |
Declare a registrar function for exporting.
The epicsExportRegistrar() macro must be used to declare a registrar function that is named in a DBD registrar statement. For example:
| fun | Registrar function's name. |
Definition at line 94 of file epicsExport.h.
| #define epicsExportSharedSymbols |
Definition at line 29 of file epicsExport.h.
| #define epicsRegisterFunction | ( | fun | ) |
Declare and register a function for exporting.
The epicsRegisterFunction() macro must be used to declare and register a function that is named in a DBD function statement and called by one or more subroutine or aSub records. For example:
| fun | Function's name |
Definition at line 111 of file epicsExport.h.
| typedef void(* REGISTRAR) (void) |
Definition at line 36 of file epicsExport.h.