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

Parsed ChannelProperties word (16 bits). More...

#include <diagnosis.h>

+ Collaboration diagram for profinet::diagnosis::ChannelProperties:

Public Member Functions

std::string ChannelTypeName () const
 Human-readable name for ChannelTypeValue.
 
std::string SpecifierName () const
 Human-readable name for Specifier.
 
std::string DirectionName () const
 Human-readable name for Direction.
 
bool operator== (const ChannelProperties &) const =default
 Compares two ChannelProperties for equality.
 

Static Public Member Functions

static ChannelProperties FromUint16 (std::uint16_t value)
 Decode a raw 16-bit ChannelProperties value.
 

Public Attributes

std::uint16_t raw = 0
 Raw 16-bit ChannelProperties value.
 
ChannelType channelTypeValue = ChannelType::Reserved
 Channel type (bits 0-1).
 
ChannelAccumulative accumulative = ChannelAccumulative::No
 Accumulative info (bits 2-4).
 
bool maintenanceRequired = false
 Maintenance required flag (bit 5).
 
bool naintenanceDemanded = false
 Maintenance demanded flag (bit 6).
 
ChannelSpecifier specifier = ChannelSpecifier::AllDisappears
 Diagnosis specifier (bits 8-10).
 
ChannelDirection direction = ChannelDirection::Manufacturer
 Data direction (bits 11-12).
 

Detailed Description

Parsed ChannelProperties word (16 bits).

Definition at line 88 of file diagnosis.h.

Member Function Documentation

◆ ChannelTypeName()

std::string profinet::diagnosis::ChannelProperties::ChannelTypeName ( ) const

Human-readable name for ChannelTypeValue.

Returns
The channel type name, e.g. "Specific".

Definition at line 46 of file diagnosis.cpp.

References profinet::diagnosis::All, channelTypeValue, profinet::diagnosis::Reserved, profinet::diagnosis::Specific, and profinet::diagnosis::Submodule.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ DirectionName()

std::string profinet::diagnosis::ChannelProperties::DirectionName ( ) const

Human-readable name for Direction.

Returns
The direction name, e.g. "Input".

Definition at line 78 of file diagnosis.cpp.

References profinet::diagnosis::Bidirectional, direction, profinet::diagnosis::Input, profinet::diagnosis::Manufacturer, and profinet::diagnosis::Output.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ FromUint16()

ChannelProperties profinet::diagnosis::ChannelProperties::FromUint16 ( std::uint16_t  value)
static

Decode a raw 16-bit ChannelProperties value.

Parameters
valueRaw ChannelProperties word.
Returns
The decoded bit fields.

Definition at line 19 of file diagnosis.cpp.

References accumulative, profinet::diagnosis::AllDisappears, profinet::ByteAt(), channelTypeValue, direction, maintenanceRequired, profinet::diagnosis::Manufacturer, naintenanceDemanded, profinet::diagnosis::No, raw, profinet::diagnosis::Reserved, and specifier.

Referenced by profinet::diagnosis::ParseDiagnosisBlock(), profinet::diagnosis::ParseDiagnosisSimple(), 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:

◆ operator==()

bool profinet::diagnosis::ChannelProperties::operator== ( const ChannelProperties &  ) const
default

Compares two ChannelProperties for equality.

Two ChannelProperties are equal when all scalar configuration fields are equal.

◆ SpecifierName()

std::string profinet::diagnosis::ChannelProperties::SpecifierName ( ) const

Human-readable name for Specifier.

Returns
The specifier name, e.g. "Appears".

Definition at line 62 of file diagnosis.cpp.

References profinet::diagnosis::AllDisappears, profinet::diagnosis::Appears, profinet::diagnosis::Disappears, profinet::diagnosis::DisappearsOther, and specifier.

Referenced by TEST_F().

+ Here is the caller graph for this function:

Member Data Documentation

◆ accumulative

ChannelAccumulative profinet::diagnosis::ChannelProperties::accumulative = ChannelAccumulative::No

Accumulative info (bits 2-4).

Definition at line 97 of file diagnosis.h.

Referenced by FromUint16().

◆ channelTypeValue

ChannelType profinet::diagnosis::ChannelProperties::channelTypeValue = ChannelType::Reserved

Channel type (bits 0-1).

Definition at line 94 of file diagnosis.h.

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

◆ direction

ChannelDirection profinet::diagnosis::ChannelProperties::direction = ChannelDirection::Manufacturer

Data direction (bits 11-12).

Definition at line 109 of file diagnosis.h.

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

◆ maintenanceRequired

bool profinet::diagnosis::ChannelProperties::maintenanceRequired = false

Maintenance required flag (bit 5).

Definition at line 100 of file diagnosis.h.

Referenced by FromUint16(), and TEST_F().

◆ naintenanceDemanded

bool profinet::diagnosis::ChannelProperties::naintenanceDemanded = false

Maintenance demanded flag (bit 6).

Definition at line 103 of file diagnosis.h.

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

◆ raw

std::uint16_t profinet::diagnosis::ChannelProperties::raw = 0

Raw 16-bit ChannelProperties value.

Definition at line 91 of file diagnosis.h.

Referenced by FromUint16().

◆ specifier

ChannelSpecifier profinet::diagnosis::ChannelProperties::specifier = ChannelSpecifier::AllDisappears

Diagnosis specifier (bits 8-10).

Definition at line 106 of file diagnosis.h.

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


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