public class CANId
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ID_EXTENDED_MAX_LENGTH
Maximum length for extended ID: 29 bits.
|
static int |
ID_MAX_LENGTH
Maximum length for ID: 11 bits.
|
| Constructor and Description |
|---|
CANId(int value,
boolean extended)
Creates a CAN identifier with the given value and whether it is extended.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getValue()
Retrieves the value of this CAN identifier.
|
boolean |
isExtended()
Returns if this CAN identifier is extended.
|
public static final int ID_MAX_LENGTH
public static final int ID_EXTENDED_MAX_LENGTH
public CANId(int value,
boolean extended)
A standard identifier (extended = false) has 11 bits.
An extended identifier (extended = true) has 29 bits.
value - The value of this CAN identifier.extended - true if it is extended, false otherwise.java.lang.IllegalArgumentException - If the length of value is invalid.