PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
profinet::rpc::RPCCon Class Reference

Connection to a PROFINET IO-Device: establishes an AR (Application Relationship) and performs acyclic read/write and CONTROL operations. More...

#include <rpc.h>

+ Inheritance diagram for profinet::rpc::RPCCon:
+ Collaboration diagram for profinet::rpc::RPCCon:

Public Member Functions

 RPCCon (RPCCon &&)=delete
 Deleted move constructor to prevent moving instances of this class.
 
RPCCon & operator= (RPCCon &&)=delete
 Deleted move assignment operator to prevent moving instances of this class.
 
 RPCCon (const dcp::DCPDeviceDescription &info, RPCConOptions options={}, std::unique_ptr< IRpcTransport > rpcTransport=nullptr, std::unique_ptr< IRpcTransport > ccontrolTransport=nullptr, asio::io_context *context=nullptr)
 Prepare a PROFINET DCE/RPC connection object for an IO-device (does not connect yet).
 
 ~RPCCon ()
 Disconnect (best-effort) and close the underlying sockets.
 
 RPCCon (const RPCCon &)=delete
 Not copyable because the connection owns non-copyable Asio sockets.
 
RPCCon & operator= (const RPCCon &)=delete
 Not copyable because the connection owns non-copyable Asio sockets.
 
std::optional< ConnectResult > Connect (std::optional< MacAddress > srcMac=std::nullopt, bool withAlarmCr=false, std::optional< IOCRSetup > iocrSetup=std::nullopt) override
 Establish (or re-establish) the AR with the device.
 
PNIODHeader Read (std::uint32_t api, std::uint16_t slot, std::uint16_t subslot, std::uint16_t idx) override
 Read a data record via slot/subslot/index (AR must be connected).
 
PNIODHeader ReadImplicit (std::uint32_t api, std::uint16_t slot, std::uint16_t subslot, std::uint16_t idx) override
 Read a data record without an established AR.
 
void Write (std::uint32_t api, std::uint16_t slot, std::uint16_t subslot, std::uint16_t idx, const Bytes &data) override
 Write a data record via slot/subslot/index (AR must be connected).
 
std::vector< blocks::WriteMultipleResult > WriteMultiple (const std::vector< WriteItem > &writes) override
 Write multiple records atomically via IODWriteMultipleReq (0xE040).
 
Bytes ReadRaw (std::uint16_t idx, std::uint16_t slot=0, std::uint16_t subslot=1)
 Read a raw record payload by index (convenience wrapper over Read()).
 
PNInM0 ReadIm0 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M0 (mandatory identification data).
 
PNInM1 ReadIm1 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M1 (tag function/location).
 
PNInM2 ReadIm2 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M2 (installation date).
 
PNInM3 ReadIm3 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M3 (free-text descriptor).
 
PNInM4 ReadIm4 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M4 (PROFIsafe signature).
 
PNInM5 ReadIm5 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M5 (free-text annotation).
 
PNInM6 ReadIm6 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M6 (reserved).
 
PNInM7 ReadIm7 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M7 (reserved).
 
PNInM8 ReadIm8 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M8 (reserved).
 
PNInM9 ReadIm9 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M9 (reserved).
 
PNInM10 ReadIm10 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M10 (reserved).
 
PNInM11 ReadIm11 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M11 (reserved).
 
PNInM12 ReadIm12 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M12 (reserved).
 
PNInM13 ReadIm13 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M13 (reserved).
 
PNInM14 ReadIm14 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M14 (reserved).
 
PNInM15 ReadIm15 (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read I&M15 (reserved).
 
AllIM ReadAllIm (std::uint16_t slot=0, std::uint16_t subslot=1) override
 Read all I&M records a device supports.
 
blocks::ModuleDiffBlock ReadModuleDiff () override
 Read and parse the device's ModuleDiffBlock.
 
diagnosis::DiagnosisData ReadDiagnosis (std::uint16_t slot=0, std::uint16_t subslot=0, std::uint16_t index=0xF000) override
 Read and parse diagnosis data at the given location/index.
 
std::map< std::uint16_t, diagnosis::DiagnosisData > ReadAllDiagnosis () override
 Read diagnosis from all standard diagnosis indices.
 
blocks::PDRealData ReadPdRealData () override
 Read and parse the device's PDRealData (physical topology).
 
blocks::RealIdentificationData ReadRealIdentificationData () override
 Read and parse the device's RealIdentificationData (logical structure).
 
std::vector< blocks::SlotInfo > DiscoverSlots () override
 Convenience accessor for ReadRealIdentificationData().Slots.
 
std::pair< blocks::PDRealData, blocks::RealIdentificationData > DiscoverTopology () override
 Read both PDRealData and RealIdentificationData in one call.
 
std::map< std::uint16_t, IndexProbeResult > EnumerateIndices (std::uint16_t slot=0, std::uint16_t subslot=1, std::optional< std::vector< std::uint16_t > > customIndices=std::nullopt) override
 Probe a set of indices and report which are readable/empty/erroring.
 
Bytes PrmBegin () override
 Send PrmBegin (start of the parameterization phase).
 
Bytes PrmEnd () override
 Send PrmEnd (end of the parameterization phase).
 
Bytes ReadyForRtClass3 () override
 Send ReadyForRTClass3 (isochronous real-time readiness).
 
Bytes ApplicationReady (double timeoutSec=30.0) override
 Wait for the device's CControl/ApplicationReady request and confirm it.
 
void Disconnect () override
 Send Release to terminate the AR.
 
void Close () noexcept override
 Disconnect() and close the underlying sockets.
 
bool IsConnected () const override
 Whether the AR is currently established.
 
const dcp::DCPDeviceDescription & Info () const override
 The device this connection targets.
 
const std::array< std::uint8_t, uuidLenght > & ArUuid () const
 The AR UUID for this connection.
 
std::uint16_t SessionKey () const
 The session key for this connection.
 
std::uint16_t LocalAlarmRef () const override
 Controller's own local alarm reference.
 
int DeviceAlarmRef () const override
 Device's local alarm reference, from AlarmCRBlockRes.
 
bool HasAlarmCr () const override
 Whether an AlarmCR was successfully established.
 
std::vector< EPMEndpoint > EpmLookup (const std::string &ip, std::uint16_t port=RPC_PORT, double timeoutSec=DEFAULT_TIMEOUT, std::optional< std::string > interfaceFilter=std::nullopt) override
 Query a device's Endpoint Mapper for available RPC endpoints.
 
- Public Member Functions inherited from profinet::rpc::IRPCCon
virtual ~IRPCCon ()=default
 Virtual destructor.
 

Private Member Functions

PNRPCHeader CreateRpc (std::uint16_t operation, const Bytes &nrd)
 Build an RPC header for the given operation and NRD body.
 
Bytes BuildAlarmCrBlock (int transport=0, int priority=0) const
 Build an AlarmCRBlockReq for inclusion in the CONNECT request.
 
PNRPCHeader SendReceive (const PNRPCHeader &request)
 Send an RPC request and synchronously wait for its response.
 
void CloseSockets () noexcept
 Close the RPC and CControl UDP sockets.
 
void CheckTimeout ()
 Reconnect if the AR has been idle longer than CONNECTION_TIMEOUT.
 
Bytes SendControl (BlockType blockType, ControlCommand controlCommand, bool waitResponse=true, const Bytes &subBlocks={})
 Send a CONTROL operation and optionally wait for its response.
 

Static Private Member Functions

static PNNRDData CreateNrd (const Bytes &payload)
 Wrap a payload in an NRD (Network Representation Data) header.
 
static int ParseAlarmCrResponse (const Bytes &responseData)
 Parse the AlarmCRBlockRes from a CONNECT response.
 
static Bytes BuildIocrBlock (IocrType iocrType, const IOCRSetup &setup)
 Build an IOCRBlockReq (header + API object list) for the CONNECT request.
 
static Bytes BuildExpectedSubmoduleBlock (const IOCRSetup &setup)
 Build an ExpectedSubmoduleBlockReq for the CONNECT request.
 
static std::uint16_t ParseIocrResponse (const Bytes &responseData, int iocrType)
 Parse an IOCRBlockRes from a CONNECT response.
 

Private Attributes

dcp::DCPDeviceDescription info
 DCP-discovered description of the target device.
 
double timeout
 Default RPC response timeout in seconds.
 
std::array< std::uint8_t, 3 > dataRepresentation {0x00, 0x00, 0x00}
 AR DREP for this connection.
 
std::array< std::uint8_t, uuidLenght > arUuid {}
 AR UUID for this connection.
 
std::array< std::uint8_t, uuidLenght > activityUuid {}
 Activity UUID for the current RPC exchange.
 
std::array< std::uint8_t, uuidLenght > interfaceUuid {}
 Interface UUID for the current RPC exchange.
 
std::array< std::uint8_t, uuidLenght > localObjectUuid {}
 This controller's own object UUID.
 
std::array< std::uint8_t, uuidLenght > remoteObjectUuid {}
 The target device's object UUID.
 
bool live = false
 Whether the AR is currently established.
 
bool reconnecting = false
 Whether timeout has occured and reconnection is needed.
 
std::chrono::steady_clock::time_point liveMonotonic {}
 Timestamp of the last successful RPC exchange, for CONNECTION_TIMEOUT tracking.
 
std::optional< MacAddress > srcMac
 Source MAC address used to establish the AR.
 
std::uint16_t sessionKey = 0
 Session key for this connection.
 
std::uint16_t alarmRef = 0x8001
 Controller's own local alarm reference.
 
int deviceAlarmRef = 0
 Device's local alarm reference, if an AlarmCR was established.
 
bool alarmCrEnabled = false
 Whether an AlarmCR was successfully established.
 
std::uint32_t sequenceNumber = 0
 Monotonically increasing RPC sequence number.
 
int inputIocrRef = 0
 IOCR reference for the input (device -> controller) IOCR.
 
int outputIocrRef = 0
 IOCR reference for the output (controller -> device) IOCR.
 
std::uint16_t inputFrameId = 0
 Frame ID assigned to the input IOCR.
 
std::uint16_t outputFrameId = 0
 Frame ID assigned to the output IOCR.
 
std::optional< IOCRSetup > iocrSetup
 Cyclic IO configuration used for the current AR, if any.
 
std::unique_ptr< asio::io_context > rpcContext
 
std::unique_ptr< IAsioIoContextRunner > rpcContextRunner
 
asio::io_context & ioContext
 Asio execution context used by the RPC transport.
 
std::unique_ptr< IRpcTransport > rpcTransport
 
std::unique_ptr< IRpcTransport > ccontrolTransport
 
std::unique_ptr< IRpcTransport > ccontrolResponseTransport
 

Friends

class RpcTests
 FRIEND_CLASS declaration granting access to the specific test case for validating CreateRpc.
 

Detailed Description

Connection to a PROFINET IO-Device: establishes an AR (Application Relationship) and performs acyclic read/write and CONTROL operations.

Example:

auto info = rpc::GetStationInfo(sock, my_mac, "device-name");
conn.Connect(my_mac);
auto iod = conn.Read(/*api=*/0, /*slot=*/0, /*subslot=*/1, /*idx=*/0xAFF0);
Abstract interface for a PROFINET RPC connection.
Definition IRPCCon.h:81
dcp::DCPDeviceDescription info
DCP-discovered description of the target device.
Definition rpc.h:534
dcp::DCPDeviceDescription GetStationInfo(IRawEthernetSocket &sock, const MacAddress &src, const std::string &name, double timeoutSec=DEFAULT_TIMEOUT *2)
Resolve a device by PROFINET station name via DCP.
Definition rpc.cpp:509

Definition at line 137 of file rpc.h.

Constructor & Destructor Documentation

◆ RPCCon() [1/3]

profinet::rpc::RPCCon::RPCCon ( RPCCon &&  )
delete

Deleted move constructor to prevent moving instances of this class.

◆ RPCCon() [2/3]

profinet::rpc::RPCCon::RPCCon ( const dcp::DCPDeviceDescription &  info,
RPCConOptions  options = {},
std::unique_ptr< IRpcTransport >  rpcTransport = nullptr,
std::unique_ptr< IRpcTransport >  ccontrolTransport = nullptr,
asio::io_context *  context = nullptr 
)
explicit

Prepare a PROFINET DCE/RPC connection object for an IO-device (does not connect yet).

The constructor initializes the Asio UDP transports but does not establish a PROFINET Application Relationship. The AR is established by Connect().

Parameters
infoDCP-discovered description of the target device.
optionsA configured RPCConOption in which you can set timeoutSec
rpcTransportAn optional injectable RPC connection for general DCE/RPC communication, for testing mainly.
ccontrolTransportAn optional injectable RPC connection for control DCE/RPC communication, for testing mainly. Default RPC response timeout.

Definition at line 573 of file rpc.cpp.

References activityUuid, arUuid, profinet::rpc::BuildObjectUuid(), profinet::dcp::DCPDeviceDescription::deviceHigh, profinet::dcp::DCPDeviceDescription::deviceLow, profinet::PNRPCHeader::IfaceUuidDevice(), info, interfaceUuid, ioContext, profinet::dcp::DCPDeviceDescription::ip, localObjectUuid, remoteObjectUuid, profinet::rpc::RPC_PORT, profinet::rpc::RPCConOptions::rpcPort, profinet::dcp::DCPDeviceDescription::vendorHigh, and profinet::dcp::DCPDeviceDescription::vendorLow.

+ Here is the call graph for this function:

◆ ~RPCCon()

profinet::rpc::RPCCon::~RPCCon ( )

Disconnect (best-effort) and close the underlying sockets.

Definition at line 610 of file rpc.cpp.

References Close().

+ Here is the call graph for this function:

◆ RPCCon() [3/3]

profinet::rpc::RPCCon::RPCCon ( const RPCCon &  )
delete

Not copyable because the connection owns non-copyable Asio sockets.

Member Function Documentation

◆ ApplicationReady()

Bytes profinet::rpc::RPCCon::ApplicationReady ( double  timeoutSec = 30.0)
overridevirtual

Wait for the device's CControl/ApplicationReady request and confirm it.

Parameters
timeoutSecHow long to wait for the request.
Returns
The request's NRD body.

Sent by the device after PrmEnd. Throws RPCTimeoutError if nothing arrives within TimeoutSec.

DCE/RPC v4 Specification Offset Reference

Offset (Dec) Offset (Hex) Field Name Size (Bytes) Description / Parsing Logic
0 0x00 rpc_vers 1 Protocol Version (0x04)
1 0x01 ptype 1 Packet Type (0x00 = Req, 0x02 = Resp)
2 0x02 flags1 1 First flags group
3 0x03 flags2 1 Second flags group
4 0x04 drep 3 Data Representation (drep[0] defines Endianness)
7 0x07 serial_hi 1 Split tracking sequence byte (High)
8 0x08 object 16 Object UUID (DREP-aware)
24 0x18 if_id 16 Interface UUID (DREP-aware)
40 0x28 act_id 16 Activity UUID (DREP-aware)
56 0x38 server_boot 4 Server Boot Time (DREP-aware, skipped here)
60 0x3C if_vers 4 Interface Version (DREP-aware)
64 0x40 seqnum 4 Sequence Number (DREP-aware)
68 0x44 opnum 2 Operation Number (DREP-aware)
70–77 0x46–0x4D Hint/Len/Frag 8 Internal routing data (skipped here)
78 0x4E auth_proto 1 Authentication Protocol ID
79 0x4F serial_lo 1 Split tracking sequence byte (Low)

Implements profinet::rpc::IRPCCon.

Definition at line 1903 of file rpc.cpp.

References profinet::PNIODReleaseBlock::arUuid, arUuid, profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_REQ, profinet::PNIODReleaseBlock::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, ccontrolTransport, CheckTimeout(), profinet::PNRPCHeader::CONTROL, profinet::ControlApplicationReadyResponse, profinet::PNIODReleaseBlock::controlBlockProperties, profinet::PNIODReleaseBlock::controlCommand, profinet::PNRPCHeader::defaultActivityHint, profinet::PNRPCHeader::defaultInterfaceHint, profinet::Done, profinet::PNIODHeader::kContolCommandOffset, profinet::rpc::raw::LastFragment, live, liveMonotonic, profinet::rpc::raw::NoFack, profinet::PNIODReleaseBlock::padding1, profinet::PNIODReleaseBlock::padding2, profinet::rpc::raw::ParseRawRpcHeader(), profinet::wire::PutFixed(), profinet::wire::PutLittleEndian(), profinet::wire::PutU16(), profinet::wire::PutU32(), profinet::PNRPCHeader::REQUEST, profinet::PNRPCHeader::RESPONSE, profinet::PNIODReleaseBlock::sessionKey, sessionKey, profinet::wire::Reader::SkipTo(), profinet::PNBlockHeader::ToBytes(), profinet::PNIODReleaseBlock::ToBytes(), profinet::wire::Reader::U16(), profinet::wire::Reader::U32(), and profinet::wire::Reader::U32LittleEndian().

+ Here is the call graph for this function:

◆ ArUuid()

const std::array< std::uint8_t, uuidLenght > & profinet::rpc::RPCCon::ArUuid ( ) const
inline

The AR UUID for this connection.

Returns
The 16-byte AR UUID.

Definition at line 421 of file rpc.h.

References arUuid.

Referenced by TEST_F(), profinet::rpc::TEST_F(), and profinet::rpc::TEST_F().

+ Here is the caller graph for this function:

◆ BuildAlarmCrBlock()

Bytes profinet::rpc::RPCCon::BuildAlarmCrBlock ( int  transport = 0,
int  priority = 0 
) const
private

Build an AlarmCRBlockReq for inclusion in the CONNECT request.

Parameters
transportTransport type (0 = RTA over Ethernet).
priorityAlarm priority.
Returns
The serialized block.

Definition at line 653 of file rpc.cpp.

References profinet::PNAlarmCRBlockReq::alarmCrProperties, profinet::PNAlarmCRBlockReq::alarmCrTagHeaderHigh, profinet::PNAlarmCRBlockReq::alarmCrTagHeaderLow, profinet::PNAlarmCRBlockReq::alarmCrType, alarmRef, profinet::PNAlarmCRBlockReq::BLOCK_TYPE, profinet::PNAlarmCRBlockReq::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::PNAlarmCRBlockReq::DEFAULT_MAX_ALARM_DATA_LENGTH, profinet::PNAlarmCRBlockReq::DEFAULT_RTA_RETRIES, profinet::PNAlarmCRBlockReq::DEFAULT_RTA_TIMEOUT_FACTOR, profinet::PNAlarmCRBlockReq::DEFAULT_TAG_HEADER_HIGH, profinet::PNAlarmCRBlockReq::DEFAULT_TAG_HEADER_LOW, profinet::PNAlarmCRBlockReq::etherTypeLT, profinet::IP_ETHERTYPE, profinet::PNAlarmCRBlockReq::kSize, profinet::PNAlarmCRBlockReq::localAlarmReference, profinet::PNAlarmCRBlockReq::maxAlarmDataLength, profinet::PROFINET_ETHERTYPE, profinet::PNAlarmCRBlockReq::rtaRetries, profinet::PNAlarmCRBlockReq::rtaTimeoutFactor, profinet::PNBlockHeader::ToBytes(), profinet::PNAlarmCRBlockReq::ToBytes(), profinet::rpc::VERSION_HIGH, and profinet::rpc::VERSION_LOW.

Referenced by Connect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildExpectedSubmoduleBlock()

Bytes profinet::rpc::RPCCon::BuildExpectedSubmoduleBlock ( const IOCRSetup &  setup)
staticprivate

Build an ExpectedSubmoduleBlockReq for the CONNECT request.

Parameters
setupCyclic IO configuration describing the expected slots.
Returns
The serialized block.

Definition at line 1079 of file rpc.cpp.

References profinet::blocks::ExpectedSubmoduleBlockReq::AddSubmodule(), profinet::blocks::ExpectedSubmoduleBlockReq::Clear(), profinet::blocks::InputAndOutput, profinet::blocks::InputOnly, profinet::blocks::None, profinet::blocks::OutputOnly, profinet::rpc::IOCRSetup::slots, and profinet::blocks::ExpectedSubmoduleBlockReq::ToBytes().

Referenced by Connect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildIocrBlock()

Bytes profinet::rpc::RPCCon::BuildIocrBlock ( IocrType  iocrType,
const IOCRSetup &  setup 
)
staticprivate

Build an IOCRBlockReq (header + API object list) for the CONNECT request.

Parameters
iocrTypeIOCR type (Input/Output).
setupCyclic IO configuration.
Returns
The serialized block.

Definition at line 703 of file rpc.cpp.

References profinet::rpc::Advanced, profinet::rpc::IOCRSetup::applicationRelations, profinet::PNIOCRBlockReqHeader::BLOCK_TYPE, profinet::PNIOCRBlockReqHeader::blockHeader, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::PNIOCRBlockReqHeader::dataHoldFactor, profinet::rpc::IOCRSetup::dataHoldFactor, profinet::PNIOCRBlockReqHeader::dataLength, profinet::PNIOCRBlockReqHeader::etherTypeLT, profinet::PNIOCRBlockReqHeader::frameId, profinet::PNIOCRBlockReqHeader::frameSendOffset, profinet::Input, profinet::PNIOCRBlockReqHeader::iocrMulticastMac, profinet::PNIOCRBlockReqHeader::iocrProperties, profinet::PNIOCRBlockReqHeader::iocrReference, profinet::PNIOCRBlockReqHeader::iocrTagHeader, profinet::PNIOCRBlockReqHeader::iocrType, profinet::PNIOCRBlockReqHeader::kSize, profinet::PNIOCRBlockReqHeader::numberOfApis, profinet::Output, profinet::PNIOCRBlockReqHeader::phase, profinet::PROFINET_ETHERTYPE, profinet::wire::PutU16(), profinet::wire::PutU32(), profinet::PNIOCRBlockReqHeader::reductionRatio, profinet::rpc::IOCRSetup::reductionRatio, profinet::PNIOCRBlockReqHeader::sendClockFactor, profinet::rpc::IOCRSetup::sendClockFactor, profinet::PNIOCRBlockReqHeader::sequence, profinet::rpc::IOCRSetup::slots, profinet::rpc::ApplicationRelations::startupMode, profinet::PNBlockHeader::ToBytes(), profinet::PNIOCRBlockReqHeader::ToBytes(), profinet::rpc::VERSION_HIGH, profinet::rpc::VERSION_LOW, profinet::PNIOCRBlockReqHeader::watchdogFactor, and profinet::rpc::IOCRSetup::watchdogFactor.

Referenced by Connect(), and profinet::rpc::RpcTests::InvokeBuildIocrBlock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckTimeout()

void profinet::rpc::RPCCon::CheckTimeout ( )
private

Reconnect if the AR has been idle longer than CONNECTION_TIMEOUT.

Definition at line 1210 of file rpc.cpp.

References Connect(), profinet::rpc::CONNECTION_TIMEOUT, live, liveMonotonic, and reconnecting.

Referenced by ApplicationReady(), Read(), SendReceive(), Write(), and WriteMultiple().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Close()

void profinet::rpc::RPCCon::Close ( )
overridevirtualnoexcept

Disconnect() and close the underlying sockets.

Called automatically by the destructor.

Implements profinet::rpc::IRPCCon.

Definition at line 2139 of file rpc.cpp.

References ccontrolTransport, Disconnect(), and rpcTransport.

Referenced by ~RPCCon(), profinet::device::ProfinetDevice::ReadImplicit(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CloseSockets()

void profinet::rpc::RPCCon::CloseSockets ( )
privatenoexcept

Close the RPC and CControl UDP sockets.

◆ Connect()

std::optional< ConnectResult > profinet::rpc::RPCCon::Connect ( std::optional< MacAddress >  srcMac = std::nullopt,
bool  withAlarmCr = false,
std::optional< IOCRSetup >  iocrSetup = std::nullopt 
)
overridevirtual

Establish (or re-establish) the AR with the device.

Parameters
srcMacSource MAC address; required on the first call.
withAlarmCrWhether to also request an AlarmCR (not all devices support it).
iocrSetupIf set, also establish cyclic IO (EXPERIMENTAL).
Returns
A ConnectResult when IocrSetup was provided, else std::nullopt.

Throws RPCConnectionError on failure.

Implements profinet::rpc::IRPCCon.

Definition at line 1223 of file rpc.cpp.

References activityUuid, profinet::rpc::Advanced, alarmCrEnabled, profinet::ApplicationRelationRequest, profinet::PNNRDData::argsMaximumStatus, profinet::PNARBlockRequest::arProperties, profinet::PNARBlockRequest::arType, profinet::PNARBlockRequest::arUuid, arUuid, profinet::rpc::ConnectResult::arUuid, profinet::PNARBlockRequest::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, BuildAlarmCrBlock(), BuildExpectedSubmoduleBlock(), BuildIocrBlock(), profinet::PNARBlockRequest::cmInitiatorActivityTimeoutFactor, profinet::PNARBlockRequest::cmInitiatorMacAddress, profinet::PNARBlockRequest::cmInitiatorObjectUuid, profinet::PNARBlockRequest::cmInitiatorStationName, profinet::PNRPCHeader::CONNECT, CreateNrd(), CreateRpc(), dataRepresentation, deviceAlarmRef, profinet::PNIOError::FromArgsStatus(), profinet::PNARBlockRequest::initiatorUdpRtport, profinet::Input, inputFrameId, iocrSetup, profinet::PNARBlockRequest::kFixedSize, live, localObjectUuid, profinet::Output, outputFrameId, profinet::PNNRDData::Parse(), ParseAlarmCrResponse(), ParseIocrResponse(), profinet::rpc::raw::ParseRawRpcHeader(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, profinet::PROFINET_ETHERTYPE, reconnecting, SendReceive(), profinet::PNARBlockRequest::sessionKey, sessionKey, srcMac, profinet::PNARBlockRequest::stationNameLength, profinet::PNNRDData::ToBytes(), profinet::PNBlockHeader::ToBytes(), profinet::PNARBlockRequest::ToBytes(), profinet::rpc::VERSION_HIGH, and profinet::rpc::VERSION_LOW.

Referenced by CheckTimeout(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateNrd()

PNNRDData profinet::rpc::RPCCon::CreateNrd ( const Bytes &  payload)
staticprivate

Wrap a payload in an NRD (Network Representation Data) header.

Parameters
payloadPayload to wrap.
Returns
The constructed NRD wrapper.

Definition at line 641 of file rpc.cpp.

References profinet::PNNRDData::actualCount, profinet::PNNRDData::argsLength, profinet::PNNRDData::argsMaximumStatus, profinet::PNNRDData::maximumCount, profinet::PNNRDData::offset, profinet::PNNRDData::payload, and payload.

Referenced by Connect(), Disconnect(), Read(), ReadImplicit(), SendControl(), Write(), and WriteMultiple().

+ Here is the caller graph for this function:

◆ CreateRpc()

PNRPCHeader profinet::rpc::RPCCon::CreateRpc ( std::uint16_t  operation,
const Bytes &  nrd 
)
private

◆ DeviceAlarmRef()

int profinet::rpc::RPCCon::DeviceAlarmRef ( ) const
inlineoverridevirtual

Device's local alarm reference, from AlarmCRBlockRes.

Returns
The device's alarm reference, or -1 if no AlarmCR was established (e.g. Connect() was called without WithAlarmCr).

Needed by AlarmEndpoint::DeviceRef regardless of whether cyclic IO (and thus a ConnectResult) was also requested.

Implements profinet::rpc::IRPCCon.

Definition at line 446 of file rpc.h.

References deviceAlarmRef.

◆ Disconnect()

void profinet::rpc::RPCCon::Disconnect ( )
overridevirtual

Send Release to terminate the AR.

Best-effort, does not wait for a response. Safe to call when not connected (no-op).

Implements profinet::rpc::IRPCCon.

Definition at line 2101 of file rpc.cpp.

References profinet::PNIODReleaseBlock::arUuid, arUuid, profinet::PNIODReleaseBlock::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::PNIODReleaseBlock::controlBlockProperties, profinet::PNIODReleaseBlock::controlCommand, CreateNrd(), CreateRpc(), live, profinet::PNIODReleaseBlock::padding1, profinet::PNIODReleaseBlock::padding2, profinet::Release, profinet::PNRPCHeader::RELEASE, profinet::ReleaseRequest, rpcTransport, profinet::PNIODReleaseBlock::sessionKey, sessionKey, profinet::PNRPCHeader::ToBytes(), profinet::PNNRDData::ToBytes(), profinet::PNBlockHeader::ToBytes(), and profinet::PNIODReleaseBlock::ToBytes().

Referenced by Close(), TEST_F(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DiscoverSlots()

std::vector< blocks::SlotInfo > profinet::rpc::RPCCon::DiscoverSlots ( )
overridevirtual

Convenience accessor for ReadRealIdentificationData().Slots.

Returns
The device's populated slots.

Implements profinet::rpc::IRPCCon.

Definition at line 1713 of file rpc.cpp.

References ReadRealIdentificationData(), and profinet::blocks::RealIdentificationData::slots.

+ Here is the call graph for this function:

◆ DiscoverTopology()

std::pair< blocks::PDRealData, blocks::RealIdentificationData > profinet::rpc::RPCCon::DiscoverTopology ( )
overridevirtual

Read both PDRealData and RealIdentificationData in one call.

Returns
A (PDRealData, RealIdentificationData) pair.

Implements profinet::rpc::IRPCCon.

Definition at line 1718 of file rpc.cpp.

References ReadPdRealData(), and ReadRealIdentificationData().

+ Here is the call graph for this function:

◆ EnumerateIndices()

std::map< std::uint16_t, rpc::IndexProbeResult > profinet::rpc::RPCCon::EnumerateIndices ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1,
std::optional< std::vector< std::uint16_t > >  customIndices = std::nullopt 
)
overridevirtual

Probe a set of indices and report which are readable/empty/erroring.

Parameters
slotSlot number to probe.
subslotSubslot number to probe.
customIndicesIf provided, only these indices are probed; otherwise the standard catalog (I&M, diagnosis, port/interface, device) is used.
Returns
Probe results keyed by index.

Implements profinet::rpc::IRPCCon.

Definition at line 1723 of file rpc.cpp.

References profinet::DeviceIndices(), profinet::DiagnosisIndices(), profinet::rpc::IndexProbeResult::error, profinet::PNIOError::errorCode1, profinet::rpc::IndexProbeResult::errorCode1, profinet::PNIOError::errorCode2, profinet::rpc::IndexProbeResult::errorCode2, profinet::EXPECTED_ID_SUBSLOT, profinet::GetIndexName(), profinet::ImIndices(), profinet::InterfaceIndices(), profinet::MODULE_DIFF_BLOCK, profinet::Name, profinet::rpc::IndexProbeResult::name, profinet::PNIODHeader::payload, profinet::PortIndices(), Read(), profinet::REAL_ID_SUBSLOT, profinet::RECORD_INPUT_DATA, profinet::RECORD_OUTPUT_DATA, profinet::rpc::IndexProbeResult::size, and profinet::rpc::IndexProbeResult::status.

+ Here is the call graph for this function:

◆ EpmLookup()

std::vector< EPMEndpoint > profinet::rpc::RPCCon::EpmLookup ( const std::string &  ip,
std::uint16_t  port = RPC_PORT,
double  timeoutSec = DEFAULT_TIMEOUT,
std::optional< std::string >  interfaceFilter = std::nullopt 
)
overridevirtual

Query a device's Endpoint Mapper for available RPC endpoints.

Parameters
ioContextAsio execution context.
ipIPv4 address of the device to query.
portUDP port of the device's Endpoint Mapper (defaults to RPC_PORT).
timeoutSecHow long to wait for a response.
interfaceFilterIf set, only endpoints for this interface UUID are requested.
Returns
The device's advertised endpoints, or an empty vector on timeout or malformed response.

Implements profinet::rpc::IRPCCon.

Definition at line 330 of file rpc.cpp.

References profinet::PNRPCHeader::defaultActivityHint, profinet::PNRPCHeader::defaultInterfaceHint, profinet::rpc::EPM_INQUIRY_ALL, profinet::rpc::EPM_INQUIRY_INTERFACE, profinet::rpc::EPM_LOOKUP, profinet::wire::Reader::Fixed(), profinet::rpc::raw::Idempotent, ioContext, profinet::PNRPCHeader::kFixedSize, profinet::rpc::raw::RawRpcHeader::kLittleEndianDrepFlag, profinet::rpc::RpcTransport::Open(), profinet::rpc::ParseEpmTower(), profinet::wire::PutFixed(), profinet::wire::PutLittleEndian(), profinet::PNRPCHeader::REQUEST, profinet::rpc::RpcTransport::SendReceive(), profinet::wire::Reader::SkipTo(), profinet::rpc::StringToUuidBytes(), profinet::wire::Reader::U16LittleEndian(), profinet::wire::Reader::U32LittleEndian(), profinet::rpc::UUID_EPM_V4, profinet::rpc::UuidBytesToString(), and profinet::uuidLenght.

+ Here is the call graph for this function:

◆ HasAlarmCr()

bool profinet::rpc::RPCCon::HasAlarmCr ( ) const
inlineoverridevirtual

Whether an AlarmCR was successfully established.

Returns
True if the device accepted an AlarmCR.

Implements profinet::rpc::IRPCCon.

Definition at line 453 of file rpc.h.

References alarmCrEnabled.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ Info()

const dcp::DCPDeviceDescription & profinet::rpc::RPCCon::Info ( ) const
inlineoverridevirtual

The device this connection targets.

Returns
The DCP-discovered device description.

Implements profinet::rpc::IRPCCon.

Definition at line 414 of file rpc.h.

References info.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ IsConnected()

bool profinet::rpc::RPCCon::IsConnected ( ) const
inlineoverridevirtual

Whether the AR is currently established.

Returns
True if connected.

Implements profinet::rpc::IRPCCon.

Definition at line 407 of file rpc.h.

References live.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

+ Here is the caller graph for this function:

◆ LocalAlarmRef()

std::uint16_t profinet::rpc::RPCCon::LocalAlarmRef ( ) const
inlineoverridevirtual

Controller's own local alarm reference.

Returns
The local alarm reference sent in AlarmCRBlockReq.

Implements profinet::rpc::IRPCCon.

Definition at line 435 of file rpc.h.

References alarmRef.

◆ operator=() [1/2]

RPCCon & profinet::rpc::RPCCon::operator= ( const RPCCon &  )
delete

Not copyable because the connection owns non-copyable Asio sockets.

◆ operator=() [2/2]

RPCCon & profinet::rpc::RPCCon::operator= ( RPCCon &&  )
delete

Deleted move assignment operator to prevent moving instances of this class.

Returns
A reference to the destination object (unreachable).

◆ ParseAlarmCrResponse()

int profinet::rpc::RPCCon::ParseAlarmCrResponse ( const Bytes &  responseData)
staticprivate

Parse the AlarmCRBlockRes from a CONNECT response.

Parameters
responseDataRaw CONNECT response NRD payload.
Returns
The device's local alarm reference, or -1 if not present.

Definition at line 679 of file rpc.cpp.

References profinet::PNAlarmCRBlockRes::BLOCK_TYPE, profinet::blockHeaderLength, profinet::PNAlarmCRBlockRes::Parse(), and profinet::rpc::PeekBlockHeader().

Referenced by Connect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseIocrResponse()

std::uint16_t profinet::rpc::RPCCon::ParseIocrResponse ( const Bytes &  responseData,
int  iocrType 
)
staticprivate

Parse an IOCRBlockRes from a CONNECT response.

Parameters
responseDataRaw CONNECT response NRD payload.
iocrTypeIOCR type to look for (Input or Output).
Returns
The frame ID assigned by the device, or 0 if not present.

Definition at line 1132 of file rpc.cpp.

References profinet::PNIOCRBlockRes::BLOCK_TYPE, profinet::blockHeaderLength, profinet::PNIOCRBlockRes::Parse(), and profinet::rpc::PeekBlockHeader().

Referenced by Connect(), and profinet::rpc::RpcTests::InvokeParseIocrResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrmBegin()

Bytes profinet::rpc::RPCCon::PrmBegin ( )
overridevirtual

Send PrmBegin (start of the parameterization phase).

Returns
The NRD response payload.

Implements profinet::rpc::IRPCCon.

Definition at line 1843 of file rpc.cpp.

References profinet::ParameterizationBeginRequest, profinet::PrmBegin, and SendControl().

+ Here is the call graph for this function:

◆ PrmEnd()

Bytes profinet::rpc::RPCCon::PrmEnd ( )
overridevirtual

Send PrmEnd (end of the parameterization phase).

Returns
The NRD response payload.

Implements profinet::rpc::IRPCCon.

Definition at line 1847 of file rpc.cpp.

References profinet::ControlPrmEndRequest, profinet::PrmEnd, and SendControl().

+ Here is the call graph for this function:

◆ Read()

PNIODHeader profinet::rpc::RPCCon::Read ( std::uint32_t  api,
std::uint16_t  slot,
std::uint16_t  subslot,
std::uint16_t  idx 
)
overridevirtual

Read a data record via slot/subslot/index (AR must be connected).

Parameters
apiAPI number.
slotSlot number.
subslotSubslot number.
idxRecord data index to read.
Returns
The parsed IOD response header and payload.

Throws PNIOError on a device-reported error, RPCTimeoutError on timeout.

Implements profinet::rpc::IRPCCon.

Definition at line 1364 of file rpc.cpp.

References profinet::PNIODHeader::api, profinet::PNNRDData::argsMaximumStatus, profinet::PNIODHeader::arUuid, arUuid, profinet::PNIODHeader::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, CheckTimeout(), CreateNrd(), CreateRpc(), profinet::PNBlockHeader::DEFAULT_BLOCK_LENGTH, profinet::PNIOError::FromArgsStatus(), profinet::PNIODHeader::index, profinet::PNBlockHeader::IODReadRequestHeader, profinet::PNIODHeader::length, profinet::PNIODHeader::padding1, profinet::PNIODHeader::padding2, profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, profinet::PNRPCHeader::READ, SendReceive(), profinet::PNIODHeader::sequenceNumber, profinet::PNIODHeader::slot, profinet::PNIODHeader::subslot, profinet::PNIODHeader::targetArUuid, profinet::PNNRDData::ToBytes(), profinet::PNIODHeader::ToBytes(), profinet::PNBlockHeader::ToBytes(), profinet::rpc::VERSION_HIGH, and profinet::rpc::VERSION_LOW.

Referenced by EnumerateIndices(), ReadDiagnosis(), ReadIm0(), ReadIm1(), ReadIm10(), ReadIm11(), ReadIm12(), ReadIm13(), ReadIm14(), ReadIm15(), ReadIm2(), ReadIm3(), ReadIm4(), ReadIm5(), ReadIm6(), ReadIm7(), ReadIm8(), ReadIm9(), ReadModuleDiff(), ReadPdRealData(), ReadRaw(), and ReadRealIdentificationData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadAllDiagnosis()

std::map< std::uint16_t, diagnosis::DiagnosisData > profinet::rpc::RPCCon::ReadAllDiagnosis ( )
overridevirtual

Read diagnosis from all standard diagnosis indices.

Returns
Diagnosis data keyed by index, for indices with at least one entry.

Covers subslot/device/API-level indices.

Implements profinet::rpc::IRPCCon.

Definition at line 1671 of file rpc.cpp.

References profinet::diagnosis::DiagnosisData::entries, and ReadDiagnosis().

+ Here is the call graph for this function:

◆ ReadAllIm()

AllIM profinet::rpc::RPCCon::ReadAllIm ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read all I&M records a device supports.

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The records that were successfully read (see AllIM for per-record semantics).

Implements profinet::rpc::IRPCCon.

Definition at line 1540 of file rpc.cpp.

References profinet::rpc::AllIM::im0, profinet::rpc::AllIM::im1, profinet::rpc::AllIM::im10, profinet::rpc::AllIM::im11, profinet::rpc::AllIM::im12, profinet::rpc::AllIM::im13, profinet::rpc::AllIM::im14, profinet::rpc::AllIM::im15, profinet::rpc::AllIM::im2, profinet::rpc::AllIM::im3, profinet::rpc::AllIM::im4, profinet::rpc::AllIM::im5, profinet::rpc::AllIM::im6, profinet::rpc::AllIM::im7, profinet::rpc::AllIM::im8, profinet::rpc::AllIM::im9, ReadIm0(), ReadIm1(), ReadIm10(), ReadIm11(), ReadIm12(), ReadIm13(), ReadIm14(), ReadIm15(), ReadIm2(), ReadIm3(), ReadIm4(), ReadIm5(), ReadIm6(), ReadIm7(), ReadIm8(), and ReadIm9().

+ Here is the call graph for this function:

◆ ReadDiagnosis()

diagnosis::DiagnosisData profinet::rpc::RPCCon::ReadDiagnosis ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 0,
std::uint16_t  index = 0xF000 
)
overridevirtual

Read and parse diagnosis data at the given location/index.

Parameters
slotSlot number to read diagnosis for.
subslotSubslot number to read diagnosis for.
indexDiagnosis record index to read.
Returns
The parsed diagnosis data (empty if none is present).

Falls back from the full block parser to the simple parser if the full parse yields no entries. Returns an empty DiagnosisData (does not throw) on any RPCError.

Implements profinet::rpc::IRPCCon.

Definition at line 1638 of file rpc.cpp.

References profinet::diagnosis::DiagnosisData::api, profinet::diagnosis::DiagnosisData::entries, profinet::diagnosis::ParseDiagnosisBlock(), profinet::diagnosis::ParseDiagnosisSimple(), profinet::PNIODHeader::payload, profinet::diagnosis::DiagnosisData::rawData, Read(), profinet::diagnosis::DiagnosisData::slot, and profinet::diagnosis::DiagnosisData::subslot.

Referenced by ReadAllDiagnosis().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm0()

PNInM0 profinet::rpc::RPCCon::ReadIm0 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M0 (mandatory identification data).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M0 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1475 of file rpc.cpp.

References profinet::PNInM0::IDX, profinet::PNInM0::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm1()

PNInM1 profinet::rpc::RPCCon::ReadIm1 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M1 (tag function/location).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M1 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1479 of file rpc.cpp.

References profinet::PNInM1::IDX, profinet::PNInM1::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm10()

PNInM10 profinet::rpc::RPCCon::ReadIm10 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M10 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M10 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1515 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm11()

PNInM11 profinet::rpc::RPCCon::ReadIm11 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M11 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M11 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1519 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm12()

PNInM12 profinet::rpc::RPCCon::ReadIm12 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M12 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M12 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1523 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm13()

PNInM13 profinet::rpc::RPCCon::ReadIm13 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M13 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M13 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1527 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm14()

PNInM14 profinet::rpc::RPCCon::ReadIm14 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M14 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M14 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1531 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm15()

PNInM15 profinet::rpc::RPCCon::ReadIm15 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M15 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M15 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1535 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm2()

PNInM2 profinet::rpc::RPCCon::ReadIm2 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M2 (installation date).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M2 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1483 of file rpc.cpp.

References profinet::PNInM2::IDX, profinet::PNInM2::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm3()

PNInM3 profinet::rpc::RPCCon::ReadIm3 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M3 (free-text descriptor).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M3 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1487 of file rpc.cpp.

References profinet::PNInM3::IDX, profinet::PNInM3::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm4()

PNInM4 profinet::rpc::RPCCon::ReadIm4 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M4 (PROFIsafe signature).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M4 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1491 of file rpc.cpp.

References profinet::PNInM4::IDX, profinet::PNInM4::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm5()

PNInM5 profinet::rpc::RPCCon::ReadIm5 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M5 (free-text annotation).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M5 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1495 of file rpc.cpp.

References profinet::PNInM5::IDX, profinet::PNInM5::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm6()

PNInM6 profinet::rpc::RPCCon::ReadIm6 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M6 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M6 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1499 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm7()

PNInM7 profinet::rpc::RPCCon::ReadIm7 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M7 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M7 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1503 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm8()

PNInM8 profinet::rpc::RPCCon::ReadIm8 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M8 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M8 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1507 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadIm9()

PNInM9 profinet::rpc::RPCCon::ReadIm9 ( std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)
overridevirtual

Read I&M9 (reserved).

Parameters
slotSlot number (defaults to 0, the device's DAP).
subslotSubslot number (defaults to 1).
Returns
The parsed I&M9 record.

Implements profinet::rpc::IRPCCon.

Definition at line 1511 of file rpc.cpp.

References profinet::PNInMReserved< Idx >::IDX, profinet::PNInMReserved< Idx >::Parse(), payload, and Read().

Referenced by ReadAllIm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadImplicit()

PNIODHeader profinet::rpc::RPCCon::ReadImplicit ( std::uint32_t  api,
std::uint16_t  slot,
std::uint16_t  subslot,
std::uint16_t  idx 
)
overridevirtual

Read a data record without an established AR.

Parameters
apiAPI number.
slotSlot number.
subslotSubslot number.
idxRecord data index to read.
Returns
The parsed IOD response header and payload.

Implements profinet::rpc::IRPCCon.

Definition at line 1400 of file rpc.cpp.

References profinet::PNIODHeader::api, profinet::PNNRDData::argsMaximumStatus, profinet::PNIODHeader::arUuid, profinet::PNIODHeader::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, CreateNrd(), CreateRpc(), profinet::PNIOError::FromArgsStatus(), profinet::PNRPCHeader::IMPLICIT_READ, profinet::PNIODHeader::index, profinet::PNBlockHeader::IODReadRequestHeader, profinet::PNIODHeader::length, profinet::PNIODHeader::padding1, profinet::PNIODHeader::padding2, profinet::PNNRDData::Parse(), profinet::PNIODHeader::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, SendReceive(), profinet::PNIODHeader::sequenceNumber, profinet::PNIODHeader::slot, profinet::PNIODHeader::subslot, profinet::PNIODHeader::targetArUuid, profinet::PNNRDData::ToBytes(), profinet::PNIODHeader::ToBytes(), and profinet::PNBlockHeader::ToBytes().

Referenced by profinet::device::ProfinetDevice::ReadImplicit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadModuleDiff()

blocks::ModuleDiffBlock profinet::rpc::RPCCon::ReadModuleDiff ( )
overridevirtual

Read and parse the device's ModuleDiffBlock.

Returns
The parsed module/submodule configuration differences.

Implements profinet::rpc::IRPCCon.

Definition at line 1632 of file rpc.cpp.

References profinet::MODULE_DIFF_BLOCK, profinet::blocks::ParseModuleDiffBlock(), profinet::PNIODHeader::payload, and Read().

+ Here is the call graph for this function:

◆ ReadPdRealData()

blocks::PDRealData profinet::rpc::RPCCon::ReadPdRealData ( )
overridevirtual

Read and parse the device's PDRealData (physical topology).

Returns
The parsed interface and port information.

Implements profinet::rpc::IRPCCon.

Definition at line 1701 of file rpc.cpp.

References profinet::blocks::ParsePdRealData(), profinet::PNIODHeader::payload, profinet::PD_REAL_DATA, and Read().

Referenced by DiscoverTopology().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadRaw()

Bytes profinet::rpc::RPCCon::ReadRaw ( std::uint16_t  idx,
std::uint16_t  slot = 0,
std::uint16_t  subslot = 1 
)

Read a raw record payload by index (convenience wrapper over Read()).

Parameters
idxRecord data index to read.
slotSlot number.
subslotSubslot number.
Returns
The raw record payload.

Definition at line 1470 of file rpc.cpp.

References profinet::PNIODHeader::payload, and Read().

+ Here is the call graph for this function:

◆ ReadRealIdentificationData()

blocks::RealIdentificationData profinet::rpc::RPCCon::ReadRealIdentificationData ( )
overridevirtual

Read and parse the device's RealIdentificationData (logical structure).

Returns
The parsed slot/subslot structure.

Implements profinet::rpc::IRPCCon.

Definition at line 1707 of file rpc.cpp.

References profinet::blocks::ParseRealIdentificationData(), profinet::PNIODHeader::payload, Read(), and profinet::REAL_ID_API.

Referenced by DiscoverSlots(), and DiscoverTopology().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadyForRtClass3()

Bytes profinet::rpc::RPCCon::ReadyForRtClass3 ( )
overridevirtual

Send ReadyForRTClass3 (isochronous real-time readiness).

Returns
The NRD response payload.

Implements profinet::rpc::IRPCCon.

Definition at line 1851 of file rpc.cpp.

References profinet::ControlRtClass3Request, profinet::ReadyForRtClass3, and SendControl().

+ Here is the call graph for this function:

◆ SendControl()

Bytes profinet::rpc::RPCCon::SendControl ( BlockType  blockType,
ControlCommand  controlCommand,
bool  waitResponse = true,
const Bytes &  subBlocks = {} 
)
private

Send a CONTROL operation and optionally wait for its response.

Parameters
blockTypeControl block type.
controlCommandControl command bitmask.
waitResponseWhether to wait for and return the response.
subBlocksAdditional blocks to append after the control block.
Returns
The NRD response payload, or empty if WaitResponse is false.

Definition at line 1797 of file rpc.cpp.

References profinet::PNNRDData::argsMaximumStatus, profinet::PNIODReleaseBlock::arUuid, arUuid, profinet::PNIODReleaseBlock::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::PNRPCHeader::CONTROL, profinet::PNIODReleaseBlock::controlBlockProperties, profinet::PNIODReleaseBlock::controlCommand, CreateNrd(), CreateRpc(), profinet::PNIOError::FromArgsStatus(), live, profinet::PNIODReleaseBlock::padding1, profinet::PNIODReleaseBlock::padding2, profinet::PNNRDData::Parse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, rpcTransport, SendReceive(), profinet::PNIODReleaseBlock::sessionKey, sessionKey, profinet::PNRPCHeader::ToBytes(), profinet::PNNRDData::ToBytes(), profinet::PNBlockHeader::ToBytes(), and profinet::PNIODReleaseBlock::ToBytes().

Referenced by PrmBegin(), PrmEnd(), and ReadyForRtClass3().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendReceive()

PNRPCHeader profinet::rpc::RPCCon::SendReceive ( const PNRPCHeader &  request)
private

Send an RPC request and synchronously wait for its response.

Parameters
requestRPC request packet to transmit.
Returns
Parsed RPC response packet.
Exceptions
RPCTimeoutErrorwhen no response arrives before the configured timeout.
RPCErrorwhen the socket or RPC response is invalid.

Definition at line 1160 of file rpc.cpp.

References CheckTimeout(), profinet::PNRPCHeader::FAULT, info, profinet::PNRPCHeader::kFixedSize, live, liveMonotonic, profinet::dcp::DCPDeviceDescription::name, profinet::PNRPCHeader::operationNumber, profinet::PNRPCHeader::packetType, profinet::PNRPCHeader::Parse(), profinet::PNRPCHeader::REJECT, profinet::PNRPCHeader::REQUEST, profinet::PNRPCHeader::RESPONSE, rpcTransport, timeout, and profinet::PNRPCHeader::ToBytes().

Referenced by Connect(), Read(), ReadImplicit(), SendControl(), Write(), and WriteMultiple().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SessionKey()

std::uint16_t profinet::rpc::RPCCon::SessionKey ( ) const
inline

The session key for this connection.

Returns
The session key.

Definition at line 428 of file rpc.h.

References sessionKey.

Referenced by TEST_F(), TEST_F(), profinet::rpc::TEST_F(), and profinet::rpc::TEST_F().

+ Here is the caller graph for this function:

◆ Write()

void profinet::rpc::RPCCon::Write ( std::uint32_t  api,
std::uint16_t  slot,
std::uint16_t  subslot,
std::uint16_t  idx,
const Bytes &  data 
)
overridevirtual

◆ WriteMultiple()

std::vector< blocks::WriteMultipleResult > profinet::rpc::RPCCon::WriteMultiple ( const std::vector< WriteItem > &  writes)
overridevirtual

Write multiple records atomically via IODWriteMultipleReq (0xE040).

Parameters
writesThe individual write operations to perform.
Returns
Per-write results (which may include per-write failures).

Throws PNIOError/RPCError if the overall request fails; individual per-write results are returned rather than thrown.

Implements profinet::rpc::IRPCCon.

Definition at line 1584 of file rpc.cpp.

References profinet::blocks::IODWriteMultipleBuilder::AddWrite(), profinet::PNIODHeader::api, profinet::PNNRDData::argsMaximumStatus, profinet::PNIODHeader::arUuid, arUuid, profinet::PNIODHeader::blockHeader, profinet::blockHeaderLength, profinet::PNBlockHeader::blockLength, profinet::PNBlockHeader::blockType, profinet::PNBlockHeader::blockVersionHigh, profinet::PNBlockHeader::blockVersionLow, profinet::blocks::IODWriteMultipleBuilder::Build(), CheckTimeout(), CreateNrd(), CreateRpc(), profinet::PNIOError::FromArgsStatus(), profinet::PNIODHeader::index, profinet::IoDataWriteRequest, profinet::PNIODHeader::length, profinet::PNIODHeader::padding1, profinet::PNIODHeader::padding2, profinet::PNNRDData::Parse(), profinet::blocks::ParseWriteMultipleResponse(), profinet::PNRPCHeader::payload, profinet::PNNRDData::payload, profinet::PNIODHeader::payload, payload, SendReceive(), profinet::PNIODHeader::sequenceNumber, profinet::PNIODHeader::slot, profinet::PNIODHeader::subslot, profinet::PNIODHeader::targetArUuid, profinet::PNNRDData::ToBytes(), profinet::PNIODHeader::ToBytes(), profinet::PNBlockHeader::ToBytes(), profinet::PNRPCHeader::WRITE, and profinet::blocks::IODWriteMultipleBuilder::writeMultipleIndex.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ RpcTests

friend class RpcTests
friend

FRIEND_CLASS declaration granting access to the specific test case for validating CreateRpc.

Definition at line 141 of file rpc.h.

Member Data Documentation

◆ activityUuid

std::array<std::uint8_t, uuidLenght> profinet::rpc::RPCCon::activityUuid {}
private

Activity UUID for the current RPC exchange.

Definition at line 546 of file rpc.h.

Referenced by RPCCon(), Connect(), and CreateRpc().

◆ alarmCrEnabled

bool profinet::rpc::RPCCon::alarmCrEnabled = false
private

Whether an AlarmCR was successfully established.

Definition at line 580 of file rpc.h.

Referenced by Connect(), and HasAlarmCr().

◆ alarmRef

std::uint16_t profinet::rpc::RPCCon::alarmRef = 0x8001
private

Controller's own local alarm reference.

Definition at line 574 of file rpc.h.

Referenced by BuildAlarmCrBlock(), and LocalAlarmRef().

◆ arUuid

std::array<std::uint8_t, uuidLenght> profinet::rpc::RPCCon::arUuid {}
private

AR UUID for this connection.

Definition at line 543 of file rpc.h.

Referenced by RPCCon(), ApplicationReady(), ArUuid(), Connect(), Disconnect(), Read(), SendControl(), Write(), and WriteMultiple().

◆ ccontrolResponseTransport

std::unique_ptr<IRpcTransport> profinet::rpc::RPCCon::ccontrolResponseTransport
private

Definition at line 607 of file rpc.h.

◆ ccontrolTransport

std::unique_ptr<IRpcTransport> profinet::rpc::RPCCon::ccontrolTransport
private

Definition at line 606 of file rpc.h.

Referenced by ApplicationReady(), and Close().

◆ dataRepresentation

std::array<std::uint8_t, 3> profinet::rpc::RPCCon::dataRepresentation {0x00, 0x00, 0x00}
private

AR DREP for this connection.

Definition at line 540 of file rpc.h.

Referenced by Connect().

◆ deviceAlarmRef

int profinet::rpc::RPCCon::deviceAlarmRef = 0
private

Device's local alarm reference, if an AlarmCR was established.

Definition at line 577 of file rpc.h.

Referenced by Connect(), and DeviceAlarmRef().

◆ info

dcp::DCPDeviceDescription profinet::rpc::RPCCon::info
private

DCP-discovered description of the target device.

Definition at line 534 of file rpc.h.

Referenced by RPCCon(), Info(), and SendReceive().

◆ inputFrameId

std::uint16_t profinet::rpc::RPCCon::inputFrameId = 0
private

Frame ID assigned to the input IOCR.

Definition at line 592 of file rpc.h.

Referenced by Connect().

◆ inputIocrRef

int profinet::rpc::RPCCon::inputIocrRef = 0
private

IOCR reference for the input (device -> controller) IOCR.

Definition at line 586 of file rpc.h.

◆ interfaceUuid

std::array<std::uint8_t, uuidLenght> profinet::rpc::RPCCon::interfaceUuid {}
private

Interface UUID for the current RPC exchange.

Definition at line 549 of file rpc.h.

Referenced by RPCCon(), and CreateRpc().

◆ ioContext

asio::io_context& profinet::rpc::RPCCon::ioContext
private

Asio execution context used by the RPC transport.

Definition at line 603 of file rpc.h.

Referenced by RPCCon(), and EpmLookup().

◆ iocrSetup

std::optional<IOCRSetup> profinet::rpc::RPCCon::iocrSetup
private

Cyclic IO configuration used for the current AR, if any.

Definition at line 598 of file rpc.h.

Referenced by Connect().

◆ live

bool profinet::rpc::RPCCon::live = false
private

Whether the AR is currently established.

Definition at line 558 of file rpc.h.

Referenced by ApplicationReady(), CheckTimeout(), Connect(), Disconnect(), IsConnected(), SendControl(), and SendReceive().

◆ liveMonotonic

std::chrono::steady_clock::time_point profinet::rpc::RPCCon::liveMonotonic {}
private

Timestamp of the last successful RPC exchange, for CONNECTION_TIMEOUT tracking.

Definition at line 564 of file rpc.h.

Referenced by ApplicationReady(), CheckTimeout(), and SendReceive().

◆ localObjectUuid

std::array<std::uint8_t, uuidLenght> profinet::rpc::RPCCon::localObjectUuid {}
private

This controller's own object UUID.

Definition at line 552 of file rpc.h.

Referenced by RPCCon(), and Connect().

◆ outputFrameId

std::uint16_t profinet::rpc::RPCCon::outputFrameId = 0
private

Frame ID assigned to the output IOCR.

Definition at line 595 of file rpc.h.

Referenced by Connect().

◆ outputIocrRef

int profinet::rpc::RPCCon::outputIocrRef = 0
private

IOCR reference for the output (controller -> device) IOCR.

Definition at line 589 of file rpc.h.

◆ reconnecting

bool profinet::rpc::RPCCon::reconnecting = false
private

Whether timeout has occured and reconnection is needed.

Definition at line 561 of file rpc.h.

Referenced by CheckTimeout(), and Connect().

◆ remoteObjectUuid

std::array<std::uint8_t, uuidLenght> profinet::rpc::RPCCon::remoteObjectUuid {}
private

The target device's object UUID.

Definition at line 555 of file rpc.h.

Referenced by RPCCon(), and CreateRpc().

◆ rpcContext

std::unique_ptr<asio::io_context> profinet::rpc::RPCCon::rpcContext
private

Definition at line 600 of file rpc.h.

◆ rpcContextRunner

std::unique_ptr<IAsioIoContextRunner> profinet::rpc::RPCCon::rpcContextRunner
private

Definition at line 601 of file rpc.h.

◆ rpcTransport

std::unique_ptr<IRpcTransport> profinet::rpc::RPCCon::rpcTransport
private

Definition at line 605 of file rpc.h.

Referenced by Close(), Disconnect(), SendControl(), and SendReceive().

◆ sequenceNumber

std::uint32_t profinet::rpc::RPCCon::sequenceNumber = 0
private

Monotonically increasing RPC sequence number.

Definition at line 583 of file rpc.h.

Referenced by CreateRpc().

◆ sessionKey

std::uint16_t profinet::rpc::RPCCon::sessionKey = 0
private

Session key for this connection.

Definition at line 570 of file rpc.h.

Referenced by ApplicationReady(), Connect(), Disconnect(), SendControl(), and SessionKey().

◆ srcMac

std::optional<MacAddress> profinet::rpc::RPCCon::srcMac
private

Source MAC address used to establish the AR.

Definition at line 567 of file rpc.h.

Referenced by Connect().

◆ timeout

double profinet::rpc::RPCCon::timeout
private

Default RPC response timeout in seconds.

Definition at line 537 of file rpc.h.

Referenced by SendReceive().


The documentation for this class was generated from the following files: