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

Declares exceptions and error types used by the PROFINET IO controller stack. More...

#include <cstdint>
#include <span>
#include <stdexcept>
#include <string>
+ Include dependency graph for exceptions.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  profinet::ProfinetError
 Base exception for all PROFINET errors. More...
 
class  profinet::DCPError
 DCP protocol errors. More...
 
class  profinet::DCPTimeoutError
 DCP operation timed out. More...
 
class  profinet::DCPDeviceNotFoundError
 Device not found via DCP. More...
 
class  profinet::RPCError
 DCE/RPC protocol errors. More...
 
class  profinet::RPCTimeoutError
 RPC operation timed out. More...
 
class  profinet::RPCFaultError
 RPC returned a fault response. More...
 
class  profinet::RPCConnectionError
 Failed to establish RPC connection. More...
 
class  profinet::ValidationError
 Input validation error. More...
 
class  profinet::InvalidMACError
 Invalid MAC address format. More...
 
class  profinet::InvalidIPError
 Invalid IP address format. More...
 
class  profinet::SocketError
 Socket operation error. More...
 
class  profinet::PermissionDeniedError
 Insufficient permissions for raw socket. More...
 
class  profinet::PNIOError
 PNIO application error with error codes. More...
 

Namespaces

namespace  profinet
 

Enumerations

enum class  profinet::ErrorDecode : std::uint8_t { profinet::PnioCm = 0x40 , profinet::PnioRw = 0x80 , profinet::Pnio = 0x81 }
 PROFINET error decode values. More...
 
enum class  profinet::PnioRwErrorCode1 : std::uint8_t {
  profinet::InvalidIndex = 0xB0 , profinet::WriteLength = 0xB1 , profinet::Resource = 0xB2 , profinet::Access = 0xB3 ,
  profinet::Application = 0xB4
}
 PNIO read/write ErrorCode1 values. More...
 
enum class  profinet::PnioCmErrorCode1 : std::uint8_t {
  profinet::Ar = 0x01 , profinet::Iocr = 0x02 , profinet::AlarmCr = 0x03 , profinet::ExpectedSubmodule = 0x04 ,
  profinet::ModuleDiff = 0x05 , profinet::ArRpc = 0x06 , profinet::IrInfo = 0x07 , profinet::SrInfo = 0x08 ,
  profinet::ArFsu = 0x09 , profinet::IodControlRequest = 0x10 , profinet::IodControlResponse = 0x11 , profinet::ArResponse = 0x81 ,
  profinet::IocrResponse = 0x82 , profinet::AlarmCrResponse = 0x83 , profinet::ModuleDiffResponse = 0x84 , profinet::ArServerResponse = 0x85 ,
  profinet::PrmServer = 0x3D , profinet::CmCtl = 0x3E , profinet::CmDev = 0x3F , profinet::CmRpc = 0x40 ,
  profinet::FaultyRecord = 0xFD , profinet::FaultyAr = 0xFE , profinet::FaultyBlock = 0xFF
}
 PNIO-CM ErrorCode1 values. More...
 
enum class  profinet::PnioRwInvalidIndexErrorCode2 : std::uint8_t { profinet::IndexNotSupported = 0x00 , profinet::IndexNotWritten = 0x05 }
 PNIORW InvalidIndex ErrorCode2 values. More...
 
enum class  profinet::PnioRwWriteLengthErrorCode2 : std::uint8_t { profinet::WriteLengthError = 0x00 , profinet::DataTooShort = 0x01 , profinet::DataTooLong = 0x02 , profinet::WriteProtected = 0x03 }
 PNIORW WriteLength ErrorCode2 values. More...
 
enum class  profinet::PnioRwResourceErrorCode2 : std::uint8_t { profinet::ResourceNotAvailable = 0x00 , profinet::InvalidSlot = 0x07 , profinet::InvalidSubslot = 0x08 , profinet::ModuleHasNoData = 0x09 }
 PNIORW Resource ErrorCode2 values. More...
 
enum class  profinet::PnioRwAccessErrorCode2 : std::uint8_t {
  profinet::InvalidArea = 0x00 , profinet::AccessDenied = 0x03 , profinet::InvalidRange = 0x04 , profinet::InvalidState = 0x05 ,
  profinet::LocalControl = 0x06
}
 PNIORW Access ErrorCode2 values. More...
 
enum class  profinet::PnioRwApplicationErrorCode2 : std::uint8_t {
  profinet::ReadError = 0x00 , profinet::WriteError = 0x01 , profinet::ModuleFailure = 0x02 , profinet::ResourceBusy = 0x04 ,
  profinet::VersionConflict = 0x05 , profinet::InvalidApi = 0x06 , profinet::BackupNotAllowed = 0x07 , profinet::AlarmPending = 0x08
}
 PNIORW Application ErrorCode2 values. More...
 
enum class  profinet::PnioCmArErrorCode2 : std::uint8_t {
  profinet::InvalidArType = 0x00 , profinet::ArAlreadyActive = 0x01 , profinet::NoArResources = 0x02 , profinet::NoProviderResources = 0x03 ,
  profinet::NoConsumerResources = 0x04 , profinet::NoAlarmResources = 0x05 , profinet::NoMemory = 0x06 , profinet::InvalidSessionKey = 0x07 ,
  profinet::ArUuidConflict = 0x08
}
 PNIO-CM AR ErrorCode2 values. More...
 
enum class  profinet::PnioCmIocrErrorCode2 : std::uint8_t {
  profinet::InvalidIocrType = 0x00 , profinet::NoIocrResources = 0x01 , profinet::InvalidFrameId = 0x02 , profinet::InvalidRtClass = 0x03 ,
  profinet::InvalidIoDataLength = 0x04 , profinet::CycleTimeConflict = 0x05 , profinet::WatchdogConfigurationError = 0x06
}
 PNIO-CM IOCR ErrorCode2 values. More...
 
enum class  profinet::PnioCmAlarmCrErrorCode2 : std::uint8_t { profinet::InvalidAlarmCrType = 0x00 , profinet::NoAlarmCrResources = 0x01 }
 PNIO-CM Alarm CR ErrorCode2 values. More...
 
enum class  profinet::PnioCmExpectedSubmoduleErrorCode2 : std::uint8_t {
  profinet::InvalidSlot = 0x00 , profinet::InvalidSubslot = 0x01 , profinet::WrongModuleIdentNumber = 0x02 , profinet::WrongSubmoduleIdentNumber = 0x03 ,
  profinet::IoDataLengthMismatch = 0x04
}
 PNIO-CM Expected Submodule ErrorCode2 values. More...
 
enum class  profinet::PnioCmDeviceErrorCode2 : std::uint8_t { profinet::DeviceStateConflict = 0x00 , profinet::ConnectionResourceUnavailable = 0x01 , profinet::AlreadyOwned = 0x02 , profinet::ArSetAborted = 0x03 }
 PNIO-CM Device ErrorCode2 values. More...
 
enum class  profinet::PnioCmFaultyBlockErrorCode2 : std::uint8_t { profinet::FaultyBlockStructure = 0x00 }
 PNIO-CM Faulty Block ErrorCode2 values. More...
 
enum class  profinet::PnioErrorCode1 : std::uint8_t { profinet::Rmpm = 0x40 , profinet::PrmServer = 0x3D }
 PNIO ErrorCode1 values. More...
 
enum class  profinet::PnioRmpmErrorCode2 : std::uint8_t {
  profinet::InvalidArgumentsLength = 0x00 , profinet::UnknownBlocksInRequest = 0x01 , profinet::RequiredIocrBlockMissing = 0x02 , profinet::WrongAlarmCrBlockCount = 0x03 ,
  profinet::OutOfArResources = 0x04
}
 PNIO RMPM ErrorCode2 values. More...
 
enum class  profinet::PnioPrmServerErrorCode2 : std::uint8_t { profinet::StateConflict = 0x00 }
 PNIO Parameter Server ErrorCode2 values. More...
 

Functions

std::string profinet::GetErrorDecodeName (ErrorDecode errorDecodeName)
 Get the human-readable name for an ErrorDecode value.
 
std::string profinet::GetPnioRwErrorCode1Name (PnioRwErrorCode1 errorCodeRw1)
 Get the human-readable name for a PNIORW ErrorCode1.
 
std::string profinet::GetPnioCmErrorCode1Name (PnioCmErrorCode1 errorCodeCm1)
 Get the human-readable name for a PNIO-CM ErrorCode1.
 
std::string profinet::GetPnioRwErrorMessage (PnioRwInvalidIndexErrorCode2 errorCode2)
 Get the human-readable message for an InvalidIndex error.
 
std::string profinet::GetPnioRwErrorMessage (PnioRwWriteLengthErrorCode2 errorCode2)
 Get the human-readable message for a WriteLength error.
 
std::string profinet::GetPnioRwErrorMessage (PnioRwResourceErrorCode2 errorCode2)
 Get the human-readable message for a Resource error.
 
std::string profinet::GetPnioRwErrorMessage (PnioRwAccessErrorCode2 errorCode2)
 Get the human-readable message for an Access error.
 
std::string profinet::GetPnioRwErrorMessage (PnioRwApplicationErrorCode2 errorCode2)
 Get the human-readable message for an Application error.
 
std::string profinet::GetPnioCmErrorMessage (PnioCmArErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM AR error.
 
std::string profinet::GetPnioCmErrorMessage (PnioCmIocrErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM IOCR error.
 
std::string profinet::GetPnioCmErrorMessage (PnioCmAlarmCrErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Alarm CR error.
 
std::string profinet::GetPnioCmErrorMessage (PnioCmExpectedSubmoduleErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Expected Submodule error.
 
std::string profinet::GetPnioCmErrorMessage (PnioCmDeviceErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Device error.
 
std::string profinet::GetPnioCmErrorMessage (PnioCmFaultyBlockErrorCode2 errorCode2)
 Get the human-readable message for a PNIO-CM Faulty Block error.
 
std::string profinet::GetPnioErrorCode1Name (PnioErrorCode1 errorCode1)
 Get the human-readable name of a PNIO ErrorCode1.
 
std::string profinet::GetPnioErrorMessage (PnioRmpmErrorCode2 errorCode2)
 Get the human-readable message for an RMPM ErrorCode2.
 
std::string profinet::GetPnioErrorMessage (PnioPrmServerErrorCode2 errorCode2)
 Get the human-readable message for a Parameter Server ErrorCode2.
 
std::string profinet::GetPnioRwErrorMessage (PnioRwErrorCode1 errorCode1, std::uint8_t errorCode2)
 Decode a PNIO read/write error.
 

Detailed Description

Declares exceptions and error types used by the PROFINET IO controller stack.

Definition in file exceptions.h.