Пример #1
0
        public unsafe int StartCallbackEvent(PxCEventType eventType, int timeOutTime)
        {
            string str1 = "EVN_IB_" + this.mxiHandle.ToString("X");
            string str2 = "EVN_TO_" + this.mxiHandle.ToString("X");

            if (this.mxiHandle > 0 && this.mxiHandle <= (int)ushort.MaxValue)
            {
                int evtHdl_IB = IBS_G4Driver.CreateEvent((void *)null, false, false, str1.ToCharArray());
                int evtHdl_TO = IBS_G4Driver.CreateEvent((void *)null, false, false, str2.ToCharArray());
                this._EvtHdlIB = evtHdl_IB;
                this._EvtHdlTO = evtHdl_TO;
                this.thrHdlIB  = new Thread(new ThreadStart(this.eventWorkerThread_IB));
                this.thrHdlIB.Start();
                this.thrHdlIB.Priority = ThreadPriority.Highest;
                this.thrHdlTO          = new Thread(new ThreadStart(this.eventWorkerThread_TO));
                this.thrHdlTO.Start();
                this.thrHdlTO.Priority = ThreadPriority.Highest;
                this._createEvent      = IBS_G4Driver.DN_DDI_CreateEvent(this.mxiHandle, (int)eventType, timeOutTime, evtHdl_IB, evtHdl_TO);
            }
            return(this._createEvent);
        }
Пример #2
0
 public int StartCallbackEvent(PxCEventType eventType)
 {
     return(this.StartCallbackEvent(eventType, 100));
 }