template <>

class NaturalClientImpl

Defined at line 223 of file fidling/gen/sdk/fidl/fuchsia.hardware.serialimpl/fuchsia.hardware.serialimpl/cpp/fidl/fuchsia.hardware.serialimpl/cpp/driver/natural_messaging.h

Public Methods

::fidl::internal::NaturalThenable< ::fuchsia_hardware_serialimpl::Device::GetInfo> GetInfo ()
::fidl::internal::NaturalThenable< ::fuchsia_hardware_serialimpl::Device::Config> Config (const ::fidl::Request< ::fuchsia_hardware_serialimpl::Device::Config> & request)

Configures the given serial port.

Values of `flags` are defined in the constants above.

* error one of the following values:

* `ZX_ERR_IO_NOT_PRESENT`: The serial controller is in a low-power state or is

* transitioning to a low-power state.

* Other values may be returned for driver- or device-specific errors.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_serialimpl::Device::Enable> Enable (const ::fidl::Request< ::fuchsia_hardware_serialimpl::Device::Enable> & request)

Enable or disable the device.

If already enabled and `enable` is true, this is a no-op and returns successfully.

If already disabled and `enable` is false, this is a no-op and returns successfully.

+ request `enable` true to enable the device, or false to disable it.

* error one of the following values:

* `ZX_ERR_BAD_STATE`: `enable` was false, and a `Read()` or `Write()` call was pending.

* `ZX_ERR_IO_NOT_PRESENT`: The serial controller is in a low-power state or is

* transitioning to a low-power state.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_serialimpl::Device::Read> Read ()

Perform a read operation. Returns immediately if data has been received since the last call;

otherwise the request is completed the next time data is received (clients can use the

hanging-get pattern to be notified of new data).

- response `data` the bytes read from the device.

* error one of the following values:

* `ZX_ERR_BAD_STATE`: The device was not enabled.

* `ZX_ERR_CANCELED`: The call was canceled by `CancelAll()`.

* `ZX_ERR_ALREADY_BOUND`: Another `Read()` call was already pending.

* `ZX_ERR_IO_NOT_PRESENT`: The serial controller is in a low-power state or is

* transitioning to a low-power state.

* Other values may be returned for driver- or device-specific errors.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_serialimpl::Device::Write> Write (const ::fidl::Request< ::fuchsia_hardware_serialimpl::Device::Write> & request)

Perform a write operation. Returns when all bytes have been written, or when an error is

encountered.

+ request `data` the bytes to write to the device.

* error one of the following values:

* `ZX_ERR_BAD_STATE`: The device was not enabled.

* `ZX_ERR_CANCELED`: The call was canceled by `CancelAll()`.

* `ZX_ERR_ALREADY_BOUND`: Another `Write()` call was already pending.

* `ZX_ERR_IO_NOT_PRESENT`: The serial controller is in a low-power state or is

* transitioning to a low-power state.

* Other values may be returned for driver- or device-specific errors.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_serialimpl::Device::CancelAll> CancelAll ()

Immediately cancels all outstanding asynchronous I/O