dmi_entity_is_decoded

Synopsis

#include <opendmi/entity.h>

bool dmi_entity_is_decoded(const dmi_entity_t *entity);
bool dmi_entity_is_linked(const dmi_entity_t *entity);
bool dmi_entity_is_valid(const dmi_entity_t *entity);
bool dmi_entity_is_incomplete(const dmi_entity_t *entity);
bool dmi_entity_is_partial(const dmi_entity_t *entity);

Description

The functions tell how far a structure has got, by the flags of its state, the state member of the entity:

dmi_entity_is_decoded

The structure has been decoded, and dmi_entity_info gives the decoded structure: DMI_ENTITY_STATE_DECODED.

dmi_entity_is_linked

The references of the structure have been resolved: DMI_ENTITY_STATE_LINKED.

dmi_entity_is_valid

The structure has been validated: DMI_ENTITY_STATE_VALID.

dmi_entity_is_incomplete

The data of the structure ends in the middle of the fields of a version of the specification, and only the fields before that point have been decoded: DMI_ENTITY_STATE_INCOMPLETE.

dmi_entity_is_partial

The structure ends where an older version of the specification ends it, and holds fewer fields than the decoder knows of: DMI_ENTITY_STATE_PARTIAL.

The functions are defined inline in the header, and read the flags only.

Parameters

entity

Structure in question, which must not be nullptr.

Return value

Returns true if the flag is set, and false otherwise.

Errors

None.