public static enum SerialComFTDID2XX.PARITY extends Enum<SerialComFTDID2XX.PARITY>
Pre-defined enum constants for enabling type of parity in a serial frame.
| Enum Constant and Description |
|---|
FT_PARITY_EVEN
The number of bits in the frame with the value one is even.
|
FT_PARITY_MARK
The parity bit is set to the mark signal condition (logical 1).
|
FT_PARITY_NONE
The uart frame does not contain any parity bit.
|
FT_PARITY_ODD
The number of bits in the frame with the value one is odd.
|
FT_PARITY_SPACE
The parity bit is set to the space signal condition (logical 0).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getValue() |
static SerialComFTDID2XX.PARITY |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SerialComFTDID2XX.PARITY[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SerialComFTDID2XX.PARITY FT_PARITY_NONE
public static final SerialComFTDID2XX.PARITY FT_PARITY_ODD
The number of bits in the frame with the value one is odd. If the sum of bits with a value of 1 is odd in the frame, the parity bit's value is set to zero. If the sum of bits with a value of 1 is even in the frame, the parity bit value is set to 1, making the total count of 1's in the frame an odd number.
public static final SerialComFTDID2XX.PARITY FT_PARITY_EVEN
The number of bits in the frame with the value one is even. The number of bits whose value is 1 in a frame is counted. If that total is odd, the parity bit value is set to 1, making the total count of 1's in the frame an even number. If the count of ones in a frame a is already even, the parity bit's value remains 0.
Odd parity may be more fruitful since it ensures that at least one state transition occurs in each character, which makes it more reliable as compared even parity.
Even parity is a special case of a cyclic redundancy check (CRC), where the 1-bit CRC is generated by the polynomial x+1.
public static final SerialComFTDID2XX.PARITY FT_PARITY_MARK
The parity bit is set to the mark signal condition (logical 1). An application may use the 9th (parity) bit for some form of addressing or special signaling.
public static final SerialComFTDID2XX.PARITY FT_PARITY_SPACE
The parity bit is set to the space signal condition (logical 0). The mark and space parity is uncommon, as it adds no error detection information.
public static SerialComFTDID2XX.PARITY[] values()
for (SerialComFTDID2XX.PARITY c : SerialComFTDID2XX.PARITY.values()) System.out.println(c);
public static SerialComFTDID2XX.PARITY valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getValue()
Copyright © 2017. All rights reserved.