IWorksDriver interface : GetMetaData method

GetMetaData method
Description
VWorks software calls the GetMetaData method for the following reasons:
When the plugin is first loaded, VWorks software calls the GetMetaData method, where iDataType is METADATA_ALL, to get all XML metadata for the plugin. The plugin returns a MetaData XML block in the MetaData parameter. This XML block identifies the device, provides version information, and describes all the tasks that the device can perform. See “Metadata XML block” .
Subsequent calls to the GetMetaData method return device, command (task), or version XML metadata, depending on the value of the iDataType parameter. See “Device XML block” , “Versions XML block” , and “Command XML block” .
Syntax
 
HRESULT GetMetaData(
[in] enum MetaDataType iDataType,
[in] BSTR current_metadata,
[out,retval] BSTR *MetaData
);
Parameters
 
The first time the GetMetaData method is called, the value of this parameter is 0.
0 = Requests all XML metadata (METADATA_ALL). See “Metadata XML block” .
1 = Requests device metadata only (METADATA_DEVICE). See “Device XML block” .
2 = Requests command metadata only (METADATA_COMMAND). See “Command XML block” .
3 = Requests version metadata only (METADATA_VERSION). See “Versions XML block” .
[in] A Device XML block or a Command XML block reflecting the current state of user-specified parameters.
When the plugin is first loaded and VWorks software calls the GetMetaData method, this parameter is empty.
[out, retval] Depending on the value of iDataType, this parameter can contain one of the following:
The plugin can modify the metadata using the updated user settings received in the current_metadata parameter before it returns to VWorks software.
Velocity11 element
All XML metadata used in the GetMetaData method contains the Velocity11 element. The Velocity11 element is defined in “Velocity11 element” .
GetMetaData method output (iDataType is METADATA_ALL)
IMPORTANT The GetMetaData method is the only method that uses the Metadata XML block. All device driver plugins must implement this method and provide the Metadata XML block to VWorks software.
When the plugin is first loaded and VWorks software calls the GetMetaData method, the plugin returns the Metadata XML block to VWorks software in the MetaData parameter.
Metadata XML block
The Metadata XML block contains the MetaData element and all its children. This XML block identifies the device, provides version information, and describes all the tasks that the device can perform.
XML structure
The following code shows the high-level structure of the Metadata XML block. The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<MetaData>
<Device />
<Versions />
<Commands />
</MetaData>
MetaData element
The MetaData element has three children: Device, Versions, and Commands. The MetaData element has no attributes. See “Velocity11 element” .
Device element
The Device element is defined in “Device element” .
Versions element
The Versions element is defined in “Versions XML block” .
Commands element
The Commands element contains one Command element for every task that the device can perform. The Commands element has no attributes. The Command element is defined in “Command XML block” .
Example of a MetaData XML block
The following sample code is the MetaData XML block for a PlateLoc Sealer.
 
<MetaData >
<Device Description='Velocity11 PlateLoc sealer' MiscAttributes='0'
Name='PlateLoc' PreferredTab='Plate Handling'
<Parameters >
<Parameter Name='Profile' Style='0' Type='2' />
</Parameters>
<Locations >
<Location Group='0' Name='Stage' Offset='0' Type='1' />
</Locations>
<StorageDimensions DirectStorageAccess='0' />
</Device>
<Versions>
<Version Author='Joe Smith' Company='ABC Company' Date='April 3, 2006'
Name='PlateLoc' Version='3.0.0' />
</Versions>
<Commands>
<Command Compiler='0' Description='Seal a plate' Editor='2' Name='Seal'>
<Parameters>
<Parameter Name='Seal time' Style='0' Type='12' Units='s' Value='1.2'>
<Ranges>
<Range Value='0.5' />
<Range Value='12' />
</Ranges>
</Parameter>
<Parameter Name='Seal temperature' Style='0' Type='8' Units='°C'
Value='170'>
<Ranges>
<Range Value='20' />
<Range Value='235' />
</Ranges>
</Parameter>
</Parameters>
</Command>
</Commands>
</MetaData>
GetMetaData method input and output (iDataType is METADATA_DEVICE)
When VWorks software calls the GetMetaData method and passes the value METADATA_DEVICE into the iDataType parameter:
VWorks software passes a Device XML block into the current_metadata parameter.
The plugin returns a Device XML block to VWorks software in the MetaData parameter.
Note: When VWorks software first calls the GetMetaData method (iDataType is METADATA_ALL), the plugin returns the MetaData XML block, which contains the Device element and all its children. See “Metadata XML block” .
Device XML block
The Device XML block contains the Device element and all its children.
XML structure
The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<MetaData>
<Device>
<Parameters>
<Parameter>
<Ranges>
<Range />
...
</Ranges>
...
</Parameters>
<Locations>
<Location />
...
</Locations>
<StorageDimensions>
<Dimensions>
<StorageDimension />
...
</Dimensions>
</StorageDimensions>
<RobotMetaData />
</Device>
/<MetaData>
Device element
The Device element has four children: Parameters, Locations, StorageDimensions, and RobotMetaData. The Device element is defined in “Device element” .
Parameters element
The Parameters element contains one or more Parameter elements.
Parameter element
The Parameter element can contain one Ranges element and has the following attributes:
 
Ranges element
If the plugin has one or more profiles, the Ranges element and its child Range elements are specified in the Device XML block. The Ranges element contains one or more Range elements.
Range element
The Range element has the following attribute:
 
Locations element
The Locations element contains one or more Location elements.
Location element
Each Location element contains the name of a location on the device where labware can be placed. The Location element is defined in “Location element” .
StorageDimensions element
The StorageDimensions XML block is used for storage devices only. VWorks software ignores the StorageDimensions element for all non-storage devices.
The StorageDimensions element has the following attributes:
 
Indicates whether a robot accesses labware in a device’s storage area or on an external staging area. For example, a robot accesses labware on a multi-sided storage carousel by reaching into the device. However, a robot accesses labware on the external staging area of an STX incubator or a Cytomat storage device.
0 = The robot accesses labware on an external staging area
1 = The robot accesses labware directly in the device
The value of this attribute is 0 for non-storage devices.
The contents of the StorageDimensions element are different for storage devices and non-storage devices, as shown in the following table:
 
One StorageDimensions element, where the Name0, Name1, and DirectStorageAccess attributes are specified.
One empty StorageDimensions element. The Name0 and Name1 attributes are not specified, and the value of the DirectStorageAccess attribute is 0, as shown in the following sample code:
Dimensions element
The Dimensions element contains one or more StorageDimension elements.
StorageDimension element
Each StorageDimension element contains the capacity of one cassette, which is the number of slots per cassette. This element has the following attribute:
 
RobotMetaData element
The RobotMetaData element contains information about the robot. If the device is not a robot, this element is ignored. The RobotMetaData element has the following attribute:
 
0 = The robot cannot reach external locations
1 = The robot can reach external locations
Example of a Device XML block
The following sample code is a Device XML block for the Lid Hotel Station.
Because this device is not a storage device:
For the StorageDimensions element’s attributes:
The value of DirectStorageAccess is 0
The Name0 and Name1 attributes are not specified
VWorks software ignores the StorageDimensions and RobotMetaData elements.
 
<MetaData>
<Device Description='Lid Hotel Station' DynamicLocations='0'
HardwareManufacturer='Agilent Technologies' HasBarcodeReader='0' MiscAttributes='0'
Name='Lid Hotel Station' PreferredTab='Other'
RegistryName='Lid Hotel Plugin\Profiles'
<Parameters >
<Parameter Name='Profile' Scriptable='1' Style='0' Type='2' >
<Ranges >
<Range Value='ActiveX_LidHotel' />
</Ranges>
</Parameter>
</Parameters>
<Locations >
<Location Group='0' MaxStackHeight='460' Name='Location' Offset='0'
Type='1' />
</Locations>
<StorageDimensions DirectStorageAccess='0' />
<RobotMetaData ReachesExternalLocations='1' />
</Device>
</MetaData>
Versions XML block
The Versions XML block contains the Versions element and all its children. This XML block describes the plugin version information to VWorks software.
When VWorks software calls the GetMetaData method and the value of the iDataType parameter is METADATA_VERSION:
VWorks software passes a Versions XML block into the current_metadata parameter.
The plugin returns a Versions XML block to VWorks software in the MetaData parameter.
Note: When VWorks software first calls the GetMetaData method (iDataType is METADATA_ALL), the plugin returns the MetaData XML block, which contains the Versions element and all its children. See “Metadata XML block” .
XML structure
The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<MetaData>
<Versions>
<Version />
...
</Versions>
</MetaData>
Versions element
The Versions element contains one or more Version elements.
Version element
The Version element describes the version information for the plugin. Multiple Version elements can be used to keep a revision history for the plugin. However, only the information for the first Version element is displayed in the About VWorks dialog box. The Version element has the following attributes:
 
Example of a Versions XML block
The following sample code is a Versions XML block for the Lid Hotel Station.
 
<MetaData>
<Versions >
<Version Author='Agilent Technologies' Company='Agilent Technologies'
Date='Mar 19th, 2010' Name='Lid Hotel Station' Version='5.0.1' />
</Versions>
</MetaData>
Command XML block
The Command XML block contains the Command element and all its children. This XML block describes a single task that the device can perform.
When VWorks software calls the GetMetaData method and the value of the iDataType parameter is METADATA_COMMAND:
VWorks software passes a Command XML block into the current_metadata parameter
The plugin returns a Command XML block to VWorks software in the MetaData parameter
Note: When VWorks software first calls the GetMetaData method (iDataType is METADATA_ALL), the plugin returns the MetaData XML block, which contains the Commands element and one or more child Command elements and all their children. See “Metadata XML block” .
XML structure
The value of the file attribute for the Velocity11 element is MetaData. See “Velocity11 element” .
 
<Command>
<Parameters>
<Parameter>
<Ranges>
<Range>
</Ranges>
...
</Parameter>
...
</Parameters>
<Locations>
<Value />
...
</Locations>
</Command>
Command element
The Command element has the following attributes:
 
The description displayed under the task icon in the protocol editor, as illustrated in the following figure.
The name of the task. The task name, followed by the word Properties, is displayed in the Task Parameters area, as illustrated in the following figure.
If the protocol has been saved, the value of this attribute is the protocol’s file path. If the protocol has not been saved, the value is the default protocol name.
The task name that is displayed in the user interface. If the DisplayName attribute is not specified, the value of the Name attribute is displayed.
Parameters element
The Parameters element contains one or more Parameter elements.
Parameter element
The Parameter element describes device parameters and task parameters. Each Parameter element contains three required attributes (Description, Name, and Type) and might contain one or more of the optional attributes that are listed in the following table. A Parameter element can also contain one Ranges element.
 
A name used to group two or more Parameter elements into a category.
Ranges element
The Ranges element contains one or more Range elements.
Range element
The Range element has the following attribute:
 
Locations element
The Locations element contains one of more Value elements.
Value element
Each Value element contains the name of a location used by the task. The Value element has the following attribute:
 
Example of a Command XML block
The following sample code is a Command XML block that describes the Seal task.
 
<Command Compiler='20' Description='Seal a plate' Editor='2' Name='Seal'
NextTaskToExecute='1' ProtocolName='Protocol File - 1' RequiresRefresh='0'
TaskRequiresLocation='1' VisibleAvailability='1' >
<Parameters >
<Parameter Name='Seal time' Scriptable='1' Style='0' Type='12' Units='s'
Value='1.2' >
<Ranges >
<Range Value='0.5' />
<Range Value='12' />
</Ranges>
</Parameter>
<Parameter Name='Seal temperature' Scriptable='1' Style='0' Type='8'
Units='C' Value='170' >
<Ranges >
<Range Value='20' />
<Range Value='235' />
</Ranges>
</Parameter>
</Parameters>
<Locations >
<Value Value='Stage' />
</Locations>
</Command>