|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
High-level PROFINET device interface and device lifecycle management. More...
#include <functional>#include <map>#include <memory>#include <optional>#include <string>#include <vector>#include "profinet/alarmListener.h"#include "profinet/alarms.h"#include "profinet/blocks.h"#include "profinet/cyclic.h"#include "profinet/dcp.h"#include "profinet/diagnosis.h"#include "profinet/protocol.h"#include "profinet/rpc.h"#include "profinet/rt.h"#include "profinet/util.h"
Include dependency graph for device.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | profinet::device::WriteItem |
| A single write operation for ProfinetDevice::WriteMultiple(). More... | |
| struct | profinet::device::DeviceInfo |
| Complete device information summary. More... | |
| class | profinet::device::ProfinetDevice |
| High-level PROFINET device interface. More... | |
Namespaces | |
| namespace | profinet |
| namespace | profinet::device |
Functions | |
| std::optional< MacAddress > | profinet::device::ParseMac (const std::string &macStr) |
| Parse a MAC address string in any common separator style. | |
| bool | profinet::device::IsMacAddress (const std::string &identifier) |
| Whether a string parses as a MAC address. | |
| std::vector< ProfinetDevice > | profinet::device::Scan (const std::string &interface="eth0", double timeoutSec=3.0) |
| Scan the network for PROFINET devices via DCP Identify. | |
| std::map< std::string, DeviceInfo > | profinet::device::ScanDict (const std::string &interface="eth0", double timeoutSec=3.0) |
| Scan the network and return a name -> DeviceInfo map. | |
High-level PROFINET device interface and device lifecycle management.
Provides the user-facing interface for discovering, connecting to, and interacting with PROFINET devices. The implementation is ported from profinet-py's device.py and combines DCP discovery, DCE/RPC record access, I&M data, diagnostics, alarms, and cyclic I/O behind a single device API.
The header provides:
ProfinetDevice manages its RPC connection and alarm listener using RAII and supports dependency injection of RPC and alarm components for testing. Operations that require an established Application Relationship connect automatically when necessary.
Example: auto device = profinet::device::ProfinetDevice::Discover("my-device", "eth0"); device.Connect(); auto im0 = device.ReadIm0(); std::cout << im0.OrderId << "\n"; device.Close();
Definition in file device.h.