Package peak.can.basic
Enum TPCANBaudrate
- java.lang.Object
-
- java.lang.Enum<TPCANBaudrate>
-
- peak.can.basic.TPCANBaudrate
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TPCANBaudrate>
,java.lang.constant.Constable
public enum TPCANBaudrate extends java.lang.Enum<TPCANBaudrate>
Baud rate codes = BTR0/BTR1 register values for the CAN controller. You can define your own Baud rate with the BTROBTR1 register. Take a look at www.peak-system.com for our free software "BAUDTOOL" to calculate the BTROBTR1 register for every baudrate and sample point.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PCAN_BAUD_100K
100 kBit/sPCAN_BAUD_10K
10 kBit/sPCAN_BAUD_125K
125 kBit/sPCAN_BAUD_1M
1 MBit/sPCAN_BAUD_20K
20 kBit/sPCAN_BAUD_250K
250 kBit/sPCAN_BAUD_33K
33,333 kBit/sPCAN_BAUD_47K
47,619 kBit/sPCAN_BAUD_500K
500 kBit/sPCAN_BAUD_50K
50 kBit/sPCAN_BAUD_5K
5 kBit/sPCAN_BAUD_800K
800 kBit/sPCAN_BAUD_83K
83,33 kBit/sPCAN_BAUD_95K
95,238 kBit/sPCAN_BAUD_User0
UserPCAN_BAUD_User1
UserPCAN_BAUD_User2
UserPCAN_BAUD_User3
UserPCAN_BAUD_User4
UserPCAN_BAUD_User5
UserPCAN_BAUD_User6
UserPCAN_BAUD_User7
UserPCAN_BAUD_User8
UserPCAN_BAUD_User9
User
-
Method Summary
Modifier and Type Method Description void
clearValue()
Clears the user-defined valueint
getValue()
Returns the value of the baud rate code.void
setValue(int value)
Sets the user-defined value.static TPCANBaudrate
valueOf(int value)
Returns a TPCANBaudrate matching the corresponding Baud rate codestatic TPCANBaudrate
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TPCANBaudrate[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PCAN_BAUD_1M
public static final TPCANBaudrate PCAN_BAUD_1M
1 MBit/s
-
PCAN_BAUD_800K
public static final TPCANBaudrate PCAN_BAUD_800K
800 kBit/s
-
PCAN_BAUD_500K
public static final TPCANBaudrate PCAN_BAUD_500K
500 kBit/s
-
PCAN_BAUD_250K
public static final TPCANBaudrate PCAN_BAUD_250K
250 kBit/s
-
PCAN_BAUD_125K
public static final TPCANBaudrate PCAN_BAUD_125K
125 kBit/s
-
PCAN_BAUD_100K
public static final TPCANBaudrate PCAN_BAUD_100K
100 kBit/s
-
PCAN_BAUD_95K
public static final TPCANBaudrate PCAN_BAUD_95K
95,238 kBit/s
-
PCAN_BAUD_83K
public static final TPCANBaudrate PCAN_BAUD_83K
83,33 kBit/s
-
PCAN_BAUD_50K
public static final TPCANBaudrate PCAN_BAUD_50K
50 kBit/s
-
PCAN_BAUD_47K
public static final TPCANBaudrate PCAN_BAUD_47K
47,619 kBit/s
-
PCAN_BAUD_33K
public static final TPCANBaudrate PCAN_BAUD_33K
33,333 kBit/s
-
PCAN_BAUD_20K
public static final TPCANBaudrate PCAN_BAUD_20K
20 kBit/s
-
PCAN_BAUD_10K
public static final TPCANBaudrate PCAN_BAUD_10K
10 kBit/s
-
PCAN_BAUD_5K
public static final TPCANBaudrate PCAN_BAUD_5K
5 kBit/s
-
PCAN_BAUD_User0
public static final TPCANBaudrate PCAN_BAUD_User0
User
-
PCAN_BAUD_User1
public static final TPCANBaudrate PCAN_BAUD_User1
User
-
PCAN_BAUD_User2
public static final TPCANBaudrate PCAN_BAUD_User2
User
-
PCAN_BAUD_User3
public static final TPCANBaudrate PCAN_BAUD_User3
User
-
PCAN_BAUD_User4
public static final TPCANBaudrate PCAN_BAUD_User4
User
-
PCAN_BAUD_User5
public static final TPCANBaudrate PCAN_BAUD_User5
User
-
PCAN_BAUD_User6
public static final TPCANBaudrate PCAN_BAUD_User6
User
-
PCAN_BAUD_User7
public static final TPCANBaudrate PCAN_BAUD_User7
User
-
PCAN_BAUD_User8
public static final TPCANBaudrate PCAN_BAUD_User8
User
-
PCAN_BAUD_User9
public static final TPCANBaudrate PCAN_BAUD_User9
User
-
-
Method Detail
-
values
public static TPCANBaudrate[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TPCANBaudrate valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
Returns the value of the baud rate code.- Returns:
- value of the baud rate code
-
setValue
public void setValue(int value)
Sets the user-defined value.- Parameters:
value
- Baud rate code
-
clearValue
public void clearValue()
Clears the user-defined value
-
valueOf
public static TPCANBaudrate valueOf(int value)
Returns a TPCANBaudrate matching the corresponding Baud rate code- Parameters:
value
- Baud rate code- Returns:
- null or a TPCANBaudrate matching the Baud rate code
-
-