BSDL Device Tree Compiler
|
Public Types | |
enum | value_type { STRING_LIST, STRING, BINARY, CROSS_REFERENCE, PHANDLE, EMPTY, UNKNOWN } |
Public Member Functions | |
bool | is_cross_reference () |
bool | is_phandle () |
bool | is_string () |
bool | is_string_list () |
bool | is_binary () |
uint32_t | get_as_uint32 () |
property_value (string l=string()) | |
void | push_to_buffer (byte_buffer &buffer) |
void | write_dts (FILE *file) |
Public Attributes | |
string | label |
string | string_data |
byte_buffer | byte_data |
value_type | type |
Properties may contain a number of different value, each with a different label. This class encapsulates a single value.
Enumeration describing the possible types of a value. Note that property-coded arrays will appear simply as binary (or possibly string, if they happen to be nul-terminated and printable), and must be checked separately.
Default constructor, specifying the label of the value.
|
inline |
Returns this property value as a 32-bit integer. Returns 0 if this property value is not 32 bits long. The bytes in the property value are assumed to be in big-endian format, but the return value is in the host native endian.
|
inline |
Returns true if this value is binary, false otherwise.
|
inline |
Returns true if this value is a cross reference, false otherwise.
|
inline |
Returns true if this value is a phandle reference, false otherwise.
|
inline |
Returns true if this value is a string, false otherwise.
|
inline |
Returns true if this value is a string list (a nul-separated sequence of strings), false otherwise.
|
inline |
Writes the data for this value into an output buffer.
|
inline |
Writes the property value to the standard output. This uses the following heuristics for deciding how to print the output:
byte_buffer dtc::fdt::property_value::byte_data |
The data that should be written to the final output.
string dtc::fdt::property_value::label |
The label for this data. This is usually empty.
string dtc::fdt::property_value::string_data |
If this value is a string, or something resolved from a string (a reference) then this contains the source string.
value_type dtc::fdt::property_value::type |
The type of this property.