| 
jamod at SF | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.modbus.msg.ModbusMessageImpl
net.wimpi.modbus.msg.ModbusRequest
net.wimpi.modbus.msg.ReadInputDiscretesRequest
Class implementing a ReadInputDiscretesRequest. The implementation directly correlates with the class 1 function read input discretes (FC 2). It encapsulates the corresponding request message.
Input Discretes are understood as bits that cannot be manipulated (i.e. set or unset).
| Constructor Summary | |
ReadInputDiscretesRequest()
Constructs a new ReadInputDiscretesRequest instance.  | 
|
ReadInputDiscretesRequest(int ref,
                          int count)
Constructs a new ReadInputDiscretesRequest instance with a given reference and count of input discretes (i.e. bits) to be read.  | 
|
| Method Summary | |
 ModbusResponse | 
createResponse()
Returns the ModbusResponse that represents the answer to this ModbusRequest.  | 
 int | 
getBitCount()
Returns the number of bits (i.e. input discretes) to be read with this ReadInputDiscretesRequest.  | 
 int | 
getReference()
Returns the reference of the register to to start reading from with this ReadInputDiscretesRequest.  | 
 void | 
readData(java.io.DataInput din)
Reads the subclass specific data from the given DataInput instance.  | 
 void | 
setBitCount(int count)
Sets the number of bits (i.e. input discretes) to be read with this ReadInputDiscretesRequest.  | 
 void | 
setReference(int ref)
Sets the reference of the register to start reading from with this ReadInputDiscretesRequest.  | 
 void | 
writeData(java.io.DataOutput dout)
Writes the subclass specific data to the given DataOutput.  | 
| Methods inherited from class net.wimpi.modbus.msg.ModbusRequest | 
createExceptionResponse, createModbusRequest | 
| Methods inherited from class net.wimpi.modbus.msg.ModbusMessageImpl | 
getDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readFrom, setDataLength, setFunctionCode, setHeadless, setHeadless, setProtocolID, setTransactionID, setUnitID, writeTo | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ReadInputDiscretesRequest()
public ReadInputDiscretesRequest(int ref,
                                 int count)
ref - the reference number of the register
        to read from.count - the number of bits to be read.| Method Detail | 
public ModbusResponse createResponse()
ModbusRequestThe implementation should take care about assembling the reply to this ModbusRequest.
createResponse in class ModbusRequestpublic void setReference(int ref)
ref - the reference of the register
        to start reading from.public int getReference()
public void setBitCount(int count)
count - the number of bits to be read.public int getBitCount()
public void writeData(java.io.DataOutput dout)
               throws java.io.IOException
ModbusMessageImpl
writeData in class ModbusMessageImpldout - the DataOutput to be written to.
java.io.IOException - if an I/O related error occurs.
public void readData(java.io.DataInput din)
              throws java.io.IOException
ModbusMessageImpl
readData in class ModbusMessageImpldin - the DataInput to read from.
java.io.IOException - if an I/O related error occurs.
  | 
jamod at SF | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||