PROTOCOLS
Device
Defined in fuchsia.hardware.haptics/haptics.fidl
GetProperties
Returns the haptics-related properties of the haptics device.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_GetProperties_Result
|
SetAmplitude
Alters the gain on vibrations played in the future.
Request
| Name | Type |
|---|---|
amplitude |
float32
|
Response
| Name | Type |
|---|---|
payload |
Device_SetAmplitude_Result
|
StartVibration
Starts a vibration. Doesn't return until the vibration has completed or if StopVibration()
is called. Returns ZX_ERR_BAD_STATE if there is a vibration already playing.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_StartVibration_Result
|
StopVibration
Stops the vibration that is currently playing. Does nothing if there isn't a vibration
currently playing. All pending StartVibration() requests are completed immediately.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
Device_StopVibration_Result
|
STRUCTS
Device_GetProperties_Response
Defined in fuchsia.hardware.haptics/haptics.fidl
| Field | Type | Description | Default |
|---|---|---|---|
fundamental_resonant_frequency_hz |
float32
|
The fundamental resonant frequency (F0) (in hertz) of the haptics device. Also known as F0. |
No default |
quality_factor |
float32
|
The quality factor of the haptics device. Also known as the Q factor. |
No default |
Device_SetAmplitude_Response
Defined in fuchsia.hardware.haptics/haptics.fidl
<EMPTY>
Device_StartVibration_Response
Defined in fuchsia.hardware.haptics/haptics.fidl
<EMPTY>
Device_StopVibration_Response
Defined in fuchsia.hardware.haptics/haptics.fidl
<EMPTY>
UNIONS
Device_GetProperties_Result strict
Defined in fuchsia.hardware.haptics/haptics.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_GetProperties_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_SetAmplitude_Result strict
Defined in fuchsia.hardware.haptics/haptics.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_SetAmplitude_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_StartVibration_Result strict
Defined in fuchsia.hardware.haptics/haptics.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_StartVibration_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_StopVibration_Result strict
Defined in fuchsia.hardware.haptics/haptics.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Device_StopVibration_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
SERVICES
Service
Defined in fuchsia.hardware.haptics/haptics.fidl
| Name | Type | Transport |
|---|---|---|
| device |
fuchsia.hardware.haptics/Device
|
Channel |