![]() |
This is Unofficial EPICS BASE Doxygen Site
|
Miscellaneous macro definitions. More...
#include <stddef.h>
Include dependency graph for dbDefs.h:Go to the source code of this file.
Macros | |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | LOCAL static |
Deprecated synonym for static. More... | |
| #define | NELEMENTS(array) (sizeof (array) / sizeof ((array) [0])) |
| Number of elements in array. More... | |
| #define | OFFSET(structure, member) offsetof(structure, member) |
Deprecated synonym for offsetof. More... | |
| #define | CONTAINER(ptr, structure, member) ((structure*)((char*)(ptr) - offsetof(structure, member))) |
| Find parent object from a member pointer. More... | |
| #define | PVNAME_STRINGSZ 61 |
| Size of a record name including the nil terminator. More... | |
| #define | PVNAME_SZ (PVNAME_STRINGSZ - 1) |
| Size of a record name without the nil terminator. More... | |
| #define | PVLINK_STRINGSZ 1024 |
| Buffer size for the string representation of a DBF_*LINK field. More... | |
| #define | DB_MAX_CHOICES 30 |
| dbAccess enums/menus can have up to this many choices More... | |
Miscellaneous macro definitions.
This file defines several miscellaneous macros.
Definition in file dbDefs.h.
| #define CONTAINER | ( | ptr, | |
| structure, | |||
| member | |||
| ) | ((structure*)((char*)(ptr) - offsetof(structure, member))) |
Find parent object from a member pointer.
Subtracts the byte offset of the member in the structure from the pointer to the member itself, giving a pointer to parent strucure.
| ptr | Pointer to a member data field of a structure |
| structure | Type name of the parent structure |
| member | Field name of the data member |
| #define DB_MAX_CHOICES 30 |
| #define NELEMENTS | ( | array | ) | (sizeof (array) / sizeof ((array) [0])) |
| #define OFFSET | ( | structure, | |
| member | |||
| ) | offsetof(structure, member) |
| #define PVLINK_STRINGSZ 1024 |
| #define PVNAME_STRINGSZ 61 |
| #define PVNAME_SZ (PVNAME_STRINGSZ - 1) |