peak.can
Class ChannelItem

java.lang.Object
  extended by peak.can.ChannelItem
Direct Known Subclasses:
MarkAllChannelItem

public class ChannelItem
extends java.lang.Object

The ChannelItem class wraps a PCANBasic Channel within his TPCANHandle, his TPCANType (for Non-PNP devices only) and a boolean property which indicates if it is in working state.


Field Summary
protected  TPCANHandle handle
           
 
Constructor Summary
ChannelItem()
          Default Constructor
ChannelItem(TPCANHandle handle)
          Constructor
ChannelItem(TPCANHandle tPCANHandle, TPCANType tPCANType)
          Constructor
 
Method Summary
 TPCANHandle getHandle()
          Gets the PCAN Handle
 TPCANType getType()
          Gets the PCAN Hardware Type (for Non-PNP devices only)
 boolean getWorking()
          Indicates if Handle is Working
 void setHandle(TPCANHandle handle)
          Sets the PCAN Handle
 void setType(TPCANType type)
          Sets the PCAN Hardware Type (for Non-PNP devices only)
 void setWorking(boolean working)
          Sets PCAN Handle state
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

handle

protected TPCANHandle handle
Constructor Detail

ChannelItem

public ChannelItem()
Default Constructor


ChannelItem

public ChannelItem(TPCANHandle handle)
Constructor

Parameters:
handle -

ChannelItem

public ChannelItem(TPCANHandle tPCANHandle,
                   TPCANType tPCANType)
Constructor

Parameters:
tPCANHandle - The wrapped PCANHandle
tPCANType - The wrapped PCAN Hardware Type (for Non-PNP devices only)
Method Detail

getType

public TPCANType getType()
Gets the PCAN Hardware Type (for Non-PNP devices only)

Returns:
The TPCANType

setType

public void setType(TPCANType type)
Sets the PCAN Hardware Type (for Non-PNP devices only)

Parameters:
type -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getHandle

public TPCANHandle getHandle()
Gets the PCAN Handle

Returns:
The handle

setHandle

public void setHandle(TPCANHandle handle)
Sets the PCAN Handle

Parameters:
handle -

getWorking

public boolean getWorking()
Indicates if Handle is Working

Returns:
true if handle is working, false if not

setWorking

public void setWorking(boolean working)
Sets PCAN Handle state

Parameters:
working - true if handle is working, false if not