fuchsia.device

PROTOCOLS

Controller

Defined in fuchsia.device/controller.fidl

Interface for manipulating a device in a devhost

Bind

Attempt to bind the requested driver to this device

Request

NameType
driver string[1024]

Response

NameType
status int32

ScheduleUnbind

Disconnect this device and allow its parent to be bound again. This may not complete before it returns.

Request

NameType

Response

NameType
status int32

GetDriverName

Return the name of the driver managing this the device

Request

NameType

Response

NameType
status int32
name string[32]?

GetDeviceName

Return the name of the device

Request

NameType

Response

NameType
name string[32]

GetTopologicalPath

Return the topological path for this device

Request

NameType

Response

NameType
status int32
path string[1024]?

GetEventHandle

Get an event for monitoring device conditions (see DEVICE_SIGNAL_* constants)

Request

NameType

Response

NameType
status int32
event handle<event>?

GetDriverLogFlags

Return the current logging flags for this device's driver

Request

NameType

Response

NameType
status int32
flags uint32

SetDriverLogFlags

Set the logging flags for this device's driver. Each set bit in clear_flags will be cleared in the log flags state. Each set bit in set_flags will then be set in the log flags state.

Request

NameType
clear_flags uint32
set_flags uint32

Response

NameType
status int32

DebugSuspend

Debug command: execute the device's suspend hook

Request

NameType

Response

NameType
status int32

DebugResume

Debug command: execute the device's resume hook

Request

NameType

Response

NameType
status int32

RunCompatibilityTests

RunCompatibilityTests: Runs compatibility tests for the driver that binds to this device. The |hook_wait_time| is the time that the driver expects to take for each device hook in nanoseconds. Returns whether the driver passed the compatibility check.

Request

NameType
hook_wait_time int64

Response

NameType
status uint32

NameProvider

Defined in fuchsia.device/name-provider.fidl

Interface for getting device names.

GetDeviceName

Return the name of this Fuchsia device.

Request

NameType

Response

NameType
result NameProvider_GetDeviceName_Result

STRUCTS

NameProvider_GetDeviceName_Response

Defined in fuchsia.device/generated

NameTypeDescriptionDefault
name string No default

UNIONS

NameProvider_GetDeviceName_Result

Defined in fuchsia.device/generated

NameTypeDescription
response NameProvider_GetDeviceName_Response
err int32

CONSTANTS

NameValueType
MAX_DEVICE_NAME_LEN 32 uint64
MAX_DEVICE_PATH_LEN 1024 uint64
MAX_DRIVER_NAME_LEN 32 uint64
MAX_DRIVER_PATH_LEN 1024 uint64
DEVICE_SIGNAL_READABLE 16777216 uint32
DEVICE_SIGNAL_OOB 33554432 uint32
DEVICE_SIGNAL_WRITABLE 67108864 uint32
DEVICE_SIGNAL_ERROR 134217728 uint32
DEVICE_SIGNAL_HANGUP 268435456 uint32
DEFAULT_DEVICE_NAME fuchsia String