Previous Topic: Storage StatementNext Topic: Populating Tables


Value Statement

The value statement provides a value or value access mechanism.

The syntax is:

value = v
value = "enumeration value"
value = * "Name"
value = unsupported
v

Specifies that the attribute is read-only, which never change. For example, the manufacturer of a component, or for read-write attributes, which the Service Layer can handle, as opposed to the component instrumentation. Specifying v for write-only attributes is prohibited. The value v must be specified in the correct data type for the attribute; for example, dates and literal strings must be specified in double quotes.

"enumeration value"

Specifies that the value is an enumeration string which the Service Layer maps to an integer. This value is enclosed within double quotes. The mapping must have been previously defined in an enum definition in this component or attribute definition, and the attribute's type must be an enumeration. Specifying an enumeration value for write-only attributes is prohibited.

Note: Specifying an integer for an enumeration is acceptable.

* "Name"

Indicates the symbolic name of the component instrumentation code to invoke to read or write the attribute at runtime. The symbolic name must have been previously defined in a path definition in this component definition. The value * "Name" has a name with an asterisk (*) before it and surrounded by double quotes.

The value unsupported (reserved keyword) can be put in to tell the Service Layer that this attribute is not supported by this component.

The value statement is required except when table templates are defined, when it is optional. If a value is provided in a template, it becomes the default value when populating the table. If it is not provided, there is no default value.

Example: Example of a group with two attributes

Start Group
	Name = "Software Template"
	Class = "DMTF|Software Example|1"
	Key = 1 // key on Product Name
	Start Attribute
		ID = 1
		Name = "Product Name"
		Description = "The name of the product"
		Storage = Common
		Type = String(64)
	End Attribute
	Start Attribute
		ID = 2
		Name = "Product Version"
		Description = "The product's version number"
		Type = String(32)
		Value = ""
	End Attribute
End Group

In this example, the group is acting as a template, as there is no group ID but a key is specified. The default value for the version is an empty string. There is no default for the product name.