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 95 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.

◆ 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.

◆ 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, channelTypeValue, direction, maintenanceRequired, profinet::diagnosis::Manufacturer, naintenanceDemanded, profinet::diagnosis::No, profinet::OneOctetShift, raw, profinet::diagnosis::Reserved, and specifier.

Referenced by profinet::diagnosis::ParseDiagnosisBlock(), and profinet::diagnosis::ParseDiagnosisSimple().

+ 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.

Member Data Documentation

◆ accumulative

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

Accumulative info (bits 2-4).

Definition at line 104 of file diagnosis.h.

Referenced by FromUint16().

◆ channelTypeValue

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

Channel type (bits 0-1).

Definition at line 101 of file diagnosis.h.

Referenced by ChannelTypeName(), and FromUint16().

◆ direction

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

Data direction (bits 11-12).

Definition at line 116 of file diagnosis.h.

Referenced by DirectionName(), and FromUint16().

◆ maintenanceRequired

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

Maintenance required flag (bit 5).

Definition at line 107 of file diagnosis.h.

Referenced by FromUint16().

◆ naintenanceDemanded

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

Maintenance demanded flag (bit 6).

Definition at line 110 of file diagnosis.h.

Referenced by FromUint16().

◆ raw

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

Raw 16-bit ChannelProperties value.

Definition at line 98 of file diagnosis.h.

Referenced by FromUint16().

◆ specifier

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

Diagnosis specifier (bits 8-10).

Definition at line 113 of file diagnosis.h.

Referenced by FromUint16(), and SpecifierName().


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