public override void LoadBytes(byte[] bytes)
        {
            ByteArrayManager BAM = new ByteArrayManager(bytes);

            base.LoadBytes(BAM.NextBytes(24)); //Load header

            int t = 0;
            List <CarTelemetryData> TelDatas = new List <CarTelemetryData>();

            for (t = 1; t <= 22; t++)
            {
                TelDatas.Add(CarTelemetryData.Create(BAM.NextBytes(58)));
            }
            FieldTelemetryData = TelDatas.ToArray();

            //Button status
            ButtonStatus = BitConverter.ToInt32(BAM.NextBytes(4), 0);

            //MFD Panel Index
            MfdPanelIndex = BAM.NextByte();

            //Secndary player mfd panel index
            SecondaryPlayerMfdPanelIndex = BAM.NextByte();

            //Suggested gear
            SuggestedGear = BAM.NextByte();
        }
예제 #2
0
        public override void LoadBytes(byte[] bytes)
        {
            ByteArrayManager BAM = new ByteArrayManager(bytes);

            base.LoadBytes(BAM.NextBytes(23)); //Load header

            int t = 0;
            List <CarTelemetryData> TelDatas = new List <CarTelemetryData>();

            for (t = 1; t <= 20; t++)
            {
                TelDatas.Add(CarTelemetryData.Create(BAM.NextBytes(66)));
            }
            FieldTelemetryData = TelDatas.ToArray();

            //I skipped the field "ButtonStatus".  Doesn't seem needed.
        }