SmartDeviceModel.getDpSchema()
Requires:
@ray-js/panel-sdk≥1.0.0
Description
Get the smart device DP schema (function point) mapping
Parameters
None
Return Value
Type: Record<string, DpSchema>
DP model mapping object where the key is the DP code and the value includes attr, mode, property, type, etc.
Referenced Types
interface
DpSchema| Property | Type | Description |
|---|---|---|
attr | number | DP attribute flag bit, used to mark additional capabilities of the DP |
canTrigger | boolean | Whether it can be used as an automation trigger condition |
code | string | DP code, e.g., switch |
defaultRecommend | boolean | Whether it is the default recommended DP |
editPermission | boolean | Whether it has edit permission |
executable | boolean | Whether it can be issued (sent downstream) |
extContent | string | DP extension content, typically a JSON string |
iconname | string | DP icon name |
id | string | number | DP ID |
mode | "rw" | "ro" | "wr" | DP mode type rw: writable and reportable (read/write) ro: report-only (read-only) wr: write-only |
name | string | DP name, typically used in voice scenarios |
| DP attributes | ||
type | "raw" | "obj" | DP data type categories: raw for raw byte stream, obj for structured object |