net.wimpi.modbus.procimg
Class SimpleDigitalIn

java.lang.Object
  extended by net.wimpi.modbus.procimg.SimpleDigitalIn
All Implemented Interfaces:
DigitalIn

public class SimpleDigitalIn
extends Object
implements DigitalIn

Class implementing a simple DigitalIn.

The set method is synchronized, which ensures atomic access, but no specific access order.

Version:
@version@ (@date@)
Author:
Dieter Wimberger

Constructor Summary
SimpleDigitalIn()
          Constructs a new SimpleDigitalIn instance.
SimpleDigitalIn(boolean b)
          Constructs a new SimpleDigitalIn instance with a given valid state.
 
Method Summary
 boolean isSet()
          Tests if this DigitalIn is set.
 void set(boolean b)
          Sets the state of this SimpleDigitalIn.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDigitalIn

public SimpleDigitalIn()
Constructs a new SimpleDigitalIn instance.


SimpleDigitalIn

public SimpleDigitalIn(boolean b)
Constructs a new SimpleDigitalIn instance with a given valid state.

Parameters:
b - true if to be set, false otherwise.
Method Detail

isSet

public boolean isSet()
Description copied from interface: DigitalIn
Tests if this DigitalIn is set.

Specified by:
isSet in interface DigitalIn
Returns:
true if set, false otherwise.

set

public void set(boolean b)
Sets the state of this SimpleDigitalIn. This method should only be used from master/device side.

Parameters:
b - true if to be set, false otherwise.


Copyright © 2010. All Rights Reserved.