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

Classes

class  Reader
 Lightweight cursor for parsing a big-endian byte buffer without copies. More...
 

Functions

void PutU8 (std::vector< std::uint8_t > &out, std::uint8_t v)
 Append a single byte to a buffer.
 
void PutU16 (std::vector< std::uint8_t > &out, std::uint16_t v)
 Append a 16-bit value to a buffer in big-endian order.
 
void PutU32 (std::vector< std::uint8_t > &out, std::uint32_t v)
 Append a 32-bit value to a buffer in big-endian order.
 
void PutBytes (std::vector< std::uint8_t > &out, const std::uint8_t *data, std::size_t len)
 Append a raw byte range to a buffer.
 
template<std::size_t N>
void PutFixed (std::vector< std::uint8_t > &out, const std::array< std::uint8_t, N > &data)
 Append a fixed-size byte array to a buffer.
 

Function Documentation

◆ PutBytes()

void profinet::wire::PutBytes ( std::vector< std::uint8_t > &  out,
const std::uint8_t *  data,
std::size_t  len 
)
inline

Append a raw byte range to a buffer.

Parameters
outBuffer to append to.
dataPointer to the first byte to copy.
lenNumber of bytes to copy.

Definition at line 48 of file wire.h.

◆ PutFixed()

template<std::size_t N>
void profinet::wire::PutFixed ( std::vector< std::uint8_t > &  out,
const std::array< std::uint8_t, N > &  data 
)
inline

Append a fixed-size byte array to a buffer.

Template Parameters
NSize of the array in bytes.
Parameters
outBuffer to append to.
dataFixed-size array to copy.

Definition at line 58 of file wire.h.

Referenced by profinet::blocks::IODWriteMultipleBuilder::BuildHeader(), profinet::blocks::IODWriteMultipleBuilder::BuildWriteBlock(), profinet::EthernetHeader::ToBytes(), profinet::EthernetVLANHeader::ToBytes(), profinet::PNRPCHeader::ToBytes(), profinet::PNIODHeader::ToBytes(), profinet::PNARBlockRequest::ToBytes(), profinet::PNIODReleaseBlock::ToBytes(), profinet::PNIOCRBlockReqHeader::ToBytes(), profinet::PNAlarmCRBlockReq::ToBytes(), profinet::PNAlarmAckPDU::ToBytes(), and profinet::PNIODWriteReq::ToBytes().

+ Here is the caller graph for this function:

◆ PutU16()

void profinet::wire::PutU16 ( std::vector< std::uint8_t > &  out,
std::uint16_t  v 
)
inline

◆ PutU32()

◆ PutU8()

void profinet::wire::PutU8 ( std::vector< std::uint8_t > &  out,
std::uint8_t  v 
)
inline