The fuchsia.usb.policy interfaces provide mechanisms for clients to query and monitor the overall state of USB devices and the USB subsystem, independent of the underlying hardware driver implementations.
PROTOCOLS
Health
Defined in fuchsia.usb.policy/policy.fidl
Protocol for retrieving diagnostic and health information from the USB system.
GetReport
Returns a snapshot of the current USB health and device state.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Health_GetReport_Result
|
PolicyProvider
Defined in fuchsia.usb.policy/policy.fidl
An interface to monitor dynamic changes to the USB device state.
WatchDeviceState
Notify a client of an updated device state value via a hanging get. The first time this is called, it will return right away with the current state. Subsequent calls will hang until there is a change to report. Returns a table containing the updated device state.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
fuchsia.hardware.usb.policy/DeviceStateWatcher_WatchDeviceState_Result
|
TABLES
HealthReport
Defined in fuchsia.usb.policy/policy.fidl
A snapshot of the USB controller's current status and health.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
state |
fuchsia.hardware.usb.policy/DeviceState
|
The current state of the device as defined by the USB 2.0 spec. |
2 |
address |
uint8
|
The address assigned to the USB device. |
UNIONS
Health_GetReport_Result strict
Defined in fuchsia.usb.policy/policy.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
HealthReport
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
SERVICES
Service
Defined in fuchsia.usb.policy/policy.fidl
| Name | Type | Transport |
|---|---|---|
| provider |
fuchsia.usb.policy/PolicyProvider
|
Channel |