mapPublishMatterDps(dpState: DpState, dpSchema: DpSchema)

Requires:
≥1.15.0

Description

Map standard DP state to Matter DP state (downlink scenario: standardDpState → matterDpState).

Parameters

ParameterTypeRequiredDescription
YesStandard-side DP state to be sent
YesdpSchema object

Return Value

Type: DpState
Converted Matter DP state

Referenced Types

typeDpValueDatapoint value type, which can be boolean, number, or string.
export type DpValue = boolean | number | string;

Valid Values

DpSchema.mode
ValueDescriptionSince
rw--
ro--
wr--
DpSchema.property.type
ValueDescriptionSince
string--
bool--
value--
enum--
bitmap--
raw--
DpSchema.type
ValueDescriptionSince
raw--
obj--

Examples

Example

import { createMatterKit } from '@ray-js/panel-sdk';

const matterKit = createMatterKit();
const matterDps = matterKit.mapPublishMatterDps(dpState, dpSchema);