通訊協定
InputDevice
定義於 fuchsia.input.report/device.fidl
InputDevice
驅動程式庫代表單一實體輸入裝置。InputDevice 也會為每個連線的用戶端維護 MAX_DEVICE_REPORT_COUNT
報告的內部 FIFO。用戶端讀取報表後,系統就會將報表從 FIFO 中移除。如果 FIFO 已滿,系統會捨棄最舊的報告,以便為收到報告騰出空間。
GetDescriptor
取得這部裝置的裝置描述元。
要求
<EMPTY>
回應
名稱 | 類型 |
---|---|
descriptor |
DeviceDescriptor
|
GetFeatureReport
取得指定裝置的功能報告。系統會要求裝置功能的狀態。
要求
<EMPTY>
回應
名稱 | 類型 |
---|---|
payload |
InputDevice_GetFeatureReport_Result
|
GetInputReport
在一般情況下,建議使用 InputReportReader 才能取得 InputReports。如果裝置不會自然傳送 InputReports,您可以使用這個方法要求指定裝置類型的報表。不會封鎖,如果不支援 GetInputReport
或 device_type
,就會傳回 ZX_ERR_NOT_SUPPORTED。
要求
名稱 | 類型 |
---|---|
device_type |
DeviceType
|
回應
名稱 | 類型 |
---|---|
payload |
InputDevice_GetInputReport_Result
|
GetInputReportsReader
在這部裝置上開啟新的 InputReportsReader。每位讀者都會收到自己的報表。
要求
名稱 | 類型 |
---|---|
reader |
server_end<InputReportsReader>
|
SendOutputReport
將單一輸出報告傳送至裝置。如果輸出報表未遵循 OutputDescriptor,則會擲回錯誤。
要求
名稱 | 類型 |
---|---|
report |
OutputReport
|
回應
名稱 | 類型 |
---|---|
payload |
InputDevice_SendOutputReport_Result
|
SetFeatureReport
為指定裝置設定功能報告。這會設定裝置功能的狀態。
要求
名稱 | 類型 |
---|---|
report |
FeatureReport
|
回應
名稱 | 類型 |
---|---|
payload |
InputDevice_SetFeatureReport_Result
|
InputReportsReader
定義於 fuchsia.input.report/device.fidl
每個 InputReportsReader
都有自己維護的 InputReports 財務資訊。呼叫 ReadInputReports 時,會清空 InputReports FIFO。如果在排除 FIFO 前建立過多 InputReports,系統將捨棄最舊的 InputReport,而且不會顯示相關通知。
ReadInputReports
此為 Hanging-Get 函式,可用來讀取 InputReport FIFO 中的報表。至少要有一份可用報表才會回覆。如果已有一個未完成的 Hanging-Get (掛斷) 功能,再次呼叫會傳回 ZX_ERR_ALREADY_BOUND。
要求
<EMPTY>
回應
名稱 | 類型 |
---|---|
payload |
InputReportsReader_ReadInputReports_Result
|
結構化
Axis
定義於 fuchsia.input.report/units.fidl
Axis
定義為 range
和 unit
。
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
range |
Range
|
無預設 | |
unit |
Unit
|
無預設 |
DeviceInfo
定義於 fuchsia.input.report/grow.fidl
DeviceInfo 可提供裝置的更多資訊,並可讓用戶端區分裝置 (例如,在兩個來自不同廠商的觸控螢幕之間)。如果裝置是 HID 裝置,則會提供裝置本身的 ID 資訊。其他非 HID 裝置則可在驅動程式庫中指派 ID,因此駕駛人必須負責指派有效的 ID。
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
vendor_id |
uint32
|
無預設 | |
product_id |
uint32
|
無預設 | |
version |
uint32
|
無預設 | |
polling_rate |
zx/Duration
|
輪詢率 (如果適用) 已新增:HEAD
|
無預設 |
InputDevice_GetFeatureReport_Response
定義於 fuchsia.input.report/device.fidl
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
report |
FeatureReport
|
無預設 |
InputDevice_GetInputReport_Response
定義於 fuchsia.input.report/device.fidl
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
report |
InputReport
|
無預設 |
InputDevice_SendOutputReport_Response
定義於 fuchsia.input.report/device.fidl
<EMPTY>
InputDevice_SetFeatureReport_Response
定義於 fuchsia.input.report/device.fidl
<EMPTY>
InputReportsReader_ReadInputReports_Response
定義於 fuchsia.input.report/device.fidl
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
reports |
vector<InputReport>[50]
|
無預設 |
範圍
定義於 fuchsia.input.report/units.fidl
說明值的 Range
。
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
min |
int64
|
無預設 | |
max |
int64
|
無預設 |
SensorAxis
定義於 fuchsia.input.report/sensor.fidl
SensorAxis
是一般的 Axis
,附帶額外的 SensorType
用來說明軸測量的項目。
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
axis |
Axis
|
無預設 | |
type |
SensorType
|
無預設 |
Unit
定義於 fuchsia.input.report/units.fidl
透過提供單位和單位的指數來說明指定單位。例如:南公尺類型為 METERS,指數為 -9。
欄位 | 類型 | 說明 | 預設 |
---|---|---|---|
type |
UnitType
|
無預設 | |
exponent |
int32
|
無預設 |
ENUMS
ConsumerControlButton 彈性
類型:uint32
定義於 fuchsia.input.report/consumer_control.fidl
這些 ControlButton 代表開啟/關閉按鈕,用途是變更主機設定。
名稱 | 值 | 說明 |
---|---|---|
VOLUME_UP |
1 |
這個按鈕代表音量正在增加。 |
VOLUME_DOWN |
2 |
這個按鈕表示音量降低。 |
暫停 |
3 |
這個按鈕表示暫停。 |
FACTORY_RESET |
4 |
這個按鈕表示要將主機恢復原廠設定。 |
MIC_MUTE |
5 |
這個按鈕代表將主機的麥克風設為靜音。 |
重新啟動 |
6 |
這個按鈕代表正在重新啟動主機。 |
CAMERA_DISABLE |
7 |
這個按鈕代表停用主機上的相機。 |
FUNCTION |
8 |
此按鈕代表一個函式。 已新增:HEAD
|
電源 |
9 |
這個按鈕代表電源按鈕。 已新增:HEAD
|
DeviceType 彈性
類型:uint32
定義於 fuchsia.input.report/device.fidl
InputReport 欄位要由 InputDevice.GetInputReport 填入。
名稱 | 值 | 說明 |
---|---|---|
MOUSE |
0 |
|
感測器 |
1 |
|
TOUCH |
2 |
|
鍵盤 |
3 |
|
CONSUMER_CONTROL |
4 |
LedType 彈性
類型:uint32
定義於 fuchsia.input.report/led.fidl
LedType 代表裝置上可開啟或關閉的 LED。在適用情況下,每個 LED 的定義都取自下列其中一個來源,並帶有 Fuchsia 專屬的數值:
- 用量頁面 0x0008 (LED) 的 USB HID 使用代碼
名稱 | 值 | 說明 |
---|---|---|
NUM_LOCK |
1 |
LED 表示鍵盤的數字鎖定功能已啟用。 對應 USB HID 頁面 0x0008 使用 0x0001 |
CAPS_LOCK |
2 |
LED 表示鍵盤的大寫鎖定功能已啟用。 對應 USB HID 頁面 0x0008 使用 0x0002 |
SCROLL_LOCK |
3 |
LED 燈,表示已啟用鍵盤的捲動鎖定功能。對應 USB HID 頁面 0x0008 使用 0x0003 |
撰寫 |
4 |
LED 燈,代表已啟用鍵盤的撰寫模式。對應 USB HID 頁面 0x0008 用量 0x0004 |
KANA |
5 |
LED 表示已啟用鍵盤的 Kana 模式。對應 USB HID 頁面 0x0008 使用 0x0005 |
SensorReportingState 彈性
類型:uint32
定義於 fuchsia.input.report/sensor.fidl
SensorReportingState
可判斷感應器傳送報告的時機。
名稱 | 值 | 說明 |
---|---|---|
REPORT_NO_EVENTS |
1 |
系統不會傳送來自感應器的事件。 |
REPORT_ALL_EVENTS |
2 |
所有事件都將從感應器傳送。大多數感應器都可以透過 |
REPORT_THRESHOLD_EVENTS |
3 |
系統只會回報超過門檻的事件。 |
SensorType 彈性
類型:uint32
定義於 fuchsia.input.report/sensor.fidl
每個感應器值都有對應的 SensorType,即可解釋該值在世界各地的測量情形。
名稱 | 值 | 說明 |
---|---|---|
ACCELEROMETER_X |
1 |
X 軸加速。 |
ACCELEROMETER_Y |
2 |
Y 軸加速。 |
ACCELEROMETER_Z |
3 |
Z 軸加速。 |
MAGNETOMETER_X |
4 |
X 軸磁場的強度。 |
MAGNETOMETER_Y |
5 |
Y 軸磁場的強度。 |
MAGNETOMETER_Z |
6 |
Z 軸磁場的強度。 |
GYROSCOPE_X |
7 |
X 方向的角度速率,逆時針移動。 |
GYROSCOPE_Y |
8 |
Y 軸方向逆時針移動的角度。 |
GYROSCOPE_Z |
9 |
Z 軸方向逆時針移動的角度。 |
LIGHT_ILLUMINANCE |
10 |
燈光的環境等級。 |
LIGHT_RED |
11 |
紅燈的環境音。 |
LIGHT_GREEN |
12 |
綠燈的環境等級。 |
LIGHT_BLUE |
13 |
藍光的環境等級。 |
TouchConfigurationInputMode 彈性
類型:uint32
定義於 fuchsia.input.report/touch.fidl
輸入模式,用於指出輸入報表應使用哪個頂層集合。這些值必須對應於通用序列匯流排 (USB) 規格 (https://usb.org/sites/default/files/hut1_22.pdf) HID 使用表 16.7 中定義的輸入模式。
名稱 | 值 | 說明 |
---|---|---|
MOUSE_COLLECTION |
0 |
如需報表資料,請使用滑鼠集合。 |
WINDOWS_PRECISION_TOUCHPAD_COLLECTION |
3 |
使用 Windows 精確度觸控板收集來回報報告資料。由 Windows Precision 觸控板必要的 HID 頂層集合:https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-概念-touchpad-required-hid-top-level-collections。 |
TouchType 彈性
類型:uint32
定義於 fuchsia.input.report/touch.fidl
觸控來源的裝置類型。
名稱 | 值 | 說明 |
---|---|---|
觸控螢幕 |
1 |
觸控螢幕有直接的手指輸入,而且與螢幕建立關聯。 |
觸控板 |
2 |
觸控板是一種可追蹤手指位置的指標裝置。 |
UnitType 彈性
類型:uint32
定義於 fuchsia.input.report/units.fidl
這種格式提供簡易的標準化方式來指定單位。您可視需求新增單位。每個 UnitType 都應以名稱完全區分的特定單位命名 (例如,使用 METERS 而非 DISTANCE)。需要區分的較複雜單位,開頭應為 SI_ (適用於國際單位) 或 ENGLISH_ (英文單位系統)。
名稱 | 值 | 說明 |
---|---|---|
無 |
0 |
裝置未指定單位。 |
其他 |
1 |
裝置指定的單位無法轉換為任何其他單位。 |
MET: |
2 |
測量距離 (以公尺為單位)。 |
微粒 |
3 |
測量單位的質量 (以公克為單位)。 |
定義 |
4 |
旋轉角度的度量。 |
ENGLISH_ANGULAR_VELOCITY |
5 |
測量角速度 (以每秒度為單位)。 |
SI_LINEAR_VELOCITY |
6 |
測量線性速率 (以公尺/秒為單位)。 |
SI_LINEAR_ACCELERATION |
7 |
加速測量單位,以公尺/秒平方為單位。 |
網路攝影機 |
8 |
一種網路器中的磁通量。 |
地點 |
9 |
以淺粉色測量發光強度的測量結果。 |
通過 |
10 |
壓力的測量值 (以帕為單位)。 |
奢華 |
11 |
|
秒 |
12 |
VendorGoogleProductId 彈性
類型:uint32
定義於 fuchsia.input.report/device_ids.fidl
以下是此輸入裝置所代表產品的 ProductId。如果輸入裝置是 HID 裝置,ProductId 會直接對應至 HID ProductId。如果輸入裝置不是 HID 裝置,ProductId 將大於 0xFFFF,也就是最大 HID ProductId。
名稱 | 值 | 說明 |
---|---|---|
FOCALTECH_TOUCHSCREEN |
65537 |
以下是非 HID 供應商 ID |
AMS_LIGHT_SENSOR |
65538 |
|
PC_PS2_KEYBOARD |
65539 |
|
PC_PS2_MOUSE |
65540 |
|
ADC_BUTTONS |
65541 |
已新增:HEAD
|
GOODIX_TOUCHSCREEN |
65542 |
已新增:HEAD
|
HID_BUTTONS |
65543 |
已新增:HEAD
|
VIRTIO_MOUSE |
65544 |
已新增:HEAD
|
VIRTIO_KEYBOARD |
65545 |
已新增:HEAD
|
VIRTIO_TOUCHSCREEN |
65546 |
已新增:HEAD
|
GOLDFISH_ACCELERATION_SENSOR |
2417819649 |
|
GOLDFISH_GYROSCOPE_SENSOR |
2417819650 |
|
GOLDFISH_RGBC_LIGHT_SENSOR |
2417819651 |
VendorId 彈性
類型:uint32
定義於 fuchsia.input.report/device_ids.fidl
VendorId 代表建立這個輸入裝置的供應商。如果輸入裝置是 HID 裝置,VendorId 會直接對應至 HID VendorId。如果輸入裝置不是 HID 裝置,則 VendorId 會大於 0xFFFF,也就是最大 HID VendorId。
名稱 | 值 | 說明 |
---|---|---|
Google 體驗 |
6353 |
以下是 HID VendorIds,範圍為 0x0000 - 0xFFFF。 |
資料表
ConsumerControlDescriptor
定義於 fuchsia.input.report/consumer_control.fidl
Fuchsia ConsumerControl 代表專門在主機上變更值的裝置。一般控制選項包括音量、電源和媒體播放。(你可以將電視遙控器視為典型的 ConsumerControl)。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
input |
ConsumerControlInputDescriptor
|
ConsumerControlInputDescriptor
定義於 fuchsia.input.report/consumer_control.fidl
說明從 ConsumerControl 裝置傳送至主機的輸入報表格式。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
buttons |
vector<ConsumerControlButton>[255]
|
這部裝置內含的按鈕清單。 |
ConsumerControlInputReport
定義於 fuchsia.input.report/consumer_control.fidl
ConsumerControl 裝置提供的單一報表。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
pressed_buttons |
vector<ConsumerControlButton>[255]
|
目前按下的按鈕清單。 |
ContactInputDescriptor
定義於 fuchsia.input.report/touch.fidl
ContactInputDescriptor
說明與觸控裝置上的觸控關聯欄位。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
position_x |
Axis
|
說明 X 軸的報表。 |
2 |
position_y |
Axis
|
說明 Y 軸的報表。 |
3 |
pressure |
Axis
|
接觸的壓力。 |
4 |
contact_width |
Axis
|
接觸區域的寬度。 |
5 |
contact_height |
Axis
|
接觸區域的高度。 |
ContactInputReport
定義於 fuchsia.input.report/touch.fidl
ContactInputReport
描述在觸控裝置上一次輕觸。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
contact_id |
uint32
|
這位聯絡人的 ID。 |
2 |
position_x |
int64
|
聯絡人在 X 軸上的位置。 |
3 |
position_y |
int64
|
聯絡人在 Y 軸上的位置。 |
4 |
pressure |
int64
|
接觸的壓力。 |
5 |
contact_width |
int64
|
觸控聯絡人周圍的定界框寬度。與 |
6 |
contact_height |
int64
|
觸控聯絡人周圍的定界框高度。與 |
7 |
confidence |
bool
|
也稱為「觸控有效」。表示裝置對觸控聯絡人是有效聯絡人的信心。如果聯絡人不是有效的觸控,裝置應回報 0。如果聯絡人有意使用且有效 (例如:觸控點),裝置應回報 1 新增日期:9
|
DeviceDescriptor
定義於 fuchsia.input.report/grow.fidl
DeviceDescriptor
描述實體輸入裝置。某些實體裝置可能會傳送多種報告 (例如,實體觸控螢幕可以傳送觸控和觸控筆報告,因此會同時包含 TouchDescriptor 和 StylusDescriptor)。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
device_info |
DeviceInfo
|
應一律顯示 |
2 |
mouse |
MouseDescriptor
|
如果 |
3 |
sensor |
SensorDescriptor
|
如果 |
4 |
touch |
TouchDescriptor
|
如果裝置有觸控裝置,且顯示 |
5 |
keyboard |
KeyboardDescriptor
|
當 |
6 |
consumer_control |
ConsumerControlDescriptor
|
如果 |
FeatureReport
定義於 fuchsia.input.report/report.fidl
含有輸入裝置功能資訊的單一報表。從裝置取得的功能報告會顯示裝置目前的狀態。傳送功能報告至裝置後,裝置就會設為該狀態。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
sensor |
SensorFeatureReport
|
|
2 |
touch |
TouchFeatureReport
|
InputReport
定義於 fuchsia.input.report/report.fidl
InputReport
是由輸入裝置建立的單一報表。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
event_time |
zx/Time
|
記錄事件時, |
2 |
mouse |
MouseInputReport
|
如果裝置含有滑鼠,系統會產生的 |
3 |
trace_id |
uint64
|
用於連結追蹤記錄非同步開始/結束事件的專屬 ID。 |
4 |
sensor |
SensorInputReport
|
如果裝置含有感應器,系統會產生的 |
5 |
touch |
TouchInputReport
|
|
6 |
keyboard |
KeyboardInputReport
|
如果裝置含有鍵盤,系統就會產生 |
7 |
consumer_control |
ConsumerControlInputReport
|
|
8 |
report_id |
uint8
|
描述這個 InputReport 的描述元會有相符的 ReportID。如果沒有,則 report_id 為 0。 |
KeyboardDescriptor
定義於 fuchsia.input.report/keyboard.fidl
鍵盤裝置的功能。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
input |
KeyboardInputDescriptor
|
|
2 |
output |
KeyboardOutputDescriptor
|
KeyboardInputDescriptor
定義於 fuchsia.input.report/keyboard.fidl
說明從鍵盤傳送至裝置的輸入報表格式。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
2 |
keys3 |
vector<fuchsia.input/Key>[256]
|
這個鍵盤包含的按鍵清單。 |
KeyboardInputReport
定義於 fuchsia.input.report/keyboard.fidl
由鍵盤裝置製作的單一報表。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
2 |
pressed_keys3 |
vector<fuchsia.input/Key>[256]
|
目前按下的按鍵清單。 |
KeyboardOutputDescriptor
定義於 fuchsia.input.report/keyboard.fidl
說明可傳送到鍵盤的輸出報表格式。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
leds |
vector<LedType>[256]
|
可切換的鍵盤 LED 清單。 |
KeyboardOutputReport
定義於 fuchsia.input.report/keyboard.fidl
單一報表內含鍵盤的輸出資訊。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
enabled_leds |
vector<LedType>[256]
|
系統會開啟這份清單中的每個 LED 燈。系統會關閉清單未列出的任何 LED 燈。 |
MouseDescriptor
定義於 fuchsia.input.report/mouse.fidl
滑鼠裝置的功能。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
input |
MouseInputDescriptor
|
MouseInputDescriptor
定義於 fuchsia.input.report/mouse.fidl
說明從滑鼠傳送至裝置的輸入報表格式。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
movement_x |
Axis
|
相對 X 動作的範圍。 |
2 |
movement_y |
Axis
|
Y 相對動作的範圍。 |
3 |
scroll_v |
Axis
|
相對垂直捲動的範圍。 |
4 |
scroll_h |
Axis
|
相對水平捲動的範圍。 |
5 |
buttons |
vector<uint8>[32]
|
這是滑鼠按鈕的向量 ID。 |
6 |
position_x |
Axis
|
X 位置的範圍。 位置的主要用途是像 VNC 這樣的虛擬滑鼠。 |
7 |
position_y |
Axis
|
Y 位置的範圍。 位置的主要用途是像 VNC 這樣的虛擬滑鼠。 |
MouseInputReport
定義於 fuchsia.input.report/mouse.fidl
MouseReport
提供滑鼠和目前按下的按鈕的相對動作。「相對」是指舊版報表與這份報表之間的移動趨勢。用戶端負責追蹤這個情況,並將其轉換成絕對移動。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
movement_x |
int64
|
相對 X 位置位移。 |
2 |
movement_y |
int64
|
相對 Y 位置位移。 |
3 |
scroll_v |
int64
|
相對垂直捲動的位移。 |
4 |
scroll_h |
int64
|
相對水平捲動移位。 |
5 |
pressed_buttons |
vector<uint8>[32]
|
目前按下的按鈕清單。 |
6 |
position_x |
int64
|
X 的位置。 位置的主要用途是像 VNC 這樣的虛擬滑鼠。 |
7 |
position_y |
int64
|
Y 的位置。 位置的主要用途是像 VNC 這樣的虛擬滑鼠。 |
OutputDescriptor
定義於 fuchsia.input.report/grow.fidl
說明實體輸入裝置會接受的輸出報告。輸出資訊通常代表對使用者的輸出結果 (例如 LED 燈、觸覺回饋等)。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
keyboard |
KeyboardOutputDescriptor
|
OutputReport
定義於 fuchsia.input.report/report.fidl
單一報表內含輸入裝置的輸出資訊。輸出資訊通常代表對使用者的輸出結果 (例如 LED 燈、觸覺回饋等)。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
keyboard |
KeyboardOutputReport
|
SelectiveReportingFeatureReport
定義於 fuchsia.input.report/touch.fidl
選擇性報表功能報表,指明系統回報的輸入類型。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
surface_switch |
bool
|
如果條件是如此,裝置會回報途徑聯絡人。 |
2 |
button_switch |
bool
|
如果為 true,裝置會回報按鈕狀態。 |
SensorDescriptor
定義於 fuchsia.input.report/sensor.fidl
感應器裝置的能力。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
input |
vector<SensorInputDescriptor>[255]
|
|
2 |
feature |
vector<SensorFeatureDescriptor>[255]
|
SensorFeatureDescriptor
定義於 fuchsia.input.report/sensor.fidl
說明感應器功能報告的格式。您可以透過感應器要求功能報告,或傳送至感應器。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
report_interval |
Axis
|
說明這個感應器支援的最小和最大報表間隔。 |
2 |
sensitivity |
vector<SensorAxis>[100]
|
設定指定 |
3 |
supports_reporting_state |
bool
|
如果設為 True,表示 SensorFeatureReport 支援設定 SensorReportingState。 |
4 |
threshold_high |
vector<SensorAxis>[100]
|
設定指定 |
5 |
threshold_low |
vector<SensorAxis>[100]
|
為指定 |
6 |
sampling_rate |
Axis
|
說明這個感應器支援的最小和最大取樣率。 |
7 |
report_id |
uint8
|
目前描述元的 ReportID。含有相同報表 ID 的報表應與這個描述元建立關聯。 |
SensorFeatureReport
定義於 fuchsia.input.report/sensor.fidl
SensorFeatureReport 可說明指定感應器的功能。如果將 FeatureReport 傳送至輸入裝置,則會設定裝置設定。如果是從輸入裝置要求 FeatureReport,就會顯示裝置目前的設定。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
report_interval |
int64
|
感應器傳送報告的間隔時間。 |
2 |
sensitivity |
vector<int64>[100]
|
各種 |
3 |
reporting_state |
SensorReportingState
|
這項設定可決定感應器傳送報告的時間。 |
4 |
threshold_high |
vector<int64>[100]
|
各種 |
5 |
threshold_low |
vector<int64>[100]
|
各種 |
6 |
sampling_rate |
int64
|
感應器的取樣率, |
SensorInputDescriptor
定義於 fuchsia.input.report/sensor.fidl
說明從感應器傳送至裝置的輸入報表格式。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
values |
vector<SensorAxis>[100]
|
|
2 |
report_id |
uint8
|
目前描述元的 ReportID。含有相同報表 ID 的報表應與這個描述元建立關聯。 |
SensorInputReport
定義於 fuchsia.input.report/sensor.fidl
SensorReport
提供感應器在特定時間點測量的值。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
values |
vector<int64>[100]
|
|
TouchDescriptor
定義於 fuchsia.input.report/touch.fidl
觸控裝置的功能。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
input |
TouchInputDescriptor
|
|
2 |
feature |
TouchFeatureDescriptor
|
TouchFeatureDescriptor
定義於 fuchsia.input.report/touch.fidl
說明觸控板設定功能報告的格式。您可以使用觸控板要求功能報告,或傳送至觸控板。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
supports_input_mode |
bool
|
指出觸控功能描述元是否支援不同的輸入模式。 |
2 |
supports_selective_reporting |
bool
|
指出觸控功能描述元是否支援選擇性回報功能。 |
TouchFeatureReport
定義於 fuchsia.input.report/touch.fidl
TouchFeatureReport 可說明特定觸控裝置的功能。如果將 FeatureReport 傳送至輸入裝置,則會設定裝置設定。如果是從輸入裝置要求 FeatureReport,就會顯示裝置目前的設定。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
input_mode |
TouchConfigurationInputMode
|
輸入模式目前正在回報。 |
2 |
selective_reporting |
SelectiveReportingFeatureReport
|
目前回報的報表類型。 |
TouchInputDescriptor
定義於 fuchsia.input.report/touch.fidl
說明從鍵盤傳送至裝置的輸入報表格式。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
contacts |
vector<ContactInputDescriptor>[10]
|
與這個觸控描述元相關聯的聯絡人描述元。 |
2 |
max_contacts |
uint32
|
這個觸控裝置一次可回報的聯絡人數量上限。 |
3 |
touch_type |
TouchType
|
使用的觸控裝置類型。 |
4 |
buttons |
vector<uint8>[10]
|
觸控裝置上的實體按鈕 ID。 |
TouchInputReport
定義於 fuchsia.input.report/touch.fidl
TouchInputReport
說明目前觸控螢幕記錄的聯絡人。
序數 | 欄位 | 類型 | 說明 |
---|---|---|---|
1 |
contacts |
vector<ContactInputReport>[10]
|
裝置目前回報的聯絡人。 |
2 |
pressed_buttons |
vector<uint8>[10]
|
目前所按下按鈕的 ID。 |
聯合國
InputDevice_GetFeatureReport_Result 嚴格
定義於 fuchsia.input.report/device.fidl
序數 | Variant | 類型 | 說明 |
---|---|---|---|
1 |
response |
InputDevice_GetFeatureReport_Response
|
|
2 |
err |
zx/Status
|
InputDevice_GetInputReport_Result 嚴格
定義於 fuchsia.input.report/device.fidl
序數 | Variant | 類型 | 說明 |
---|---|---|---|
1 |
response |
InputDevice_GetInputReport_Response
|
|
2 |
err |
zx/Status
|
InputDevice_SendOutputReport_Result 嚴格
定義於 fuchsia.input.report/device.fidl
序數 | Variant | 類型 | 說明 |
---|---|---|---|
1 |
response |
InputDevice_SendOutputReport_Response
|
|
2 |
err |
zx/Status
|
InputDevice_SetFeatureReport_Result 嚴格
定義於 fuchsia.input.report/device.fidl
序數 | Variant | 類型 | 說明 |
---|---|---|---|
1 |
response |
InputDevice_SetFeatureReport_Response
|
|
2 |
err |
zx/Status
|
InputReportsReader_ReadInputReports_Result 嚴格
定義於 fuchsia.input.report/device.fidl
序數 | Variant | 類型 | 說明 |
---|---|---|---|
1 |
response |
InputReportsReader_ReadInputReports_Response
|
|
2 |
err |
zx/Status
|
業者
名稱 | 值 | 類型 | 說明 |
---|---|---|---|
CONSUMER_CONTROL_MAX_NUM_BUTTONS |
255
|
uint32 |
ConsumerControl 向量的硬式編碼大小上限。如果我們發現裝置上的物件數量超過無法表示的數量,則應增加這些尺寸。 |
KEYBOARD_MAX_NUM_KEYS |
256
|
uint32 |
鍵盤向量的硬式編碼大小上限。如果鍵盤顯示的物件數量超過實際的顯示比例,則應增加這些尺寸。 |
KEYBOARD_MAX_NUM_LEDS |
256
|
uint32 |
|
KEYBOARD_MAX_PRESSED_KEYS |
256
|
uint32 |
|
MAX_DEVICE_REPORT_COUNT |
50
|
uint32 |
|
MAX_REPORT_COUNT |
255
|
uint32 |
以硬式編碼方式設定的報表數量上限。由於報表 ID 只有 8 位元,因此一次只能產生 255 個不同的報表。 |
MOUSE_MAX_NUM_BUTTONS |
32
|
uint32 |
以硬式編碼方式設定滑鼠上限。日後如果因為按鈕多出更多按鈕,這應該就會增加。 |
SENSOR_MAX_VALUES |
100
|
uint32 |
感應器值數量上限的硬式編碼。日後如果感應器資料值更多,這應該就會增加。 |
TOUCH_MAX_CONTACTS |
10
|
uint32 |
每份報表的聯絡人數量上限。日後如果我們發現裝置數量超過上限,應該就會提高裝置用量。 |
TOUCH_MAX_NUM_BUTTONS |
10
|
uint32 |