java.lang.Object
io.qt.QtObject
io.qt.serialbus.QModbusPdu
io.qt.serialbus.QModbusResponse
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
- Direct Known Subclasses:
QModbusExceptionResponse
Container class containing the function code and payload that is stored inside a Modbus ADU
Java wrapper for Qt's class QModbusResponse
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Java wrapper for Qt function pointer FunctionPointerPrivate::fn<int,const QModbusResponse&>::typeNested classes/interfaces inherited from class io.qt.serialbus.QModbusPdu
QModbusPdu.ExceptionCode, QModbusPdu.FunctionCode
Nested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Field Summary
Fields inherited from class io.qt.serialbus.QModbusPdu
ExceptionByte
-
Constructor Summary
ModifierConstructorDescriptionOverloaded constructor forQModbusResponse(io.qt.serialbus.QModbusPdu.FunctionCode, io.qt.core.QByteArray)
withnewData = new io.qt.core.QByteArray()
.QModbusResponse
(QModbusPdu.FunctionCode code, QByteArray newData) protected
Constructor for internal use only. -
Method Summary
Modifier and TypeMethodDescriptionstatic int
clone()
boolean
Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical.int
hashCode()
static int
void
readFrom
(QDataStream stream) static void
void
writeTo
(QDataStream stream) Methods inherited from class io.qt.serialbus.QModbusPdu
assign, data, dataSize, decodeData, decodeData, decodeData, encodeData, encodeData, encodeData, exceptionCode, functionCode, isException, isValid, setData, setFunctionCode, size, toString
Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QModbusResponse
public QModbusResponse() -
QModbusResponse
Overloaded constructor for
QModbusResponse(io.qt.serialbus.QModbusPdu.FunctionCode, io.qt.core.QByteArray)
withnewData = new io.qt.core.QByteArray()
. -
QModbusResponse
-
QModbusResponse
-
QModbusResponse
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
writeTo
- Overrides:
writeTo
in classQModbusPdu
-
readFrom
-
calculateDataSize
-
minimumDataSize
-
registerDataSizeCalculator
public static void registerDataSizeCalculator(QModbusPdu.FunctionCode fc, QModbusResponse.CalcFunction func) -
equals
Description copied from class:QtObject
Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical. Qt value types override this method to make a value comparison. Otherwise it will return the result of calling the super class implementation.- Overrides:
equals
in classQModbusPdu
- Parameters:
other
- other object- Returns:
- true if the native counterpart of the two objects are one and the same.
-
hashCode
- Overrides:
hashCode
in classQModbusPdu
-
clone
- Overrides:
clone
in classQModbusPdu
-