ISimulatorTraffic
USI.Core
Observes AI, multiplayer, and externally injected nearby aircraft.
public interface ISimulatorTrafficEvents
Changed
public event EventHandler<NearbyAircraftChangedEventArgs> ChangedRaised when the provider reports that another aircraft appeared, disappeared, or that the complete snapshot should be refreshed. Query the current snapshot when full contact data is needed.
ControlOwnerChanged
public event EventHandler<SimulatorTrafficControlOwnerChangedEventArgs> ControlOwnerChangedRaised when the provider reports that ownership of its exclusive traffic-control facility changed.
Methods
TryCreateAircraftAsync
public Task<USIResult<ControlledTrafficAircraft>> TryCreateAircraftAsync(TrafficAircraftModel model, ControlledTrafficAircraftPose initialPose)Creates a controlled traffic aircraft using a model returned by .
TryCreateCurrentAircraftCloneAsync
public Task<USIResult<ControlledTrafficAircraft>> TryCreateCurrentAircraftCloneAsync(ControlledTrafficAircraftPose initialPose)Creates an externally controlled airborne clone of the currently loaded aircraft model. The returned handle uses the same API on every provider.
TryGetAvailableAircraftModelsAsync
public Task<USIResult<IReadOnlyList<TrafficAircraftModel>>> TryGetAvailableAircraftModelsAsync()Gets the aircraft model and livery choices that this provider can create as controlled traffic.
TryGetCapacityAsync
public Task<USIResult<SimulatorTrafficCapacity>> TryGetCapacityAsync()Gets simulator-owned maximum, active, and available counts for aircraft other than the user aircraft. Capacity does not imply that this client can acquire exclusive control of an available slot.
TryGetControlOwnerAsync
public Task<USIResult<SimulatorTrafficControlOwner>> TryGetControlOwnerAsync()Gets who currently owns the provider's exclusive traffic-control facility. This is an observation, not an ownership reservation.
TryGetNearbyAircraftAsync
public Task<USIResult<IReadOnlyList<NearbyAircraftContact>>> TryGetNearbyAircraftAsync()Gets the provider's current nearby-aircraft snapshot. An empty successful result means that the provider currently reports no other aircraft.
