Package peak.can.basic
Enum TPCANBaudrate
- All Implemented Interfaces:
Serializable
,Comparable<TPCANBaudrate>
,java.lang.constant.Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription100 kBit/s10 kBit/s125 kBit/s1 MBit/s20 kBit/s250 kBit/s33,333 kBit/s47,619 kBit/s500 kBit/s50 kBit/s5 kBit/s800 kBit/s83,33 kBit/s95,238 kBit/sUserUserUserUserUserUserUserUserUserUser -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
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 Details
-
PCAN_BAUD_1M
1 MBit/s -
PCAN_BAUD_800K
800 kBit/s -
PCAN_BAUD_500K
500 kBit/s -
PCAN_BAUD_250K
250 kBit/s -
PCAN_BAUD_125K
125 kBit/s -
PCAN_BAUD_100K
100 kBit/s -
PCAN_BAUD_95K
95,238 kBit/s -
PCAN_BAUD_83K
83,33 kBit/s -
PCAN_BAUD_50K
50 kBit/s -
PCAN_BAUD_47K
47,619 kBit/s -
PCAN_BAUD_33K
33,333 kBit/s -
PCAN_BAUD_20K
20 kBit/s -
PCAN_BAUD_10K
10 kBit/s -
PCAN_BAUD_5K
5 kBit/s -
PCAN_BAUD_User0
User -
PCAN_BAUD_User1
User -
PCAN_BAUD_User2
User -
PCAN_BAUD_User3
User -
PCAN_BAUD_User4
User -
PCAN_BAUD_User5
User -
PCAN_BAUD_User6
User -
PCAN_BAUD_User7
User -
PCAN_BAUD_User8
User -
PCAN_BAUD_User9
User
-
-
Method Details
-
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
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- 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
Returns a TPCANBaudrate matching the corresponding Baud rate code- Parameters:
value
- Baud rate code- Returns:
- null or a TPCANBaudrate matching the Baud rate code
-