Interface Attributes for a RAD Module
Each attribute in an interface is defined by a property element. The name of an attribute is defined by this element's mandatory name attribute. The types of access permitted are defined by the mandatory access attribute, which takes a value of ro, wo, or rw, corresponding to read-only access, write-only access, or read-write access, respectively.
The type of an attribute is specified in the same way the type is specified for a structure field.
If access to an attribute can fail for an API-specific reason, it is defined using one or more error elements. An error element in a property may specify a for attribute, which takes a value of ro, wo, or rw, corresponding to the types of access the error return definition applies to. An error element with no for attribute is equivalent to one with a for attribute set to the access level defined on the property. Two error elements may not specify overlapping access types. For example, on a read-write property it is invalid for one error to have no for attribute (implying rw) and one to have a for attribute of wo as they both specify an error for writing.
The type of an error is specified the same way the type is specified for a method. It is identical to defining the type of a structure, with the exception that a type need not be defined.
Example 2-6 Defining an Interface Attribute for a RAD Module
<struct name="PrivilegeError">...</struct>
<property name="guestList" access="rw">
<list type="string" />
<error for="wo" type="PrivilegeError" />
<!-- Reads cannot fail -->
</property>