Class CanFrame

java.lang.Object
com.codename1.hardware.CanFrame

public final class CanFrame extends Object
One classic CAN frame: an identifier and up to eight data bytes.
  • Constructor Details

    • CanFrame

      public CanFrame(int id, boolean extended, byte[] data)

      Creates a frame.

      Parameters
      • id: an 11-bit identifier, or 29-bit when extended

      • extended: true for a 29-bit identifier

      • data: zero to eight payload bytes; the array is copied

  • Method Details

    • getId

      public int getId()
      The identifier.
    • isExtended

      public boolean isExtended()
      true for a 29-bit identifier.
    • getData

      public byte[] getData()
      A copy of the payload.
    • getLength

      public int getLength()
      The payload length.