/// <summary>Gets the dimension of a specific /// output control parameter</summary> public int GetOutputCtrlParamDimension(int index) { if (index < 1 || index > this.parDimensionsCtrlOutput.Length) { HDevEngineException.ThrowGeneric("Bad index for GetOutputCtrlParamDimension"); } return((int)this.parDimensionsCtrlOutput[index - 1]); }
/// <summary>Gets the name of a specific output control parameter</summary> public string GetOutputCtrlParamName(int index) { if (index < 1 || index > this.parNamesCtrlOutput.Length) { HDevEngineException.ThrowGeneric("Bad index for GetOutputCtrlParamName"); } return(this.parNamesCtrlOutput.SArr[index - 1]); }
/// <summary>Gets the dimension of a specific control variable</summary> public int GetCtrlVarDimension(int index) { if (index < 1 || index > this.varDimsCtrl.Length) { HDevEngineException.ThrowGeneric("Bad index for GetCtrlVarDimension"); } return((int)this.varDimsCtrl[index - 1]); }
/// <summary>Gets the name of a specific control variable</summary> public string GetCtrlVarName(int index) { if (index < 1 || index > this.varNamesCtrl.Length) { HDevEngineException.ThrowGeneric("Bad index for GetCtrlVarName"); } return(this.varNamesCtrl.SArr[index - 1]); }
/// <summary> /// Creates an instance of the fixed window implementation /// </summary> /// <param name="windowID">The window ID of an existing HALCON window</param> public HDevOpFixedWindowImpl(HTuple windowID) { if (windowID.Length != 1) { HDevEngineException.ThrowGeneric("Please specify exactly one window ID"); } this.activeID = windowID.Clone(); }
/// <summary>Loads a local procedure</summary> public void LoadProcedure(HDevProgram program, string procedureName) { if (program.Handle == IntPtr.Zero) { HDevEngineException.ThrowGeneric("Uninitialized program while creating a local procedure call"); } HDevProcedure.HCkE(EngineAPI.LoadProcedure(this.procedure, program.Handle, procedureName)); GC.KeepAlive((object)this); this.UpdateProcedureInfo(); }
internal static void AssertObjectClass(IntPtr key, string assertClass, string procedureName) { if (!(key != HObjectBase.UNDEF)) { return; } HObject hobject = new HObject(key); HTuple objClass = hobject.GetObjClass(); hobject.Dispose(); if (objClass.Length <= 0) { return; } string s = objClass.S; if (s.StartsWith(assertClass)) { return; } HDevEngineException.ThrowGeneric("Output object type mismatch (excepted " + assertClass + ", got " + s + ")", procedureName); }