class FakePipe

Defined at line 27 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.h

A fake fuchsia.hardware.goldfish.pipe.Bus FIDL protocol implementation where

users can set up custom callbacks for PIPE_CMD_WRITE commands and queue

outputs for PIPE_CMD_READ commands.

Public Methods

void Create (CreateCompleter::Sync & completer)

Defined at line 34 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void SetEvent (SetEventRequestView request, SetEventCompleter::Sync & completer)

Defined at line 55 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void Destroy (DestroyRequestView request, DestroyCompleter::Sync & completer)

Defined at line 68 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void Open (OpenRequestView request, OpenCompleter::Sync & completer)

Defined at line 75 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void Exec (ExecRequestView request, ExecCompleter::Sync & completer)

Defined at line 88 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void GetBti (GetBtiCompleter::Sync & completer)

Defined at line 189 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void EnqueueBytesToRead (const std::vector<uint8_t> & bytes)

FakePipe stores a queue of byte vectors for PIPE_CMD_READ commands.

Every time it receives a PIPE_CMD_READ command, it will pop a byte vector

and send the contents to the client.

Defined at line 83 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

void SetOnCmdWriteCallback (fit::function<void (const std::vector<uint8_t> &)> fn)

Set callback function for PIPE_CMD_WRITE commands.

Defined at line 235 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

zx_status_t SetUpPipeDevice ()

Defined at line 203 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

fzl::VmoMapper MapCmdBuffer ()

Map command buffer to a memory address so that tests can access.

Defined at line 216 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

fzl::VmoMapper MapIoBuffer ()

Map IO buffer to a memory address so that tests can access. Wsill create a

new IO buffer if there is none available.

Defined at line 224 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

bool IsPipeReady ()

Defined at line 239 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

zx::event & pipe_event ()

Defined at line 241 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc

const std::vector<std::vector<uint8_t>> & io_buffer_contents ()

Defined at line 243 of file ../../src/devices/testing/goldfish/fake_pipe/fake_pipe.cc