|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Classes | |
| struct | DeviceInfo |
| Complete device information summary. More... | |
| class | ProfinetDevice |
| High-level PROFINET device interface. More... | |
| struct | WriteItem |
| A single write operation for ProfinetDevice::WriteMultiple(). More... | |
Functions | |
| std::optional< MacAddress > | ParseMac (const std::string &macStr) |
| Parse a MAC address string in any common separator style. | |
| bool | IsMacAddress (const std::string &identifier) |
| Whether a string parses as a MAC address. | |
| std::vector< ProfinetDevice > | Scan (const std::string &interface="eth0", double timeoutSec=3.0) |
| Scan the network for PROFINET devices via DCP Identify. | |
| std::map< std::string, DeviceInfo > | ScanDict (const std::string &interface="eth0", double timeoutSec=3.0) |
| Scan the network and return a name -> DeviceInfo map. | |
| bool profinet::device::IsMacAddress | ( | const std::string & | identifier | ) |
Whether a string parses as a MAC address.
| identifier | String to test. |
Definition at line 173 of file device.cpp.
References ParseMac().
Here is the call graph for this function:| std::optional< MacAddress > profinet::device::ParseMac | ( | const std::string & | macStr | ) |
Parse a MAC address string in any common separator style.
| macStr | MAC address as "aa:bb:cc:dd:ee:ff", "aa-bb-cc-dd-ee-ff", or "aa.bb.cc.dd.ee.ff". |
Matches device.py's _parse_mac – used to distinguish a MAC-address identifier from a station-name identifier in Discover().
Definition at line 57 of file device.cpp.
References profinet::macAddressLength.
Referenced by profinet::device::ProfinetDevice::Discover(), and IsMacAddress().
Here is the caller graph for this function:| std::vector< ProfinetDevice > profinet::device::Scan | ( | const std::string & | interface = "eth0", |
| double | timeoutSec = 3.0 |
||
| ) |
Scan the network for PROFINET devices via DCP Identify.
| interface | Network interface name to use, e.g. "eth0". |
| timeoutSec | How long to listen for responses. |
Throws PermissionDeniedError if raw-socket privileges are insufficient.
Definition at line 713 of file device.cpp.
References profinet::GetMac(), profinet::dcp::ReadResponse(), and profinet::dcp::SendDiscover().
Referenced by ScanDict().
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
| interface | Network interface name to use, e.g. "eth0". |
| timeoutSec | How long to listen for responses. |
Definition at line 731 of file device.cpp.
References profinet::device::DeviceInfo::ip, profinet::device::DeviceInfo::mac, profinet::device::DeviceInfo::name, and Scan().
Here is the call graph for this function: