예제 #1
0
        /// <summary>
        /// Gets the value of a control variable (in main)
        /// </summary>
        public HTuple GetCtrlVarTuple(int index)
        {
            IntPtr tuple;

            HDevProgramCall.HCkE(EngineAPI.GetCtrlVarTuple(this.call, index, out tuple));
            GC.KeepAlive((object)this);
            return(HalconAPI.LoadTuple(tuple));
        }
예제 #2
0
        /// <summary>
        /// Gets the values of an iconic vector variable
        ///             (in main)
        /// </summary>
        public HObjectVector GetIconicVarVector(string name)
        {
            IntPtr vector;

            HDevProgramCall.HCkE(EngineAPI.GetIconicVarVector(this.call, name, out vector));
            GC.KeepAlive((object)this);
            return(EngineAPI.GetAndDestroyObjectVector(vector));
        }
예제 #3
0
        /// <summary>
        /// Gets the object of an iconic variable (in main)
        /// </summary>
        public HObject GetIconicVarObject(string name)
        {
            IntPtr key;

            HDevProgramCall.HCkE(EngineAPI.GetIconicVarObject(this.call, name, out key));
            GC.KeepAlive((object)this);
            return(new HObject(key));
        }
예제 #4
0
        /// <summary>
        /// Gets the values of a control vector variable
        ///             (in main)
        /// </summary>
        public HTupleVector GetCtrlVarVector(int index)
        {
            IntPtr vector;

            HDevProgramCall.HCkE(EngineAPI.GetCtrlVarVector(this.call, index, out vector));
            GC.KeepAlive((object)this);
            return(EngineAPI.GetAndDestroyTupleVector(vector));
        }
예제 #5
0
        /// <summary>
        /// Gets the xld contour of an iconic variable (in main)
        /// </summary>
        public HXLD GetIconicVarXld(string name)
        {
            IntPtr key;

            HDevProgramCall.HCkE(EngineAPI.GetIconicVarObject(this.call, name, out key));
            GC.KeepAlive((object)this);
            EngineAPI.AssertObjectClass(key, "xld", "main");
            return(new HXLD(key));
        }
예제 #6
0
        /// <summary>
        /// Gets the region of an iconic variable (in main)
        /// </summary>
        public HRegion GetIconicVarRegion(int index)
        {
            IntPtr key;

            HDevProgramCall.HCkE(EngineAPI.GetIconicVarObject(this.call, index, out key));
            GC.KeepAlive((object)this);
            EngineAPI.AssertObjectClass(key, "region", "main");
            return(new HRegion(key));
        }
예제 #7
0
 /// <summary>
 /// Resets the program execution
 /// </summary>
 public void Reset()
 {
     HDevProgramCall.HCkE(EngineAPI.ResetProgramCall(this.call));
     GC.KeepAlive((object)this);
 }
예제 #8
0
 /// <summary>
 /// Stops execution on first line of program.
 /// </summary>
 ///
 /// <remarks>
 /// This is intended for debugging purposes when you wish to step
 ///               through a specific program call. It only has an effect when a
 ///               debug server is running and it will only stop once.
 ///
 /// </remarks>
 public void SetWaitForDebugConnection(bool wait_once)
 {
     HDevProgramCall.HCkE(EngineAPI.SetWaitForDebugConnectionProgramCall(this.call, wait_once));
     GC.KeepAlive((object)this);
 }
예제 #9
0
 /// <summary>
 /// Executes the program
 /// </summary>
 public void Execute()
 {
     HDevProgramCall.HCkE(EngineAPI.ExecuteProgramCall(this.call));
     GC.KeepAlive((object)this);
 }
예제 #10
0
 /// <summary>
 /// Creates a program call for the specified program
 /// </summary>
 public HDevProgramCall(HDevProgram program)
 {
     HDevProgramCall.HCkE(EngineAPI.CreateProgramCall(program.Handle, out this.call));
     GC.KeepAlive((object)this);
     this.program = program;
 }