Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

serial_port

Provides serial port functionality.

class serial_port :
  public serial_port_base
Types

Name

Description

executor_type

The type of the executor associated with the object.

lowest_layer_type

A basic_serial_port is always the lowest layer.

native_handle_type

The native representation of a serial port.

Member Functions

Name

Description

assign

Assign an existing native serial port to the serial port.

async_read_some

Start an asynchronous read.

async_write_some

Start an asynchronous write.

cancel

Cancel all asynchronous operations associated with the serial port.

close

Close the serial port.

get_executor

Get the executor associated with the object.

get_io_context

(Deprecated: Use get_executor().) Get the io_context associated with the object.

get_io_service

(Deprecated: Use get_executor().) Get the io_context associated with the object.

get_option

Get an option from the serial port.

is_open

Determine whether the serial port is open.

lowest_layer

Get a reference to the lowest layer.

Get a const reference to the lowest layer.

native_handle

Get the native serial port representation.

open

Open the serial port using the specified device name.

operator=

Move-assign a serial_port from another.

read_some

Read some data from the serial port.

send_break

Send a break sequence to the serial port.

serial_port

Construct a serial_port without opening it.

Construct and open a serial_port.

Construct a serial_port on an existing native serial port.

Move-construct a serial_port from another.

set_option

Set an option on the serial port.

write_some

Write some data to the serial port.

~serial_port

Destroys the serial port.

The serial_port class provides a wrapper over serial port functionality.

Thread Safety

Distinct objects: Safe.

Shared objects: Unsafe.

Requirements

Header: boost/asio/serial_port.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext