dmi_decoder_get_bcd_at

Synopsis

#include <opendmi/decoder.h>

dmi_decoder_get_bcd_at(decoder, offset, type, pvalue)

Description

The dmi_decoder_get_bcd_at macro reads sizeof(type) bytes at offset from the beginning of the body of the structure, decodes the value from BCD encoding using dmi_decode_bcd, and stores the result in the object pointed to by pvalue. The cursor is not moved.

Parameters

decoder

Decoder to read from.

offset

Byte offset from the beginning of the structure.

type

Wire-format type to read (e.g. dmi_byte_t).

pvalue

Pointer to the variable that receives the decoded value.

Return value

true on success, false if the requested range exceeds the structure bounds.

Errors

None.