|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wimpi.modbus.ModbusCoupler
public class ModbusCoupler
Class implemented following a Singleton pattern, to couple the slave side with a master side or with a device.
At the moment it only provides a reference to the OO model of the process image.
Method Summary | |
---|---|
ProcessImage |
getProcessImage()
Returns a reference to the ProcessImage of this ModbusCoupler. |
ProcessImageFactory |
getProcessImageFactory()
Returns the actual ProcessImageFactory instance. |
static ModbusCoupler |
getReference()
Returns a reference to the singleton instance. |
int |
getUnitID()
Returns the identifier of this unit. |
boolean |
isMaster()
Tests if this instance is a master device. |
boolean |
isSlave()
Tests if this instance is not a master device. |
void |
setMaster(boolean master)
Sets this instance to be or not to be a master device. |
void |
setProcessImage(ProcessImage procimg)
Sets the reference to the ProcessImage of this ModbusCoupler. |
void |
setProcessImageFactory(ProcessImageFactory factory)
Sets the ProcessImageFactory instance. |
void |
setUnitID(int id)
Sets the identifier of this unit, which is needed to be determined in a serial network. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ProcessImageFactory getProcessImageFactory()
public void setProcessImageFactory(ProcessImageFactory factory)
factory
- the instance to be used for creating process
image instances.public ProcessImage getProcessImage()
public void setProcessImage(ProcessImage procimg)
procimg
- the ProcessImage to be set.public int getUnitID()
public void setUnitID(int id)
id
- the new unit identifier as int.public boolean isMaster()
public boolean isSlave()
public void setMaster(boolean master)
master
- true if master device, false otherwise.public static final ModbusCoupler getReference()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |