PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::sim::VirtualAumaValve Class Reference

AUMA SGx application model that behaves as a real RTC1 peer in memory. More...

#include <virtual_auma_valve.h>

+ Collaboration diagram for profinet::sim::VirtualAumaValve:

Public Member Functions

 VirtualAumaValve (std::string name, const gsdml::GSDMLDevice &gsdml, MacAddress deviceMac, rt::IOCRConfig inputIocr, rt::IOCRConfig outputIocr, VirtualAumaValveConfiguration config={})
 Construct a virtual AUMA valve.
 
 ~VirtualAumaValve ()
 Stop the simulator and release the virtual transport.
 
 VirtualAumaValve (const VirtualAumaValve &)=delete
 
VirtualAumaValve & operator= (const VirtualAumaValve &)=delete
 
void Start (InMemoryEthernetBus &bus)
 Attach the device to a shared virtual Ethernet bus and start cyclic processing.
 
void Stop ()
 Stop cyclic simulation.
 
void SetScenario (VirtualAumaScenario scenario)
 Set the current simulator scenario.
 
VirtualAumaScenario Scenario () const noexcept
 Return the current scenario.
 
std::uint16_t Position () const noexcept
 Return the current simulated position.
 
std::uint16_t TargetPosition () const noexcept
 Return the current requested target position.
 
bool FaultActive () const noexcept
 Return whether an application or mechanical fault is active.
 
bool Moving () const noexcept
 Return whether the valve model is moving toward its target.
 
const std::string & Name () const noexcept
 Return the configured simulator name.
 
const MacAddress & DeviceMac () const noexcept
 Return the simulated device MAC address.
 
std::uint16_t InputSlot () const noexcept
 Return the configured input slot.
 
std::uint16_t InputSubslot () const noexcept
 Return the configured input subslot.
 
std::uint16_t OutputSlot () const noexcept
 Return the configured output slot.
 
std::uint16_t OutputSubslot () const noexcept
 Return the configured output subslot.
 
const io::IoSignalCatalog & SignalCatalog () const noexcept
 Return the GSDML-derived signal catalogue.
 
void OnFrame (std::function< void(const Bytes &)> callback)
 Register a callback for every Ethernet frame emitted by the device.
 
void OnAlarm (std::function< void(const VirtualAumaAlarmEvent &)> callback)
 Register a callback for generated scenario alarm events.
 
Bytes InputProcessData () const
 Return the most recent input process-data object.
 
Bytes OutputProcessData () const
 Return the most recent output process-data object.
 

Private Member Functions

void Run ()
 Main worker loop receiving controller outputs and sending device inputs.
 
void ProcessOutputFrame (const Bytes &frame)
 Decode and apply one controller RTC1 output frame.
 
void UpdateProcessModel (double elapsedSeconds)
 Advance the valve application model for one elapsed interval.
 
void DecodeCommands (const Bytes &outputData)
 Decode command bits and optional setpoints from an output object.
 
void BuildInputProcessData ()
 Rebuild all AUMA input measurement and status signals.
 
void SendInputFrame ()
 Send one device-to-controller RTC1 input frame.
 
void SetBitSignal (Bytes &data, std::string_view textId, bool value) const
 Set one Boolean input signal.
 
void SetScalarSignal (Bytes &data, std::string_view textId, std::uint64_t value) const
 Set one big-endian unsigned input signal.
 
bool ReadBitSignal (const Bytes &data, std::string_view textId) const
 Read a Boolean output signal.
 
std::uint64_t ReadScalarSignal (const Bytes &data, std::string_view textId) const
 Read a big-endian unsigned output signal.
 
const io::IoSignal & RequireSignal (std::string_view textId, io::IoSignalDirection direction) const
 Resolve a unique GSDML signal or throw a configuration error.
 
Bytes BuildRtaErrorFrame (std::uint8_t errorCode1, std::uint8_t errorCode2) const
 Build the raw RTA 0x0F scenario error frame.
 
Bytes BuildAlarmNotificationBlock (std::uint16_t alarmSpecifier) const
 Build a PROFINET AlarmNotification block for a scenario.
 
void EmitScenarioAlarms (VirtualAumaScenario scenario)
 Emit enabled scenario alarms and notify callbacks.
 
void NotifyFrame (const Bytes &frame) const
 Invoke the frame callback outside the state mutex.
 
void NotifyAlarm (const VirtualAumaAlarmEvent &event) const
 Invoke the alarm callback outside the state mutex.
 

Private Attributes

std::string name
 
const gsdml::GSDMLDevice & gsdml
 
MacAddress deviceMac {}
 
rt::IOCRConfig inputIocr
 
rt::IOCRConfig outputIocr
 
VirtualAumaValveConfiguration config
 
io::IoSignalCatalog catalog
 
std::unique_ptr< InMemoryEthernetSocket > socket
 
std::jthread worker
 
std::atomic< bool > running {false}
 
std::mutex stateMutex
 
VirtualAumaScenario scenario = VirtualAumaScenario::Normal
 
std::uint16_t position = 0
 
std::uint16_t targetPosition = 0
 
double commandSpeed = 1.0
 
bool opening = false
 
bool closing = false
 
bool moving = false
 
bool controllerKnown = false
 
MacAddress controllerMac {}
 
std::uint16_t rxCycleCounter = 0
 
std::uint32_t inputFrameNumber = 0
 
std::uint16_t alarmSequence = 1
 
Bytes inputProcessData
 
Bytes outputProcessData
 
std::function< void(const Bytes &)> onFrame
 
std::function< void(const VirtualAumaAlarmEvent &)> onAlarm
 

Detailed Description

AUMA SGx application model that behaves as a real RTC1 peer in memory.

The device owns one in-memory Ethernet socket and a worker thread. Controller output frames are decoded through the production RTFrame parser. The resulting output process data drives the valve model. Input process data is generated from the same GSDML-derived logical signals and placed using the supplied IOCR object.

The simulator deliberately exposes error scenarios instead of silently hiding failures. This allows watchdog, IOPS, RTA and AlarmListener code paths to be validated independently and together.

Definition at line 147 of file virtual_auma_valve.h.

Constructor & Destructor Documentation

◆ VirtualAumaValve() [1/2]

profinet::sim::VirtualAumaValve::VirtualAumaValve ( std::string  name,
const gsdml::GSDMLDevice &  gsdml,
MacAddress  deviceMac,
rt::IOCRConfig  inputIocr,
rt::IOCRConfig  outputIocr,
VirtualAumaValveConfiguration  config = {} 
)

Construct a virtual AUMA valve.

Parameters
nameStable logical simulator instance name.
gsdmlParsed AUMA SGx GSDML document.
deviceMacEthernet MAC used by the simulated device.
inputIocrDevice-to-controller RTC1 layout.
outputIocrController-to-device RTC1 layout.
configSignal mapping, motion and alarm settings.

Definition at line 167 of file virtual_auma_valve.cpp.

References profinet::sim::VirtualAumaValveConfiguration::actualPosition, profinet::io::Actuator, BuildInputProcessData(), profinet::sim::VirtualAumaValveConfiguration::closeCommand, config, profinet::rt::IOCRConfig::dataLength, gsdml, profinet::sim::VirtualAumaValveConfiguration::initialPosition, inputIocr, inputProcessData, profinet::rt::IOCRConfig::objects, profinet::sim::VirtualAumaValveConfiguration::openCommand, outputIocr, outputProcessData, RequireSignal(), profinet::io::Sensor, profinet::sim::VirtualAumaValveConfiguration::slowValveMultiplier, profinet::sim::VirtualAumaValveConfiguration::stopCommand, and profinet::sim::VirtualAumaValveConfiguration::travelUnitsPerSecond.

+ Here is the call graph for this function:

◆ ~VirtualAumaValve()

profinet::sim::VirtualAumaValve::~VirtualAumaValve ( )

Stop the simulator and release the virtual transport.

Definition at line 239 of file virtual_auma_valve.cpp.

References Stop().

+ Here is the call graph for this function:

◆ VirtualAumaValve() [2/2]

profinet::sim::VirtualAumaValve::VirtualAumaValve ( const VirtualAumaValve &  )
delete

Member Function Documentation

◆ BuildAlarmNotificationBlock()

Bytes profinet::sim::VirtualAumaValve::BuildAlarmNotificationBlock ( std::uint16_t  alarmSpecifier) const
private

Build a PROFINET AlarmNotification block for a scenario.

Definition at line 851 of file virtual_auma_valve.cpp.

References profinet::sim::VirtualAumaValveConfiguration::alarmApi, profinet::sim::VirtualAumaValveConfiguration::alarmModuleIdent, profinet::sim::VirtualAumaValveConfiguration::alarmSubmoduleIdent, config, profinet::sim::VirtualAumaValveConfiguration::inputSlot, profinet::sim::VirtualAumaValveConfiguration::inputSubslot, payload, profinet::wire::PutU16(), and profinet::wire::PutU32().

Referenced by EmitScenarioAlarms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildInputProcessData()

void profinet::sim::VirtualAumaValve::BuildInputProcessData ( )
private

Rebuild all AUMA input measurement and status signals.

Definition at line 595 of file virtual_auma_valve.cpp.

References profinet::sim::VirtualAumaValveConfiguration::actualPosition, closing, commandSpeed, config, profinet::sim::Fault, profinet::sim::VirtualAumaValveConfiguration::faultSignal, inputProcessData, profinet::sim::Jammed, moving, opening, position, scenario, SetBitSignal(), SetScalarSignal(), profinet::sim::SlowValve, and profinet::sim::VirtualAumaValveConfiguration::warningSignal.

Referenced by VirtualAumaValve(), and UpdateProcessModel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildRtaErrorFrame()

Bytes profinet::sim::VirtualAumaValve::BuildRtaErrorFrame ( std::uint8_t  errorCode1,
std::uint8_t  errorCode2 
) const
private

Build the raw RTA 0x0F scenario error frame.

Definition at line 816 of file virtual_auma_valve.cpp.

References profinet::sim::VirtualAumaValveConfiguration::alarmDestinationReference, alarmSequence, profinet::sim::VirtualAumaValveConfiguration::alarmSourceReference, config, controllerKnown, controllerMac, deviceMac, profinet::wire::PutU16(), stateMutex, and varPart.

Referenced by EmitScenarioAlarms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DecodeCommands()

void profinet::sim::VirtualAumaValve::DecodeCommands ( const Bytes &  outputData)
private

Decode command bits and optional setpoints from an output object.

Parameters
outputDataAUMA output process-data object.

Definition at line 502 of file virtual_auma_valve.cpp.

References profinet::io::Actuator, catalog, profinet::sim::VirtualAumaValveConfiguration::closeCommand, closing, commandSpeed, config, profinet::sim::Fault, profinet::sim::Jammed, moving, profinet::sim::VirtualAumaValveConfiguration::openCommand, opening, position, profinet::sim::VirtualAumaValveConfiguration::positionSetpoint, ReadBitSignal(), ReadScalarSignal(), scenario, profinet::sim::VirtualAumaValveConfiguration::speedSetpoint, stateMutex, profinet::sim::VirtualAumaValveConfiguration::stopCommand, and targetPosition.

Referenced by ProcessOutputFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeviceMac()

const MacAddress & profinet::sim::VirtualAumaValve::DeviceMac ( ) const
noexcept

Return the simulated device MAC address.

Definition at line 352 of file virtual_auma_valve.cpp.

References deviceMac.

Referenced by profinet::sim::VirtualPhoenixPlc::Connect().

+ Here is the caller graph for this function:

◆ EmitScenarioAlarms()

◆ FaultActive()

bool profinet::sim::VirtualAumaValve::FaultActive ( ) const
noexcept

Return whether an application or mechanical fault is active.

Definition at line 335 of file virtual_auma_valve.cpp.

References profinet::sim::Fault, profinet::sim::Jammed, scenario, and stateMutex.

Referenced by profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ InputProcessData()

Bytes profinet::sim::VirtualAumaValve::InputProcessData ( ) const

Return the most recent input process-data object.

Definition at line 394 of file virtual_auma_valve.cpp.

References inputProcessData, and stateMutex.

◆ InputSlot()

std::uint16_t profinet::sim::VirtualAumaValve::InputSlot ( ) const
noexcept

Return the configured input slot.

Definition at line 357 of file virtual_auma_valve.cpp.

References config, and profinet::sim::VirtualAumaValveConfiguration::inputSlot.

Referenced by profinet::sim::VirtualPhoenixPlc::ReadInput().

+ Here is the caller graph for this function:

◆ InputSubslot()

std::uint16_t profinet::sim::VirtualAumaValve::InputSubslot ( ) const
noexcept

Return the configured input subslot.

Definition at line 362 of file virtual_auma_valve.cpp.

References config, and profinet::sim::VirtualAumaValveConfiguration::inputSubslot.

Referenced by profinet::sim::VirtualPhoenixPlc::ReadInput().

+ Here is the caller graph for this function:

◆ Moving()

bool profinet::sim::VirtualAumaValve::Moving ( ) const
noexcept

Return whether the valve model is moving toward its target.

Definition at line 341 of file virtual_auma_valve.cpp.

References moving, and stateMutex.

◆ Name()

const std::string & profinet::sim::VirtualAumaValve::Name ( ) const
noexcept

Return the configured simulator name.

Definition at line 347 of file virtual_auma_valve.cpp.

References name.

Referenced by profinet::sim::VirtualPhoenixPlc::Connect().

+ Here is the caller graph for this function:

◆ NotifyAlarm()

void profinet::sim::VirtualAumaValve::NotifyAlarm ( const VirtualAumaAlarmEvent &  event) const
private

Invoke the alarm callback outside the state mutex.

Definition at line 995 of file virtual_auma_valve.cpp.

References onAlarm, and stateMutex.

Referenced by EmitScenarioAlarms().

+ Here is the caller graph for this function:

◆ NotifyFrame()

void profinet::sim::VirtualAumaValve::NotifyFrame ( const Bytes &  frame) const
private

Invoke the frame callback outside the state mutex.

Definition at line 975 of file virtual_auma_valve.cpp.

References frame, onFrame, and stateMutex.

Referenced by EmitScenarioAlarms(), and SendInputFrame().

+ Here is the caller graph for this function:

◆ OnAlarm()

void profinet::sim::VirtualAumaValve::OnAlarm ( std::function< void(const VirtualAumaAlarmEvent &)>  callback)

Register a callback for generated scenario alarm events.

Parameters
callbackAlarm event callback.

Definition at line 388 of file virtual_auma_valve.cpp.

References onAlarm, and stateMutex.

Referenced by profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ OnFrame()

void profinet::sim::VirtualAumaValve::OnFrame ( std::function< void(const Bytes &)>  callback)

Register a callback for every Ethernet frame emitted by the device.

Parameters
callbackComplete Ethernet frame callback.

Definition at line 382 of file virtual_auma_valve.cpp.

References onFrame, and stateMutex.

Referenced by profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ operator=()

VirtualAumaValve & profinet::sim::VirtualAumaValve::operator= ( const VirtualAumaValve &  )
delete

◆ OutputProcessData()

Bytes profinet::sim::VirtualAumaValve::OutputProcessData ( ) const

Return the most recent output process-data object.

Definition at line 400 of file virtual_auma_valve.cpp.

References outputProcessData, and stateMutex.

Referenced by profinet::sim::TEST(), profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ OutputSlot()

std::uint16_t profinet::sim::VirtualAumaValve::OutputSlot ( ) const
noexcept

Return the configured output slot.

Definition at line 367 of file virtual_auma_valve.cpp.

References config, and profinet::sim::VirtualAumaValveConfiguration::outputSlot.

Referenced by profinet::sim::VirtualPhoenixPlc::SetOutput().

+ Here is the caller graph for this function:

◆ OutputSubslot()

std::uint16_t profinet::sim::VirtualAumaValve::OutputSubslot ( ) const
noexcept

Return the configured output subslot.

Definition at line 372 of file virtual_auma_valve.cpp.

References config, and profinet::sim::VirtualAumaValveConfiguration::outputSubslot.

Referenced by profinet::sim::VirtualPhoenixPlc::SetOutput().

+ Here is the caller graph for this function:

◆ Position()

std::uint16_t profinet::sim::VirtualAumaValve::Position ( ) const
noexcept

Return the current simulated position.

Definition at line 323 of file virtual_auma_valve.cpp.

References position, and stateMutex.

Referenced by profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ ProcessOutputFrame()

void profinet::sim::VirtualAumaValve::ProcessOutputFrame ( const Bytes &  frame)
private

Decode and apply one controller RTC1 output frame.

Parameters
frameComplete Ethernet frame.

Definition at line 439 of file virtual_auma_valve.cpp.

References closing, config, controllerKnown, controllerMac, profinet::rt::DATA_STATUS_PROVIDER_RUN, DecodeCommands(), deviceMac, frame, profinet::rt::IOCRConfig::frameId, moving, profinet::rt::IOCRConfig::objects, opening, outputIocr, outputProcessData, profinet::sim::VirtualAumaValveConfiguration::outputSlot, profinet::sim::VirtualAumaValveConfiguration::outputSubslot, profinet::rt::ParseEthernetFrame(), and stateMutex.

Referenced by Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadBitSignal()

bool profinet::sim::VirtualAumaValve::ReadBitSignal ( const Bytes &  data,
std::string_view  textId 
) const
private

Read a Boolean output signal.

Parameters
dataOutput process-data image.
textIdGSDML signal TextId.
Returns
True when asserted.

Definition at line 685 of file virtual_auma_valve.cpp.

References profinet::io::Actuator, and RequireSignal().

Referenced by DecodeCommands(), and ReadScalarSignal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadScalarSignal()

std::uint64_t profinet::sim::VirtualAumaValve::ReadScalarSignal ( const Bytes &  data,
std::string_view  textId 
) const
private

Read a big-endian unsigned output signal.

Parameters
dataOutput process-data image.
textIdGSDML signal TextId.
Returns
Unsigned integer value.

Definition at line 700 of file virtual_auma_valve.cpp.

References profinet::io::Actuator, ReadBitSignal(), and RequireSignal().

Referenced by DecodeCommands().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RequireSignal()

const io::IoSignal & profinet::sim::VirtualAumaValve::RequireSignal ( std::string_view  textId,
io::IoSignalDirection  direction 
) const
private

Resolve a unique GSDML signal or throw a configuration error.

Definition at line 617 of file virtual_auma_valve.cpp.

References catalog.

Referenced by VirtualAumaValve(), ReadBitSignal(), and ReadScalarSignal().

+ Here is the caller graph for this function:

◆ Run()

void profinet::sim::VirtualAumaValve::Run ( )
private

Main worker loop receiving controller outputs and sending device inputs.

Definition at line 406 of file virtual_auma_valve.cpp.

References profinet::rt::IOCRConfig::CycleTimeUs(), frame, inputIocr, ProcessOutputFrame(), running, SendInputFrame(), socket, and UpdateProcessModel().

Referenced by Start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Scenario()

VirtualAumaScenario profinet::sim::VirtualAumaValve::Scenario ( ) const
noexcept

Return the current scenario.

Definition at line 317 of file virtual_auma_valve.cpp.

References scenario, and stateMutex.

Referenced by profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ SendInputFrame()

◆ SetBitSignal()

void profinet::sim::VirtualAumaValve::SetBitSignal ( Bytes &  data,
std::string_view  textId,
bool  value 
) const
private

Set one Boolean input signal.

Parameters
dataProcess-data image to update.
textIdGSDML signal TextId.
valueDesired Boolean value.

Definition at line 628 of file virtual_auma_valve.cpp.

References catalog, and profinet::io::Sensor.

Referenced by BuildInputProcessData().

+ Here is the caller graph for this function:

◆ SetScalarSignal()

void profinet::sim::VirtualAumaValve::SetScalarSignal ( Bytes &  data,
std::string_view  textId,
std::uint64_t  value 
) const
private

Set one big-endian unsigned input signal.

Parameters
dataProcess-data image to update.
textIdGSDML signal TextId.
valueNumeric value.

Definition at line 662 of file virtual_auma_valve.cpp.

References catalog, and profinet::io::Sensor.

Referenced by BuildInputProcessData().

+ Here is the caller graph for this function:

◆ SetScenario()

void profinet::sim::VirtualAumaValve::SetScenario ( VirtualAumaScenario  scenario)

Set the current simulator scenario.

Parameters
scenarioNew deterministic behavior.

Definition at line 293 of file virtual_auma_valve.cpp.

References closing, EmitScenarioAlarms(), profinet::sim::Fault, profinet::sim::Jammed, moving, profinet::sim::Normal, opening, position, scenario, stateMutex, and targetPosition.

Referenced by profinet::sim::VirtualProfinetLab::SetAumaScenario(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SignalCatalog()

const io::IoSignalCatalog & profinet::sim::VirtualAumaValve::SignalCatalog ( ) const
noexcept

Return the GSDML-derived signal catalogue.

Definition at line 377 of file virtual_auma_valve.cpp.

References catalog.

Referenced by profinet::sim::VirtualPhoenixPlc::FindDeviceSignal(), and profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ Start()

void profinet::sim::VirtualAumaValve::Start ( InMemoryEthernetBus &  bus)

Attach the device to a shared virtual Ethernet bus and start cyclic processing.

Parameters
busShared Layer-2 simulator bus.

Definition at line 244 of file virtual_auma_valve.cpp.

References alarmSequence, controllerKnown, controllerMac, profinet::sim::InMemoryEthernetBus::CreateSocket(), deviceMac, inputFrameNumber, Run(), running, rxCycleCounter, socket, stateMutex, and worker.

Referenced by profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), profinet::sim::TEST(), and profinet::sim::TEST().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Stop()

void profinet::sim::VirtualAumaValve::Stop ( )

◆ TargetPosition()

std::uint16_t profinet::sim::VirtualAumaValve::TargetPosition ( ) const
noexcept

Return the current requested target position.

Definition at line 329 of file virtual_auma_valve.cpp.

References stateMutex, and targetPosition.

Referenced by profinet::sim::TEST().

+ Here is the caller graph for this function:

◆ UpdateProcessModel()

void profinet::sim::VirtualAumaValve::UpdateProcessModel ( double  elapsedSeconds)
private

Advance the valve application model for one elapsed interval.

Parameters
elapsedSecondsElapsed simulation time in seconds.

Definition at line 559 of file virtual_auma_valve.cpp.

References BuildInputProcessData(), closing, commandSpeed, config, profinet::sim::Fault, profinet::sim::Jammed, moving, opening, position, scenario, profinet::sim::SlowValve, profinet::sim::VirtualAumaValveConfiguration::slowValveMultiplier, stateMutex, targetPosition, and profinet::sim::VirtualAumaValveConfiguration::travelUnitsPerSecond.

Referenced by Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ alarmSequence

std::uint16_t profinet::sim::VirtualAumaValve::alarmSequence = 1
private

Definition at line 322 of file virtual_auma_valve.h.

Referenced by BuildRtaErrorFrame(), EmitScenarioAlarms(), and Start().

◆ catalog

io::IoSignalCatalog profinet::sim::VirtualAumaValve::catalog
private

◆ closing

bool profinet::sim::VirtualAumaValve::closing = false
private

◆ commandSpeed

double profinet::sim::VirtualAumaValve::commandSpeed = 1.0
private

Definition at line 314 of file virtual_auma_valve.h.

Referenced by BuildInputProcessData(), DecodeCommands(), and UpdateProcessModel().

◆ config

◆ controllerKnown

bool profinet::sim::VirtualAumaValve::controllerKnown = false
private

◆ controllerMac

MacAddress profinet::sim::VirtualAumaValve::controllerMac {}
private

◆ deviceMac

MacAddress profinet::sim::VirtualAumaValve::deviceMac {}
private

◆ gsdml

const gsdml::GSDMLDevice& profinet::sim::VirtualAumaValve::gsdml
private

Definition at line 299 of file virtual_auma_valve.h.

Referenced by VirtualAumaValve().

◆ inputFrameNumber

std::uint32_t profinet::sim::VirtualAumaValve::inputFrameNumber = 0
private

Definition at line 321 of file virtual_auma_valve.h.

Referenced by SendInputFrame(), and Start().

◆ inputIocr

rt::IOCRConfig profinet::sim::VirtualAumaValve::inputIocr
private

Definition at line 301 of file virtual_auma_valve.h.

Referenced by VirtualAumaValve(), Run(), and SendInputFrame().

◆ inputProcessData

Bytes profinet::sim::VirtualAumaValve::inputProcessData
private

◆ moving

bool profinet::sim::VirtualAumaValve::moving = false
private

◆ name

std::string profinet::sim::VirtualAumaValve::name
private

Definition at line 298 of file virtual_auma_valve.h.

Referenced by Name().

◆ onAlarm

std::function<void(const VirtualAumaAlarmEvent&)> profinet::sim::VirtualAumaValve::onAlarm
private

Definition at line 326 of file virtual_auma_valve.h.

Referenced by NotifyAlarm(), and OnAlarm().

◆ onFrame

std::function<void(const Bytes&)> profinet::sim::VirtualAumaValve::onFrame
private

Definition at line 325 of file virtual_auma_valve.h.

Referenced by NotifyFrame(), and OnFrame().

◆ opening

bool profinet::sim::VirtualAumaValve::opening = false
private

◆ outputIocr

rt::IOCRConfig profinet::sim::VirtualAumaValve::outputIocr
private

Definition at line 302 of file virtual_auma_valve.h.

Referenced by VirtualAumaValve(), and ProcessOutputFrame().

◆ outputProcessData

Bytes profinet::sim::VirtualAumaValve::outputProcessData
private

Definition at line 324 of file virtual_auma_valve.h.

Referenced by VirtualAumaValve(), OutputProcessData(), and ProcessOutputFrame().

◆ position

std::uint16_t profinet::sim::VirtualAumaValve::position = 0
private

◆ running

std::atomic<bool> profinet::sim::VirtualAumaValve::running {false}
private

Definition at line 308 of file virtual_auma_valve.h.

Referenced by Run(), Start(), and Stop().

◆ rxCycleCounter

std::uint16_t profinet::sim::VirtualAumaValve::rxCycleCounter = 0
private

Definition at line 320 of file virtual_auma_valve.h.

Referenced by SendInputFrame(), and Start().

◆ scenario

◆ socket

std::unique_ptr<InMemoryEthernetSocket> profinet::sim::VirtualAumaValve::socket
private

Definition at line 306 of file virtual_auma_valve.h.

Referenced by EmitScenarioAlarms(), Run(), SendInputFrame(), Start(), and Stop().

◆ stateMutex

◆ targetPosition

std::uint16_t profinet::sim::VirtualAumaValve::targetPosition = 0
private

◆ worker

std::jthread profinet::sim::VirtualAumaValve::worker
private

Definition at line 307 of file virtual_auma_valve.h.

Referenced by Start(), and Stop().


The documentation for this class was generated from the following files: