peak.can

## Class ChannelItem

- java.lang.Object
- - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TPCANHandle` | `handle`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChannelItem()` Default Constructor
    `ChannelItem(TPCANHandle handle, boolean isCanFd)` Constructor
    `ChannelItem(TPCANHandle tPCANHandle, TPCANType tPCANType, boolean isCanFd)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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
    `boolean` | `isCanFd()`
    `void` | `setCanFd(boolean isCanFd)`
    `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,
                             boolean isCanFd)

      Constructor
      Parameters:
        `handle` - The wrapped PCANHandle
        `isCanFd` - States if CAN FD is enabled

    - #### ChannelItem

          public ChannelItem(TPCANHandle tPCANHandle,
                             TPCANType tPCANType,
                             boolean isCanFd)

      Constructor
      Parameters:
        `tPCANHandle` - The wrapped PCANHandle
        `tPCANType` - The wrapped PCAN Hardware Type (for Non-PNP devices only)
        `isCanFd` - States if CAN FD is enabled

  - ### 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

    - #### isCanFd

          public boolean isCanFd()

      Returns:
        the isCanFd

    - #### setCanFd

          public void setCanFd(boolean isCanFd)

      Parameters:
        `isCanFd` - the isCanFd to set