public void readData(DataInput din) throws IOException {
  din.readShort();
  count=din.readUnsignedShort();
  registers=new InputRegister[count];
  for (int i=0; i < count; i++) {
    registers[i]=new SimpleInputRegister(din.readShort());
  }
}

public void readData ( DataInput din ) throws IOException { din . readShort ( ) ; count = din . readUnsignedShort ( ) ; registers = new InputRegister [ count ] ; for ( int i = 0 ; i < count ; i ++ ) { registers [ i ] = new SimpleInputRegister ( din . readShort ( ) ) ; } }
readdata - - input the modbus message from din . if there was a header , such as for modbus / tcp , it will have been read already .
