|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Implements PROFINET DCE/RPC connection management and AR lifecycle operations. More...
#include "profinet/rpc.h"#include <arpa/inet.h>#include <netdb.h>#include <netinet/in.h>#include <sys/socket.h>#include <sys/types.h>#include <unistd.h>#include <algorithm>#include <cstdio>#include <cstring>#include <iostream>#include <random>#include <ranges>#include <sstream>#include "profinet/cyclic.h"
Include dependency graph for rpc.cpp:Go to the source code of this file.
Namespaces | |
| namespace | profinet |
| namespace | profinet::rpc |
Functions | |
| std::string | profinet::rpc::UuidBytesToString (const std::array< std::uint8_t, uuidLenght > &data) |
| Format a 16-byte DCE/RPC UUID as a canonical string. | |
| std::array< std::uint8_t, uuidLenght > | profinet::rpc::StringToUuidBytes (const std::string &uuidStr) |
| Parse a canonical UUID string into 16 raw DCE/RPC UUID bytes. | |
| std::vector< EPMEndpoint > | profinet::rpc::EpmLookup (asio::io_context &ioContext, const std::string &ip, std::uint16_t port=RPC_PORT, double timeoutSec=DEFAULT_TIMEOUT, std::optional< std::string > interfaceFilter=std::nullopt) |
| Query a device's Endpoint Mapper for available RPC endpoints. | |
| dcp::DCPDeviceDescription | profinet::rpc::GetStationInfo (const EthernetSocket &sock, const MacAddress &src, const std::string &name, int timeoutSec=static_cast< int >(DEFAULT_TIMEOUT *2)) |
| Resolve a device by PROFINET station name via DCP. | |
Variables | |
| constexpr std::uint8_t | profinet::rpc::VERSION_HIGH = 0x01 |
| Version high. | |
| constexpr std::uint8_t | profinet::rpc::VERSION_LOW = 0x00 |
| Version low. | |
Implements PROFINET DCE/RPC connection management and AR lifecycle operations.
Handles Application Relation establishment, parameterization, IOCR and AlarmCR configuration, acyclic record access, Application Ready and Application Relation release. The implementation serializes protocol blocks explicitly and delegates network transport to the RPC transport layer.
Definition in file rpc.cpp.
| Bytes payload |
Definition at line 3254 of file rpc.cpp.
Referenced by profinet::rpc::RPCCon::CreateNrd(), profinet::rt::CyclicDataBuilder::Load(), profinet::ParseAlarmNotification(), profinet::dcp::ParseSetResponse(), profinet::AlarmListener::ProcessAlarm(), profinet::rpc::RPCCon::ReadIm0(), profinet::rpc::RPCCon::ReadIm1(), profinet::rpc::RPCCon::ReadIm10(), profinet::rpc::RPCCon::ReadIm11(), profinet::rpc::RPCCon::ReadIm12(), profinet::rpc::RPCCon::ReadIm13(), profinet::rpc::RPCCon::ReadIm14(), profinet::rpc::RPCCon::ReadIm15(), profinet::rpc::RPCCon::ReadIm2(), profinet::rpc::RPCCon::ReadIm3(), profinet::rpc::RPCCon::ReadIm4(), profinet::rpc::RPCCon::ReadIm5(), profinet::rpc::RPCCon::ReadIm6(), profinet::rpc::RPCCon::ReadIm7(), profinet::rpc::RPCCon::ReadIm8(), profinet::rpc::RPCCon::ReadIm9(), profinet::dcp::ReadResponse(), profinet::dcp::ReceiveHello(), profinet::dcp::RecvSetResponse(), profinet::cyclic::CyclicController::SendOutputFrame(), and profinet::rpc::RPCCon::WriteMultiple().
| std::uint8_t version {} |
Definition at line 3247 of file rpc.cpp.
Referenced by profinet::AlarmListener::ProcessAlarm().