29#include "trax/Location.h"
30#include "trax/Curve.h"
31#include "trax/Sensor.h"
32#include "trax/Signal.h"
33#include "trax/LogicElements.h"
39 static std::filesystem::path FixturePath();
51struct ThreeTracksInALineFixture{
52 ThreeTracksInALineFixture();
53 ~ThreeTracksInALineFixture();
55 std::shared_ptr<trax::TrackBuilder> m_pTrack1;
56 std::shared_ptr<trax::TrackBuilder> m_pTrack2;
57 std::shared_ptr<trax::TrackBuilder> m_pTrack3;
64 std::shared_ptr<trax::TrackBuilder> m_pTrack1;
65 std::shared_ptr<trax::TrackBuilder> m_pTrack2;
66 std::shared_ptr<trax::TrackBuilder> m_pTrack3;
71struct TrackAndLocation : TrackFixture
85 std::shared_ptr<trax::TrackBuilder> m_pTrack1;
86 std::shared_ptr<trax::TrackBuilder> m_pTrack2;
87 std::shared_ptr<trax::TrackBuilder> m_pTrack3;
88 std::shared_ptr<trax::TrackBuilder> m_pTrack4;
90 std::shared_ptr<trax::ArcP> m_pArc1;
91 std::shared_ptr<trax::ArcP> m_pArc2;
92 std::shared_ptr<trax::ArcP> m_pArc3;
93 std::shared_ptr<trax::ArcP> m_pArc4;
104struct SensorFixture : TrackCircle{
108 std::shared_ptr<trax::Sensor> m_pSensor;
109 std::unique_ptr<trax::PulseCounter> m_pPulseCounter;
110 std::unique_ptr<trax::Event> m_pEvent;
118 m_bNotifyFlag =
true;
123 void Active(
bool bActive )
noexcept override{
132 bool m_bNotifyFlag =
false;
134 bool m_bActive =
true;
Definition Fixtures.h:113
bool Notify(const trax::Signal &, dim::Length) override
Method called to notify about a signalling state.
Definition Fixtures.h:117
bool Active() const noexcept override
Definition Fixtures.h:127
void Active(bool bActive) noexcept override
Switches the target on or off to receive notifications from signals.
Definition Fixtures.h:123
A Location specifies a position on a track system by referencing a track and a TrackLocation on it.
Definition Location.h:110
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
trax::Location m_LocationOnTrack
location in middle of the track
Definition Fixtures.h:75
std::shared_ptr< trax::TrackBuilder > m_pTrack
track unattached to system
Definition Fixtures.h:48
A Signal is positioned along a track and is submitted to a Train if it runs over it.
Definition Signal.h:61
Target for signal notification.
Definition Signal.h:407