www.rkjava.de

de.rkjava.serial.rk512
Interface S5Model

All Superinterfaces:
de.rkjava.serial.util.S5Model
All Known Implementing Classes:
DefaultS5Model

public interface S5Model
extends de.rkjava.serial.util.S5Model

When DefaultS5Model is not complete for your whishes, you can implement this interface by your self

Author:
Gerd Limbeck, www.rkjava.de

Method Summary
 void addS5DataListener(S5DataListener listener)
          Adds a S5DataListener.
 int getAmmountWords()
          Returns the ammount of the datawords
 int getCpuNo()
          Returns the Cpu-Number
 int getDbNo()
          Returns the Number of the datablock
 int getFirstWordNo()
          Returns the Number of the first dataword in the datablock
 short[] getWords()
          Returns the datawords
 void removeS5DataListener(S5DataListener listener)
          Removes a S5DataListener
 void setNewStructure(int cpuNo, int dbNo, int firstWordNo, short[] data)
          Sets a new structure together with new datawords
Every registered S5DataListener will be informed via s5StructureChanged()
 void setWords(short[] data)
          Sets new datawords
Attention: It must be valid: data.length = getAmmountWords()
 
Methods inherited from interface de.rkjava.serial.util.S5Model
addS5DataListener, removeS5DataListener
 

Method Detail

addS5DataListener

public void addS5DataListener(S5DataListener listener)
Adds a S5DataListener. Every registered S5DataListener will be informed about all changes at the data of this Model.

Parameters:
listener - a S5DataListener

removeS5DataListener

public void removeS5DataListener(S5DataListener listener)
Removes a S5DataListener

Parameters:
listener - a S5DataListener

getCpuNo

public int getCpuNo()
Returns the Cpu-Number

Specified by:
getCpuNo in interface de.rkjava.serial.util.S5Model
Returns:
the Cpu-Number

getDbNo

public int getDbNo()
Returns the Number of the datablock

Specified by:
getDbNo in interface de.rkjava.serial.util.S5Model
Returns:
Number of the datablock

getFirstWordNo

public int getFirstWordNo()
Returns the Number of the first dataword in the datablock

Specified by:
getFirstWordNo in interface de.rkjava.serial.util.S5Model
Returns:
first dataword in the datablock

getAmmountWords

public int getAmmountWords()
Returns the ammount of the datawords

Specified by:
getAmmountWords in interface de.rkjava.serial.util.S5Model
Returns:
ammount of the datawords

getWords

public short[] getWords()
Returns the datawords

Specified by:
getWords in interface de.rkjava.serial.util.S5Model
Returns:
the datawords

setNewStructure

public void setNewStructure(int cpuNo,
                            int dbNo,
                            int firstWordNo,
                            short[] data)
Sets a new structure together with new datawords
Every registered S5DataListener will be informed via s5StructureChanged()

Specified by:
setNewStructure in interface de.rkjava.serial.util.S5Model
Parameters:
cpuNo - new CPU-No
dbNo - new Number of the datablock
firstWordNo - new Number of the first dataword
data - new datawords

setWords

public void setWords(short[] data)
Sets new datawords
Attention: It must be valid: data.length = getAmmountWords()

Specified by:
setWords in interface de.rkjava.serial.util.S5Model
Parameters:
data - new datawords

www.rkjava.de