// TODO: plan on multiple types of ReadRequests... One will copy snapshot of TND value into a DataValueInstance, another will watch a TND value as a trigger, etc public ReadValueFromTNDDefinition(TestSequence testSequence) : base(testSequence) { mDataValue = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "DataValue")); mDataValue.AddDependency(this); mDataValue.Name = "TND Data Value"; }
public ImageCropDefinition(TestSequence testSequence) : base(testSequence) { mCroppedImage = new GeneratedImageDefinition(testSequence, OwnerLink.newLink(this, "ResultantImage")); mCroppedImage.AddDependency(this); mCroppedImage.Name = "cropResult"; }
public FindCornerFromInsideDefinition(TestSequence testSequence) : base(testSequence) { mResultX = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "ResultX")); mResultX.Type = DataType.IntegerNumber; mResultX.AddDependency(this); mResultX.Name = "ResultX"; mResultY = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "ResultY")); mResultY.Type = DataType.IntegerNumber; mResultY.AddDependency(this); mResultY.Name = "ResultY"; /* * mSearchEndX = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "SearchEndX")); * mSearchEndX.Type = DataType.IntegerNumber; * mSearchEndX.AddDependency(this); * mSearchEndX.Name = "SearchEndX"; * * mSearchEndY = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "SearchEndY")); * mSearchEndY.Type = DataType.IntegerNumber; * mSearchEndY.AddDependency(this); * mSearchEndY.Name = "SearchEndY"; * * mSearchPath = new ToolLineDecorationDefinition(testSequence, OwnerLink.newLink(this, "SearchPath")); * mSearchPath.Name = "SearchPath"; * mSearchPath.SetStartX(mStartX); * mSearchPath.SetStartY(mStartY); * mSearchPath.SetEndX(mSearchEndX); * mSearchPath.SetEndY(mSearchEndY); */ }
public FindBoundingRectangleDefinition(TestSequence testSequence) : base(testSequence) { mLeftBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "LeftBound")); mLeftBound.Type = DataType.IntegerNumber; mLeftBound.AddDependency(this); mLeftBound.Name = "LeftBound"; mRightBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "RightBound")); mRightBound.Type = DataType.IntegerNumber; mRightBound.AddDependency(this); mRightBound.Name = "RightBound"; mTopBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "TopBound")); mTopBound.Type = DataType.IntegerNumber; mTopBound.AddDependency(this); mTopBound.Name = "TopBound"; mBottomBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "BottomBound")); mBottomBound.Type = DataType.IntegerNumber; mBottomBound.AddDependency(this); mBottomBound.Name = "BottomBound"; /* * TODO: add resultant point (X or +) * mResultantRay = new ValueBasedLineDecorationDefinition(testSequence, OwnerLink.newLink(this, "ResultantRay")); * mResultantRay.AddDependency(mResultantAngle); * mResultantRay.Name = "ResultantRay"; */ }
public ImageDuplicatorDefinition(TestSequence testSequence) : base(testSequence) { mDuplicateImage = new GeneratedImageDefinition(testSequence, OwnerLink.newLink(this, "ResultantImage")); mDuplicateImage.AddDependency(this); mDuplicateImage.Name = "Copy of image"; }
public CalibrationToolDefinition(TestSequence testSequence) : base(testSequence) { mConversionFactor = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "ConversionFactor")); mConversionFactor.Type = DataType.DecimalNumber; mConversionFactor.AddDependency(this); mConversionFactor.Name = "ConversionFactor"; }
public MathOpResultDefinition(TestSequence testSequence, MathOperationDefinition mathOp, string calcDef) : base(testSequence, OwnerLink.newLink(mathOp, "Result")) { testSequence.MathOperationRegistry.RegisterObject(this); mMathOp = mathOp; base.Name = calcDef; SetDataCategory(DataCategory.UnnamedCalculatedValue); }
public OperatorQueryDefinition(TestSequence testSequence) : base(testSequence) { mOperatorAnswer = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "OperatorAnswer")); mOperatorAnswer.Type = DataType.IntegerNumber; mOperatorAnswer.AddDependency(this); mOperatorAnswer.Name = "OperatorAnswer"; }
public CopyValueDefinition(TestSequence testSequence) : base(testSequence) { mDestinationValue = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "DestinationValue")); mDestinationValue.Type = DataType.DecimalNumber; mDestinationValue.AddDependency(this); mDestinationValue.Name = "DestinationValue"; }
public ColorMatchCountDefinition(TestSequence testSequence) : base(testSequence) { mResult = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "Result")); mResult.Type = DataType.IntegerNumber; mResult.AddDependency(this); mResult.Name = "ColorMatchCountResult"; }
public MeasurementToolDefinition(TestSequence testSequence) : base(testSequence) { mDistance = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "Distance")); mDistance.Type = DataType.DecimalNumber; mDistance.AddDependency(this); mDistance.Name = "Distance"; }
public VideoCaptureByJPEGDefinition(TestSequence testSequence) : base(testSequence) { mCapturedVideo = new GeneratedVideoDefinition(testSequence, OwnerLink.newLink(this, "CapturedVideo")); mCapturedVideo.AddDependency(this); mCapturedVideo.Name = "capturedVideo"; bufferForWorker = new byte[bufferSize]; }
public void SetOwnerLink(OwnerLink ownerLink) { // NOTE: this is not a property since we don't want to expose it to the PropertyGrid or config file if (mOwnerLink != null && mOwnerLink != ownerLink) { throw new Exception("should only call this once asdlkjalksjd"); } mOwnerLink = ownerLink; }
public CameraSnapshotDefinition(TestSequence testSequence) : base(testSequence) { mSnapshotImage = new GeneratedImageDefinition(testSequence, OwnerLink.newLink(this, "ResultantImage")); mSnapshotImage.AddDependency(this); mSnapshotImage.Name = "snapshotResult"; bufferForWorker = new byte[bufferSize]; testSequence.TriggerRegistry.RegisterObject(this); }
public AddNumbersDefinition(TestSequence testSequence) : base(testSequence) { // // TODO: Add constructor logic here // mResult = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "Result")); mResult.Type = DataType.IntegerNumber; mResult.AddDependency(this); mResult.Name = "ColorMatchCountResult"; }
public void AddObject(Object theObject) { /* * if (theObject is MathOperationDefinition || * theObject is MathOpResultDefinition || * theObject is CalculationToolDefinition * ) * { * return; * } */ /* removed 7/3/08 since fixed support in ConstantValueDefinition for IncludeObjectInConfigFile() * if (theObject is ConstantValueDefinition ) * { * ConstantValueDefinition constValue = (ConstantValueDefinition)theObject; * if (constValue.Name == "" + constValue.Value) return; * }*/ writer.WriteLine(); Type objectType = theObject.GetType(); //writer.WriteLine("[" + objectType.Assembly.GetName() + "." + objectType.Name + "]"); string objectTypeLine = "[" + objectType.Name; OwnerLink ownerLink = null; if (theObject is IObjectDefinition) { ownerLink = ((IObjectDefinition)theObject).GetOwnerLink(); } if (ownerLink != null) { objectTypeLine += " | " + ownerLink.Owner.Name + "." + ownerLink.Property.Name; } objectTypeLine += "]"; writer.WriteLine(objectTypeLine); foreach (PropertyInfo propInfo in objectType.GetProperties()) { if (propInfo.CanWrite) { object propertyValue = propInfo.GetValue(theObject, null); if (propertyValue == null) { writer.WriteLine(propInfo.Name + " = "); } else { TypeConverter converter = TypeDescriptor.GetConverter(propertyValue); writer.WriteLine(propInfo.Name + " = " + converter.ConvertToString(propertyValue)); } } } }
public IntensityVariationDefinition(TestSequence testSequence) : base(testSequence) { mResult = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "Result")); mResult.Type = DataType.IntegerNumber; mResult.AddDependency(this); mResult.Name = "IntensityVariation"; mMarkedImage = new GeneratedImageDefinition(testSequence, OwnerLink.newLink(this, "MarkedImage")); mMarkedImage.AddDependency(this); mMarkedImage.Name = "IntensityVariationImage"; }
public FindCenterOfColorOnLineDefinition(TestSequence testSequence) : base(testSequence) { mResultX = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "ResultX")); mResultX.Type = DataType.IntegerNumber; mResultX.AddDependency(this); mResultX.Name = "ResultX"; mResultY = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "ResultY")); mResultY.Type = DataType.IntegerNumber; mResultY.AddDependency(this); mResultY.Name = "ResultY"; }
public FindBrightestSpotDefinition(TestSequence testSequence) : base(testSequence) { mBrightSpot_X = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "BrightSpot_X")); mBrightSpot_X.Type = DataType.IntegerNumber; mBrightSpot_X.AddDependency(this); mBrightSpot_X.Name = "BrightSpot_X"; mBrightSpot_Y = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "BrightSpot_Y")); mBrightSpot_Y.Type = DataType.IntegerNumber; mBrightSpot_Y.AddDependency(this); mBrightSpot_Y.Name = "BrightSpot_Y"; }
public ProximityCollectorWith2GridsScoreFilterDefinition(TestSequence testSequence) : base(testSequence) { mMaxScore = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "MaxScore")); mMaxScore.Type = DataType.IntegerNumber; mMaxScore.AddDependency(this); mMaxScore.Name = "MaxScore"; mNumScoresInMax = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "NumScoresInMax")); mNumScoresInMax.Type = DataType.IntegerNumber; mNumScoresInMax.AddDependency(this); mNumScoresInMax.Name = "NumScoresInMax"; }
public PatternMatchOfAvgGrayVariationDefinition(TestSequence testSequence) : base(testSequence) { mResult = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "Result")); mResult.Type = DataType.IntegerNumber; mResult.AddDependency(this); mResult.Name = "DifferenceScore"; //TODO: ConstantImage to hold "average" image of pattern...along with red pixels to show what won't be matched (diff range outside of threshold) mMarkedImage = new GeneratedImageDefinition(testSequence, OwnerLink.newLink(this, "MarkedImage")); mMarkedImage.AddDependency(this); mMarkedImage.Name = "IntensityVariationImage"; }
public FindEdgeOriginalDefinition(TestSequence testSequence) : base(testSequence) { mEdgeMarker = new ValueBasedLineDecorationDefinition(testSequence, OwnerLink.newLink(this, "EdgeMarker")); mEdgeMarker.Name = "EdgeMarker"; mEdgeMarker.AddDependency(this); MarkerColor = Color.Yellow; mEdgeLocation = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "EdgeLocation")); mEdgeLocation.Type = DataType.IntegerNumber; mEdgeLocation.AddDependency(this); mEdgeLocation.Name = "EdgeLocation"; }
public IntensityVariationOverRectangleDefinition(TestSequence testSequence) : base(testSequence) { // // TODO: Add constructor logic here // mResult = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "Result")); mResult.Type = DataType.IntegerNumber; mResult.AddDependency(this); mResult.Name = "IntensityVariation"; mMarkedImage = new GeneratedImageDefinition(testSequence, OwnerLink.newLink(this, "MarkedImage")); mMarkedImage.AddDependency(this); mMarkedImage.Name = "IntensityVariationImage"; }
public FindRadialLineDefinition(TestSequence testSequence) : base(testSequence) { mOuterSearchBounds = new ToolCircleDecorationDefinition(testSequence, OwnerLink.newLink(this, "OuterSearchBounds")); mOuterSearchBounds.Name = "Outer bound"; mOuterSearchBounds.AddDependency(this); mInnerSearchBounds = new ToolCircleDecorationDefinition(testSequence, OwnerLink.newLink(this, "InnerSearchBounds")); mInnerSearchBounds.Name = "Inner bound"; mInnerSearchBounds.AddDependency(this); SearchBoundsColor = Color.Yellow; mResultantAngle = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "ResultantAngle")); mResultantAngle.Type = DataType.IntegerNumber; mResultantAngle.AddDependency(this); mResultantAngle.Name = "ResultantAngle"; mResultantRay = new ValueBasedLineDecorationDefinition(testSequence, OwnerLink.newLink(this, "ResultantRay")); mResultantRay.AddDependency(mResultantAngle); mResultantRay.Name = "ResultantRay"; }
public FindBlobOfSizeAndColorDefinition(TestSequence testSequence) : base(testSequence) { mLeftBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "LeftBound")); mLeftBound.Type = DataType.IntegerNumber; mLeftBound.AddDependency(this); mLeftBound.Name = "LeftBound"; mRightBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "RightBound")); mRightBound.Type = DataType.IntegerNumber; mRightBound.AddDependency(this); mRightBound.Name = "RightBound"; mTopBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "TopBound")); mTopBound.Type = DataType.IntegerNumber; mTopBound.AddDependency(this); mTopBound.Name = "TopBound"; mBottomBound = new GeneratedValueDefinition(testSequence, OwnerLink.newLink(this, "BottomBound")); mBottomBound.Type = DataType.IntegerNumber; mBottomBound.AddDependency(this); mBottomBound.Name = "BottomBound"; }
public ToolPointDecorationDefinition(TestSequence testSequence, OwnerLink ownerLink) : base(testSequence) { SetOwnerLink(ownerLink); }
public EdgeCollectionDefinition(TestSequence testSequence, OwnerLink theOwner) : base(testSequence) { SetOwnerLink(theOwner); testSequence.DecorationRegistry.RegisterObject(this); }
public GeneratedValueDefinition(TestSequence testSequence, OwnerLink ownerLink) : base(testSequence) { SetOwnerLink(ownerLink); SetDataCategory(DataCategory.NamedValue); }
public GeneratedImageDefinition(TestSequence testSequence, OwnerLink ownerLink) : base(testSequence) { SetOwnerLink(ownerLink); }
public ValueBasedLineDecorationDefinition(TestSequence testSequence, OwnerLink ownerLink) : base(testSequence) { SetOwnerLink(ownerLink); }