dmi_decoder_get_string

Synopsis

#include <opendmi/decoder.h>

bool dmi_decoder_get_string(dmi_decoder_t *decoder, const char **value);

Description

The dmi_decoder_get_string function reads the number a string is referred to by and looks the string up among the ones of the structure.

A reference to no string gives nullptr, and so does a reference to a string the structure does not carry, which raises an error of its own.

Parameters

decoder

Decoder to read from.

value

String the reference stands for.

Return value

true if the reference has been read, false if there are not enough bytes remaining, or on error.

Errors

DMI_ERROR_ARGUMENT_NULL

value is nullptr.

DMI_ERROR_STRING_NOT_FOUND

Structure carries no such string.