IoT::Modbus

class ModbusException

File Information

Library: IoT/Modbus
Package: ModbusCore
Header: IoT/Modbus/ModbusException.h

Description

An exception class for Modbus exceptions.

Inheritance

Direct Base Classes: Poco::IOException

All Base Classes: Poco::Exception, Poco::IOException, Poco::RuntimeException, std::exception

Member Summary

Member Functions: className, clone, exceptionCode, formatExceptionCode, formatFunctionCode, functionCode, name, operator =, rethrow

Inherited Functions: className, clone, code, displayText, extendedMessage, message, name, nested, operator =, rethrow, what

Constructors

ModbusException

ModbusException(
    const ModbusException & exc
);

Creates a new ModbusException from another one.

ModbusException

ModbusException(
    Poco::UInt8 functionCode,
    Poco::UInt8 exceptionCode
);

Create ModbusException.

Destructor

~ModbusException

~ModbusException();

Destroy the exception.

Member Functions

className virtual

const char * className() const;

Returns the name of the exception class.

clone

Poco::Exception * clone() const;

Creates an exact copy of the exception.

exceptionCode

Poco::UInt8 exceptionCode() const;

Returns the Modbus exception code (same as code()).

formatExceptionCode static

static std::string formatExceptionCode(
    Poco::UInt8 exceptionCode
);

Returns a string representation of the given exception code.

formatFunctionCode static

static std::string formatFunctionCode(
    Poco::UInt8 functionCode
);

Returns a string representation of the given function code.

functionCode

Poco::UInt8 functionCode() const;

Returns the Modbus function code.

name virtual

const char * name() const;

Returns a static string describing the exception.

operator =

ModbusException & operator = (
    const ModbusException & exc
);

Assignment operator.

rethrow virtual

void rethrow() const;

(Re)Throws the exception.

Securely control IoT edge devices from anywhere   Connect a Device