PROTOCOLS
RadarBurstInjector
Defined in fuchsia.hardware.radar/radar.fidl
Test clients may use this protocol to inject burst data to radar clients
through a virtual radar driver. Only one client of this protocol can be
connected at a time. radar-proxy will send epitaph status code
ZX_ERR_ALREADY_BOUND to and close channels from any additional clients
that attempt to connect.
EnqueueBursts
Enqueues the given VMO with burst data to be injected. After all bursts
from this VMO have been injected, radar-proxy will move on to the next
VMO in the queue. The caller must not write to the VMO until it has been
returned by OnBurstsDelivered(). The VMO will be closed and unmapped
if the injector client unexpectedly disconnects.
Bursts are injected by radar-proxy at the rate reported by the
underlying driver's GetBurstProperties() method. If no VMOs are in the
queue at the time that a burst is to be delivered, radar-proxy will stop
sending bursts until either EnqueueBursts() or StopBurstInjection()
is called.
- request
burststheBurstDatastruct containing bursts to inject.
- response
bursts_idthe ID to be passed back throughOnBurstsDelivered()after the final burst from this buffer has been injected.
- error one of the following
StatusCodevalues: VMO_BAD_HANDLE: The VMO handle was invalid.VMO_ACCESS_DENIED: The VMO had insufficient rights.VMO_TOO_SMALL: The VMO was too small to hold the indicated number-
of bursts. INVALID_ARGS: The number of bursts was zero.BAD_STATE: A previous call toStopBurstInjection()is still-
pending.
Request
| Name | Type |
|---|---|
bursts |
BurstData
|
Response
| Name | Type |
|---|---|
payload |
RadarBurstInjector_EnqueueBursts_Result
|
GetBurstProperties
Returns the size and period of bursts reported by the sensor.
- response
sizethe size of each radar burst in bytes. - response
periodthe time between bursts in nanoseconds.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
size |
uint32
|
period |
zx/Duration
|
OnBurstsDelivered
Returns an ID corresponding to a BurstData struct previously passed to
EnqueueBursts(). Upon receiving this event the client is free to write
to the VMO, and if desired, pass it back to radar-proxy for injection.
- request
bursts_idthe ID returned by a previous call toEnqueueBursts().
Response
| Name | Type |
|---|---|
bursts_id |
uint32
|
StartBurstInjection
Tells radar-proxy to read future bursts from enqueued VMOs rather than
from the real radar driver. radar-proxy will attempt to deliver the
first injected burst at the time that the radar driver would have done
so. If the queue is or becomes empty then sending of bursts will stop
until more bursts are available in the queue. See EnqueueBursts()
above.
radar-proxy will call StopBursts() on the real radar driver before
it starts to deliver the enqueued bursts.
- error one of the following
StatusCodevalues: BAD_STATE: Injection has already been started, or a previous call-
to `StopBurstInjection()` is still pending.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
RadarBurstInjector_StartBurstInjection_Result
|
StopBurstInjection
Tells radar-proxy to finish injecting bursts from VMOs currently on the
queue then switch back to delivering bursts from the real radar driver.
The reply to this call will not be sent until OnBurstsDelivered() has
been called for the final VMO to be injected, and any other calls made
in that time will return errors.
radar-proxy will call StartBursts() on the real radar driver as part
of this call. There may be a delay before RadarBurstReader clients start
to receive bursts from the driver again.
- error one of the following
StatusCodevalues: BAD_STATE: Injection has already been stopped, or a call to this-
method is still pending.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
RadarBurstInjector_StopBurstInjection_Result
|
RadarBurstReader
Defined in fuchsia.hardware.radar/radar.fidl
GetBurstProperties
Request
<EMPTY>
Response
| Name | Type |
|---|---|
size |
uint32
|
period |
zx/Duration
|
OnBurst
Returns the ID of a VMO containing a single burst, the time the burst
was received. Ownership of the VMO must be returned to the driver by
calling UnlockVmo(), and won't be written by the driver until then.
See the doc for the burst format specification.
The driver will drop bursts if there are no unlocked VMOs. This also
provides flow control for the number of events in flight. When a burst
is received and no VMOs are unlocked, OnBurst() will be called with
OUT_OF_VMOS set as the error. OnBurst will not be called again until
at least one VMO has been unlocked.
- request
burstthe ID of a VMO containing the burst, as well as the time the burst was received.
- error one of the following
StatusCodevalues: -
`OUT_OF_VMOS`: No unlocked VMOs were available to hold the burst. -
The driver will wait for at least one VMO to become available -
before sending more events to this client. -
`SENSOR_TIMEOUT`: The driver could not drain the sensor FIFO -
quickly enough. -
`SENSOR_ERROR`: An unspecified driver or sensor error occurred -
when trying to read the burst.
Response
| Name | Type |
|---|---|
payload |
RadarBurstReaderOnBurstRequest
|
RegisterVmos
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_idsthe ID numbers to associate with each VMO. - request
vmosthe VMO handles corresponding to each ID.
- error one of the following
StatusCodevalues: -
`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.
Request
| Name | Type |
|---|---|
vmo_ids |
vector<uint32>:300
|
vmos |
vector<handle<vmo>>:300
|
Response
| Name | Type |
|---|---|
payload |
RadarBurstReader_RegisterVmos_Result
|
StartBursts
Tells the driver to start sending bursts via OnBurst().
Request
<EMPTY>
StopBursts
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.
Request
<EMPTY>
Response
<EMPTY>
UnlockVmo
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_idthe ID of the VMO to return to the driver.
Request
| Name | Type |
|---|---|
vmo_id |
uint32
|
UnregisterVmos
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_idsthe IDs of the VMOs to unregister and return.
- response
vmosthe VMO handles corresponding tovmo_ids.
- error one of the following
StatusCodevalues: -
`INVALID_ARGS`: `vmo_ids` was too big. -
`VMO_NOT_FOUND`: An ID in `vmo_ids` was not registered.
Request
| Name | Type |
|---|---|
vmo_ids |
vector<uint32>:300
|
Response
| Name | Type |
|---|---|
payload |
RadarBurstReader_UnregisterVmos_Result
|
RadarBurstReaderProvider
Defined in fuchsia.hardware.radar/radar.fidl
The main protocol implemented by radar drivers. Clients use this protocol to
establish a RadarBurstReader connection with the driver.
Connect
- request
servertheRadarBurstReaderserver end for the driver to bind to.
- error one of the following
StatusCodevalues:BIND_ERROR: An error was encountered while trying to bind to the provided server channel.ALREADY_BOUND: Another client has already established aRadarBurstReaderconnection with the driver.
Request
| Name | Type |
|---|---|
server |
server_end:RadarBurstReader
|
Response
| Name | Type |
|---|---|
payload |
RadarBurstReaderProvider_Connect_Result
|
RadarSensorInfo
Defined in fuchsia.hardware.radar/radar.fidl
GetBurstProperties
Returns the size and period of bursts reported by the sensor.
- response
sizethe size of each radar burst in bytes. - response
periodthe time between bursts in nanoseconds.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
size |
uint32
|
period |
zx/Duration
|
STRUCTS
Burst
Defined in fuchsia.hardware.radar/radar.fidl
| Field | Type | Description | Default |
|---|---|---|---|
vmo_id |
uint32
|
No default | |
timestamp |
zx/Time
|
No default |
BurstData resource
Defined in fuchsia.hardware.radar/radar.fidl
| Field | Type | Description | Default |
|---|---|---|---|
vmo |
handle<vmo>
|
A VMO holding zero or more radar bursts of the size reported by
|
No default |
burst_count |
uint32
|
The number of bursts stored in |
No default |
RadarBurstInjector_EnqueueBursts_Response
Defined in fuchsia.hardware.radar/radar.fidl
| Field | Type | Description | Default |
|---|---|---|---|
bursts_id |
uint32
|
No default |
RadarBurstInjector_StartBurstInjection_Response
Defined in fuchsia.hardware.radar/radar.fidl
<EMPTY>
RadarBurstInjector_StopBurstInjection_Response
Defined in fuchsia.hardware.radar/radar.fidl
<EMPTY>
RadarBurstReaderProvider_Connect_Response
Defined in fuchsia.hardware.radar/radar.fidl
<EMPTY>
RadarBurstReader_RegisterVmos_Response
Defined in fuchsia.hardware.radar/radar.fidl
<EMPTY>
RadarBurstReader_UnregisterVmos_Response resource
Defined in fuchsia.hardware.radar/radar.fidl
| Field | Type | Description | Default |
|---|---|---|---|
vmos |
vector<handle<vmo>>:300
|
No default |
ENUMS
StatusCode strict
Type: uint32
Defined in fuchsia.hardware.radar/radar.fidl
| Name | Value | Description |
|---|---|---|
UNSPECIFIED |
0 |
An unspecified error occurred (generally should not be used). |
SUCCESS |
1 |
The request completed successfully. |
ALREADY_BOUND |
2 |
|
BIND_ERROR |
3 |
|
INVALID_ARGS |
4 |
The vectors passed to |
VMO_BAD_HANDLE |
5 |
A VMO handle was invalid. |
VMO_ALREADY_REGISTERED |
6 |
A VMO was already registered with this ID. |
VMO_NOT_FOUND |
7 |
No registered VMO was found for the given ID. |
VMO_ACCESS_DENIED |
8 |
A client VMO could not be written to or mapped due to insufficient permissions. |
VMO_TOO_SMALL |
9 |
A client VMO was smaller than the burst size (see |
OUT_OF_VMOS |
10 |
A burst was received, but no unlocked VMOs are available. |
SENSOR_TIMEOUT |
11 |
A burst was not received within the expected window. |
SENSOR_ERROR |
12 |
An unspecified driver or sensor error was encountered. |
BAD_STATE |
13 |
The radar driver or proxy was not in the correct state for this call. |
UNIONS
RadarBurstInjector_EnqueueBursts_Result strict
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
RadarBurstInjector_EnqueueBursts_Response
|
|
2 |
err |
StatusCode
|
RadarBurstInjector_StartBurstInjection_Result strict
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
RadarBurstInjector_StartBurstInjection_Response
|
|
2 |
err |
StatusCode
|
RadarBurstInjector_StopBurstInjection_Result strict
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
RadarBurstInjector_StopBurstInjection_Response
|
|
2 |
err |
StatusCode
|
RadarBurstReaderOnBurstRequest flexible
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
burst |
Burst
|
|
2 |
error |
StatusCode
|
RadarBurstReaderProvider_Connect_Result strict
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
RadarBurstReaderProvider_Connect_Response
|
|
2 |
err |
StatusCode
|
RadarBurstReader_RegisterVmos_Result strict
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
RadarBurstReader_RegisterVmos_Response
|
|
2 |
err |
StatusCode
|
RadarBurstReader_UnregisterVmos_Result strict resource
Defined in fuchsia.hardware.radar/radar.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
RadarBurstReader_UnregisterVmos_Response
|
|
2 |
err |
StatusCode
|
CONSTANTS
| Name | Value | Type | Description |
|---|---|---|---|
| VMO_VECTOR_MAX_COUNT |
300
|
uint32 |
Arbitrary limit on the number of VMOs in one call to |
SERVICES
Service
Defined in fuchsia.hardware.radar/radar.fidl
| Name | Type | Transport |
|---|---|---|
| device |
fuchsia.hardware.radar/RadarBurstReaderProvider
|
Channel |