peak.can.basic

## Class TPCANMsgFD

- java.lang.Object
- - peak.can.basic.TPCANMsgFD

- All Implemented Interfaces:
    java.lang.Cloneable

      public class TPCANMsgFD
      extends java.lang.Object
      implements java.lang.Cloneable

  Defines a CAN FD message.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TPCANMsgFD()` Default constructor
    `TPCANMsgFD(int id, java.util.EnumSet<TPCANMessageType> type, byte dlc, byte[] data)` Constructs a new message object.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Clones this message object.
    `byte[]` | `getData()` Gets the data of this message.
    `byte` | `getDlc()` Gets the data length code of this message.
    `int` | `getID()` Gets the id of this message.
    `byte` | `getLengthFromDLC()` Gets the length of this message based on its DLC.
    `static byte` | `getLengthFromDLC(byte dlc)` Gets the length of a message based on a DLC.
    `byte` | `getType()` Gets the type of this message.
    `java.util.EnumSet<TPCANMessageType>` | `getTypeEnum()` Gets the type of this message.
    `void` | `setData(byte[] data, byte dlc)` Sets the data and length of this message.
    `void` | `setDlc(byte dlc)` Sets the data length code of this message.
    `void` | `setID(int id)` Sets the id of this message.
    `void` | `setType(byte type)` Sets the type of this message.
    `void` | `setType(java.util.EnumSet<TPCANMessageType> type)` Sets the type of this message.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TPCANMsgFD

          public TPCANMsgFD()

      Default constructor

    - #### TPCANMsgFD

          public TPCANMsgFD(int id,
                            java.util.EnumSet<TPCANMessageType> type,
                            byte dlc,
                            byte[] data)

      Constructs a new message object.
      Parameters:
        `id` - the message id
        `type` - the message type
        `dlc` - the message data length code
        `data` - the message data

  - ### Method Detail

    - #### setID

          public void setID(int id)

      Sets the id of this message.
      Parameters:
        `id` - the message id

    - #### setData

          public void setData(byte[] data,
                              byte dlc)

      Sets the data and length of this message.
      Parameters:
        `data` - the message data
        `dlc` - the message length

    - #### setDlc

          public void setDlc(byte dlc)

      Sets the data length code of this message.
      Parameters:
        `dlc` - the data length code of the message

    - #### setType

          public void setType(java.util.EnumSet<TPCANMessageType> type)

      Sets the type of this message.
      Parameters:
        `type` - the message type

    - #### setType

          public void setType(byte type)

      Sets the type of this message.
      Parameters:
        `type` - the message type

    - #### getID

          public int getID()

      Gets the id of this message.
      Returns:
        the message id

    - #### getData

          public byte[] getData()

      Gets the data of this message.
      Returns:
        the message data

    - #### getDlc

          public byte getDlc()

      Gets the data length code of this message.
      Returns:
        the message length

    - #### getLengthFromDLC

          public byte getLengthFromDLC()

      Gets the length of this message based on its DLC.
      Returns:
        the message length

    - #### getLengthFromDLC

          public static byte getLengthFromDLC(byte dlc)

      Gets the length of a message based on a DLC.
      Parameters:
        `dlc` -
      Returns:
        the message length

    - #### getTypeEnum

          public java.util.EnumSet<TPCANMessageType> getTypeEnum()

      Gets the type of this message.
      Returns:
        the message type

    - #### getType

          public byte getType()

      Gets the type of this message.
      Returns:
        the message type

    - #### clone

          public java.lang.Object clone()

      Clones this message object.
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        The cloned message object.