|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.modbus.procimg.SimpleProcessImage
public class SimpleProcessImage
Class implementing a simple process image to be able to run unit tests or handle simple cases.
| Field Summary |
|---|
| Fields inherited from interface net.wimpi.modbus.procimg.ProcessImageImplementation |
|---|
DIG_FALSE, DIG_INVALID, DIG_TRUE |
| Constructor Summary | |
|---|---|
SimpleProcessImage()
Constructs a new SimpleProcessImage instance. |
|
| Method Summary | |
|---|---|
void |
addDigitalIn(DigitalIn di)
Adds a new DigitalIn instance. |
void |
addDigitalOut(DigitalOut _do)
Adds a new DigitalOut instance. |
void |
addInputRegister(InputRegister reg)
Adds a new InputRegister instance. |
void |
addRegister(Register reg)
Adds a new Register instance. |
DigitalIn |
getDigitalIn(int ref)
Returns the DigitalIn instance at the given reference. |
int |
getDigitalInCount()
Returns the number of DigitalIn instances in this ProcessImage. |
DigitalIn[] |
getDigitalInRange(int ref,
int count)
Returns a range of DigitalIn instances. |
DigitalOut |
getDigitalOut(int ref)
Returns the DigitalOut instance at the given reference. |
int |
getDigitalOutCount()
Returns the number of DigitalOut instances in this ProcessImage. |
DigitalOut[] |
getDigitalOutRange(int ref,
int count)
Returns a range of DigitalOut instances. |
InputRegister |
getInputRegister(int ref)
Returns the InputRegister instance at the given reference. |
int |
getInputRegisterCount()
Returns the number of InputRegister instances in this ProcessImage. |
InputRegister[] |
getInputRegisterRange(int ref,
int count)
Returns a range of InputRegister instances. |
Register |
getRegister(int ref)
Returns the Register instance at the given reference. |
int |
getRegisterCount()
Returns the number of Register instances in this ProcessImage. |
Register[] |
getRegisterRange(int ref,
int count)
Returns a range of Register instances. |
boolean |
isLocked()
|
void |
removeDigitalIn(DigitalIn di)
Removes a given DigitalIn instance. |
void |
removeDigitalOut(DigitalOut _do)
Removes a given DigitalOut instance. |
void |
removeInputRegister(InputRegister reg)
Removes a given InputRegister instance. |
void |
removeRegister(Register reg)
Removes a given Register instance. |
void |
setDigitalIn(int ref,
DigitalIn di)
Sets a new DigitalIn instance at the given reference. |
void |
setDigitalOut(int ref,
DigitalOut _do)
Sets a new DigitalOut instance at the given reference. |
void |
setInputRegister(int ref,
InputRegister reg)
Sets a new InputRegister instance at the given reference. |
void |
setLocked(boolean locked)
|
void |
setRegister(int ref,
Register reg)
Sets a new Register instance at the given reference. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleProcessImage()
| Method Detail |
|---|
public boolean isLocked()
public void setLocked(boolean locked)
public void addDigitalIn(DigitalIn di)
ProcessImageImplementation
addDigitalIn in interface ProcessImageImplementationdi - the DigitalIn instance to be
added.public void removeDigitalIn(DigitalIn di)
ProcessImageImplementation
removeDigitalIn in interface ProcessImageImplementationdi - the DigitalIn instance to be
removed.
public void setDigitalIn(int ref,
DigitalIn di)
throws IllegalAddressException
ProcessImageImplementation
setDigitalIn in interface ProcessImageImplementationref - the reference as int.di - the new DigitalIn instance to be
set.
IllegalAddressException - if the reference is invalid.
public DigitalIn getDigitalIn(int ref)
throws IllegalAddressException
ProcessImage
getDigitalIn in interface ProcessImageref - the reference.
IllegalAddressException - if the reference is invalid.public int getDigitalInCount()
ProcessImage
getDigitalInCount in interface ProcessImage
public DigitalIn[] getDigitalInRange(int ref,
int count)
ProcessImage
getDigitalInRange in interface ProcessImageref - the start offset.count - the amount of DigitalIn from the offset.
public void addDigitalOut(DigitalOut _do)
ProcessImageImplementation
addDigitalOut in interface ProcessImageImplementation_do - the DigitalOut instance to be
added.public void removeDigitalOut(DigitalOut _do)
ProcessImageImplementation
removeDigitalOut in interface ProcessImageImplementation_do - the DigitalOut instance to be
removed.
public void setDigitalOut(int ref,
DigitalOut _do)
throws IllegalAddressException
ProcessImageImplementation
setDigitalOut in interface ProcessImageImplementationref - the reference as int._do - the new DigitalOut instance to be
set.
IllegalAddressException - if the reference is invalid.
public DigitalOut getDigitalOut(int ref)
throws IllegalAddressException
ProcessImage
getDigitalOut in interface ProcessImageref - the reference.
IllegalAddressException - if the reference is invalid.public int getDigitalOutCount()
ProcessImage
getDigitalOutCount in interface ProcessImage
public DigitalOut[] getDigitalOutRange(int ref,
int count)
ProcessImage
getDigitalOutRange in interface ProcessImageref - the start offset.count - the amount of DigitalOut from the offset.
public void addInputRegister(InputRegister reg)
ProcessImageImplementation
addInputRegister in interface ProcessImageImplementationreg - the InputRegister instance to be
added.public void removeInputRegister(InputRegister reg)
ProcessImageImplementation
removeInputRegister in interface ProcessImageImplementationreg - the InputRegister instance to be
removed.
public void setInputRegister(int ref,
InputRegister reg)
throws IllegalAddressException
ProcessImageImplementation
setInputRegister in interface ProcessImageImplementationref - the reference as int.reg - the new InputRegister instance to be
set.
IllegalAddressException - if the reference is invalid.
public InputRegister getInputRegister(int ref)
throws IllegalAddressException
ProcessImage
getInputRegister in interface ProcessImageref - the reference.
IllegalAddressException - if the reference is invalid.public int getInputRegisterCount()
ProcessImage
getInputRegisterCount in interface ProcessImage
public InputRegister[] getInputRegisterRange(int ref,
int count)
ProcessImage
getInputRegisterRange in interface ProcessImageref - the start offset.count - the amount of InputRegister
from the offset.
public void addRegister(Register reg)
ProcessImageImplementation
addRegister in interface ProcessImageImplementationreg - the Register instance to be
added.public void removeRegister(Register reg)
ProcessImageImplementation
removeRegister in interface ProcessImageImplementationreg - the Register instance to be
removed.
public void setRegister(int ref,
Register reg)
throws IllegalAddressException
ProcessImageImplementation
setRegister in interface ProcessImageImplementationref - the reference as int.reg - the new Register instance to be
set.
IllegalAddressException - if the reference is invalid.
public Register getRegister(int ref)
throws IllegalAddressException
ProcessImage
getRegister in interface ProcessImageref - the reference.
IllegalAddressException - if the reference is invalid.public int getRegisterCount()
ProcessImage
getRegisterCount in interface ProcessImage
public Register[] getRegisterRange(int ref,
int count)
ProcessImage
getRegisterRange in interface ProcessImageref - the start offset.count - the amount of Register from the offset.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||