Example #1
0
        public void RXGroupsFromRawData(byte[] rawData, bool debug)
        {
            int offset = OFFSET;

            for (int i = 0; i < MAX; i++)
            {
                //Console.WriteLine("RXGroups: "+i);
                String hex;
                byte[] oneRXGroupRaw = new byte[DATA_WIDTH];
                for (int j = 0; j < DATA_WIDTH; j++)
                {
                    byte value = rawData[offset + j];
                    oneRXGroupRaw[j] = value;
                    if (debug)
                    {
                        hex = string.Format("{0:X2}", value);
                        Console.Write(hex + " ");
                    }
                }
                if (debug)
                {
                    Console.WriteLine();
                }
                offset += DATA_WIDTH;
                RXGroupObject ch = new RXGroupObject();
                ch.RawData = oneRXGroupRaw;
                AddRXGroup(ch);
                if (debug)
                {
                    Console.WriteLine(ch.toString());
                    oneRXGroupRaw = ch.RawData;
                    for (int j = 0; j < DATA_WIDTH; j++)
                    {
                        byte value = oneRXGroupRaw[j];
                        hex = string.Format("{0:X2}", value);
                        Console.Write(hex + " ");
                    }
                    Console.WriteLine();
                }
            }
        }
Example #2
0
 public void AddRXGroup(RXGroupObject oneRXGroup)
 {
     allRXGroups.Rows.Add(oneRXGroup.GUID, oneRXGroup.RXGroupName, oneRXGroup);
 }