public void ProcessCommand(RdsCommand command) { foreach (var f in features) { f.ProcessCommand(this, command); } OnCommand?.Invoke(this, command); }
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()); } }); }
public void ProcessFrame(ulong frame) { ProcessCommand(RdsCommand.DecodeCommand(frame)); }
public RdsHistoryAdapter(RdsCommand command) { this.command = command; }