enum io.SerialParity

Overview

This enumeration specifies all possible values for the serial parity bit setting. More…

enum SerialParity {
    None,
    Odd,
    Even,
    Mark,
    Space,
};

Detailed Documentation

This enumeration specifies all possible values for the serial parity bit setting.

Serial parity bit is an extra bit transmitted alongside the data so that the total number of one’s including data bits and this parity bit is always odd or always even.

This is a rather weak error detection method as it does not detect data corruption if an even number of bits are altered. Usually it’s much more reliable to employ other checksums/hash checks after the data has been transmitted.

To adjust the parity protocol, modify io.Serial.m_parity property at any time(both pre-open and post-open modifications are supported).

See also:

io.Serial

Enum Values

None

No parity bit is sent alongside the data.

Odd

A parity bit is sent; odd parity check is used(total number of ones including data and parity bit should be odd).

Even

A parity bit is sent; even parity check is used(total number of ones including data and parity bit should be odd).

Mark

A parity bit is sent; parity bit should always be set to 1.

Space

A parity bit is sent; parity bit should always be set to 0.