CuteHMI - Modbus (CuteHMI.Modbus.2)
cutehmi::modbus::RTUServer Class Reference

#include <cutehmi/modbus/RTUServer.hpp>

Inheritance diagram for cutehmi::modbus::RTUServer:
cutehmi::modbus::AbstractServer cutehmi::modbus::AbstractDevice QObject cutehmi::services::Serviceable CuteHMI::Modbus::RTUServer

Public Slots

void open () override
 
void close () override
 
- Public Slots inherited from cutehmi::modbus::AbstractDevice
virtual void open ()=0
 
virtual void close ()=0
 

Signals

void portChanged ()
 
void parityChanged ()
 
void baudRateChanged ()
 
void dataBitsChanged ()
 
void stopBitsChanged ()
 
void slaveAddressChanged ()
 
- Signals inherited from cutehmi::modbus::AbstractServer
void busyChanged ()
 
- Signals inherited from cutehmi::modbus::AbstractDevice
void errored (cutehmi::InplaceError error)
 
void stateChanged ()
 
void readyChanged ()
 
void maxReadCoilsChanged ()
 
void maxWriteCoilsChanged ()
 
void maxReadDiscreteInputsChanged ()
 
void maxWriteDiscreteInputsChanged ()
 
void maxReadHoldingRegistersChanged ()
 
void maxWriteHoldingRegistersChanged ()
 
void maxReadInputRegistersChanged ()
 
void maxWriteInputRegistersChanged ()
 
void maxRequestsChanged ()
 
void requestCompleted (QJsonObject request, QJsonObject reply)
 

Public Member Functions

 RTUServer (QObject *parent=nullptr)
 
 ~RTUServer () override
 
QString port () const
 
void setPort (const QString &port)
 
QSerialPort::Parity parity () const
 
void setParity (QSerialPort::Parity)
 
QSerialPort::BaudRate baudRate () const
 
void setBaudRate (QSerialPort::BaudRate baudRate)
 
QSerialPort::DataBits dataBits () const
 
void setDataBits (QSerialPort::DataBits dataBits)
 
QSerialPort::StopBits stopBits () const
 
void setStopBits (QSerialPort::StopBits stopBits)
 
int slaveAddress () const
 
void setSlaveAddress (int slaveAddress)
 
void setBusy (bool busy) override
 
- Public Member Functions inherited from cutehmi::modbus::AbstractServer
bool busy () const
 
std::unique_ptr< ServiceStatusesconfigureStarting (QState *starting) override
 
std::unique_ptr< ServiceStatusesconfigureStarted (QState *active, const QState *idling, const QState *yielding) override
 
std::unique_ptr< ServiceStatusesconfigureStopping (QState *stopping) override
 
std::unique_ptr< ServiceStatusesconfigureBroken (QState *broken) override
 
std::unique_ptr< ServiceStatusesconfigureRepairing (QState *repairing) override
 
std::unique_ptr< ServiceStatusesconfigureEvacuating (QState *evacuating) override
 
std::unique_ptr< QAbstractTransitiontransitionToStarted () const override
 
std::unique_ptr< QAbstractTransitiontransitionToStopped () const override
 
std::unique_ptr< QAbstractTransitiontransitionToBroken () const override
 
std::unique_ptr< QAbstractTransitiontransitionToYielding () const override
 
std::unique_ptr< QAbstractTransitiontransitionToIdling () const override
 
- Public Member Functions inherited from cutehmi::modbus::AbstractDevice
State state () const
 
bool ready () const
 Get readiness status. More...
 
int maxReadCoils () const
 
void setMaxReadCoils (int maxReadCoils)
 
int maxWriteCoils () const
 
void setMaxWriteCoils (int maxWriteCoils)
 
int maxReadDiscreteInputs () const
 
void setMaxReadDiscreteInputs (int maxReadDiscreteInputs)
 
int maxWriteDiscreteInputs () const
 
void setMaxWriteDiscreteInputs (int maxWriteDiscreteInputs)
 
int maxReadHoldingRegisters () const
 
void setMaxReadHoldingRegisters (int maxReadHoldingRegisters)
 
int maxWriteHoldingRegisters () const
 
void setMaxWriteHoldingRegisters (int maxWriteHoldingRegisters)
 
int maxReadInputRegisters () const
 
void setMaxReadInputRegisters (int maxReadInputRegisters)
 
int maxWriteInputRegisters () const
 
void setMaxWriteInputRegisters (int maxWriteInputRegisters)
 
int maxRequests () const
 
void setMaxRequests (int maxRequests)
 
CoilcoilAt (quint16 address)
 
DiscreteInputdiscreteInputAt (quint16 address)
 
HoldingRegisterholdingRegisterAt (quint16 address)
 
InputRegisterinputRegisterAt (quint16 address)
 
Q_INVOKABLE void requestReadCoils (quint16 address, quint16 amount=1, QUuid *requestId=nullptr)
 Read coils request. More...
 
Q_INVOKABLE void requestWriteCoil (quint16 address, bool value, QUuid *requestId=nullptr)
 Write coils request. More...
 
Q_INVOKABLE void requestWriteMultipleCoils (quint16 address, QJsonArray values, QUuid *requestId=nullptr)
 Write multiple coils request. More...
 
Q_INVOKABLE void requestReadDiscreteInputs (quint16 address, quint16 amount=1, QUuid *requestId=nullptr)
 Read discrete inputs request. More...
 
Q_INVOKABLE void requestWriteDiscreteInput (quint16 address, bool value, QUuid *requestId=nullptr)
 Write discrete input request. More...
 
Q_INVOKABLE void requestWriteMultipleDiscreteInputs (quint16 address, QJsonArray values, QUuid *requestId=nullptr)
 Write multiple discrete inputs request. More...
 
Q_INVOKABLE void requestReadHoldingRegisters (quint16 address, quint16 amount=1, QUuid *requestId=nullptr)
 Read holding registers request. More...
 
Q_INVOKABLE void requestWriteHoldingRegister (quint16 address, quint16 value, QUuid *requestId=nullptr)
 Write holding register request. More...
 
Q_INVOKABLE void requestWriteMultipleHoldingRegisters (quint16 address, QJsonArray values, QUuid *requestId=nullptr)
 Write multiple holding registers request. More...
 
Q_INVOKABLE void requestReadInputRegisters (quint16 address, quint16 amount=1, QUuid *requestId=nullptr)
 Read input registers request. More...
 
Q_INVOKABLE void requestWriteInputRegister (quint16 address, quint16 value, QUuid *requestId=nullptr)
 Write input register request. More...
 
Q_INVOKABLE void requestWriteMultipleInputRegisters (quint16 address, QJsonArray values, QUuid *requestId=nullptr)
 Write multiple input registers request. More...
 
Q_INVOKABLE void requestDiagnostics (DiagnosticsSubfunction subfunction, quint16 data, QUuid *requestId=nullptr)
 Diagonistics request. More...
 
Q_INVOKABLE void requestReadExceptionStatus (QUuid *requestId=nullptr)
 Report slave id request. More...
 
Q_INVOKABLE void requestFetchCommEventCounter (QUuid *requestId=nullptr)
 Report slave id request. More...
 
Q_INVOKABLE void requestFetchCommEventLog (QUuid *requestId=nullptr)
 Report slave id request. More...
 
Q_INVOKABLE void requestReportSlaveId (QUuid *requestId=nullptr)
 Report slave id request. More...
 
Q_INVOKABLE void requestMaskWriteHoldingRegister (quint16 address, quint16 andMask, quint16 orMask, QUuid *requestId=nullptr)
 Mask write holding register request. More...
 
Q_INVOKABLE void requestReadWriteMultipleHoldingRegisters (quint16 readAddress, quint16 amount, quint16 writeAddress, QJsonArray values, QUuid *requestId=nullptr)
 Read/write multiple holding registers request. More...
 
Q_INVOKABLE void requestReadFIFOQueue (quint16 address, QUuid *requestId=nullptr)
 Read FIFO queue request. More...
 
Q_INVOKABLE QJsonObject readFileRecordSubrequest (quint16 file, quint16 address, quint16 amount)
 Generate read file record subrequest. More...
 
Q_INVOKABLE void requestReadFileRecord (QJsonArray subrequests, QUuid *requestId=nullptr)
 Read file record request. More...
 
Q_INVOKABLE QJsonObject writeFileRecordSubrequest (quint16 file, quint16 address, QJsonArray values)
 Generate write file record subrequest. More...
 
Q_INVOKABLE void requestWriteFileRecord (QJsonArray subrequests, QUuid *requestId=nullptr)
 Write file record request. More...
 
Q_INVOKABLE void request (Function function, QJsonObject payload, QUuid *requestId=nullptr)
 Modbus function request. More...
 
- Public Member Functions inherited from QObject
virtual const QMetaObjectmetaObject () const const
 
virtual void * qt_metacast (const char *)
 
virtual int qt_metacall (QMetaObject::Call, int, void **)
 
 QObject (QObject *parent)
 
virtual ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
bool blockSignals (bool block)
 
QThreadthread () const const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
const QObjectList & children () const const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
void dumpObjectTree () const const
 
void dumpObjectInfo () const const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const const
 
QList< QByteArraydynamicPropertyNames () const const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
bool inherits (const char *className) const const
 
void deleteLater ()
 
- Public Member Functions inherited from cutehmi::services::Serviceable
 Serviceable ()=default
 

Static Public Attributes

static constexpr int MIN_SLAVE_ADDRESS = internal::RTUServerConfig::MIN_SLAVE_ADDRESS
 
static constexpr int MAX_SLAVE_ADDRESS = internal::RTUServerConfig::MAX_SLAVE_ADDRESS
 
static const char * INITIAL_PORT = internal::RTUServerConfig::INITIAL_PORT
 
static constexpr QSerialPort::Parity INITIAL_PARITY = internal::RTUServerConfig::INITIAL_PARITY
 
static constexpr QSerialPort::BaudRate INITIAL_BAUD_RATE = internal::RTUServerConfig::INITIAL_BAUD_RATE
 
static constexpr QSerialPort::DataBits INITIAL_DATA_BITS = internal::RTUServerConfig::INITIAL_DATA_BITS
 
static constexpr QSerialPort::StopBits INITIAL_STOP_BITS = internal::RTUServerConfig::INITIAL_STOP_BITS
 
static constexpr int INITIAL_SLAVE_ADDRESS = internal::RTUServerConfig::INITIAL_SLAVE_ADDRESS
 
static constexpr int INITIAL_COILS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_COILS_ADDRESS_RANGE_MIN
 
static constexpr int INITIAL_COILS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_COILS_ADDRESS_RANGE_MAX
 
static constexpr int INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MIN
 
static constexpr int INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX
 
static constexpr int INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN
 
static constexpr int INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MAX
 
static constexpr int INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN
 
static constexpr int INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX
 
- Static Public Attributes inherited from cutehmi::modbus::AbstractServer
static constexpr bool INITIAL_BUSY = false
 
- Static Public Attributes inherited from cutehmi::modbus::AbstractDevice
static constexpr quint16 MIN_ADDRESS = 0
 
static constexpr quint16 MAX_ADDRESS = 65535
 
static constexpr int INITIAL_MAX_READ_COILS = 16
 
static constexpr int INITIAL_MAX_WRITE_COILS = 16
 
static constexpr int INITIAL_MAX_READ_DISCRETE_INPUTS = 16
 
static constexpr int INITIAL_MAX_WRITE_DISCRETE_INPUTS = 16
 
static constexpr int INITIAL_MAX_READ_HOLDING_REGISTERS = 16
 
static constexpr int INITIAL_MAX_WRITE_HOLDING_REGISTERS = 16
 
static constexpr int INITIAL_MAX_READ_INPUT_REGISTERS = 16
 
static constexpr int INITIAL_MAX_WRITE_INPUT_REGISTERS = 16
 
static constexpr int INITIAL_MAX_REQUESTS = 1000
 
static constexpr State INITIAL_STATE = CLOSED
 
static constexpr bool INITIAL_READY = false
 
static constexpr int MAX_READ_TCP_COILS = 1976
 Maximal amount of coils that can be read at once through TCP. More...
 
static constexpr int MAX_READ_RTU_COILS = 2008
 Maximal amount of coils that can be read at once through RTU. More...
 
static constexpr int MAX_WRITE_TCP_COILS = 1944
 Maximal amount of coils that can be written at once through TCP. More...
 
static constexpr int MAX_WRITE_RTU_COILS = 1976
 Maximal amount of coils that can be written at once through RTU. More...
 
static constexpr int MAX_READ_TCP_DISCRETE_INPUTS = 1976
 Maximal amount of discrete inputs that can be read at once through TCP. More...
 
static constexpr int MAX_READ_RTU_DISCRETE_INPUTS = 2008
 Maximal amount of discrete inputs that can be read at once through RTU. More...
 
static constexpr int MAX_READ_TCP_HOLDING_REGISTERS = 123
 Maximal amount of holding registers that can be read at once through TCP. More...
 
static constexpr int MAX_READ_RTU_HOLDING_REGISTERS = 125
 Maximal amount of holding registers that can be read at once through RTU. More...
 
static constexpr int MAX_WRITE_TCP_HOLDING_REGISTERS = 123
 Maximal amount of holding registers that can be written at once through TCP. More...
 
static constexpr int MAX_WRITE_RTU_HOLDING_REGISTERS = 125
 Maximal amount of holding registers that can be written at once through RTU. More...
 
static constexpr int MAX_READ_TCP_INPUT_REGISTERS = 123
 Maximal amount of input registers that can be read at once through TCP. More...
 
static constexpr int MAX_READ_RTU_INPUT_REGISTERS = 125
 Maximal amount of input registers that can be read at once through RTU. More...
 

Properties

QString port
 
QSerialPort::Parity parity
 
QSerialPort::BaudRate baudRate
 
QSerialPort::DataBits dataBits
 
QSerialPort::StopBits stopBits
 
int slaveAddress
 
- Properties inherited from cutehmi::modbus::AbstractServer
bool busy
 
- Properties inherited from cutehmi::modbus::AbstractDevice
State state
 
bool ready
 
int maxReadCoils
 
int maxWriteCoils
 
int maxReadDiscreteInputs
 
int maxWriteDiscreteInputs
 
int maxReadHoldingRegisters
 
int maxWriteHoldingRegisters
 
int maxReadInputRegisters
 
int maxWriteInputRegisters
 
int maxRequests
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Types inherited from cutehmi::modbus::AbstractDevice
enum  State { OPENING, OPENED, CLOSING, CLOSED }
 
enum  Function {
  FUNCTION_INVALID = QModbusPdu::Invalid, FUNCTION_READ_COILS = QModbusPdu::ReadCoils, FUNCTION_READ_DISCRETE_INPUTS = QModbusPdu::ReadDiscreteInputs, FUNCTION_READ_HOLDING_REGISTERS = QModbusPdu::ReadHoldingRegisters,
  FUNCTION_READ_INPUT_REGISTERS = QModbusPdu::ReadInputRegisters, FUNCTION_WRITE_COIL = QModbusPdu::WriteSingleCoil, FUNCTION_WRITE_HOLDING_REGISTER = QModbusPdu::WriteSingleRegister, FUNCTION_READ_EXCEPTION_STATUS = QModbusPdu::ReadExceptionStatus,
  FUNCTION_DIAGNOSTICS = QModbusPdu::Diagnostics, FUNCTION_FETCH_COMM_EVENT_COUNTER = QModbusPdu::GetCommEventCounter, FUNCTION_FETCH_COMM_EVENT_LOG = QModbusPdu::GetCommEventLog, FUNCTION_WRITE_MULTIPLE_COILS = QModbusPdu::WriteMultipleCoils,
  FUNCTION_WRITE_MULTIPLE_HOLDING_REGISTERS = QModbusPdu::WriteMultipleRegisters, FUNCTION_REPORT_SLAVE_ID = QModbusPdu::ReportServerId, FUNCTION_READ_FILE_RECORD = QModbusPdu::ReadFileRecord, FUNCTION_WRITE_FILE_RECORD = QModbusPdu::WriteFileRecord,
  FUNCTION_MASK_WRITE_HOLDING_REGISTER = QModbusPdu::MaskWriteRegister, FUNCTION_READ_WRITE_MULTIPLE_HOLDING_REGISTERS = QModbusPdu::ReadWriteMultipleRegisters, FUNCTION_READ_FIFO_QUEUE = QModbusPdu::ReadFifoQueue, FUNCTION_UNDEFINED = QModbusPdu::UndefinedFunctionCode,
  FUNCTION_WRITE_DISCRETE_INPUT, FUNCTION_WRITE_MULTIPLE_DISCRETE_INPUTS, FUNCTION_WRITE_INPUT_REGISTER, FUNCTION_WRITE_MULTIPLE_INPUT_REGISTERS,
  FUNCTION_RAW
}
 
enum  DiagnosticsSubfunction : quint16 {
  DIAGNOSTICS_RETURN_QUERY_DATA = 0x00, DIAGNOSTICS_RESTART_COMM_OPTION = 0x01, DIAGNOSTICS_RETURN_DIAGNOSTICS_REGISTER = 0x02, DIAGNOSTICS_CHANGE_ASCII_INPUT_DELIMITER = 0x03,
  DIAGNOSTICS_FORCE_LISTEN_ONLY_MODE = 0x04, DIAGNOSTICS_CLEAR_COUNTERS_AND_DIAGNOSTICS_REGISTER = 0x0A, DIAGNOSTICS_RETURN_BUS_MESSAGE_COUNT = 0x0B, DIAGNOSTICS_RETURN_BUS_COMM_ERROR_COUNT = 0x0C,
  DIAGNOSTICS_RETURN_BUS_EXCEPTION_ERROR_COUNT = 0x0D, DIAGNOSTICS_RETURN_SLAVE_MESSAGE_COUNT = 0x0E, DIAGNOSTICS_RETURN_SLAVE_NO_RESPONSE_COUNT = 0x0F, DIAGNOSTICS_RETURN_SLAVE_NAK_COUNT = 0x10,
  DIAGNOSTICS_RETURN_SLAVE_BUSY_COUNT = 0x11, DIAGNOSTICS_RETURN_BUS_CHARACTER_OVERRUN_COUNT = 0x12, DIAGNOSTICS_RETURN_IOP_OVERRUN_COUNT = 0x13, DIAGNOSTICS_CLEAR_OVERRUN_COUNTER_AND_FLAG = 0x14,
  DIAGNOSTICS_GET_CLEAR_MODBUS_PLUS_STATISTICS = 0x15
}
 
- Public Types inherited from cutehmi::services::Serviceable
typedef QHash< QState *, QStringServiceStatuses
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Protected Types inherited from cutehmi::modbus::AbstractDevice
typedef internal::RegisterTraits< internal::Coil >::Container CoilDataContainer
 
typedef internal::RegisterTraits< internal::DiscreteInput >::Container DiscreteInputDataContainer
 
typedef internal::RegisterTraits< internal::HoldingRegister >::Container HoldingRegisterDataContainer
 
typedef internal::RegisterTraits< internal::InputRegister >::Container InputRegisterDataContainer
 
- Protected Slots inherited from cutehmi::modbus::AbstractServer
virtual void handleCoilsWritten (quint16 address, quint16 amount)
 
virtual void handleDiscreteInputsWritten (quint16 address, quint16 amount)
 
virtual void handleHoldingRegistersWritten (quint16 address, quint16 amount)
 
virtual void handleInputRegistersWritten (quint16 address, quint16 amount)
 
void updateBusy (bool busy)
 
- Protected Slots inherited from cutehmi::modbus::AbstractDevice
virtual void handleReply (QUuid requestId, QJsonObject reply)
 Reply handler. More...
 
void setState (State state)
 
void setReady (bool ready)
 
void handleError (cutehmi::InplaceError error)
 
- Protected Member Functions inherited from cutehmi::modbus::AbstractServer
 AbstractServer (QObject *parent=nullptr)
 
void handleRequest (const QJsonObject &request) override
 Handle request. More...
 
- Protected Member Functions inherited from cutehmi::modbus::AbstractDevice
 AbstractDevice (QObject *parent=nullptr)
 
 ~AbstractDevice () override
 Destructor. More...
 
const CoilDataContainercoilData () const
 
CoilDataContainercoilData ()
 
const DiscreteInputDataContainerdiscreteInputData () const
 
DiscreteInputDataContainerdiscreteInputData ()
 
const HoldingRegisterDataContainerholdingRegisterData () const
 
HoldingRegisterDataContainerholdingRegisterData ()
 
const InputRegisterDataContainerinputRegisterData () const
 
InputRegisterDataContainerinputRegisterData ()
 
QJsonObject pendingRequest (QUuid requestId) const
 
QJsonObject takePendingRequest (QUuid requestId)
 
void stopped ()
 
void started ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const const
 
int senderSignalIndex () const const
 
int receivers (const char *signal) const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Protected Member Functions inherited from cutehmi::services::Serviceable
virtual ~Serviceable ()=default
 
 Serviceable (const Serviceable &other)=default
 
Serviceableoperator= (const Serviceable &other)=default
 
- Protected Attributes inherited from cutehmi::modbus::AbstractServer
CUTEHMI_PROTECTED_SIGNALS __pad0__: void requestReceived(QJsonObject request)
 
- Protected Attributes inherited from cutehmi::modbus::AbstractDevice
CUTEHMI_PROTECTED_SIGNALS __pad0__: void broke()
 

Constructor & Destructor Documentation

◆ RTUServer()

cutehmi::modbus::RTUServer::RTUServer ( QObject parent = nullptr)

◆ ~RTUServer()

cutehmi::modbus::RTUServer::~RTUServer ( )
override

Member Function Documentation

◆ baudRate()

QSerialPort::BaudRate cutehmi::modbus::RTUServer::baudRate ( ) const

◆ baudRateChanged

void cutehmi::modbus::RTUServer::baudRateChanged ( )
signal

◆ close

void cutehmi::modbus::RTUServer::close ( )
overrideslot

◆ dataBits()

QSerialPort::DataBits cutehmi::modbus::RTUServer::dataBits ( ) const

◆ dataBitsChanged

void cutehmi::modbus::RTUServer::dataBitsChanged ( )
signal

◆ open

void cutehmi::modbus::RTUServer::open ( )
overrideslot

◆ parity()

QSerialPort::Parity cutehmi::modbus::RTUServer::parity ( ) const

◆ parityChanged

void cutehmi::modbus::RTUServer::parityChanged ( )
signal

◆ port()

QString cutehmi::modbus::RTUServer::port ( ) const

◆ portChanged

void cutehmi::modbus::RTUServer::portChanged ( )
signal

◆ setBaudRate()

void cutehmi::modbus::RTUServer::setBaudRate ( QSerialPort::BaudRate  baudRate)

◆ setBusy()

void cutehmi::modbus::RTUServer::setBusy ( bool  busy)
overridevirtual

◆ setDataBits()

void cutehmi::modbus::RTUServer::setDataBits ( QSerialPort::DataBits  dataBits)

◆ setParity()

void cutehmi::modbus::RTUServer::setParity ( QSerialPort::Parity  parity)

◆ setPort()

void cutehmi::modbus::RTUServer::setPort ( const QString port)

◆ setSlaveAddress()

void cutehmi::modbus::RTUServer::setSlaveAddress ( int  slaveAddress)

◆ setStopBits()

void cutehmi::modbus::RTUServer::setStopBits ( QSerialPort::StopBits  stopBits)

◆ slaveAddress()

int cutehmi::modbus::RTUServer::slaveAddress ( ) const

◆ slaveAddressChanged

void cutehmi::modbus::RTUServer::slaveAddressChanged ( )
signal

◆ stopBits()

QSerialPort::StopBits cutehmi::modbus::RTUServer::stopBits ( ) const

◆ stopBitsChanged

void cutehmi::modbus::RTUServer::stopBitsChanged ( )
signal

Member Data Documentation

◆ INITIAL_BAUD_RATE

constexpr QSerialPort::BaudRate cutehmi::modbus::RTUServer::INITIAL_BAUD_RATE = internal::RTUServerConfig::INITIAL_BAUD_RATE
staticconstexpr

◆ INITIAL_COILS_ADDRESS_RANGE_MAX

constexpr int cutehmi::modbus::RTUServer::INITIAL_COILS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_COILS_ADDRESS_RANGE_MAX
staticconstexpr

◆ INITIAL_COILS_ADDRESS_RANGE_MIN

constexpr int cutehmi::modbus::RTUServer::INITIAL_COILS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_COILS_ADDRESS_RANGE_MIN
staticconstexpr

◆ INITIAL_DATA_BITS

constexpr QSerialPort::DataBits cutehmi::modbus::RTUServer::INITIAL_DATA_BITS = internal::RTUServerConfig::INITIAL_DATA_BITS
staticconstexpr

◆ INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX

constexpr int cutehmi::modbus::RTUServer::INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MAX
staticconstexpr

◆ INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MIN

constexpr int cutehmi::modbus::RTUServer::INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_DISCRETE_INPUTS_ADDRESS_RANGE_MIN
staticconstexpr

◆ INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MAX

constexpr int cutehmi::modbus::RTUServer::INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MAX
staticconstexpr

◆ INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN

constexpr int cutehmi::modbus::RTUServer::INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_HOLDING_REGISTERS_ADDRESS_RANGE_MIN
staticconstexpr

◆ INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX

constexpr int cutehmi::modbus::RTUServer::INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX = internal::RTUServerConfig::INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MAX
staticconstexpr

◆ INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN

constexpr int cutehmi::modbus::RTUServer::INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN = internal::RTUServerConfig::INITIAL_INPUT_REGISTERS_ADDRESS_RANGE_MIN
staticconstexpr

◆ INITIAL_PARITY

constexpr QSerialPort::Parity cutehmi::modbus::RTUServer::INITIAL_PARITY = internal::RTUServerConfig::INITIAL_PARITY
staticconstexpr

◆ INITIAL_PORT

const char * cutehmi::modbus::RTUServer::INITIAL_PORT = internal::RTUServerConfig::INITIAL_PORT
static

◆ INITIAL_SLAVE_ADDRESS

constexpr int cutehmi::modbus::RTUServer::INITIAL_SLAVE_ADDRESS = internal::RTUServerConfig::INITIAL_SLAVE_ADDRESS
staticconstexpr

◆ INITIAL_STOP_BITS

constexpr QSerialPort::StopBits cutehmi::modbus::RTUServer::INITIAL_STOP_BITS = internal::RTUServerConfig::INITIAL_STOP_BITS
staticconstexpr

◆ MAX_SLAVE_ADDRESS

constexpr int cutehmi::modbus::RTUServer::MAX_SLAVE_ADDRESS = internal::RTUServerConfig::MAX_SLAVE_ADDRESS
staticconstexpr

◆ MIN_SLAVE_ADDRESS

constexpr int cutehmi::modbus::RTUServer::MIN_SLAVE_ADDRESS = internal::RTUServerConfig::MIN_SLAVE_ADDRESS
staticconstexpr

Property Documentation

◆ baudRate

QSerialPort::BaudRate cutehmi::modbus::RTUServer::baudRate
readwrite

◆ dataBits

QSerialPort::DataBits cutehmi::modbus::RTUServer::dataBits
readwrite

◆ parity

QSerialPort::Parity cutehmi::modbus::RTUServer::parity
readwrite

◆ port

QString cutehmi::modbus::RTUServer::port
readwrite

◆ slaveAddress

int cutehmi::modbus::RTUServer::slaveAddress
readwrite

◆ stopBits

QSerialPort::StopBits cutehmi::modbus::RTUServer::stopBits
readwrite