A serial port service must meet the requirements for an I/O object service with support for movability, as well as the additional requirements listed below.
In the table below, X
denotes
a serial port service class, a
and ao
denote values of type
X
, d
denotes a serial port device name of type std::string
,
b
and c
denote values of type X::implementation_type
, n
denotes a value of type X::native_handle_type
,
ec
denotes a value of type
error_code
, s
denotes a value meeting SettableSerialPortOption
requirements,
g
denotes a value meeting
GettableSerialPortOption
requirements, mb
denotes
a value satisfying mutable
buffer sequence requirements, rh
denotes a value meeting ReadHandler
requirements, cb
denotes a value satisfying constant
buffer sequence requirements, and wh
denotes a value meeting WriteHandler
requirements. and
u
and v
denote identifiers.
Table 27. SerialPortService requirements
expression |
return type |
assertion/note |
---|---|---|
|
The implementation-defined native representation of a serial port.
Must satisfy the requirements of |
|
|
From IoObjectService
requirements. |
|
|
From IoObjectService
requirements. Implicitly cancels asynchronous operations, as if
by calling |
|
a.move_construct(b, c);
|
From IoObjectService
requirements. The underlying native representation is moved from
|
|
a.move_assign(b, ao, c);
|
From IoObjectService
requirements. Implicitly cancels asynchronous operations associated
with |
|
const std::string& u = d; a.open(b, u, ec);
|
|
pre: |
a.assign(b, n, ec);
|
|
pre: |
a.is_open(b);
|
|
|
const X& u = a; const X::implementation_type& v = b; u.is_open(v);
|
|
|
a.close(b, ec);
|
|
If |
a.native_handle(b);
|
|
|
a.cancel(b, ec);
|
|
pre: |
a.set_option(b, s, ec);
|
|
pre: |
a.get_option(b, g, ec);
|
|
pre: |
const X& u = a; const X::implementation_type& v = b; u.get_option(v, g, ec);
|
|
pre: |
a.send_break(b, ec);
|
|
pre: |
|
|
pre: |
|
|
pre: |
|
|
pre: |
|
|
pre: |