The kernel objects store various data of various types and various meaning:
All these data can be accessed using an uniform kernel interface. Some of the properties are just regular data structure members, while the others are virtual with read and write callbacks which can cause complex recomputations.
One property is stored in a struct prop
structure. Its contents are:
string key
– a unique identifier of the property in the given object.
It contains the displayed name of the property.
prop_value value
– a union for storing various property values.
u8 type
specifies the data type of the property value stored.
u8 subtype
provides a more subtle differentiation of property
values within the data type.
u8 unit
– an index into unit array See Units. It defines the
display multiplier of the property value (used only for real number values).
u8 flags
– a combination of the following:
PTF_VIRTUAL
means that the property is virtual. See Virtual properties.
PTF_READ_ONLY
means that changing value of the property always fails.
PTF_SAVE
means that the property is saved when saving the object.
PTF_RECYCLABLE
means that the property is recycled by the GUI recycler
(see Property Recycler).