CogNdmInspectionResult Constructor (Int32, CogNdmUsedAcquisitionIDCollection, Boolean, Int32,  Byte , Int32)Cognex VisionPro
Constructs a Network Data Model (NDM) inspection result. NDM inspection result is a structure designed to hold the data to be sent to a remote device over (usually a PLC).

Namespace: Cognex.VisionPro.Comm
Assembly: Cognex.VisionPro.Comm (in Cognex.VisionPro.Comm.dll) Version: 65.1.0.0
Syntax

public CogNdmInspectionResult(
	int inspectionIndex,
	CogNdmUsedAcquisitionIDCollection usedAcquisitionIDs,
	bool inspectionPassed,
	int resultCode,
	byte[] resultData,
	int resultDataOffset
)

Parameters

inspectionIndex
Type: System Int32
The index of the inspection process\channel\slot that produced this inspection result.
usedAcquisitionIDs
Type: Cognex.VisionPro.Comm CogNdmUsedAcquisitionIDCollection
Information about which acquired images were used by the inspection process to produce this inspection result.
inspectionPassed
Type: System Boolean
Information about whether the inspection passed or failed.
resultCode
Type: System Int32
A user specified code which signifies something about the result of the inspection.
resultData
Type:  System Byte 
The data produced by the inspection to be sent to the remote device.
resultDataOffset
Type: System Int32
An offset into the overall result data packet at which to write the result data for this particular inspection result.

There is a single common packet format for all inspection result data. It is the responsibility of the user to partition this single data region into separate regions to avoid overwriting result data from other parallel inspection slots/channels (if they so choose).

Exceptions

ExceptionCondition
ArgumentOutOfRangeException Thrown if the result code is less than 0 or greater than UInt16.MaxValue.
ArgumentOutOfRangeException Thrown if the inspection index is less than 0 or greater than 255.
ArgumentOutOfRangeException Thrown if the acquisition ID in the usedAcquisitionIDs is less than 0 or greater than UInt16.MaxValue.
ArgumentOutOfRangeException Thrown if the camera index in the usedAcquisitionIDs is less than 0 or greater than UInt16.MaxValue.
ArgumentException Thrown if the result data offset is less than 0 or greater than UInt16.MaxValue.
See Also