Class ModbusWriteRequestBlueprint
java.lang.Object
org.openhab.core.io.transport.modbus.ModbusWriteRequestBlueprint
- Direct Known Subclasses:
ModbusWriteCoilRequestBlueprint,ModbusWriteRegisterRequestBlueprint
Base interface for Modbus write requests
- Author:
- Sami Salonen - Initial contribution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaccept(ModbusWriteRequestBlueprintVisitor visitor) Accept visitorabstract ModbusWriteFunctionCodeReturns the function code of this ModbusMessage as int.
The function code is a 1-byte non negative integer value valid in the range of 0-127.
Function codes are ordered in conformance classes their values are specified in net.wimpi.modbus.Modbus.abstract intGet maximum number of tries, in case errors occur.intReturns the protocol identifier of this ModbusMessage as int.
The identifier is a 2-byte (short) non negative integer value valid in the range of 0-65535.abstract intReturns the reference of the register/coil/discrete input to to start writing with this requestabstract intReturns the unit identifier of this ModbusMessage as int.
The identifier is a 1-byte non negative integer value valid in the range of 0-255.
-
Constructor Details
-
ModbusWriteRequestBlueprint
public ModbusWriteRequestBlueprint()
-
-
Method Details
-
getProtocolID
public int getProtocolID()Returns the protocol identifier of this ModbusMessage as int.
The identifier is a 2-byte (short) non negative integer value valid in the range of 0-65535.- Returns:
- the protocol identifier as int.
-
getReference
public abstract int getReference()Returns the reference of the register/coil/discrete input to to start writing with this request- Returns:
- the reference of the register to start reading from as int.
-
getUnitID
public abstract int getUnitID()Returns the unit identifier of this ModbusMessage as int.
The identifier is a 1-byte non negative integer value valid in the range of 0-255.- Returns:
- the unit identifier as int.
-
getFunctionCode
Returns the function code of this ModbusMessage as int.
The function code is a 1-byte non negative integer value valid in the range of 0-127.
Function codes are ordered in conformance classes their values are specified in net.wimpi.modbus.Modbus.- Returns:
- the function code as int.
- See Also:
-
getMaxTries
public abstract int getMaxTries()Get maximum number of tries, in case errors occur. Should be at least 1. -
accept
Accept visitor- Parameters:
visitor-
-