IIODriver interface : EnumPoints method

EnumPoints method
Description
VWorks software calls the EnumPoints method to tell the plugin to enumerate all I/O channels for a device.
Syntax
 
HRESULT EnumPoints(
[out] BSTR *ioxml,
[out,retval] enum ReturnCode *retVal
);
Parameters
 
[out] Three XML elements: digitalInputs, analogInputs, and digitalOutputs. Each XML element contains an enumeration array of all digital input, analog input, or digital output channels for a device.
0 = The request was completed (RETURN_SUCCESS)
1 = Something was wrong with the input, so the request was not completed (RETURN_BAD_ARGS)
2 = The request was not completed (RETURN_FAIL)
EnumPoints method output
The plugin returns the following three XML elements in the ioxml parameter of the EnumPoints method:
The value of the file attribute of the Velocity11 element is Velocity11. See “Velocity11 element” .
digitalInputs, analogInputs, or digitalOutputs elements
Each digitalInputs, analogInputs, and digitalOutputs element contains one or more name elements.
Required: No
Default value: An empty string
name element
Each name element contains the name of an input or output channel.
Required: No
Default value: An empty string
Example of EnumPoints method output
The following sample code contains the (truncated) digitalInputs, analogInputs, and digitalOutputs XML elements (with enumeration arrays) that are returned to VWorks software by the plugin as a string in the ioxml parameter of the EnumPoints method.
 
version='1.1' >
<digitalInputs >
<name >Input 1 for Temperature</name>
<name >Input 2 for Humidity</name>
<name >Input 3 for Waste bin door</name>
...
<name >Input 19 (00-00-00-00-00-00)</name>
<name >Input 20 (00-00-00-00-00-00)</name>
</digitalInputs>
<analogInputs >
<name >Fluid level 1</name>
<name >Fluid level 2</name>
<name >Humidity</name>
...
<name >Analog 11 (00-00-00-00-00-00)</name>
<name >Analog 12 (00-00-00-00-00-00)</name>
</analogInputs>
<digitalOutputs >
<name >Ventilation fan</name>
<name >UV light</name>
<name >Alarm (audible)</name>
...
<name >Output 15 (00-00-00-00-00-00)</name>
<name >Output 16 (00-00-00-00-00-00)</name>
</digitalOutputs>
Related information