net.wimpi.modbus.procimg
Class SimpleDigitalOut

java.lang.Object
  extended by net.wimpi.modbus.procimg.SimpleDigitalOut
All Implemented Interfaces:
DigitalOut

public class SimpleDigitalOut
extends Object
implements DigitalOut

Class implementing a simple DigitalOut.

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

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

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

Constructor Detail

SimpleDigitalOut

public SimpleDigitalOut()
Constructs a new SimpleDigitalOut instance. It's state will be invalid.


SimpleDigitalOut

public SimpleDigitalOut(boolean b)
Constructs a new SimpleDigitalOut instance with the given state.

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

isSet

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

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

set

public void set(boolean b)
Description copied from interface: DigitalOut
Sets the state of this DigitalOut.

Specified by:
set in interface DigitalOut
Parameters:
b - true if to be set, false otherwise.


Copyright © 2010. All Rights Reserved.