net.wimpi.modbus.io.Transportable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jamod Show documentation
Show all versions of jamod Show documentation
jamod is an object oriented implementation of the Modbus protocol, realized 100% in Java. It allows to quickly
realize master and slave applications in various transport flavors (IP and serial).
The newest version!
package net.wimpi.modbus.io;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
/**
* Interface defining a transportable class.
*
* @author Dieter Wimberger
* @version 1.2 (@date@)
*/
public interface Transportable {
/**
* Returns the number of bytes that will
* be written by {@link #writeTo(DataOutput)}.
*
* @return the number of bytes that will be written as int.
*/
public int getOutputLength();
/**
* Writes this Transportable to the
* given DataOutput.
*
* @param dout the DataOutput to write to.
* @throws java.io.IOException if an I/O error occurs.
*/
public void writeTo(DataOutput dout)
throws IOException;
/**
* Reads this Transportable from the given
* DataInput.
*
* @param din the DataInput to read from.
* @throws java.io.IOException if an I/O error occurs or the data
* is invalid.
*/
public void readFrom(DataInput din)
throws IOException;
}//interface Transportable