jamod at SF

net.wimpi.modbus.msg
Interface ModbusMessage

All Superinterfaces:
Transportable
All Known Implementing Classes:
ModbusMessageImpl

public interface ModbusMessage
extends Transportable

Interface defining a ModbusMessage.

Version:
1.2rc1 (09/11/2004)
Author:
Dieter Wimberger

Method Summary
 int getDataLength()
          Returns the length of the data appended after the protocol header.
 int getFunctionCode()
          Returns the function code of this ModbusMessage as int.
 java.lang.String getHexMessage()
          Returns the raw message as String containing a hexadecimal series of bytes.
 int getProtocolID()
          Returns the protocol identifier of this ModbusMessage as int.
 int getTransactionID()
          Returns the transaction identifier of this ModbusMessage as int.
 int getUnitID()
          Returns the unit identifier of this ModbusMessage as int.
 void setHeadless()
          Sets the flag that marks this ModbusMessage as headless (for serial transport).
 
Methods inherited from interface net.wimpi.modbus.io.Transportable
getOutputLength, readFrom, writeTo
 

Method Detail

setHeadless

public void setHeadless()
Sets the flag that marks this ModbusMessage as headless (for serial transport).


getTransactionID

public int getTransactionID()
Returns the transaction 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 transaction identifier as int.

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.

getDataLength

public int getDataLength()
Returns the length of the data appended after the protocol header.

Returns:
the data length as int.

getUnitID

public 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

public 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:
Modbus

getHexMessage

public java.lang.String getHexMessage()
Returns the raw message as String containing a hexadecimal series of bytes.
This method is specially for debugging purposes, allowing to log the communication in a manner used in the specification document.

Returns:
the raw message as String containing a hexadecimal series of bytes.

jamod at SF

Copyright © 2002-2004 jamod development team.