通訊協定
TripPoint
如 fuchsia.hardware.trippoint/trippoint.fidl
伺服器應強制規定隨時只能連線一個用戶端,並設定行程點。如果第二個用戶端在用戶端連線的情況下嘗試設定行程點,伺服器應傳回 ZX_ERR_ALREADY_BOUND,表示目前忙碌中。伺服器可允許多個用戶端存取
GetSensorName
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| name | fuchsia.hardware.temperature/SensorName | 
GetTemperatureCelsius
目前溫度以攝氏度為單位。
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| status | zx/Status | 
| temp | float32 | 
GetTripPointDescriptors
傳回 N 個描述元。每個描述元會描述硬體支援的一個行程點。
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| payload | TripPoint_GetTripPointDescriptors_Result | 
SetTripPoints
設定 0 或多個硬體三點。
要求
| 名稱 | 類型 | 
|---|---|
| descriptors | vector<TripPointDescriptor> | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | TripPoint_SetTripPoints_Result | 
WaitForAnyTripPoint
Haning get API,會在任何已設定的行程點交叉時傳回。如果未設定行程點,或呼叫 SetTripPoints 清除所有已設定的行程點,則會傳回 ZX_ERR_BAD_STATE。
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| payload | TripPoint_WaitForAnyTripPoint_Result | 
結構化
ClearedTripPoint
如 fuchsia.hardware.trippoint/trippoint.fidl
<EMPTY>
OneshotTempAboveTripPoint
如 fuchsia.hardware.trippoint/trippoint.fidl
詳情請參閱 TripPointType 中的註解。
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| critical_temperature_celsius | float32 | 行程點啟動時的溫度。 | 無預設 | 
OneshotTempBelowTripPoint
如 fuchsia.hardware.trippoint/trippoint.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| critical_temperature_celsius | float32 | 行程點啟動時的溫度。 | 無預設 | 
TripDeviceMetadata
如 fuchsia.hardware.trippoint/trippoint.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| critical_temp_celsius | float32 | 最高溫度 (攝氏)。 | 無預設 | 
TripPointDescriptor
如 fuchsia.hardware.trippoint/trippoint.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| type | TripPointType | 此行程點 (由硬體定義的類型) 類型。 | 無預設 | 
| index | uint32 | 要設定的行程點索引。行程點一律為 0 到 N-1,其中 N 是可用的硬體行程點數量。 | 無預設 | 
| configuration | TripPointValue | 如果未設定,這項設定的類型為  | 無預設 | 
TripPointResult
如 fuchsia.hardware.trippoint/trippoint.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| measured_temperature_celsius | float32 | 感應器測量的溫度。如未執行測量,則為 NaN。 | 無預設 | 
| index | uint32 | 設定的行程點索引。 | 無預設 | 
TripPoint_GetTripPointDescriptors_Response
定義於 fuchsia.hardware.trippoint/trippoint.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| descriptors | vector<TripPointDescriptor> | 無預設 | 
TripPoint_SetTripPoints_Response
定義於 fuchsia.hardware.trippoint/trippoint.fidl
<EMPTY>
TripPoint_WaitForAnyTripPoint_Response
定義於 fuchsia.hardware.trippoint/trippoint.fidl
| 欄位 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| result | TripPointResult | 無預設 | 
ENUMS
TripPointType 彈性
類型:uint16
如 fuchsia.hardware.trippoint/trippoint.fidl
表示特定行程點的類型。
| 名稱 | 值 | 說明 | 
|---|---|---|
| ONESHOT_TEMP_ABOVE | 1 | 這種類型的行程點具有一個重要溫度,也就是行程點觸發和方向的關鍵溫度。行程點啟動後,就無法設定,且必須修復才能再次觸發。 | 
| ONESHOT_TEMP_BELOW | 2 | 
聯合國
TripPointValue 彈性
如 fuchsia.hardware.trippoint/trippoint.fidl
用來定義所有可能類型的行程點的聯集。
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | cleared_trip_point | ClearedTripPoint | 這是特殊的保留類型,用戶端可使用此類型清除先前設定的行程點。 | 
| 2 | oneshot_temp_above_trip_point | OneshotTempAboveTripPoint | |
| 3 | oneshot_temp_below_trip_point | OneshotTempBelowTripPoint | 
TripPoint_GetTripPointDescriptors_Result (嚴格)
如 fuchsia.hardware.trippoint/trippoint.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | TripPoint_GetTripPointDescriptors_Response | |
| 2 | err | zx/Status | |
| 3 | framework_err | internal | 
TripPoint_SetTripPoints_Result (嚴格)
如 fuchsia.hardware.trippoint/trippoint.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | TripPoint_SetTripPoints_Response | |
| 2 | err | zx/Status | |
| 3 | framework_err | internal | 
TripPoint_WaitForAnyTripPoint_Result (嚴格)
如 fuchsia.hardware.trippoint/trippoint.fidl
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | TripPoint_WaitForAnyTripPoint_Response | |
| 2 | err | zx/Status | |
| 3 | framework_err | internal | 
服務
TripPointService
如 fuchsia.hardware.trippoint/trippoint.fidl
| 名稱 | 類型 | 傳輸 | 
|---|---|---|
| 行程點 | fuchsia.hardware.trippoint/TripPoint | 版本 |