Example #1
0
        public Grabber(CheatEngineReader table, MemoryReader reader)
        {
            Config = new Configuration(this);

            //TEMPORARY configuration!
            Config.SamplesBeforeTrigger = 750;
            Config.SamplesAfterTrigger = 750;
            Config.SampleWaitTime = 10000;//ms, 1ms here

            Config.Trigger_Simple_Channel = 0; // gear
            Config.Trigger_Simple_Condition = TriggerCondition.IN_RANGE; // Rising up
            Config.Trigger_Simple_ValueType = MemoryChannelType.INT32;
            Config.Trigger_Simple_Value = new byte[4] { 3, 0, 0, 0 }; // INT32 (5)
            Config.Trigger_Simple_Value2 = new byte[4] { 5, 0, 0, 0 }; // INT32 (5)
            Config.Trigger_Simple = true;

            Channels = new Channels(this,table);
            Waveform = new Waveform(this);
            Trigger = new Triggering(this);

            this.Reader = reader;

            _mGrabberTiming = new MicroStopwatch();

            TritonBase.PreExit += Stop;
        }
Example #2
0
        public Grabber(CheatEngineReader table, MemoryReader reader)
        {
            Config = new Configuration(this);

            //TEMPORARY configuration!
            Config.SamplesBeforeTrigger = 750;
            Config.SamplesAfterTrigger  = 750;
            Config.SampleWaitTime       = 10000;                         //ms, 1ms here

            Config.Trigger_Simple_Channel   = 0;                         // gear
            Config.Trigger_Simple_Condition = TriggerCondition.IN_RANGE; // Rising up
            Config.Trigger_Simple_ValueType = MemoryChannelType.INT32;
            Config.Trigger_Simple_Value     = new byte[4] {
                3, 0, 0, 0
            };                                                        // INT32 (5)
            Config.Trigger_Simple_Value2 = new byte[4] {
                5, 0, 0, 0
            };                                                         // INT32 (5)
            Config.Trigger_Simple = true;

            Channels = new Channels(this, table);
            Waveform = new Waveform(this);
            Trigger  = new Triggering(this);

            this.Reader = reader;

            _mGrabberTiming = new MicroStopwatch();

            TritonBase.PreExit += Stop;
        }
Example #3
0
        private void DataGrabber_Thread()
        {
            _mGrabberTiming.Start();
            while (_mGrabberRunning)
            {
                if (Trigger.IsTriggered || Config.SamplesBeforeTrigger > 0)
                {
                    Waveform.Push();
                }

                if (Trigger.IsTriggered)
                {
                    if (Waveform.SampleIndex >= Config.Samples)
                    {
                        long totalTime = _mGrabberTiming.ElapsedMicroseconds - _mGrabberCaptureTime;
                        //totalTime /= Config.SampleWaitTime;
                        _mGrabberRunning = false;
                    }
                }
                else
                {
                    Trigger.Check();
                    _mGrabberCaptureTime = _mGrabberTiming.ElapsedMicroseconds;
                }
                DataGrabber_Timing();
            }

            // Finalize waveform
            Waveform.Finalize();

            // Sent event DONE
            if (Done != null)
            {
                Done(this);
            }
        }