jamod at SF

net.wimpi.modbus.procimg
Class SimpleDigitalIn

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

public class SimpleDigitalIn
extends java.lang.Object
implements DigitalIn

Class implementing a simple DigitalIn.

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

Version:
1.2rc1 (09/11/2004)
Author:
Dieter Wimberger

Field Summary
protected  boolean m_Set
          Field for the digital in state.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Set

protected boolean m_Set
Field for the digital in state.

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.

jamod at SF

Copyright © 2002-2004 jamod development team.