fuchsia.device

Added: 7

PROTOCOLS

Controller

Defined in fuchsia.device/controller.fidl

Interface for manipulating a device in a devhost

Deprecation

This interface is moving to fuchsia.device.fs. Tracking bug: https://fxbug.dev/340316138 Please use that version of this protocol. Also, see //sdk/fidl/fuchsia.device.fs/README.md for future plans for DevFS.

Added: HEAD

Bind

Attempt to bind a driver to this device.

  • request driver This represents the suffix of a driver URL (e.g: "fvm.cm"). If this is non-empty, then the only drivers that will try to bind are ones that match this url suffix.

Request

NameType
driver string:1024

Response

NameType
payload Controller_Bind_Result

ConnectToController

Connect to the same Controller FIDL protocol.

Request

NameType
server server_end:Controller

ConnectToDeviceFidl

Connect to the underlying device's FIDL protocol. This connection will not be multiplexed with fuchsia.device.Controller or fuchsia.io.Node.

Request

NameType
server handle<channel>

GetTopologicalPath

Return the topological path for this device

Request

<EMPTY>

Response

NameType
payload Controller_GetTopologicalPath_Result

Rebind

Unbind all the children of this device, and then attempt to bind a driver to the device. This will not return until the bind completes.

  • request driver This represents the suffix of a driver URL (e.g: "fvm.cm"). If this is non-empty, then the only drivers that will try to bind are ones that match this url suffix.

Request

NameType
driver string:1024

Response

NameType
payload Controller_Rebind_Result

ScheduleUnbind

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

Request

<EMPTY>

Response

NameType
payload Controller_ScheduleUnbind_Result

UnbindChildren

This api will unbind all the children of this device synchronously. This will avoid watching for device removal by the clients.

Request

<EMPTY>

Response

NameType
payload Controller_UnbindChildren_Result

NameProvider

Defined in fuchsia.device/name-provider.fidl

Interface for getting device names.

Added: 7

GetDeviceName

Return the name of this Fuchsia device.

Request

<EMPTY>

Response

NameType
payload NameProvider_GetDeviceName_Result

STRUCTS

Controller_Bind_Response

Defined in fuchsia.device/controller.fidl

<EMPTY>

Controller_GetTopologicalPath_Response

Defined in fuchsia.device/controller.fidl

FieldTypeDescriptionDefault
path string:1024 No default

Controller_Rebind_Response

Defined in fuchsia.device/controller.fidl

<EMPTY>

Controller_ScheduleUnbind_Response

Defined in fuchsia.device/controller.fidl

<EMPTY>

Controller_UnbindChildren_Response

Defined in fuchsia.device/controller.fidl

<EMPTY>

NameProvider_GetDeviceName_Response

Defined in fuchsia.device/name-provider.fidl

FieldTypeDescriptionDefault
name string:255 No default

UNIONS

Controller_Bind_Result strict

Defined in fuchsia.device/controller.fidl

OrdinalVariantTypeDescription
response Controller_Bind_Response
err zx/Status

Controller_GetTopologicalPath_Result strict

Defined in fuchsia.device/controller.fidl

OrdinalVariantTypeDescription
response Controller_GetTopologicalPath_Response
err zx/Status

Controller_Rebind_Result strict

Defined in fuchsia.device/controller.fidl

OrdinalVariantTypeDescription
response Controller_Rebind_Response
err zx/Status

Controller_ScheduleUnbind_Result strict

Defined in fuchsia.device/controller.fidl

OrdinalVariantTypeDescription
response Controller_ScheduleUnbind_Response
err zx/Status

Controller_UnbindChildren_Result strict

Defined in fuchsia.device/controller.fidl

OrdinalVariantTypeDescription
response Controller_UnbindChildren_Response
err zx/Status

NameProvider_GetDeviceName_Result strict

Defined in fuchsia.device/name-provider.fidl

OrdinalVariantTypeDescription
response NameProvider_GetDeviceName_Response
err zx/Status

BITS

DeviceSignal strict

Type: uint32

Defined in fuchsia.device/controller.fidl

Deprecated: 7 Added: 7

NameValueDescription
16777216

Indicates the device is ready for reading.

33554432

Indicates an out-of-band state transition has occurred.

67108864

Indicates the device is ready for writing.

134217728

Indicates the device has encountered an error state.

268435456

Indicates the device has hung up on the current connection.

CONSTANTS

NameValueTypeDescription
DEFAULT_DEVICE_NAME fuchsia String
Added: HEAD
DEVICE_NAME_MAX 255 uint32

Maximum length of a device name (without a null byte), based on HOST_NAME_MAX as defined by <limits.h>.

Added: 7
MAX_DEVICE_NAME_LEN 32 uint64

Maxmium length for a device name

Added: HEAD
MAX_DEVICE_PATH_LEN 1024 uint64

Maximum length of a device path

Added: HEAD
MAX_DRIVER_NAME_LEN 32 uint64

Maxmium length for a driver name

Added: HEAD
MAX_DRIVER_PATH_LEN 1024 uint64

Maximum length for a driver path

Added: HEAD