53 const std::string& plcName,
54 const std::string& valveName,
78 [[nodiscard]] std::vector<std::
string>
ValveNames() const;
81 [[nodiscard]] std::vector<std::
string>
PlcNames() const;
94 std::unique_ptr<VirtualAumaValve>
valve;
99 std::unique_ptr<VirtualPhoenixPlc>
plc;
Small virtual Ethernet switch suitable for deterministic tests and demos.
AUMA SGx application model that behaves as a real RTC1 peer in memory.
Virtual Phoenix Contact AXC F 1252 controller hosting real CyclicController instances.
Owns one shared Ethernet bus plus any number of virtual PLCs and AUMA valves.
void SetAumaScenario(const std::string &valveName, VirtualAumaScenario scenario)
Set one valve scenario.
std::vector< AumaEntry > valves
std::vector< PlcEntry > plcs
std::vector< std::string > PlcNames() const
Return all PLC names.
VirtualPhoenixPlc & AddPhoenixPlc(std::string name, const gsdml::GSDMLDevice &gsdml, MacAddress controllerMac)
Add one Phoenix AXC F 1252 controller instance.
VirtualProfinetLab(const VirtualProfinetLab &)=delete
VirtualProfinetLab()=default
Create an empty virtual network.
VirtualProfinetLab & operator=(const VirtualProfinetLab &)=delete
std::string StatusReport() const
Render a compact multi-device status dashboard.
InMemoryEthernetBus & Bus() noexcept
Return the shared virtual bus.
VirtualPhoenixPlc & Plc(const std::string &name)
Find a PLC by name.
void Stop()
Stop all devices and controllers.
bool IsMacInUse(const MacAddress &mac) const noexcept
Determine whether a node MAC is already used by this lab.
VirtualAumaValve & Valve(const std::string &name)
Find a valve by name.
void Connect(asio::io_context &ioContext, const std::string &plcName, const std::string &valveName, rt::IOCRConfig inputIocr, rt::IOCRConfig outputIocr, int maxConsecutiveTimeouts=cyclic::DEFAULT_MAX_CONSECUTIVE_TIMEOUTS)
Connect a PLC to an AUMA valve.
VirtualAumaValve & AddAumaValve(std::string name, const gsdml::GSDMLDevice &gsdml, MacAddress deviceMac, rt::IOCRConfig inputIocr, rt::IOCRConfig outputIocr, VirtualAumaValveConfiguration config={})
Add one AUMA valve instance.
std::vector< std::string > ValveNames() const
Return all valve names.
Declares the GSDML parser and PROFINET device-description data model.
Thread-safe in-memory Layer-2 Ethernet switch for PROFINET simulation.
constexpr int DEFAULT_MAX_CONSECUTIVE_TIMEOUTS
Default number of consecutive watchdog timeouts before transitioning to Fault.
VirtualAumaScenario
Deterministic operating and communication scenarios for a virtual AUMA valve.
std::array< std::uint8_t, macAddressLength > MacAddress
A 6-byte Ethernet MAC address.
Declares PROFINET RT_CLASS_1 cyclic frame and IOCR data structures.
Complete parsed GSDML device profile.
IOCR configuration derived from AR setup: timing parameters and IO object mappings needed for cyclic ...
Application-level signal mapping and motion settings for a virtual AUMA SGx.
std::unique_ptr< VirtualAumaValve > valve
std::unique_ptr< VirtualPhoenixPlc > plc
std::unique_ptr< asio::io_context > ioContext
Shared ASIO context.
Stateful in-memory AUMA SGx PROFINET IO device simulator.
In-memory Phoenix Contact AXC F 1252 PLC/controller simulator.