6.3.3 VerifyAsset method

The VerifyAsset Method allows a Client to verify whether an Asset’s identity and functionality meet the expectations of system engineering.

Three different modes are available for Asset verification (see VerificationMode). Each mode depends on a set of mandatory and optional Variables (see definition of AssetVerificationModeEnum in 10.4) to be present for verification. The VerifyAsset Method also accepts additional Variables for verification.

An Asset implementing the VerifyAsset Method shall at least support the VerificationMode AssetCompatibility and expose the corresponding mandatory and implemented optional Variables in its Information Model. If at least one of the optional Variables, SerialNumber and/or ProductInstanceUri, is provided, then the VerificationModes AssetIdentity and AssetIdentityAndCompatibility shall be supported.

The signature of this Method is specified below; the arguments are defined in Table 31.

Signature

	VerifyAsset (
	[in] 2:AssetVerificationModeEnum	VerificationMode,
	[in] 0:KeyValuePair[]			ExpectedVerificationVariables,
	[in] 2:NodeIdValuePair[]			ExpectedAdditionalVerificationVariables,
	[out] 2:AssetVerificationResultEnum	VerificationResult,
	[out] 0:StatusCode[]			VerificationVariablesErrors,
	[out] 0:StatusCode[]			VerificationAdditionalVariablesErrors
	);
	
Table 31 – VerifyAsset Method arguments
Argument Description
VerificationModeMode for Asset verification: see 10.4 for a definition of the AssetVerificationModeEnum.
ExpectedVerificationVariables

An array of KeyValuePair containing verification Variables. Key shall be the BrowseName of the Variable to verify (relative to the Asset this Method is being called on), and Value is its expected value.

A Client shall pass all mandatory and implemented optional Variables depending on VerificationMode:

AssetCompatibility:

IVendorNameplateType ManufacturerUri (M),

IVendorNameplateType ProductCode (M),

IAssetRevisionType MajorAssetVersion (M),

IAssetRevisionType MinorAssetVersion (M),

IAssetRevisionType BuildAssetNumber (O),

IAssetRevisionType SubBuildAssetNumber (O),

IVendorNameplateType HardwareRevision (O),

IVendorNameplateType SoftwareRevision (O)

AssetIdentity:

IVendorNameplateType ManufacturerUri (M),

IVendorNameplateType ProductCode (M),

At least one of:

IVendorNameplateType SerialNumber,

IVendorNameplateType ProductInstanceUri

AssetIdentityAndCompatibility: All mandatory Variables of both AssetCompatibility and AssetIdentity are mandatory for top-level Assets (those directly in the Assets Folder in the AutomationComponent). All optional Variables of AssetCompatibility are optional.

ExpectedAdditionalVerificationVariables

An array of NodeIdValuePair containing additional verification Variables. NodeId shall be the NodeId of the Variable to verify, and Value shall be its expected value. This array may be null or empty if no additional Variables are to be verified.

The following rules shall apply to the usage of NodeIdValuePair:

If NodeId refers to variables of type array, it shall be verified that Value is a matching array.

If the ArrayIndex is provided, the value shall be checked against the corresponding index.

If Value is null, it shall be verified that NodeId exists. The Node may be of any NodeClass, but only the NodeClass of Variable or VariableType can have a non-null value.

VerificationResult

The result of Asset verification is determined by the Method implementation; see 10.7 for a definition of the AssetVerificationResultEnum.

The following general rule applies to determine VerificationResult:

All string-type Variables shall be stripped of leading and trailing whitespaces before processing.

The following specific rules apply to determine AssetCompatibility:

NotSet: Shall be returned if verification is not possible due to invalid elements in ExpectedVerificationVariables and/or ExpectedAdditionalVerificationVariables (e.g., a Variable was passed by the Client that does not exist in the Asset’s Information Model).
If this value is set, VerificationVariablesErrors and/or VerificationAdditionalVariablesErrors shall be populated.

Match: Shall be returned if all Variables in ExpectedVerificationVariables and ExpectedAdditionalVerificationVariables exist in the Information Model of this Asset and their actual values are identical to the expected values.

Compatible: Shall be returned if all of the following conditions apply:

The actual value of at least one ExpectedVerificationVariables does not match its expected value, but overall, the Asset is still compatible (e.g., expected IAssetRevisionType MinorAssetVersion 1, but the actual value is 2, being backwards compatible to 1).

All ExpectedAdditionalVerificationVariables match their expected values.

Mismatch: Shall be returned if any of the following conditions apply:

The actual value of at least one ExpectedVerificationVariables does not match its expected value, and the Asset overall is not compatible.

The actual value of at least one ExpectedAdditionalVerificationVariables does not match its expected value.

If this value is set, VerificationVariablesErrors and/or VerificationAdditionalVariablesErrors shall be populated.

The following specific rules apply to determine AssetIdentity:

NotSet: See description for AssetCompatibility.

Match: See description for AssetCompatibility.

Compatible: Shall never be returned.

Mismatch: Shall be returned if all Variables in ExpectedVerificationVariables and ExpectedAdditionalVerificationVariables exist and the actual value of at least one does not match its expected value.
If this value is set, VerificationVariablesErrors and/or VerificationAdditionalVariablesErrors shall be populated.

The following specific rules apply to determine AssetIdentityAndCompatibility:

NotSet: Shall be returned if verification of AssetCompatibility or AssetIdentity or both result in NotSet.

Match: Shall be returned if both the verification of AssetIdentity and AssetCompatibility result in Match.

Compatible: Shall be returned if verification of AssetIdentity results in Match and verification of AssetCompatibility results in Compatible.

Mismatch: Shall be returned if verification of AssetCompatibility or AssetIdentity or both results in Mismatch.

VerificationVariablesErrorsAn array of StatusCode corresponding to the ExpectedVerificationVariables input argument that indicates any errors that occurred during the processing of ExpectedVerificationVariables. If this array is populated, the length of this array shall match the length of ExpectedVerificationVariables. For possible values in this array, see Table 33.
VerificationAdditionalVariablesErrorsAn array of StatusCode corresponding to the ExpectedAdditionalVerificationVariables input argument that indicates any errors that occurred during the processing of ExpectedAdditionalVerificationVariables. If this array is populated, the length of this array shall match the length of ExpectedAdditionalVerificationVariables. For possible values in this array, see Table 34.

The possible Method result codes are formally defined in Table 32. The order in which checks are performed is vendor-specific. A bad result code in the Method (an error code in Table 32) shall result in all output arguments listed in the Method signature being empty/null. The check of provided Variables (Bad_InvalidArgument) shall take precedence over the actual checks related to the values of provided Variables.

Table 32 – VerifyAsset Method result codes
Result Code Description
Bad_InvalidArgumentOne or more arguments are invalid, or ExpectedVerificationVariables are missing Variables that are mandatory for the chosen VerificationMode (or optional, and the implementation of this Method expects them because they are implemented).
Bad_NotSupportedThe Client specified a VerificationMode that is not supported by this Method implementation.
UncertainAt least one element in ExpectedVerificationVariables and/or ExpectedAdditionalVerificationVariables is invalid or failed verification. VerificationVariablesErrors and/or VerificationAdditionalVariablesErrors will contain additional information.

The VerificationVariablesErrors StatusCodes are formally defined in Table 33.

Table 33 – VerificationVariablesErrors StatusCodes
Result Code Description
Bad_BrowseNameInvalidThe BrowseName for the verification Variable is invalid or was passed more than once.
Bad_TypeMismatchThe value supplied for the verification Variable (if non-null) is not of the same type as the implemented verification Variable.
Bad_OutOfRange The value supplied for the Variable is not equal to the actual value of the Variable (if non-null).
GoodThe verification for this Variable succeeded.

The VerificationAdditionalVariablesErrors StatusCodes are formally defined in Table 34.

Table 34 – VerificationAdditionalVariablesErrors StatusCodes
Result Code Description
Bad_OutOfRange The value supplied for the Variable is not equal to the actual value of the Variable (if non-null).
Bad_TypeMismatchThe value supplied for the verification Variable (if non-null) is not of the same type as the implemented verification variable.
Bad_NodeIdInvalidThe NodeIdValuePair contains a NodeId in its key field with an invalid syntax.
Bad_NodeIdUnknownThe NodeIdValuePair contains a NodeId in its key field that does not exist in the Server address space.
GoodThe verification for this Variable succeeded.

The VerifyAsset Method representation in the AddressSpace is formally defined in Table 35.

Table 35 – VerifyAsset Method AddressSpace definition
Attribute Value
BrowseName3:VerifyAsset
References Node Class BrowseName DataType TypeDefinition Other
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeM
0:HasPropertyVariable0:OutputArguments0:Argument[] 0:PropertyTypeM
ConformanceUnits
UAFX IAssetRevision VerifyAsset Base