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

Shared data types used by the PROFINET DCE/RPC layer. More...

#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include "profinet/blocks.h"
#include "profinet/dcp.h"
+ Include dependency graph for rpcTypes.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  profinet::rpc::IOSlot
 One slot/subslot's expected module configuration and IO data sizes. More...
 
struct  profinet::rpc::ApplicationRelations
 
struct  profinet::rpc::IOCRSetup
 Configuration for establishing cyclic IO alongside an AR. More...
 
struct  profinet::rpc::raw::RawRpcHeader
 DREP-aware fields we need out of a raw incoming RPC request; PROFINET block payloads inside the NRD body are always big-endian regardless of DREP, but the RPC/NRD header fields follow the DREP byte order. More...
 
struct  profinet::rpc::ConnectResult
 Result of a successful RPCCon::Connect() that also established cyclic IO. More...
 
struct  profinet::rpc::WriteItem
 A single write operation for WriteMultiple(). More...
 
struct  profinet::rpc::AllIM
 All I&M records a device supports, read in one call. More...
 
struct  profinet::rpc::IndexProbeResult
 Result of probing one index in EnumerateIndices(). More...
 
struct  profinet::rpc::RPCConOptions
 Configuration options for an RPC connection. More...
 

Namespaces

namespace  profinet
 
namespace  profinet::rpc
 
namespace  profinet::rpc::raw
 

Enumerations

enum class  profinet::rpc::StartupMode : std::uint16_t { profinet::rpc::Legacy , profinet::rpc::Advanced }
 
enum class  profinet::rpc::raw::Flags1 : std::uint8_t {
  profinet::rpc::raw::None = 0x00 , profinet::rpc::raw::Reserved1 = 1 << 7 , profinet::rpc::raw::Broadcast = 1 << 6 , profinet::rpc::raw::Idempotent = 1 << 5 ,
  profinet::rpc::raw::Maybe = 1 << 4 , profinet::rpc::raw::NoFack = 1 << 3 , profinet::rpc::raw::Fragment = 1 << 2 , profinet::rpc::raw::LastFragment = 1 << 1 ,
  profinet::rpc::raw::Reserved0 = 1 << 0
}
 Represents bitwise flags for Application Ready Response header options (byte 1). More...
 

Functions

constexpr Flags1 profinet::rpc::raw::operator| (Flags1 lhs, Flags1 rhs) noexcept
 Bitwise OR operator for combining two ApplicationReadyResponseFlags1 values.
 
constexpr Flags1 profinet::rpc::raw::operator& (Flags1 lhs, Flags1 rhs) noexcept
 Bitwise AND operator for intersecting two ApplicationReadyResponseFlags1 values.
 
constexpr std::uint8_t profinet::rpc::raw::operator& (std::uint8_t lhs, Flags1 rhs) noexcept
 Bitwise AND between a raw integer byte and an ApplicationReadyResponseFlags1 value.
 
constexpr std::uint8_t profinet::rpc::raw::operator& (Flags1 lhs, std::uint8_t rhs) noexcept
 Bitwise AND between an ApplicationReadyResponseFlags1 value and a raw integer byte.
 
constexpr std::uint8_t profinet::rpc::raw::operator| (std::uint8_t lhs, Flags1 rhs) noexcept
 Bitwise OR between a raw integer byte and an ApplicationReadyResponseFlags1 value.
 
constexpr std::uint8_t profinet::rpc::raw::operator| (Flags1 lhs, std::uint8_t rhs) noexcept
 Bitwise OR between an ApplicationReadyResponseFlags1 value and a raw integer byte.
 
constexpr bool profinet::rpc::raw::HasFlag (Flags1 flags, Flags1 test) noexcept
 Checks if all flag bits in 'test' are set within 'flags'.
 
constexpr bool profinet::rpc::raw::HasFlag (std::uint8_t flags, Flags1 test) noexcept
 Checks if all flag bits in 'test' are set within raw integer byte 'flags'.
 
constexpr bool profinet::rpc::raw::HasFlag (Flags1 flags, std::uint8_t test) noexcept
 Checks if all flag bits in raw integer byte 'test' are set within enum 'flags'.
 
std::optional< RawRpcHeader > profinet::rpc::raw::ParseRawRpcHeader (const Bytes &data)
 Parses a raw network byte vector into a structured DCE/RPC v4 Connectionless Header.
 

Variables

constexpr std::uint16_t profinet::rpc::RPC_PORT = 0x8894
 PROFINET IO RPC port (34964).
 
constexpr std::uint16_t profinet::rpc::RPC_BIND_PORT = 0x8895
 PROFINET IO RPC bind port (34965).
 
const std::string profinet::rpc::UUID_NULL = "00000000-0000-0000-0000-000000000000"
 Null (all-zero) DCE/RPC UUID string.
 
const std::string profinet::rpc::UUID_EPM_V4 = "e1af8308-5d1f-11c9-91a4-08002b14a0fa"
 Endpoint Mapper interface UUID.
 
const std::string profinet::rpc::UUID_PNIO_DEVICE = "dea00001-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-Device interface UUID.
 
const std::string profinet::rpc::UUID_PNIO_CONTROLLER = "dea00002-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-Controller interface UUID.
 
const std::string profinet::rpc::UUID_PNIO_SUPERVISOR = "dea00003-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-Supervisor interface UUID.
 
const std::string profinet::rpc::UUID_PNIO_PARAMETER_SERVER = "dea00004-6c97-11d1-8271-00a02442df7d"
 PROFINET IO-ParameterServer interface UUID.
 
constexpr std::uint32_t profinet::rpc::PNIO_DEVICE_INTERFACE_VERSION = 1
 Interface version used for the PNIO device interface.
 
constexpr std::uint32_t profinet::rpc::EPM_LOOKUP = 0x02
 EPM operation: Lookup.
 
constexpr std::uint32_t profinet::rpc::EPM_INQUIRY_ALL = 0x00
 EPM inquiry type: all interfaces.
 
constexpr std::uint32_t profinet::rpc::EPM_INQUIRY_INTERFACE = 0x01
 EPM inquiry type: specific interface.
 
constexpr double profinet::rpc::DEFAULT_TIMEOUT = 5.0
 Default RPC response timeout in seconds.
 
constexpr double profinet::rpc::CONNECTION_TIMEOUT = 10.0
 Maximum idle time in seconds before an AR is considered to need re-connection.
 
constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_PRM_END_REQ = 0x0110
 Block type: IODControlReqPrmEnd.
 
constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_REQ = 0x0112
 Block type: IODControlReqAppReady.
 
constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_APP_READY_RES = 0x8112
 Block type: IODControlResAppReady.
 
constexpr std::uint16_t profinet::rpc::BLOCK_IOD_CONTROL_RT_CLASS_3_REQ = 0x0117
 Block type: IODControlReqRTClass3.
 
constexpr std::uint16_t profinet::rpc::BLOCK_PRM_BEGIN_REQ = 0x0118
 Block type: PrmBeginReq.
 
constexpr std::uint16_t profinet::rpc::BLOCK_RELEASE_REQ = 0x0114
 Block type: IODReleaseReq.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_PRM_END = 0x0001
 Control command bit: PrmEnd.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_APP_READY = 0x0002
 Control command bit: ApplicationReady.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_RELEASE = 0x0004
 Control command bit: Release.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_DONE = 0x0008
 Control command bit: Done.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_READY_FOR_COMPANION = 0x0010
 Control command bit: ReadyForCompanion.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_READY_FOR_RT_CLASS_3 = 0x0020
 Control command bit: ReadyForRTClass3.
 
constexpr std::uint16_t profinet::rpc::CONTROL_CMD_PRM_BEGIN = 0x0040
 Control command bit: PrmBegin.
 

Detailed Description

Shared data types used by the PROFINET DCE/RPC layer.

Defines common data structures used used to describe IO configuration, IOCR setup, RPC connection results, record operations and Identification & Maintenance data. These types are kept separate from the RPC connection classes to avoid circular dependencies between the RPC interface and implementation headers.

Definition in file rpcTypes.h.