-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsequence.ts
85 lines (77 loc) · 1.5 KB
/
sequence.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
export interface Sequence {
track: Track;
vehicleGroup?: VehicleGroup[];
direction?: "RIGHT" | "LEFT";
plannedTrack?: string;
actualTrack?: string;
}
export interface Track {
start: { position: number };
end: { position: number };
sections: Section[] | [];
name: string; // name of the track
}
export interface Section {
name: string;
start: { position: number };
end: { position: number };
gleisabschnittswuerfelPosition: number; // ??????????????????????
firstClass: boolean;
}
export interface VehicleGroup {
vehicles: Vehicle[];
tripReference: TripReference;
designation: string;
}
export interface TripReference {
type: string;
line: string;
destination: { name: string };
category: string;
fahrtNr: number;
}
export interface Vehicle {
vehicleType: VehicleType;
status: string;
orientation: string;
positionOnTrack: PositionOnTrack;
equipment: Equipment[];
orderNumber?: number; // coach number
}
/**
* category might be:
*
* POWERCAR
* LOCOMOTIVE
* DOUBLEDECK_*
* PASSENGERCARRIAGE_*
*/
export interface VehicleType {
category: string;
model: string;
firstClass: boolean;
secondClass: boolean;
}
export interface PositionOnTrack {
start: { position: number };
end: { position: number };
section: string;
}
/**
* SEATS_SEVERELY_DISABLED
* ZONE_FAMILY
* ZONE_QUIET
* INFO
* CABIN_INFANT
* AIR_CONDITION
* TOILET_WHEELCHAIR
* WHEELCHAIR_SPACE
* SEATS_BAHN_COMFORT
* BIKE_SPACE
* ZONE_MULTI_PURPOSE
* BISTRO
*/
export interface Equipment {
type: string;
status: string;
}