Exemple #1
0
        // Process a shell message
        void HandleShell(Debugger.Message msg)
        {
            int spc = msg.Text.IndexOf(' ');

            if (spc < 0)
            {
                return;
            }

            string kind = msg.Text.Substring(0, spc);
            string arg  = msg.Text.Substring(spc + 1,
                                             msg.Text.Length - spc - 1);

            if (kind.Equals("power-sample-us"))
            {
                int period = XmlConvert.ToInt32(arg);

                powerData = new SampleQueue(period, 131072);
                if (PowerChanged != null)
                {
                    PowerChanged(this, null);
                }
            }
            else if (kind.Equals("power-samples"))
            {
                if (powerData != null)
                {
                    int[] samples = DecodeSamples(arg);

                    powerData.Push(samples);
                    if (PowerChanged != null)
                    {
                        PowerChanged(this, null);
                    }
                }
            }
        }
Exemple #2
0
 public MessageEventArgs(Debugger.Message m)
 {
     Message = m;
 }
Exemple #3
0
 public MessageEventArgs(Debugger.Message m)
 {
     Message = m;
 }