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

Implements PROFINET DCE/RPC connection management and AR lifecycle operations. More...

#include "profinet/rpc.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
 
namespace  profinet::rpc::raw
 

Functions

std::array< std::uint8_t, uuidLenght > profinet::rpc::BuildObjectUuid (std::uint8_t b10, std::uint8_t b11, std::uint8_t b12, std::uint8_t b13, std::uint8_t b14, std::uint8_t b15)
 Builds a PROFINET object UUID.
 
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::optional< EPMEndpoint > profinet::rpc::ParseEpmTower (const Bytes &towerData)
 Parses a DCE/RPC EPM tower into a PROFINET endpoint.
 
dcp::DCPDeviceDescription profinet::rpc::GetStationInfo (IRawEthernetSocket &sock, const MacAddress &src, const std::string &name, double timeoutSec=DEFAULT_TIMEOUT *2)
 Resolve a device by PROFINET station name via DCP.
 
std::optional< RawRpcHeader > profinet::rpc::raw::ParseRawRpcHeader (const Bytes &data)
 Parses a raw network byte vector into a structured DCE/RPC v4 Connectionless Header.
 

Detailed Description

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.