IMeasurementDriver interface : GetMeasurementTypes method

GetMeasurementTypes method
Description
VWorks software calls the GetMeasurementTypes method to get all available measurement types from the plugin, such as battery level, power load, and internal temperature.
Syntax
 
HRESULT GetMeasurementTypes(
[out] BSTR *xmlTypes,
[out,retval] enum ReturnCode *retcode
);
Parameters
 
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)
GetMeasurementTypes method output
The plugin returns a MeasurementTypes XML block in the xmlTypes parameter of the GetMeasurementTypes method.
MeasurementTypes XML block
The MeasurementTypes XML block contains the MeasurementTypes element and all its children. This XML block defines the available measurement types, including settings that are specified on the Measurement Manager tab.
XML structure
The value of the file attribute for the Velocity11 element is Measurement. See “Velocity11 element” .
 
<MeasurementTypes>
<MeasurementType />
...
</MeasurementTypes>
MeasurementTypes element
The MeasurementTypes element contains one or more MeasurementType elements.
MeasurementType element
The MeasurementType element has the following attributes:
 
The time, in seconds, that the measurement is allowed to be above the upper limit or below the lower limit before it is considered to be out of range.
-1 = Always log the measurement value based on the poll frequency (LOG_ACTION_ALWAYS)
 0 = Do not log any measurement values (LOG_ACTION_NONE)
 1 = Log the measurement value only when the value is less than the lower limit and the duration is longer than the critical time (LOG_ACTION_LOW)
 2 = Log the measurement value only when the value exceeds the upper limit and the duration is longer than the critical time (LOG_ACTION_HIGH)
 3 = Log the measurement value when the value is less than the lower limit or exceeds the upper limit and when the duration is longer than the critical time (LOG_ACTION_HIGHLOW)
0 = Do not pause the scheduler for any measurement values (PAUSE_ACTION_NONE)
1 = Pause the scheduler for the measurement value only when the value is less than the lower limit and the duration is longer than the critical time (PAUSE_ACTION_LOW)
2 = Pause the scheduler for the measurement value only when the value exceeds the upper limit and the duration is longer than the critical time (PAUSE_ACTION_HIGH)
3 = Pause the scheduler for the measurement value when the value is less than the lower limit or exceeds the upper limit and when the duration is longer than the critical time (PAUSE_ACTION_HIGHLOW)
The frequency at which VWorks software requests measurement values, in seconds.
Example of GetMeasurementTypes method output
The following sample code is a MeasurementTypes XML block that is returned to VWorks software by the plugin as a string in the xmlTypes parameter of the GetMeasurementTypes method. The plugin returns the measurement type named Battery level to VWorks software.
 
version='1.1' >
<MeasurementTypes >
<MeasurementType CriticalTime='5' LogAction='1' LowerLimit='80'
MeasurementName='Battery level' PauseAction='3' PollFrequency='10' Unit='%'
UpperLimit='100' />
</MeasurementTypes>
Related information