public ParticipantInfoDecoder()
        {
            worldPosition      = new TwoByteArrayDecoder(3);
            orientation        = new TwoByteArrayDecoder(3);
            currentLapDistance = new TwoByteDecoder();
            racePosition       = new RacePositionDecoder();
            sector             = new SectorDecoder();
            highestFlag        = new HighestFlagDecoder();
            pitModeSchedule    = new PitModeScheduleDecoder();
            carIndex           = new TwoByteDecoder();
            raceState          = new RaceStateDecoder();
            currentLap         = new OneByteDecoder();
            currentTime        = new FourByteDecoder();
            currentSectorTime  = new FourByteDecoder();
            participantIndex   = new TwoByteDecoder();

            Add(worldPosition);
            Add(orientation);
            Add(currentLapDistance);
            Add(racePosition);
            Add(sector);
            Add(highestFlag);
            Add(pitModeSchedule);
            Add(carIndex);
            Add(raceState);
            Add(currentLap);
            Add(currentTime);
            Add(currentSectorTime);
            Add(participantIndex);
        }
        public TwoByteArrayDecoder(int amount)
        {
            this.amount = amount;
            data        = new TwoByteDecoder[amount];

            for (int i = 0; i < amount; ++i)
            {
                data[i] = new TwoByteDecoder();
            }
        }
        public ParticipantStatsInfoDecoder()
        {
            fastestLapTime       = new FourByteDecoder();
            lastLapTime          = new FourByteDecoder();
            lastSectorTime       = new FourByteDecoder();
            fastestSector1Time   = new FourByteDecoder();
            fastestSector2Time   = new FourByteDecoder();
            fastestSector3Time   = new FourByteDecoder();
            participantOnlineRep = new FourByteDecoder();
            MPParticipantIndex   = new TwoByteDecoder();

            Add(fastestLapTime);
            Add(lastLapTime);
            Add(lastSectorTime);
            Add(fastestSector1Time);
            Add(fastestSector2Time);
            Add(fastestSector3Time);
            Add(participantOnlineRep);
            Add(MPParticipantIndex);
        }
Esempio n. 4
0
        public GameStateDataDecoder()
        {
            packetBase         = new PacketBaseDecoder();
            buildVersionNumber = new TwoByteDecoder();
            gameState          = new GameStateDecoder();
            ambientTemperature = new OneByteDecoder();
            trackTemperature   = new OneByteDecoder();
            rainDensity        = new OneByteDecoder();
            snowDensity        = new OneByteDecoder();
            windSpeed          = new OneByteDecoder();
            windDirectionX     = new OneByteDecoder();
            windDirectionY     = new OneByteDecoder();

            Add(packetBase);
            Add(buildVersionNumber);
            Add(gameState);
            Add(ambientTemperature);
            Add(trackTemperature);
            Add(rainDensity);
            Add(snowDensity);
            Add(windSpeed);
            Add(windDirectionX);
            Add(windDirectionY);
        }
        public TimingsDataDecoder()
        {
            packetBase      = new PacketBaseDecoder();
            numParticipants = new OneByteDecoder();
            participantsChangedTimestamp = new FourByteDecoder();
            eventTimeRemaining           = new FourByteDecoder();
            splitTimeAhead        = new FourByteDecoder();
            splitTimeBehind       = new FourByteDecoder();
            splitTime             = new FourByteDecoder();
            participants          = new ParticipantInfoArrayDecoder(ParticipantInfoArrayDecoder.UDP_STREAMER_PARTICIPANTS_SUPPORTED);
            localParticipantIndex = new TwoByteDecoder();
            tickCount             = new FourByteDecoder();

            Add(packetBase);
            Add(numParticipants);
            Add(participantsChangedTimestamp);
            Add(eventTimeRemaining);
            Add(splitTimeAhead);
            Add(splitTimeBehind);
            Add(splitTime);
            Add(participants);
            Add(localParticipantIndex);
            Add(tickCount);
        }
 public LapsTimeInEvent()
 {
     lapsTimeInEvent = new TwoByteDecoder();
 }
        public TelemetryDataDecoder()
        {
            packetBase             = new PacketBaseDecoder();
            viewedParticipantIndex = new OneByteDecoder();
            unfilteredThrottle     = new OneByteDecoder();
            unfilteredBrake        = new OneByteDecoder();
            unfilteredSteering     = new OneByteDecoder();
            unfilteredClutch       = new OneByteDecoder();
            carFlags         = new OneByteDecoder();
            oilTempCelsius   = new TwoByteDecoder();
            oilPressureKPa   = new TwoByteDecoder();
            waterTempCelsius = new TwoByteDecoder();
            waterPressureKpa = new TwoByteDecoder();
            fuelPressureKpa  = new TwoByteDecoder();
            fuelCapacity     = new OneByteDecoder();
            brake            = new OneByteDecoder();
            throttle         = new OneByteDecoder();
            clutch           = new OneByteDecoder();
            fuelLevel        = new FourByteDecoder();
            speed            = new FourByteDecoder();
            rpm                   = new TwoByteDecoder();
            maxRpm                = new TwoByteDecoder();
            steering              = new OneByteDecoder();
            gearNumGears          = new GearNumGearsDecoder();
            boostAmount           = new OneByteDecoder();
            crashState            = new OneByteDecoder();
            odometerKM            = new FourByteDecoder();
            orientation           = new FourByteArrayDecoder(3);
            localVelocity         = new FourByteArrayDecoder(3);
            worldVelocity         = new FourByteArrayDecoder(3);
            angularVelocity       = new FourByteArrayDecoder(3);
            localAcceleration     = new FourByteArrayDecoder(3);
            worldAcceleration     = new FourByteArrayDecoder(3);
            extentsCentre         = new FourByteArrayDecoder(3);
            tyreFlags             = new OneByteArrayDecoder(4);
            terrain               = new OneByteArrayDecoder(4);
            tyreY                 = new FourByteArrayDecoder(4);
            tyreRPS               = new FourByteArrayDecoder(4);
            tyreTemp              = new OneByteArrayDecoder(4);
            tyreHeightAboveGround = new FourByteArrayDecoder(4);
            tyreWear              = new OneByteArrayDecoder(4);
            brakeDamage           = new OneByteArrayDecoder(4);
            suspensionDamage      = new OneByteArrayDecoder(4);
            brakeTempCelsius      = new TwoByteArrayDecoder(4);
            tyreTreadTemp         = new TwoByteArrayDecoder(4);
            tyreLayerTemp         = new TwoByteArrayDecoder(4);
            tyreCarcassTemp       = new TwoByteArrayDecoder(4);
            tyreRimTemp           = new TwoByteArrayDecoder(4);
            tyreInternalAirTemp   = new TwoByteArrayDecoder(4);
            tyreTempLeft          = new TwoByteArrayDecoder(4);
            tyreTempCenter        = new TwoByteArrayDecoder(4);
            tyreTempRight         = new TwoByteArrayDecoder(4);
            wheelLocalPositionY   = new FourByteArrayDecoder(4);
            rideHeight            = new FourByteArrayDecoder(4);
            suspensionTravel      = new FourByteArrayDecoder(4);
            suspensionVelocity    = new FourByteArrayDecoder(4);
            suspensionRideHeight  = new TwoByteArrayDecoder(4);
            airPressure           = new TwoByteArrayDecoder(4);
            engineSpeed           = new FourByteDecoder();
            engineTorque          = new FourByteDecoder();
            wings                 = new OneByteArrayDecoder(2);
            handBrake             = new OneByteDecoder();
            aeroDamage            = new OneByteDecoder();
            engineDamage          = new OneByteDecoder();
            joyPad0               = new FourByteDecoder();
            dPad                  = new OneByteDecoder();
            tyreCompound          = new StringMatrixDecoder(4, TYRE_NAME_LENGTH_MAX);
            turboBoostPressure    = new FourByteDecoder();
            fullPosition          = new FourByteArrayDecoder(3);
            brakeBias             = new OneByteDecoder();
            tickCount             = new FourByteDecoder();

            Add(packetBase);
            Add(viewedParticipantIndex);
            Add(unfilteredThrottle);
            Add(unfilteredBrake);
            Add(unfilteredSteering);
            Add(unfilteredClutch);
            Add(carFlags);
            Add(oilTempCelsius);
            Add(oilPressureKPa);
            Add(waterTempCelsius);
            Add(waterPressureKpa);
            Add(fuelPressureKpa);
            Add(fuelCapacity);
            Add(brake);
            Add(throttle);
            Add(clutch);
            Add(fuelLevel);
            Add(speed);
            Add(rpm);
            Add(maxRpm);
            Add(steering);
            Add(gearNumGears);
            Add(boostAmount);
            Add(crashState);
            Add(odometerKM);
            Add(orientation);
            Add(localVelocity);
            Add(worldVelocity);
            Add(angularVelocity);
            Add(localAcceleration);
            Add(worldAcceleration);
            Add(extentsCentre);
            Add(tyreFlags);
            Add(terrain);
            Add(tyreY);
            Add(tyreRPS);
            Add(tyreTemp);
            Add(tyreHeightAboveGround);
            Add(tyreWear);
            Add(brakeDamage);
            Add(suspensionDamage);
            Add(brakeTempCelsius);
            Add(tyreTreadTemp);
            Add(tyreLayerTemp);
            Add(tyreCarcassTemp);
            Add(tyreRimTemp);
            Add(tyreInternalAirTemp);
            Add(tyreTempLeft);
            Add(tyreTempCenter);
            Add(tyreTempRight);
            Add(wheelLocalPositionY);
            Add(rideHeight);
            Add(suspensionTravel);
            Add(suspensionVelocity);
            Add(suspensionRideHeight);
            Add(airPressure);
            Add(engineSpeed);
            Add(engineTorque);
            Add(wings);
            Add(handBrake);
            Add(aeroDamage);
            Add(engineDamage);
            Add(joyPad0);
            Add(dPad);
            Add(tyreCompound);
            Add(turboBoostPressure);
            Add(fullPosition);
            Add(brakeBias);
            Add(tickCount);
        }