Skip to content

Commit

Permalink
chore: added mock data for station speeds to demo journey. (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
rawi-coding committed Jan 10, 2025
1 parent 22cf9d3 commit 6421e73
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 4 deletions.
10 changes: 6 additions & 4 deletions das_client/test/sfera/mapper/sfera_mapper_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,13 @@ void main() {
test('Test available break series are parsed correctly', () async {
var journey = getJourney('T9999', 5);
expect(journey.valid, true);
expect(journey.metadata.availableBreakSeries, hasLength(2));
expect(journey.metadata.availableBreakSeries, hasLength(3));
expect(journey.metadata.availableBreakSeries.elementAt(0).trainSeries, TrainSeries.R);
expect(journey.metadata.availableBreakSeries.elementAt(0).breakSeries, 100);
expect(journey.metadata.availableBreakSeries.elementAt(1).trainSeries, TrainSeries.A);
expect(journey.metadata.availableBreakSeries.elementAt(1).breakSeries, 30);
expect(journey.metadata.availableBreakSeries.elementAt(0).breakSeries, 150);
expect(journey.metadata.availableBreakSeries.elementAt(1).trainSeries, TrainSeries.R);
expect(journey.metadata.availableBreakSeries.elementAt(1).breakSeries, 100);
expect(journey.metadata.availableBreakSeries.elementAt(2).trainSeries, TrainSeries.A);
expect(journey.metadata.availableBreakSeries.elementAt(2).breakSeries, 30);

journey = getJourney('T5', 1);
expect(journey.valid, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<TP_ID_Reference TP_ID="Bahnhof_A"/>
</TimingPointReference>
</TimingPointConstraints>
<TrainCharacteristicsRef TC_ID="T9999_1" TC_VersionMajor="1" TC_VersionMinor="0" location="0">
<TC_RU_ID>1085</TC_RU_ID>
</TrainCharacteristicsRef>
</SegmentProfileList>
<SegmentProfileList SP_ID="T9999_2" SP_VersionMajor="1" SP_VersionMinor="0" SP_Direction="Nominal">
<SP_Zone>
Expand Down
12 changes: 12 additions & 0 deletions das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
<LocationPrimaryCode>9991</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Bahnhof A"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;60&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
<NetworkSpecificParameter name="xmlGraduatedSpeedInfo" value="
&lt;entries&gt;
&lt;entry roSpeed=&quot;105/[60]&quot;/&gt;
&lt;/entries&gt;
"/>
</TAF_TAP_Location_NSP>

<!-- gleisspezifische Geschwindigkeiten -->
<TAF_TAP_Location_NSP name="stationProperty_00000">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
<LocationPrimaryCode>9992</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Haltestelle B"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;90&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>

<NetworkSpecificArea startEndQualifier="StartsEnds" startLocation="200" endLocation="600" name="nonStandardTrackEquipment">
Expand Down
12 changes: 12 additions & 0 deletions das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@
<LocationPrimaryCode>9993</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Halt auf Verlangen C"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;60&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
<NetworkSpecificParameter name="xmlGraduatedSpeedInfo" value="
&lt;entries&gt;
&lt;entry roSpeed=&quot;70-60&quot;/&gt;
&lt;/entries&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>

<NetworkSpecificArea startEndQualifier="WholeSP" name="nonStandardTrackEquipment">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
<TAF_TAP_Location_NSP name="bracketStation">
<NetworkSpecificParameter name="mainStation" value="CH9994"/>
</TAF_TAP_Location_NSP>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;90&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>
<NetworkSpecificArea startEndQualifier="Ends" endLocation="500" name="nonStandardTrackEquipment">
<NetworkSpecificParameter name="trackEquipmentType" value="ETCS-L2-extSpeedReversingPossible"/>
Expand Down
19 changes: 19 additions & 0 deletions das_client/test_resources/T9999_mixed_journey/SFERA_SP_T9999_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
<TAF_TAP_Location_NSP name="bracketStation">
<NetworkSpecificParameter name="mainStation" value="CH9994"/>
</TAF_TAP_Location_NSP>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;80&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>
<TAF_TAP_Location startEndQualifier="StartsEnds" TAF_TAP_location_abbreviation="E"
TAF_TAP_location_type="station">
Expand All @@ -48,6 +55,18 @@
<LocationPrimaryCode>9996</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Bahnhof E"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;100&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
<NetworkSpecificParameter name="xmlGraduatedSpeedInfo" value="
&lt;entries&gt;
&lt;entry roSpeed=&quot;100/100-125&quot;/&gt;
&lt;/entries&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>
</SP_Areas>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<TrainCharacteristics xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../SFERA_3.0_custom.xsd"
TC_ID="T9999_1" TC_VersionMajor="1" TC_VersionMinor="0">
<TC_RU_ID>1085</TC_RU_ID>
<TC_Features trainCategoryCode="R" brakedWeightPercentage="150">
</TC_Features>
</TrainCharacteristics>
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
<LocationPrimaryCode>9991</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Bahnhof A"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;60&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
<NetworkSpecificParameter name="xmlGraduatedSpeedInfo" value="
&lt;entries&gt;
&lt;entry roSpeed=&quot;105/[60]&quot;/&gt;
&lt;/entries&gt;
"/>
</TAF_TAP_Location_NSP>

<!-- gleisspezifische Geschwindigkeiten -->
<TAF_TAP_Location_NSP name="stationProperty_00000">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
<LocationPrimaryCode>9992</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Haltestelle B"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;90&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>

<NetworkSpecificArea startEndQualifier="StartsEnds" startLocation="200" endLocation="600" name="nonStandardTrackEquipment">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@
<LocationPrimaryCode>9993</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Halt auf Verlangen C"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;60&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
<NetworkSpecificParameter name="xmlGraduatedSpeedInfo" value="
&lt;entries&gt;
&lt;entry roSpeed=&quot;70-60&quot;/&gt;
&lt;/entries&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>

<NetworkSpecificArea startEndQualifier="WholeSP" name="nonStandardTrackEquipment">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
<TAF_TAP_Location_NSP name="bracketStation">
<NetworkSpecificParameter name="mainStation" value="CH9994"/>
</TAF_TAP_Location_NSP>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;90&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>
<NetworkSpecificArea startEndQualifier="Ends" endLocation="500" name="nonStandardTrackEquipment">
<NetworkSpecificParameter name="trackEquipmentType" value="ETCS-L2-extSpeedReversingPossible"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
<TAF_TAP_Location_NSP name="bracketStation">
<NetworkSpecificParameter name="mainStation" value="CH9994"/>
</TAF_TAP_Location_NSP>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;80&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>
<TAF_TAP_Location startEndQualifier="StartsEnds" TAF_TAP_location_abbreviation="E"
TAF_TAP_location_type="station">
Expand All @@ -48,6 +55,18 @@
<LocationPrimaryCode>9996</LocationPrimaryCode>
</TAF_TAP_LocationIdent>
<TAF_TAP_LocationName language="de" messageString="Bahnhof E"/>
<TAF_TAP_Location_NSP name="stationSpeed">
<NetworkSpecificParameter name="xmlStationSpeed" value="
&lt;stationSpeed&gt;
&lt;v trainSeries=&quot;R&quot; brakeSeries=&quot;150&quot; speed=&quot;100&quot;/&gt;
&lt;/stationSpeed&gt;
"/>
<NetworkSpecificParameter name="xmlGraduatedSpeedInfo" value="
&lt;entries&gt;
&lt;entry roSpeed=&quot;100/100-125&quot;/&gt;
&lt;/entries&gt;
"/>
</TAF_TAP_Location_NSP>
</TAF_TAP_Location>
</SP_Areas>

Expand Down

0 comments on commit 6421e73

Please sign in to comment.