.
,
MARK SPACE, , POSIX. Unix/Linux , termios . ( , PARMRK MARK .)
, , Boost.Asio.
:
:
8M1 (8 , MARK, 1 ) 8N2. -. 1 ( ), .
, asio as.
:
basic_serial_port::native_handle
Get the native serial port representation.
native_handle_type native_handle();
This function may be used to obtain the underlying representation of the serial port. This is intended to allow access to native serial port functionality that is not otherwise provided.
,
boost_1_45_0/boost/asio/serial_port_base.hpp
, , , linux:
switch (value_)
{
case none:
storage.c_iflag |= IGNPAR;
storage.c_cflag &= ~(PARENB | PARODD);
break;
case even:
storage.c_iflag &= ~(IGNPAR | PARMRK);
storage.c_iflag |= INPCK;
storage.c_cflag |= PARENB;
storage.c_cflag &= ~PARODD;
break;
case odd:
storage.c_iflag &= ~(IGNPAR | PARMRK);
storage.c_iflag |= INPCK;
storage.c_cflag |= (PARENB | PARODD);
break;
default:
break;
}
, native_handle, - :
cflag |= PARENB | CMSPAR
cflag &= ~PARODD
cflag |= PARENB | CMSPAR | PARODD
( , )
. libserial