|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.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.
| Field Summary | |
|---|---|
private static ModbusCoupler |
c_Self
|
private boolean |
m_Master
|
private ProcessImageFactory |
m_PIFactory
|
private ProcessImage |
m_ProcessImage
|
private int |
m_UnitID
|
| Constructor Summary | |
|---|---|
private |
ModbusCoupler()
|
private |
ModbusCoupler(ProcessImage procimg)
Private constructor to prevent multiple instantiation. |
| 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static ModbusCoupler c_Self
private ProcessImage m_ProcessImage
private int m_UnitID
private boolean m_Master
private ProcessImageFactory m_PIFactory
| Constructor Detail |
|---|
private ModbusCoupler()
private ModbusCoupler(ProcessImage procimg)
procimg - a ProcessImage.| 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 | ||||||||