Ejemplo n.º 1
0
 public void ProcessCommand(RdsCommand command)
 {
     foreach (var f in features)
     {
         f.ProcessCommand(this, command);
     }
     OnCommand?.Invoke(this, command);
 }
Ejemplo n.º 2
0
        private int[] groupChartValues = new int[32]; //32 = 2^5

        private void Rds_OnCommand(RdsClient client, RdsCommand command)
        {
            //Configure pie graph
            int groupId = (command.GroupType << 1) | (command.GroupVersionB ? 1 : 0);

            //Update internal count
            groupChartValues[groupId]++;

            //Update UI
            Invoke((MethodInvoker) delegate
            {
                //Update graph
                rdsGroupChart.Series["Groups"].Points[groupId].SetValueXY(command.GroupName + " (" + groupChartValues[groupId] + ")", groupChartValues[groupId]);
                rdsGroupChart.Series["Groups"].Points[groupId].IsVisibleInLegend = true;
                rdsGroupChart.Invalidate();

                //Update table
                if (!historyPause.Checked)
                {
                    rdsHistory.Rows.Insert(0, command.PiCode.ToString("X"), command.GroupName, command.DescribeCommand());
                }
            });
        }
Ejemplo n.º 3
0
 public void ProcessFrame(ulong frame)
 {
     ProcessCommand(RdsCommand.DecodeCommand(frame));
 }
Ejemplo n.º 4
0
 public RdsHistoryAdapter(RdsCommand command)
 {
     this.command = command;
 }