Home / Type/ Paritybit Type — netty Architecture

Paritybit Type — netty Architecture

Architecture documentation for the Paritybit type/interface in RxtxChannelConfig.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  47406688_7f0e_7cd4_969c_3981ea7bd82a["Paritybit"]
  e44bacc8_8508_4cea_f355_1d8a8899dc98["RxtxChannelConfig.java"]
  47406688_7f0e_7cd4_969c_3981ea7bd82a -->|defined in| e44bacc8_8508_4cea_f355_1d8a8899dc98
  style 47406688_7f0e_7cd4_969c_3981ea7bd82a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannelConfig.java lines 129–171

    enum Paritybit {
        /**
         * No parity bit will be sent with each data character at all
         */
        NONE(SerialPort.PARITY_NONE),
        /**
         * An odd parity bit will be sent with each data character, ie. will be set
         * to 1 if the data character contains an even number of bits set to 1.
         */
        ODD(SerialPort.PARITY_ODD),
        /**
         * An even parity bit will be sent with each data character, ie. will be set
         * to 1 if the data character contains an odd number of bits set to 1.
         */
        EVEN(SerialPort.PARITY_EVEN),
        /**
         * A mark parity bit (ie. always 1) will be sent with each data character
         */
        MARK(SerialPort.PARITY_MARK),
        /**
         * A space parity bit (ie. always 0) will be sent with each data character
         */
        SPACE(SerialPort.PARITY_SPACE);

        private final int value;

        Paritybit(int value) {
            this.value = value;
        }

        public int value() {
            return value;
        }

        public static Paritybit valueOf(int value) {
            for (Paritybit paritybit : Paritybit.values()) {
                if (paritybit.value == value) {
                    return paritybit;
                }
            }
            throw new IllegalArgumentException("unknown " + Paritybit.class.getSimpleName() + " value: " + value);
        }
    }

Frequently Asked Questions

What is the Paritybit type?
Paritybit is a type/interface in the netty codebase, defined in transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannelConfig.java.
Where is Paritybit defined?
Paritybit is defined in transport-rxtx/src/main/java/io/netty/channel/rxtx/RxtxChannelConfig.java at line 129.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free