Locate Meter Services
This section describes the locate meter web services of the Adapter Development Kit test harness composite.
FindMeters
This web service queries the data store for one or more meters. The difference between GetMeter and FindMeters is GetMeter can return at most one meter and it must match the provided ID exactly. GetMeter will throw an error if the ID is not found. FindMeters can return more than one meter (when using the regex) and will not throw an error when the ID does not match any of the meters in the index.
Input: FindMetersInput
Part: payload
Element: FindMetersRequest
Parameter
Description
id
The meter ID for which to search
isRegex
The provided id can be a regex value when this parameter is true. Hint: to search for all meters in the system, use ".*" for the ID.
Output: FindMetersOutput
Part: payload
Element: FindMetersResult
Zero or more meter objects can be returned from the search
Fault: See UtilityFault. Unlike other methods, FindMeters does not throw an exception if the meter is not found.
IsMeterDefined
This web service queries whether a particular meter is defined in the data store.
Input: IsMeterDefinedInput
Part: payload
Element: IsMeterDefinedRequest
Parameter
Description
id
The meter ID for which to search
Output: IsMeterDefinedOutput
Part: payload
Element: IsMeterDefinedResult
Whether or not the provided ID is part of the index.
Fault: See UtilityFault. Thrown when meter id is not found.
GetMeter
This web service returns all the attributes of a single meter from the in-memory data store. The difference between GetMeter and FindMeters is GetMeter can return at most one meter and it must match the provided ID exactly. GetMeter will throw an error if the ID is not found. FindMeters can return more than one meter (when using the regex) and will not throw an error when the ID does not match any of the meters in the index.
Input: GetMeterInput
Part: payload
Element: GetMeterRequest
Parameter
Description
id
The meter ID for which to search
Output: GetMeterOutput
Part: payload
Element: GetMeterResult
The meter object requested by the ID.
Fault: See UtilityFault. Thrown when meter id is not found.