|
||
A property has the two attributes: identity and type.
A property is identified by a 64-bit integer made up of two 32-bit parts: the category and the key.
A property belongs to a category, and a category is identified by a UID.
A key is a 32-bit value that identifies a specific property within a category. The meaning applied to the key depends on the kind of enumeration scheme set up for the category. At its simplest, a key can be an index value. It can also be another UID, if the category is designed to be generally extensible.
A property can be:
a single 32-bit value
a contiguous set of bytes, referred to as a byte-array, whose length can vary from 0 to 512 bytes
Unicode text.
From the viewpoint of the implementation, Unicode text is treated as a byte-array; the detail is hidden by the API.
Once defined, a property value can change, but the property type
cannot. Byte-array type properties can also change length provided the length
does not exceed the value RProperty::KMaxPropertySize
. The
limit on size of property ensures some limit on RAM usage.
The API allows byte-array and Unicode text type properties to be pre-allocated when they are defined. This means that the time taken to set the values is bounded. However, if the length of these property types subsequently increases, then memory allocation may take place, and no guarantees can be made on the time taken to set them.
Note that the RProperty::ELargeByteArray
property type can never provide a real-time guarantee.
Properties and their values are defined, set and retrieved using
RProperty
.