PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
virtual_sim_test_helpers.h File Reference

Shared synthetic GSDML and timing helpers for virtual PROFINET tests. More...

#include <chrono>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <string>
#include <thread>
#include "profinet/gsdml.h"
#include "profinet/sim/virtual_auma_config.h"
#include "profinet/util.h"
+ Include dependency graph for virtual_sim_test_helpers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  profinet
 
namespace  profinet::sim
 
namespace  profinet::sim::test
 

Functions

gsdml::GSDMLDataItem profinet::sim::test::MakeScalarItem (const std::string &dataType, const int length, const std::string &textId)
 Create a scalar GSDML DataItem.
 
gsdml::GSDMLDataItem profinet::sim::test::MakeBitByte (const std::string &parentTextId, const std::string &bitPrefix)
 Create a GSDML Boolean byte containing eight BitDataItems.
 
gsdml::GSDMLDevice profinet::sim::test::MakeAumaGsdml ()
 Build a compact GSDML model using the real AUMA signal identifiers.
 
gsdml::GSDMLDevice profinet::sim::test::MakePhoenixGsdml ()
 Build a compact Phoenix GSDML model with four-byte DI/DO process data.
 
VirtualAumaIocrConfiguration profinet::sim::test::MakeTestAumaIocrs (const gsdml::GSDMLDevice &device)
 Build matching compact RTC1 IOCR configurations for the AUMA test model.
 
bool profinet::sim::test::WaitUntil (const std::function< bool()> &predicate, std::chrono::milliseconds timeout=std::chrono::milliseconds(500))
 Wait until a predicate becomes true or the timeout expires.
 
MacAddress profinet::sim::test::MakeIndexedMac (const std::uint8_t prefix, const std::size_t index)
 Allocate a deterministic locally administered MAC address for an instance index.
 

Variables

constexpr MacAddress profinet::sim::test::kControllerMac {0x02, 0x00, 0x00, 0x10, 0x00, 0x01}
 
constexpr MacAddress profinet::sim::test::kValveMac {0x02, 0x00, 0x00, 0x20, 0x00, 0x01}
 

Detailed Description

Shared synthetic GSDML and timing helpers for virtual PROFINET tests.

Definition in file virtual_sim_test_helpers.h.