EPICS Base 7.0.8.0
|
Exporting IOC objects. More...
#include <shareLib.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. | |
#define | epicsExportRegistrar(fun) epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(fun) = (REGISTRAR) &fun |
Declare a registrar function for exporting. | |
#define | epicsRegisterFunction(fun) |
Declare and register a function for exporting. | |
Typedefs | |
typedef void(* | REGISTRAR) (void) |
This header defines macros that allow registering IOC shell commands, subroutines, device support, etc.
Because this header defines the epicsExportSharedSymbols
macro, it triggers a transition between importing declarations from other libraries, to exporting symbols from our own library. For this reason, it must be included last, after all other EPICS-related includes. The comments in shareLib.h provide more information. It is recommended to mark this with a comment, e.g.
makeAPIheader.pl -h
. Definition in file epicsExport.h.
#define epicsExportSharedSymbols |
Definition at line 35 of file epicsExport.h.
Definition at line 44 of file epicsExport.h.
Definition at line 45 of file epicsExport.h.
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 81 of file epicsExport.h.
#define epicsExportRegistrar | ( | fun | ) | epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(fun) = (REGISTRAR) &fun |
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 100 of file epicsExport.h.
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 117 of file epicsExport.h.
Definition at line 42 of file epicsExport.h.