Files
Migu2.0/MiGu.Server/Configs/TrafficRule.cs
T

17 lines
724 B
C#

namespace MiGu.Server.Configs;
public record IntersectionPolicy(string Id, List<string> SiteIds, string Mode);
public record ZoneMutex(string Id, List<string> ZoneIds);
public record DynamicYield(string Id, string From, string To, string Condition);
public record TrafficRule(
List<IntersectionPolicy> Intersections,
List<ZoneMutex> Mutex,
List<DynamicYield> Yields)
{
public static TrafficRule Default() => new(
Intersections: new List<IntersectionPolicy> { new("IX1", new List<string> { "S006", "S007" }, "mutex") },
Mutex: new List<ZoneMutex> { new("MZ1", new List<string> { "Z-CROSS" }) },
Yields: new List<DynamicYield> { new("YD1", "A 区", "B 区", "priority<peer") });
}