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

PROFINET DCP SET and Signal wire-format regression tests. More...

#include <gtest/gtest.h>
#include <array>
#include <cstdint>
#include <span>
#include <string>
#include "profinet/dcp.h"
#include "profinet/exceptions.h"
#include "profinet/protocol.h"
#include "profinet/wire.h"
+ Include dependency graph for test_dcpWireFormat.cpp:

Go to the source code of this file.

Classes

class  profinet::dcp::DcpWireFormatTest
 Test fixture for DCP request wire-format serialization. More...
 

Namespaces

namespace  profinet
 
namespace  profinet::dcp
 

Functions

 profinet::dcp::TEST_F (DcpWireFormatTest, OddLengthNameIsPaddedAndBlockLengthExcludesPadding)
 
 profinet::dcp::TEST_F (DcpWireFormatTest, EvenLengthNameIsNotPadded)
 
 profinet::dcp::TEST_F (DcpWireFormatTest, DefaultQualifierIsTemporary)
 
 profinet::dcp::TEST_F (DcpWireFormatTest, PermanentQualifierIsSerialized)
 
 profinet::dcp::TEST_F (DcpWireFormatTest, IpSetOperationIsRejected)
 
 profinet::dcp::TEST_F (DcpWireFormatTest, IpParameterMatchingIsCaseInsensitive)
 
 profinet::dcp::TEST_F (DcpWireFormatTest, SignalUsesFlashOnceValue)
 

Detailed Description

PROFINET DCP SET and Signal wire-format regression tests.

Verifies the byte-level representation of DCP SET and Signal requests. The tests specifically cover conformance corrections identified by comparing the implementation against certified PROFINET devices and PROFINET protocol dissections.

The covered regressions are:

  • Odd-length station-name padding.
  • DCP BlockLength excluding alignment padding.
  • Temporary BlockQualifier serialization.
  • Permanent BlockQualifier serialization.
  • Rejection of the legacy string-based IP SET operation.
  • DCP Signal using the IEC-defined Flash-Once value.

These tests inspect serialized request frames and therefore do not require a physical Ethernet interface.

Definition in file test_dcpWireFormat.cpp.