Configurations
A configuration is a specific way in which the properties of a component are set such that the component conforms to a specific requirement.
For example, the "Resistor" component has a configuration called "Variable resistor" which requires that the "Type" property is set to "Variable".
Using configurations has several benefits:
- The user can add a specific configuration of a component to the toolbox
- Allows the component to implement more than one common component
The <declaration>
section may contain only one <configurations>
tag, which itself contains one or more <configuration>
tags.
The name
attribute contains the name of the configuration and the value
attribute contains a comma-separated list of property requirements, in the format:
PropertyName:Value,PropertyName:Value
The requirements for a configuration can only be based on enum properties.
Example
The configurations for the standard Resistor component:
<configurations>
<configuration name="Resistor" value="Type:Standard" />
<configuration name="Variable Resistor" value="Type:Variable" />
<configuration name="Potentiometer" value="Type:Potentiometer" />
<configuration name="Thermistor" value="Type:Thermistor" />
<configuration name="LDR" value="Type:LDR" />
</configurations>