mapMatterDpState(dpState: DpState, updateDpState: DpState, dpSchema: DpSchema, shouldConvert?: boolean)
Requires:
≥1.15.0
Description
Map Matter DP state to standard DP state (report/merge scenario: matterDpState → standardDpState).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Current full DP state | ||
| Yes | Subset of DPs involved in this change, used to determine which keys to convert | ||
| Yes | dpSchema object | ||
shouldConvert | boolean | No | Whether to perform numeric conversion; defaults to true (aligned with shouldConvert semantics in the interceptor) |
Return Value
Type: DpState
Converted Matter DP state
Referenced Types
type
DpValueDatapoint value type, which can be boolean, number, or string.Valid Values
DpSchema.mode
| Value | Description | Since |
|---|---|---|
rw | - | - |
ro | - | - |
wr | - | - |
DpSchema.property.type
| Value | Description | Since |
|---|---|---|
string | - | - |
bool | - | - |
value | - | - |
enum | - | - |
bitmap | - | - |
raw | - | - |
DpSchema.type
| Value | Description | Since |
|---|---|---|
raw | - | - |
obj | - | - |