java.lang.Object
io.qt.internal.QtJambiObject
io.qt.QtObject
io.qt.serialbus.QModbusPdu
io.qt.serialbus.QModbusResponse
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
- Direct Known Subclasses:
QModbusExceptionResponse
public class QModbusResponse extends QModbusPdu implements Cloneable
Container class containing the function code and payload that is stored inside a Modbus ADU
Java wrapper for Qt class QModbusResponse
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.serialbus.QModbusPdu
QModbusPdu.ExceptionCode, QModbusPdu.FunctionCode
-
Constructor Summary
Constructors Modifier Constructor Description QModbusResponse()
protected
QModbusResponse(QtObject.QPrivateConstructor p)
Constructor for internal use only.QModbusResponse(QModbusPdu pdu)
QModbusResponse(QModbusPdu.FunctionCode code)
Overloaded constructor forQModbusResponse(io.qt.serialbus.QModbusPdu.FunctionCode, io.qt.core.QByteArray)
withnewData = new io.qt.core.QByteArray()
.QModbusResponse(QModbusPdu.FunctionCode code, QByteArray newData)
-
Method Summary
Modifier and Type Method Description static int
calculateDataSize(QModbusResponse pdu)
QModbusResponse
clone()
static int
minimumDataSize(QModbusResponse pdu)
void
readFrom(QDataStream stream)
static void
registerDataSizeCalculator(QModbusPdu.FunctionCode fc, QModbusResponseCalculatorFunction func)
void
writeTo(QDataStream stream)
Methods inherited from class io.qt.serialbus.QModbusPdu
data, dataSize, decodeData, decodeData, decodeData, encodeData, encodeData, encodeData, ExceptionByte, exceptionCode, functionCode, isException, isValid, setData, setFunctionCode, size, toString
-
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, QModbusResponseCalculatorFunction func) -
clone
- Overrides:
clone
in classQModbusPdu
-