dmi_member
Synopsis
#include <opendmi/defs.h>
typedef struct dmi_member_ref {
size_t offset;
size_t size;
} dmi_member_ref_t;
dmi_member_ref_t dmi_member(structure, member);
dmi_member_ref_t dmi_member_array(structure, member);
#define DMI_MEMBER_NULL ((dmi_member_ref_t){ 0, 0 })
bool dmi_member_is_present(dmi_member_ref_t ref);
size_t dmi_member_size(structure, member);
size_t dmi_member_offset(structure, member);
size_t dmi_element_size(structure, member);
size_t dmi_member_span(structure, first, last);
Description
Declarations of fields and attributes refer to the members of the decoded
structure by dmi_member_ref_t, the offset and the size of the member, so
that the library reads and writes them whatever the structure is.
dmi_member-
Reference to
memberofstructure, of its own size. dmi_member_array-
Reference to an array member, whose size is the size of an element: the member the pointer to the elements of an array is stored in, or the first element of a vector.
DMI_MEMBER_NULL-
Reference to no member, which the parameters left unset are, and the fields carrying no value have.
dmi_member_is_present-
Tells whether a reference refers to a member, i.e. it is not
DMI_MEMBER_NULL. dmi_member_size,dmi_member_offset,dmi_element_size-
Size and offset of a member, and size of an element of an array member or of the elements a pointer member points at.
dmi_member_span-
Size of the consecutive members from
firsttolast, inclusive.
The macros are evaluated at compile time, and are given types and member names rather than values.