class Buffer

Defined at line 52 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.request/fuchsia.hardware.usb.request/cpp/fidl/fuchsia.hardware.usb.request/cpp/natural_types.h

Data buffer. There are two supported ways data may be conveyed, corresponding to the two

members of the Buffer union:

1) vmo_id: Pre-registered VMO. A driver may preregister VMOs using the

fuchsia.hardware.usb.endpoint.Endpoint::RegisterVmos method. These VMOs are saved by

the underlying USB driver in correspondence to the given vmo_id. Future Requests may

refer to this by the unique vmo_id.

Because VMOs are reused across Requests and saved by the underlying driver, each VMO

only needs to be pinned/unpinned once.

2) data: A data buffer for data that is not associated with a VMO. The underlying USB driver

should allocate its own VMO, copy the data from the buffer, and pin the VMO. This

should not be used often and not for large amounts of data.

Public Methods

void Buffer (Buffer && other)
Buffer & operator= (Buffer && other)
bool IsUnknown ()
::fuchsia_hardware_usb_request::Buffer::Tag Which ()
Buffer WithVmoId (uint64_t val)
const ::fidl::internal::UnionMemberView<1, Storage_> vmo_id ()
::fidl::internal::UnionMemberView<1, Storage_> vmo_id ()
Buffer & vmo_id (uint64_t value)

The ID of a VMO that was previously registered.

Buffer WithData (::std::vector<uint8_t> val)
const ::fidl::internal::UnionMemberView<2, Storage_> data ()
::fidl::internal::UnionMemberView<2, Storage_> data ()
Buffer & data (::std::vector<uint8_t> value)

Embedded data buffer to copy data to/from.

void Buffer (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Enumerations

enum Tag
Name Value
kVmoId 1
kData 2
_do_not_handle_this__write_a_default_case_instead ::std::numeric_limits<::fidl_union_tag_t>::max()

TODO: share union tag types between wire

&

natural.

Defined at line 60 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.request/fuchsia.hardware.usb.request/cpp/fidl/fuchsia.hardware.usb.request/cpp/natural_types.h

Friends

class NaturalUnionCodingTraits