Documentation Center

  • Trial Software
  • Product Updates

Contents

Specifying Property Information

To specify property information in an IMDF file, use the Property element. You can include as many Property nodes in an IMDF file as you want. Property nodes can be children of the root node, a Device node, or a Videoformat node. Property nodes can also be children of Section nodes.

    Note   Property nodes that are children of the root node affect all devices accessed through the adaptor. Property nodes that are children of a Device or VideoFormat node affect only that device or video format.

You use attributes of the Property element to specify characteristics of the property, such as its name, type, and constraints. For more information about Property attributes, see Specifying Property Element Attributes.

The following example outlines how to use these elements to specify property information. The example shows the Property node as a child of the root node but you use it the same way as a child of a Device or VideoFormat node. The words in italics represent text you define.

<ImageAcquisitionInfo>
	<Property constraint=constraint_value
			 deviceSpecific=true_or_false
			 name=property_name
			 readOnly=always_never_or_whileRunning
			 type=cell_double_int_or_string
			 min=minimum_value
			 max=maximum_value
			 optional=on_or_off
			 default=default_value>
	</Property>
	.
	.
	.
</ImageAcquisitionInfo>

Specifying Property Element Attributes

The following table lists the attributes of a Property node in alphabetical order. The table gives a brief description of the property and lists which properties are required and which are optional.

Attribute

Description

Required

constraint

Specifies the constraints on the property — see Specifying Values for the Constraint Attribute.

Required

default

Default value for the property.

Optional

deviceSpecific

Boolean value. True if property is vendor-specific; otherwise false.

Required

min

Minimum allowable value

Optional

max

Maximum allowable value

Optional

name

Name of property

Required

optional

If set to off, the property is created automatically and added to the object when the IMDF file is processed. If on, the adaptor must explicitly create the property. The default is off.

Optional

readOnly

Read-only status of property: always, never, or whileRunning.

Required

type

Data type of the property: cell, double, int or string.

Required

Specifying Values for the Constraint Attribute

Constraints specify information about what are valid values for a property. For example, to specify that a property only accepts positive values, use the positive constraint value, as follows:

constraint=positive

The following table lists all the possible values for the constraint attribute in alphabetical order.

Constraint Value

Description

bounded

Property has both a minimum and maximum value. If you set the constraint attribute to bounded, you must assign values to the min and max attributes.

enum

Property is an enumerated value. If set, the Property node must contain one or more EnumConstraintValue nodes. See Specifying Enumerated Values.

inforpositive

Value must be positive or infinite

none

No constraints

positive

Value must be positive

zeroinforpositive

Value must be greater than zero or infinite

zeroorpositive

Value must be greater than zero

Specifying Enumerated Values

If your property uses enumerated values, you must set the value of the constraint attribute to enum, the type attribute to string, and create EnumConstraintValue elements for each enumeration. The EnumConstraintValue nodes are children of the Property node.

When you create the EnumConstraintValue nodes, you specify two attributes:

  • Value ID

  • Value name

This example defines the property StrobeEnable. The constraint attribute is set to enum. The name attribute of the EnumConstraintValue nodes defines the possible values of this enumeration: on and off.

<Property optional="on" 
          constraint="enum"
          deviceSpecific="true" 
          name="StrobeEnable" 
          readOnly="whileRunning"
          type="string">
   <EnumConstraintValue id="0" name="off" />
   <EnumConstraintValue id="1" name="on" />
</Property>
Was this topic helpful?