fuchsia.hardware.goldfish.pipe

PROTOCOLS

Device

Defined in fuchsia.hardware.goldfish.pipe/goldfish-pipe.fidl

OpenPipe

Open pipe. A protocol request |pipe_request| provides an interface to the pipe. Multiple pipes can be opened for a single device. Closing the device connection will also close all pipe connections. TODO(DX-1766): Unify device and pipe.

Request

NameType
pipe_request request<Pipe>

Pipe

Defined in fuchsia.hardware.goldfish.pipe/goldfish-pipe.fidl

SetBufferSize

Request new IO buffer size. Can fail if out of memory. Discards contents of existing buffer on success. Leaves existing buffer intact on failure.

Request

NameType
size uint64

Response

NameType
res int32

SetEvent

Set event used to signal device state. Discards existing event after having transferred device state to the new event.

Request

NameType
event handle<event>

GetBuffer

Acquire VMO for IO buffer. Can be called multiple times. Each call returns a new handle to the VMO.

Request

NameType

Response

NameType
res int32
vmo handle<vmo>?

Read

Attempt to read up to count bytes into IO buffer at specified offset. Returns ZX_ERR_SHOULD_WAIT if pipe device is not readable.

Request

NameType
count uint64
offset uint64

Response

NameType
res int32
actual uint64

Write

Writes up to count bytes from the IO buffer at specified offset. Returns ZX_ERR_SHOULD_WAIT if pipe device is not writable.

Request

NameType
count uint64
offset uint64

Response

NameType
res int32
actual uint64

Call

Writes count bytes from the IO buffer at specified write offset. Blocks if pipe device is not writable. Subsequently reads read_count bytes into the IO buffer at specified read offset. Returns ZX_ERR_SHOULD_WAIT if pipe device is not readable.

Request

NameType
count uint64
offset uint64
read_count uint64
read_offset uint64

Response

NameType
res int32
actual uint64

CONSTANTS

NameValueTypeDescription
SIGNAL_READABLE 16777216 uint32 Signal that will be active on event handle if the Read() method will return data.
SIGNAL_WRITABLE 33554432 uint32 Signal that will be active on event handle if the Write() method will accept data.
SIGNAL_HANGUP 67108864 uint32 Signal that will be active on event handle if the device has been disconnected.