template <>

class Server

Defined at line 451 of file fidling/gen/sdk/fidl/fuchsia.hardware.radar/fuchsia.hardware.radar/cpp/fidl/fuchsia.hardware.radar/cpp/natural_messaging.h

Public Methods

void GetBurstProperties (GetBurstPropertiesCompleter::Sync & completer)
void RegisterVmos (RegisterVmosRequest & request, RegisterVmosCompleter::Sync & completer)

Registers the VMOs for future use and associates them with vmo_ids,

which can be used with `UnregisterVmos()` and `OnBurst()`. vmos will be

mapped by the driver using `ZX_VM_PERM_WRITE`. The client should only

read registered VMOs that are sent via `OnBurst()`. The size of vmo is

assumed to be at least the burst size, and the sizes of `vmo_ids` and

`vmos` must be the same.

+ request `vmo_ids` the ID numbers to associate with each VMO.

+ request `vmos` the VMO handles corresponding to each ID.

* error one of the following `StatusCode` values:

* `INVALID_ARGS`: `vmo_ids` and `vmos` were of different sizes.

* `VMO_BAD_HANDLE`: A handle in `vmos` was invalid.

* `VMO_ALREADY_REGISTERED`: An ID in `vmo_ids` was already

* registered.

* `VMO_ACCESS_DENIED`: A VMO in `vmos` could not be mapped due to

* insufficient permissions.

* `VMO_TOO_SMALL`: A VMO in `vmos` was smaller than the burst size.

void Server ()

Defined at line 454 of file fidling/gen/sdk/fidl/fuchsia.hardware.radar/fuchsia.hardware.radar/cpp/fidl/fuchsia.hardware.radar/cpp/natural_messaging.h

void UnregisterVmos (UnregisterVmosRequest & request, UnregisterVmosCompleter::Sync & completer)

Removes the associations with the given VMO IDs and returns the VMOs to

the client. The driver will not send any more `OnBurst()` events with

these VMO IDs after replying, however the client may still receive

bursts with these IDs if they were in flight during this call. The

driver must return all of the requested VMOs, or return an error. In

case of an error, the driver may have unregistered some or all of the

requested VMOs.

+ request `vmo_ids` the IDs of the VMOs to unregister and return.

- response `vmos` the VMO handles corresponding to `vmo_ids`.

* error one of the following `StatusCode` values:

* `INVALID_ARGS`: `vmo_ids` was too big.

* `VMO_NOT_FOUND`: An ID in `vmo_ids` was not registered.

void StartBursts (StartBurstsCompleter::Sync & completer)

Tells the driver to start sending bursts via `OnBurst()`.

void StopBursts (StopBurstsCompleter::Sync & completer)

Tells the driver to stop sending bursts via `OnBurst()`. If all clients

call `StopBursts()` then the driver may choose to stop its worker thread.

The driver may wait for a single burst read to complete, but will not

access any of the client’s VMOs or call its observer after replying.

Note that already inflight `OnBurst()` bursts may still be received by

the client.

void UnlockVmo (UnlockVmoRequest & request, UnlockVmoCompleter::Sync & completer)

Signals to the driver that the client is no longer reading the VMO. The

client must not access the VMO after calling this.

+ request `vmo_id` the ID of the VMO to return to the driver.

Handler bind_handler (async_dispatcher_t * dispatcher)

|bind_handler| returns a handler that binds incoming connections to this

server implementation.

The returned handler borrows the server instance.

The server must outlive the provided |dispatcher|. Only after

the dispatcher is shutdown will it be safe to destroy the servers.

The server should not be moved.

void ~Server ()

Defined at line 455 of file fidling/gen/sdk/fidl/fuchsia.hardware.radar/fuchsia.hardware.radar/cpp/fidl/fuchsia.hardware.radar/cpp/natural_messaging.h