@project-chip/matter.js 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/cjs/cluster/AccessControlCluster.js +105 -0
- package/dist/cjs/cluster/BasicInformationCluster.js +92 -0
- package/dist/cjs/cluster/BindingCluster.js +51 -0
- package/dist/cjs/cluster/BridgedDeviceBasicInformationCluster.js +75 -0
- package/dist/cjs/cluster/Cluster.js +49 -0
- package/dist/cjs/cluster/DescriptorCluster.js +53 -0
- package/dist/cjs/cluster/GeneralCommissioningCluster.js +89 -0
- package/dist/cjs/cluster/GroupsCluster.js +140 -0
- package/dist/cjs/cluster/IdentifyCluster.js +55 -0
- package/dist/cjs/cluster/LabelCluster.js +55 -0
- package/dist/cjs/cluster/OnOffCluster.js +105 -0
- package/dist/cjs/cluster/OperationalCredentialsCluster.js +205 -0
- package/dist/cjs/cluster/ScenesCluster.js +236 -0
- package/dist/cjs/common/AttributeId.js +23 -0
- package/dist/cjs/common/ClusterId.js +24 -0
- package/dist/cjs/common/DeviceTypeId.js +23 -0
- package/dist/cjs/common/EndpointNumber.js +23 -0
- package/dist/cjs/common/FabricId.js +24 -0
- package/dist/cjs/common/FabricIndex.js +28 -0
- package/dist/cjs/common/GroupId.js +30 -0
- package/dist/cjs/common/NodeId.js +31 -0
- package/dist/cjs/common/SubjectId.js +11 -0
- package/dist/cjs/common/VendorId.js +25 -0
- package/{dist-cjs → dist/cjs}/matter.js +12 -0
- package/dist/cjs/protocol/InteractionProtocol.js +136 -0
- package/dist/cjs/schema/BitmapSchema.js +133 -0
- package/dist/cjs/schema/Schema.js +26 -0
- package/dist/cjs/spec/Specifications.js +7 -0
- package/dist/cjs/tlv/TlvAny.js +71 -0
- package/dist/cjs/tlv/TlvArray.js +52 -0
- package/dist/cjs/tlv/TlvBoolean.js +27 -0
- package/dist/cjs/tlv/TlvCodec.js +248 -0
- package/dist/cjs/tlv/TlvNullable.js +37 -0
- package/dist/cjs/tlv/TlvNumber.js +83 -0
- package/dist/cjs/tlv/TlvObject.js +85 -0
- package/dist/cjs/tlv/TlvSchema.js +92 -0
- package/dist/cjs/tlv/TlvString.js +56 -0
- package/dist/cjs/tlv/TlvVoid.js +26 -0
- package/dist/cjs/tlv/TlvWrapper.js +27 -0
- package/dist/cjs/util/ByteArray.js +50 -0
- package/dist/cjs/util/DataReader.js +69 -0
- package/dist/cjs/util/DataWriter.js +102 -0
- package/dist/cjs/util/Number.js +46 -0
- package/dist/cjs/util/Type.js +10 -0
- package/dist/dts/cluster/AccessControlCluster.d.ts +108 -0
- package/dist/dts/cluster/BasicInformationCluster.d.ts +57 -0
- package/dist/dts/cluster/BindingCluster.d.ts +23 -0
- package/dist/dts/cluster/BridgedDeviceBasicInformationCluster.d.ts +53 -0
- package/dist/dts/cluster/Cluster.d.ts +109 -0
- package/dist/dts/cluster/DescriptorCluster.d.ts +25 -0
- package/dist/dts/cluster/GeneralCommissioningCluster.d.ts +94 -0
- package/dist/dts/cluster/GroupsCluster.d.ts +92 -0
- package/dist/dts/cluster/IdentifyCluster.d.ts +60 -0
- package/dist/dts/cluster/LabelCluster.d.ts +34 -0
- package/dist/dts/cluster/OnOffCluster.d.ts +85 -0
- package/dist/dts/cluster/OperationalCredentialsCluster.d.ts +156 -0
- package/dist/dts/cluster/ScenesCluster.d.ts +200 -0
- package/dist/dts/common/AttributeId.d.ts +17 -0
- package/dist/dts/common/ClusterId.d.ts +18 -0
- package/dist/dts/common/DeviceTypeId.d.ts +17 -0
- package/dist/dts/common/EndpointNumber.d.ts +17 -0
- package/dist/dts/common/FabricId.d.ts +18 -0
- package/dist/dts/common/FabricIndex.d.ts +22 -0
- package/dist/dts/common/GroupId.d.ts +24 -0
- package/dist/dts/common/NodeId.d.ts +19 -0
- package/dist/dts/common/SubjectId.d.ts +15 -0
- package/dist/dts/common/VendorId.d.ts +19 -0
- package/dist/{matter.d.ts → dts/matter.d.ts} +12 -0
- package/dist/dts/protocol/InteractionProtocol.d.ts +159 -0
- package/dist/{schema → dts/schema}/BitmapSchema.d.ts +15 -3
- package/dist/{schema → dts/schema}/Schema.d.ts +0 -0
- package/dist/{spec → dts/spec}/Specifications.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvAny.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvArray.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvBoolean.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvCodec.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvNullable.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvNumber.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvObject.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvSchema.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvString.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvVoid.d.ts +0 -0
- package/dist/{tlv → dts/tlv}/TlvWrapper.d.ts +0 -0
- package/dist/{util → dts/util}/ByteArray.d.ts +0 -0
- package/dist/{util → dts/util}/DataReader.d.ts +0 -0
- package/dist/{util → dts/util}/DataWriter.d.ts +0 -0
- package/dist/{util → dts/util}/Number.d.ts +0 -0
- package/dist/{util → dts/util}/Type.d.ts +1 -0
- package/dist/es/cluster/AccessControlCluster.js +102 -0
- package/dist/es/cluster/BasicInformationCluster.js +89 -0
- package/dist/es/cluster/BindingCluster.js +48 -0
- package/dist/es/cluster/BridgedDeviceBasicInformationCluster.js +72 -0
- package/dist/es/cluster/Cluster.js +36 -0
- package/dist/es/cluster/DescriptorCluster.js +50 -0
- package/dist/es/cluster/GeneralCommissioningCluster.js +86 -0
- package/dist/es/cluster/GroupsCluster.js +137 -0
- package/dist/es/cluster/IdentifyCluster.js +52 -0
- package/dist/es/cluster/LabelCluster.js +52 -0
- package/dist/es/cluster/OnOffCluster.js +102 -0
- package/dist/es/cluster/OperationalCredentialsCluster.js +202 -0
- package/dist/es/cluster/ScenesCluster.js +233 -0
- package/dist/es/common/AttributeId.js +19 -0
- package/dist/es/common/ClusterId.js +20 -0
- package/dist/es/common/DeviceTypeId.js +19 -0
- package/dist/es/common/EndpointNumber.js +19 -0
- package/dist/es/common/FabricId.js +20 -0
- package/dist/es/common/FabricIndex.js +24 -0
- package/dist/es/common/GroupId.js +26 -0
- package/dist/es/common/NodeId.js +27 -0
- package/dist/es/common/SubjectId.js +8 -0
- package/dist/es/common/VendorId.js +21 -0
- package/dist/{matter.js → es/matter.js} +12 -0
- package/dist/es/protocol/InteractionProtocol.js +133 -0
- package/dist/es/schema/BitmapSchema.js +125 -0
- package/dist/{schema → es/schema}/Schema.js +0 -0
- package/dist/{spec → es/spec}/Specifications.js +0 -0
- package/dist/{tlv → es/tlv}/TlvAny.js +0 -0
- package/dist/{tlv → es/tlv}/TlvArray.js +0 -0
- package/dist/{tlv → es/tlv}/TlvBoolean.js +0 -0
- package/dist/{tlv → es/tlv}/TlvCodec.js +0 -0
- package/dist/{tlv → es/tlv}/TlvNullable.js +0 -0
- package/dist/{tlv → es/tlv}/TlvNumber.js +0 -0
- package/dist/{tlv → es/tlv}/TlvObject.js +6 -2
- package/dist/{tlv → es/tlv}/TlvSchema.js +0 -0
- package/dist/{tlv → es/tlv}/TlvString.js +0 -0
- package/dist/{tlv → es/tlv}/TlvVoid.js +0 -0
- package/dist/{tlv → es/tlv}/TlvWrapper.js +0 -0
- package/dist/{util → es/util}/ByteArray.js +2 -0
- package/dist/{util → es/util}/DataReader.js +0 -0
- package/dist/{util → es/util}/DataWriter.js +0 -0
- package/dist/{util → es/util}/Number.js +0 -0
- package/dist/{util → es/util}/Type.js +1 -1
- package/package.json +6 -6
- package/dist/schema/BitmapSchema.js +0 -48
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Cluster, WritableAttribute, Attribute, Event } from "./Cluster.js";
|
|
7
|
+
/**
|
|
8
|
+
* List of privileges that can be granted to a subject.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.10.5.3
|
|
11
|
+
*/
|
|
12
|
+
export declare const enum Privilege {
|
|
13
|
+
/** Can read and observe all (except Access Control Cluster and as seen by a non-Proxy). */
|
|
14
|
+
View = 1,
|
|
15
|
+
/** An read and observe all (as seen by a Proxy). */
|
|
16
|
+
ProxyView = 2,
|
|
17
|
+
/** View privileges, and can perform the primary function of this Node (except Access Control Cluster). */
|
|
18
|
+
Operate = 3,
|
|
19
|
+
/** Operate privileges, and can modify persistent configuration of this Node (except Access Control Cluster). */
|
|
20
|
+
Manage = 4,
|
|
21
|
+
/** Manage privileges, and can observe and modify the Access Control Cluster. */
|
|
22
|
+
Administer = 5
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* List of Auth Modes that can be used to authenticate a subject.
|
|
26
|
+
*
|
|
27
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.10.5.3
|
|
28
|
+
*/
|
|
29
|
+
export declare const enum AuthMode {
|
|
30
|
+
/** Passcode authenticated session. */
|
|
31
|
+
PASE = 1,
|
|
32
|
+
/** Certificate authenticated session. */
|
|
33
|
+
CASE = 2,
|
|
34
|
+
/** Group authenticated session. */
|
|
35
|
+
Group = 3
|
|
36
|
+
}
|
|
37
|
+
/** @see {@link MatterCoreSpecificationV1_0} § 9.10.8.1 */
|
|
38
|
+
export declare const enum ChangeTypeEnum {
|
|
39
|
+
/** Entry or extension was changed. */
|
|
40
|
+
Changed = 0,
|
|
41
|
+
/** Entry or extension was added. */
|
|
42
|
+
Added = 1,
|
|
43
|
+
/** Entry or extension was removed. */
|
|
44
|
+
Removed = 2
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The Access Control Cluster exposes a data model view of a Node’s Access Control List (ACL),
|
|
48
|
+
* which codifies the rules used to manage and enforce Access Control for the Node’s endpoints
|
|
49
|
+
* and their associated cluster instances. Access to this Access Control Cluster itself requires
|
|
50
|
+
* a special Administer privilege level, such that only Nodes granted such privilege (hereafter
|
|
51
|
+
* termed "Administrators") can manage the Access Control Cluster.
|
|
52
|
+
* The Access Control Cluster SHALL be present on the root node endpoint of each Node, and SHALL
|
|
53
|
+
* NOT be present on any other Endpoint of any Node.
|
|
54
|
+
*
|
|
55
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.10
|
|
56
|
+
*/
|
|
57
|
+
export declare const AccessControlCluster: Cluster<import("../matter.js").BitSchema, {
|
|
58
|
+
acl: WritableAttribute<{
|
|
59
|
+
privilege: Privilege;
|
|
60
|
+
authMode: AuthMode;
|
|
61
|
+
subjects: import("../common/NodeId.js").NodeId[] | null;
|
|
62
|
+
targets: {
|
|
63
|
+
cluster: import("../common/ClusterId.js").ClusterId | null;
|
|
64
|
+
endpoint: import("../common/EndpointNumber.js").EndpointNumber | null;
|
|
65
|
+
deviceType: import("../common/DeviceTypeId.js").DeviceTypeId | null;
|
|
66
|
+
}[] | null;
|
|
67
|
+
}[]>;
|
|
68
|
+
extension: WritableAttribute<{
|
|
69
|
+
data: Uint8Array;
|
|
70
|
+
}[]>;
|
|
71
|
+
subjectsPerAccessControlEntry: Attribute<number>;
|
|
72
|
+
targetsPerAccessControlEntry: Attribute<number>;
|
|
73
|
+
accessControlEntriesPerFabric: Attribute<number>;
|
|
74
|
+
clusterRevision: Attribute<number>;
|
|
75
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
76
|
+
}, import("./Cluster.js").Commands, {
|
|
77
|
+
/**
|
|
78
|
+
* The cluster SHALL send AccessControlEntryChanged events whenever its ACL attribute data is changed by an
|
|
79
|
+
* Administrator.
|
|
80
|
+
*/
|
|
81
|
+
accessControlEntryChanged: Event<{
|
|
82
|
+
adminNodeID: import("../common/NodeId.js").NodeId | null;
|
|
83
|
+
adminPasscodeID: number | null;
|
|
84
|
+
changeType: ChangeTypeEnum;
|
|
85
|
+
latestValue: {
|
|
86
|
+
privilege: Privilege;
|
|
87
|
+
authMode: AuthMode;
|
|
88
|
+
subjects: import("../common/NodeId.js").NodeId[] | null;
|
|
89
|
+
targets: {
|
|
90
|
+
cluster: import("../common/ClusterId.js").ClusterId | null;
|
|
91
|
+
endpoint: import("../common/EndpointNumber.js").EndpointNumber | null;
|
|
92
|
+
deviceType: import("../common/DeviceTypeId.js").DeviceTypeId | null;
|
|
93
|
+
}[] | null;
|
|
94
|
+
} | null;
|
|
95
|
+
}>;
|
|
96
|
+
/**
|
|
97
|
+
* The cluster SHALL send AccessControlExtensionChanged events whenever its extension attribute data is changed
|
|
98
|
+
* by an Administrator.
|
|
99
|
+
*/
|
|
100
|
+
accessControlExtensionChanged: Event<{
|
|
101
|
+
adminNodeID: import("../common/NodeId.js").NodeId | null;
|
|
102
|
+
adminPasscodeID: number | null;
|
|
103
|
+
changeType: ChangeTypeEnum;
|
|
104
|
+
latestValue: {
|
|
105
|
+
data: Uint8Array;
|
|
106
|
+
} | null;
|
|
107
|
+
}>;
|
|
108
|
+
}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, Cluster, Event, OptionalAttribute, WritableAttribute } from "./Cluster.js";
|
|
7
|
+
/**
|
|
8
|
+
* This cluster provides attributes and events for determining basic information about Nodes, which supports both
|
|
9
|
+
* commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number,
|
|
10
|
+
* which apply to the whole Node. Also allows setting user device information such as location.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link MatterCoreSpecificationV1_0} § 11.1
|
|
13
|
+
*/
|
|
14
|
+
export declare const BasicInformationCluster: Cluster<import("../matter.js").BitSchema, {
|
|
15
|
+
dataModelRevision: Attribute<number>;
|
|
16
|
+
vendorName: Attribute<string>;
|
|
17
|
+
vendorId: Attribute<import("../common/VendorId.js").VendorId>;
|
|
18
|
+
productName: Attribute<string>;
|
|
19
|
+
productId: Attribute<number>;
|
|
20
|
+
nodeLabel: WritableAttribute<string>;
|
|
21
|
+
location: WritableAttribute<string>;
|
|
22
|
+
hardwareVersion: Attribute<number>;
|
|
23
|
+
hardwareVersionString: Attribute<string>;
|
|
24
|
+
softwareVersion: Attribute<number>;
|
|
25
|
+
softwareVersionString: Attribute<string>;
|
|
26
|
+
manufacturingDate: OptionalAttribute<string>;
|
|
27
|
+
partNumber: OptionalAttribute<string>;
|
|
28
|
+
productURL: OptionalAttribute<string>;
|
|
29
|
+
productLabel: OptionalAttribute<string>;
|
|
30
|
+
serialNumber: OptionalAttribute<string>;
|
|
31
|
+
localConfigDisabled: WritableAttribute<boolean>;
|
|
32
|
+
reachable: OptionalAttribute<boolean>;
|
|
33
|
+
uniqueId: OptionalAttribute<string>;
|
|
34
|
+
capabilityMinima: Attribute<{
|
|
35
|
+
caseSessionsPerFabric: number;
|
|
36
|
+
subscriptionsPerFabric: number;
|
|
37
|
+
}>;
|
|
38
|
+
clusterRevision: Attribute<number>;
|
|
39
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
40
|
+
}, import("./Cluster.js").Commands, {
|
|
41
|
+
/** First event fired as soon as reasonable after completing a boot or reboot process. */
|
|
42
|
+
startUp: Event<{
|
|
43
|
+
softwareVersion: number;
|
|
44
|
+
}>;
|
|
45
|
+
/** Last event fired prior to any orderly shutdown sequence on a best-effort basis. */
|
|
46
|
+
shutDown: Event<{
|
|
47
|
+
[x: string]: any;
|
|
48
|
+
}>;
|
|
49
|
+
/** Fired prior to permanently leaving a given Fabric. */
|
|
50
|
+
leave: Event<{
|
|
51
|
+
fabricIndex: import("../common/FabricIndex.js").FabricIndex;
|
|
52
|
+
}>;
|
|
53
|
+
/** Fired when there is a change in the {@link BasicInformationCluster.attributes.reachable reachable} attribute. */
|
|
54
|
+
reachableChanged: Event<{
|
|
55
|
+
reachableNewValue: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Cluster, WritableAttribute } from "./Cluster.js";
|
|
7
|
+
/**
|
|
8
|
+
* A binding represents a persistent relationship between an endpoint and one or more other local or
|
|
9
|
+
* remote endpoints. A binding does not require that the relationship exists. It is up to the node
|
|
10
|
+
* application to set up the relationship.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.6
|
|
13
|
+
*/
|
|
14
|
+
export declare const BindingCluster: Cluster<import("../matter.js").BitSchema, {
|
|
15
|
+
binding: WritableAttribute<{
|
|
16
|
+
group?: import("../common/GroupId.js").GroupId | undefined;
|
|
17
|
+
cluster?: import("../common/ClusterId.js").ClusterId | undefined;
|
|
18
|
+
endpoint?: import("../common/EndpointNumber.js").EndpointNumber | undefined;
|
|
19
|
+
node?: import("../common/NodeId.js").NodeId | undefined;
|
|
20
|
+
}[]>;
|
|
21
|
+
clusterRevision: import("./Cluster.js").Attribute<number>;
|
|
22
|
+
featureMap: import("./Cluster.js").Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
23
|
+
}, import("./Cluster.js").Commands, import("./Cluster.js").Events>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, Cluster, Event, OptionalAttribute } from "./Cluster.js";
|
|
7
|
+
/**
|
|
8
|
+
* This Cluster serves two purposes towards a Node communicating with a Bridge:
|
|
9
|
+
* * indicate that the functionality on the Endpoint where it is placed (and its Parts) is bridged from a
|
|
10
|
+
* non-Matter technology, and
|
|
11
|
+
* * provide a centralized collection of attributes that the Node MAY collect to aid in conveying information
|
|
12
|
+
* regarding the Bridged Device to a user, such as the vendor name, the model name, or user-assigned name.
|
|
13
|
+
*
|
|
14
|
+
* This cluster is Derived from Basic Information Cluster.
|
|
15
|
+
*
|
|
16
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.13
|
|
17
|
+
*/
|
|
18
|
+
export declare const BridgedDeviceBasicInformationCluster: Cluster<import("../matter.js").BitSchema, {
|
|
19
|
+
vendorName: OptionalAttribute<string>;
|
|
20
|
+
vendorId: OptionalAttribute<import("../common/VendorId.js").VendorId>;
|
|
21
|
+
productName: OptionalAttribute<string>;
|
|
22
|
+
nodeLabel: import("./Cluster.js").WritableAttribute<string>;
|
|
23
|
+
hardwareVersion: OptionalAttribute<number>;
|
|
24
|
+
hardwareVersionString: OptionalAttribute<string>;
|
|
25
|
+
softwareVersion: OptionalAttribute<number>;
|
|
26
|
+
softwareVersionString: OptionalAttribute<string>;
|
|
27
|
+
manufacturingDate: OptionalAttribute<string>;
|
|
28
|
+
partNumber: OptionalAttribute<string>;
|
|
29
|
+
productURL: OptionalAttribute<string>;
|
|
30
|
+
productLabel: OptionalAttribute<string>;
|
|
31
|
+
serialNumber: OptionalAttribute<string>;
|
|
32
|
+
reachable: Attribute<boolean>;
|
|
33
|
+
uniqueId: OptionalAttribute<string>;
|
|
34
|
+
clusterRevision: Attribute<number>;
|
|
35
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
36
|
+
}, import("./Cluster.js").Commands, {
|
|
37
|
+
/** First event fired as soon as reasonable after completing a boot or reboot process. */
|
|
38
|
+
startUp: Event<{
|
|
39
|
+
softwareVersion: number;
|
|
40
|
+
}>;
|
|
41
|
+
/** Last event fired prior to any orderly shutdown sequence on a best-effort basis. */
|
|
42
|
+
shutDown: Event<{
|
|
43
|
+
[x: string]: any;
|
|
44
|
+
}>;
|
|
45
|
+
/** Fired prior to permanently leaving a given Fabric. */
|
|
46
|
+
leave: Event<{
|
|
47
|
+
fabricIndex: import("../common/FabricIndex.js").FabricIndex;
|
|
48
|
+
}>;
|
|
49
|
+
/** Fired when there is a change in the {@link BasicInformationCluster.attributes.reachable reachable} attribute */
|
|
50
|
+
reachableChanged: Event<{
|
|
51
|
+
reachableNewValue: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { BitSchema, TypeFromBitSchema } from "../schema/BitmapSchema.js";
|
|
7
|
+
import { TlvFields, TypeFromFields } from "../tlv/TlvObject.js";
|
|
8
|
+
import { TlvSchema } from "../tlv/TlvSchema.js";
|
|
9
|
+
import { Merge } from "../util/Type.js";
|
|
10
|
+
export declare const enum AccessLevel {
|
|
11
|
+
View = 0,
|
|
12
|
+
Manage = 1,
|
|
13
|
+
Administer = 2
|
|
14
|
+
}
|
|
15
|
+
export interface Attribute<T> {
|
|
16
|
+
id: number;
|
|
17
|
+
schema: TlvSchema<T>;
|
|
18
|
+
optional: boolean;
|
|
19
|
+
readAcl: AccessLevel;
|
|
20
|
+
writable: boolean;
|
|
21
|
+
writeAcl?: AccessLevel;
|
|
22
|
+
default?: T;
|
|
23
|
+
}
|
|
24
|
+
export interface OptionalAttribute<T> extends Attribute<T> {
|
|
25
|
+
optional: true;
|
|
26
|
+
}
|
|
27
|
+
export interface WritableAttribute<T> extends Attribute<T> {
|
|
28
|
+
writable: true;
|
|
29
|
+
}
|
|
30
|
+
export interface OptionalWritableAttribute<T> extends OptionalAttribute<T> {
|
|
31
|
+
writable: true;
|
|
32
|
+
}
|
|
33
|
+
export type AttributeJsType<T extends Attribute<any>> = T extends Attribute<infer JsType> ? JsType : never;
|
|
34
|
+
interface AttributeOptions<T> {
|
|
35
|
+
default?: T;
|
|
36
|
+
readAcl?: AccessLevel;
|
|
37
|
+
writeAcl?: AccessLevel;
|
|
38
|
+
}
|
|
39
|
+
export declare const Attribute: <T, V extends T>(id: number, schema: TlvSchema<T>, { default: conformanceValue, readAcl }?: AttributeOptions<V>) => Attribute<T>;
|
|
40
|
+
export declare const OptionalAttribute: <T, V extends T>(id: number, schema: TlvSchema<T>, { default: conformanceValue, readAcl }?: AttributeOptions<V>) => OptionalAttribute<T>;
|
|
41
|
+
export declare const WritableAttribute: <T, V extends T>(id: number, schema: TlvSchema<T>, { default: conformanceValue, readAcl, writeAcl }?: AttributeOptions<V>) => WritableAttribute<T>;
|
|
42
|
+
export declare const OptionalWritableAttribute: <T, V extends T>(id: number, schema: TlvSchema<T>, { default: conformanceValue, readAcl, writeAcl }?: AttributeOptions<V>) => WritableAttribute<T>;
|
|
43
|
+
export declare const TlvNoArguments: import("../tlv/TlvObject.js").ObjectSchema<{}>;
|
|
44
|
+
export declare const TlvNoResponse: import("../tlv/TlvVoid.js").VoidSchema;
|
|
45
|
+
export interface Command<RequestT, ResponseT> {
|
|
46
|
+
optional: boolean;
|
|
47
|
+
requestId: number;
|
|
48
|
+
requestSchema: TlvSchema<RequestT>;
|
|
49
|
+
responseId: number;
|
|
50
|
+
responseSchema: TlvSchema<ResponseT>;
|
|
51
|
+
}
|
|
52
|
+
export interface OptionalCommand<RequestT, ResponseT> extends Command<RequestT, ResponseT> {
|
|
53
|
+
optional: true;
|
|
54
|
+
}
|
|
55
|
+
export type ResponseType<T extends Command<any, any>> = T extends OptionalCommand<any, infer ResponseT> ? ResponseT | undefined : (T extends Command<any, infer ResponseT> ? ResponseT : never);
|
|
56
|
+
export type RequestType<T extends Command<any, any>> = T extends Command<infer RequestT, any> ? RequestT : never;
|
|
57
|
+
export declare const Command: <RequestT, ResponseT>(requestId: number, requestSchema: TlvSchema<RequestT>, responseId: number, responseSchema: TlvSchema<ResponseT>) => Command<RequestT, ResponseT>;
|
|
58
|
+
export declare const OptionalCommand: <RequestT, ResponseT>(requestId: number, requestSchema: TlvSchema<RequestT>, responseId: number, responseSchema: TlvSchema<ResponseT>) => OptionalCommand<RequestT, ResponseT>;
|
|
59
|
+
export declare const enum EventPriority {
|
|
60
|
+
Critical = 0,
|
|
61
|
+
Info = 1
|
|
62
|
+
}
|
|
63
|
+
export interface Event<T> {
|
|
64
|
+
id: number;
|
|
65
|
+
schema: TlvSchema<T>;
|
|
66
|
+
priority: EventPriority;
|
|
67
|
+
optional: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface OptionalEvent<T> extends Event<T> {
|
|
70
|
+
optional: true;
|
|
71
|
+
}
|
|
72
|
+
export declare const Event: <FT extends TlvFields>(id: number, priority: EventPriority, data?: FT) => Event<Merge<{ [K_1 in { [K in keyof FT]: FT[K] extends import("../tlv/TlvObject.js").OptionalFieldType<any> ? never : K; }[keyof FT]]: FT[K_1] extends infer T ? T extends FT[K_1] ? T extends import("../tlv/TlvObject.js").FieldType<infer T_1> ? T_1 : never : never : never; }, { [K_3 in { [K_2 in keyof FT]: FT[K_2] extends import("../tlv/TlvObject.js").OptionalFieldType<any> ? K_2 : never; }[keyof FT]]?: (FT[K_3] extends infer T_2 ? T_2 extends FT[K_3] ? T_2 extends import("../tlv/TlvObject.js").FieldType<infer T_1> ? T_1 : never : never : never) | undefined; }>>;
|
|
73
|
+
export declare const OptionalEvent: <FT extends TlvFields>(id: number, priority: EventPriority, data?: FT) => Event<Merge<{ [K_1 in { [K in keyof FT]: FT[K] extends import("../tlv/TlvObject.js").OptionalFieldType<any> ? never : K; }[keyof FT]]: FT[K_1] extends infer T ? T extends FT[K_1] ? T extends import("../tlv/TlvObject.js").FieldType<infer T_1> ? T_1 : never : never : never; }, { [K_3 in { [K_2 in keyof FT]: FT[K_2] extends import("../tlv/TlvObject.js").OptionalFieldType<any> ? K_2 : never; }[keyof FT]]?: (FT[K_3] extends infer T_2 ? T_2 extends FT[K_3] ? T_2 extends import("../tlv/TlvObject.js").FieldType<infer T_1> ? T_1 : never : never : never) | undefined; }>>;
|
|
74
|
+
export interface Attributes {
|
|
75
|
+
[key: string]: Attribute<any>;
|
|
76
|
+
}
|
|
77
|
+
export interface Commands {
|
|
78
|
+
[key: string]: Command<any, any>;
|
|
79
|
+
}
|
|
80
|
+
export interface Events {
|
|
81
|
+
[key: string]: Event<any>;
|
|
82
|
+
}
|
|
83
|
+
/** @see {@link MatterCoreSpecificationV1_0} § 7.13 */
|
|
84
|
+
export type GlobalAttributes<F extends BitSchema> = {
|
|
85
|
+
/** Indicates the revision of the server cluster specification supported by the cluster instance. */
|
|
86
|
+
clusterRevision: Attribute<number>;
|
|
87
|
+
/** Indicates whether the server supports zero or more optional cluster features. */
|
|
88
|
+
featureMap: Attribute<TypeFromBitSchema<F>>;
|
|
89
|
+
};
|
|
90
|
+
export declare const GlobalAttributes: <F extends BitSchema>(features: F) => GlobalAttributes<F>;
|
|
91
|
+
export interface Cluster<F extends BitSchema, A extends Attributes, C extends Commands, E extends Events> {
|
|
92
|
+
id: number;
|
|
93
|
+
name: string;
|
|
94
|
+
revision: number;
|
|
95
|
+
features: BitSchema;
|
|
96
|
+
attributes: A;
|
|
97
|
+
commands: C;
|
|
98
|
+
events: E;
|
|
99
|
+
}
|
|
100
|
+
export declare const Cluster: <F extends BitSchema, A extends Attributes, C extends Commands, E extends Events>({ id, name, revision, features, attributes, commands, events, }: {
|
|
101
|
+
id: number;
|
|
102
|
+
name: string;
|
|
103
|
+
revision: number;
|
|
104
|
+
features?: F | undefined;
|
|
105
|
+
attributes?: A | undefined;
|
|
106
|
+
commands?: C | undefined;
|
|
107
|
+
events?: E | undefined;
|
|
108
|
+
}) => Cluster<F, Merge<A, GlobalAttributes<F>>, C, E>;
|
|
109
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, Cluster } from "./Cluster.js";
|
|
7
|
+
/**
|
|
8
|
+
* This cluster describes an endpoint instance on the node, independently of other endpoints, but also
|
|
9
|
+
* allows composition of endpoints to conform to complex device type patterns.
|
|
10
|
+
* This Cluster is also meant to replace the support from the Zigbee Device Object (ZDO) for describing a node,
|
|
11
|
+
* its endpoints and clusters.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.5
|
|
14
|
+
*/
|
|
15
|
+
export declare const DescriptorCluster: Cluster<import("../matter.js").BitSchema, {
|
|
16
|
+
deviceTypeList: Attribute<{
|
|
17
|
+
type: import("../common/DeviceTypeId.js").DeviceTypeId;
|
|
18
|
+
revision: number;
|
|
19
|
+
}[]>;
|
|
20
|
+
serverList: Attribute<import("../common/ClusterId.js").ClusterId[]>;
|
|
21
|
+
clientList: Attribute<import("../common/ClusterId.js").ClusterId[]>;
|
|
22
|
+
partsList: Attribute<import("../common/EndpointNumber.js").EndpointNumber[]>;
|
|
23
|
+
clusterRevision: Attribute<number>;
|
|
24
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
25
|
+
}, import("./Cluster.js").Commands, import("./Cluster.js").Events>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, Cluster, Command, WritableAttribute } from "./Cluster.js";
|
|
7
|
+
import { TypeFromSchema } from "../tlv/TlvSchema.js";
|
|
8
|
+
/**
|
|
9
|
+
* This enumeration is used by the RegulatoryConfig and LocationCapability attributes to indicate possible radio usage.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link MatterCoreSpecificationV1_0} § 11.9.5.3
|
|
12
|
+
*/
|
|
13
|
+
export declare const enum RegulatoryLocationType {
|
|
14
|
+
/** Indoor only */
|
|
15
|
+
Indoor = 0,
|
|
16
|
+
/** Outdoor only */
|
|
17
|
+
Outdoor = 1,
|
|
18
|
+
/** Indoor/Outdoor */
|
|
19
|
+
IndoorOutdoor = 2
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* This enumeration is used by several response commands in this cluster to indicate particular errors.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link MatterCoreSpecificationV1_0} § 11.9.5.1
|
|
25
|
+
*/
|
|
26
|
+
export declare const enum CommissioningError {
|
|
27
|
+
/** No error. */
|
|
28
|
+
Ok = 0,
|
|
29
|
+
/** Attempting to set regulatory configuration to a region or indoor/outdoor mode for which the server does not have proper configuration. */
|
|
30
|
+
ValueOutsideRange = 1,
|
|
31
|
+
/** Executed CommissioningComplete outside CASE session. */
|
|
32
|
+
InvalidAuthentication = 2,
|
|
33
|
+
/** Executed CommissioningComplete when there was no active Fail-Safe context. */
|
|
34
|
+
NoFailSafe = 3,
|
|
35
|
+
/** Attempting to arm fail-safe or execute CommissioningComplete from a fabric different than the one associated with the current fail-safe context. */
|
|
36
|
+
BusyWithOtherAdmin = 4
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Used by the following commands as response payload:
|
|
40
|
+
* ArmFailSafeResponse, @see {@link MatterCoreSpecificationV1_0} § 11.9.7.3
|
|
41
|
+
* CommissioningCompleteResponse, @see {@link MatterCoreSpecificationV1_0} § 11.9.7.7
|
|
42
|
+
* CommissioningCompleteResponse, @see {@link MatterCoreSpecificationV1_0} § 11.9.7.7
|
|
43
|
+
*/
|
|
44
|
+
declare const TlvCommissioningSuccessFailureResponse: import("../tlv/TlvObject.js").ObjectSchema<{
|
|
45
|
+
/** Contain the result of the operation. */
|
|
46
|
+
errorCode: import("../tlv/TlvObject.js").FieldType<CommissioningError>;
|
|
47
|
+
/** Should help developers in troubleshooting errors. The value MAY go into logs or crash reports, not User UIs. */
|
|
48
|
+
debugText: import("../tlv/TlvObject.js").FieldType<string>;
|
|
49
|
+
}>;
|
|
50
|
+
export type CommissioningSuccessFailureResponse = TypeFromSchema<typeof TlvCommissioningSuccessFailureResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* This cluster is used to manage global aspects of the Commissioning flow.
|
|
53
|
+
*
|
|
54
|
+
* @see {@link MatterCoreSpecificationV1_0} § 11.9
|
|
55
|
+
*/
|
|
56
|
+
export declare const GeneralCommissioningCluster: Cluster<import("../matter.js").BitSchema, {
|
|
57
|
+
breadcrumb: WritableAttribute<number | bigint>;
|
|
58
|
+
commissioningInfo: Attribute<{
|
|
59
|
+
failSafeExpiryLengthSeconds: number;
|
|
60
|
+
maxCumulativeFailsafeSeconds: number;
|
|
61
|
+
}>;
|
|
62
|
+
regulatoryConfig: Attribute<RegulatoryLocationType>;
|
|
63
|
+
locationCapability: Attribute<RegulatoryLocationType>;
|
|
64
|
+
supportsConcurrentConnections: Attribute<boolean>;
|
|
65
|
+
clusterRevision: Attribute<number>;
|
|
66
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
67
|
+
}, {
|
|
68
|
+
/** Arms the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock. */
|
|
69
|
+
armFailSafe: Command<{
|
|
70
|
+
expiryLengthSeconds: number;
|
|
71
|
+
breadcrumbStep: number | bigint;
|
|
72
|
+
}, {
|
|
73
|
+
errorCode: CommissioningError;
|
|
74
|
+
debugText: string;
|
|
75
|
+
}>;
|
|
76
|
+
/** Sets or Updates the regulatory configuration to be used during commissioning. */
|
|
77
|
+
setRegulatoryConfig: Command<{
|
|
78
|
+
breadcrumbStep: number | bigint;
|
|
79
|
+
newRegulatoryConfig: RegulatoryLocationType;
|
|
80
|
+
countryCode: string;
|
|
81
|
+
}, {
|
|
82
|
+
errorCode: CommissioningError;
|
|
83
|
+
debugText: string;
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Informs that all steps of Commissioning/Reconfiguration needed during the fail-safe period have been
|
|
87
|
+
* completed.
|
|
88
|
+
*/
|
|
89
|
+
commissioningComplete: Command<{}, {
|
|
90
|
+
errorCode: CommissioningError;
|
|
91
|
+
debugText: string;
|
|
92
|
+
}>;
|
|
93
|
+
}, import("./Cluster.js").Events>;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, Cluster, Command } from "./Cluster.js";
|
|
7
|
+
import { BitFlag } from "../schema/BitmapSchema.js";
|
|
8
|
+
import { StatusCode } from "../protocol/InteractionProtocol.js";
|
|
9
|
+
/**
|
|
10
|
+
* The Groups cluster manages, per endpoint, the content of the node-wide Group
|
|
11
|
+
* Table that is part of the underlying interaction layer.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link MatterApplicationClusterSpecificationV1_0} § 1.3
|
|
14
|
+
*/
|
|
15
|
+
export declare const GroupsCluster: Cluster<{
|
|
16
|
+
/** The ability to store a name for a group. */
|
|
17
|
+
groupNames: BitFlag;
|
|
18
|
+
}, {
|
|
19
|
+
nameSupport: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
|
|
20
|
+
groupNames: BitFlag;
|
|
21
|
+
}>>;
|
|
22
|
+
clusterRevision: Attribute<number>;
|
|
23
|
+
featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
|
|
24
|
+
/** The ability to store a name for a group. */
|
|
25
|
+
groupNames: BitFlag;
|
|
26
|
+
}>>;
|
|
27
|
+
}, {
|
|
28
|
+
/**
|
|
29
|
+
* The AddGroup command allows a client to add group membership in a particular group for the server endpoint.
|
|
30
|
+
*/
|
|
31
|
+
addGroup: Command<{
|
|
32
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
33
|
+
groupName: string;
|
|
34
|
+
}, {
|
|
35
|
+
status: StatusCode;
|
|
36
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* The ViewGroup command allows a client to request that the server responds with a ViewGroupResponse command
|
|
40
|
+
* containing the name string for a particular group.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
viewGroup: Command<{
|
|
44
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
45
|
+
}, {
|
|
46
|
+
status: StatusCode;
|
|
47
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
48
|
+
groupName: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* The GetGroupMembership command allows a client to inquire about the group membership of the server endpoint,
|
|
52
|
+
* in a number of ways.
|
|
53
|
+
*/
|
|
54
|
+
getGroupMembership: Command<{
|
|
55
|
+
groupList: import("../common/GroupId.js").GroupId[];
|
|
56
|
+
}, {
|
|
57
|
+
groupList: import("../common/GroupId.js").GroupId[];
|
|
58
|
+
capacity: number | null;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* The RemoveGroup command allows a client to request that the server removes the membership for the server
|
|
62
|
+
* endpoint, if any, in a particular group.
|
|
63
|
+
*/
|
|
64
|
+
removeGroup: Command<{
|
|
65
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
66
|
+
}, {
|
|
67
|
+
status: StatusCode;
|
|
68
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* The RemoveAllGroups command allows a client to direct the server to remove all group associations for the
|
|
72
|
+
* server endpoint.
|
|
73
|
+
*
|
|
74
|
+
* TODO: According to specs the response might be suppressed:
|
|
75
|
+
* If the RemoveAllGroups command was received as unicast and a response is not suppressed, the server
|
|
76
|
+
* SHALL generate a response with the Status field set to SUCCESS.
|
|
77
|
+
* Else potentially no response?
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
80
|
+
removeAllGroups: Command<{}, {
|
|
81
|
+
status: StatusCode;
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* The AddGroupIfIdentifying command allows a client to add group membership in a particular group for the
|
|
85
|
+
* server endpoint, on condition that the endpoint is identifying itself.
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
addGroupIfIdentifying: Command<{
|
|
89
|
+
groupId: import("../common/GroupId.js").GroupId;
|
|
90
|
+
groupName: string;
|
|
91
|
+
}, void>;
|
|
92
|
+
}, import("./Cluster.js").Events>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, WritableAttribute, Cluster, Command, OptionalCommand } from "./Cluster.js";
|
|
7
|
+
import { BitFlag } from "../schema/BitmapSchema.js";
|
|
8
|
+
/** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2.5.2 */
|
|
9
|
+
export declare const enum IdentifyType {
|
|
10
|
+
None = 0,
|
|
11
|
+
VisibleLight = 1,
|
|
12
|
+
VisibleLED = 2,
|
|
13
|
+
AudibleBeep = 3,
|
|
14
|
+
Display = 4,
|
|
15
|
+
Actuator = 5
|
|
16
|
+
}
|
|
17
|
+
/** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2.6.3.1 */
|
|
18
|
+
export declare const enum IdentifyEffectIdentifier {
|
|
19
|
+
Blink = 0,
|
|
20
|
+
Breathe = 1,
|
|
21
|
+
Okay = 2,
|
|
22
|
+
ChannelChange = 11,
|
|
23
|
+
FinishEffect = 254,
|
|
24
|
+
StopEffect = 255
|
|
25
|
+
}
|
|
26
|
+
/** @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2.6.3.2 */
|
|
27
|
+
export declare const enum EffectVariant {
|
|
28
|
+
Default = 0
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Attributes and commands for putting a device into Identification mode (e.g. flashing a light).
|
|
32
|
+
*
|
|
33
|
+
* @see {@link MatterApplicationClusterSpecificationV1_0} § 1.2
|
|
34
|
+
*/
|
|
35
|
+
export declare const IdentifyCluster: Cluster<{
|
|
36
|
+
/** Replies to multicast / groupcast queries if the identification state is active. */
|
|
37
|
+
query: BitFlag;
|
|
38
|
+
}, {
|
|
39
|
+
identifyTime: WritableAttribute<number>;
|
|
40
|
+
identifyType: Attribute<IdentifyType>;
|
|
41
|
+
clusterRevision: Attribute<number>;
|
|
42
|
+
featureMap: Attribute<import("../schema/BitmapSchema.js").TypeFromBitSchema<{
|
|
43
|
+
/** Replies to multicast / groupcast queries if the identification state is active. */
|
|
44
|
+
query: BitFlag;
|
|
45
|
+
}>>;
|
|
46
|
+
}, {
|
|
47
|
+
/** Starts or stops the receiving device identifying itself. */
|
|
48
|
+
identify: Command<{
|
|
49
|
+
identifyTime: number;
|
|
50
|
+
}, void>;
|
|
51
|
+
/** Request the target or targets to respond if they are currently identifying themselves. */
|
|
52
|
+
identifyQuery: Command<{}, {
|
|
53
|
+
timeout: number;
|
|
54
|
+
}>;
|
|
55
|
+
/** Allows the support of feedback to the user, such as a certain light effect when identifying. */
|
|
56
|
+
triggerEffect: OptionalCommand<{
|
|
57
|
+
effectIdentifier: IdentifyEffectIdentifier;
|
|
58
|
+
effectVariant: EffectVariant;
|
|
59
|
+
}, void>;
|
|
60
|
+
}, import("./Cluster.js").Events>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Project CHIP Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Attribute, Cluster, WritableAttribute } from "./Cluster.js";
|
|
7
|
+
/**
|
|
8
|
+
* This cluster provides a feature to tag an endpoint with zero or more labels.
|
|
9
|
+
* Derived from LabelCluster ({@link MatterCoreSpecificationV1_0} § 9.7)
|
|
10
|
+
*
|
|
11
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.9
|
|
12
|
+
*/
|
|
13
|
+
export declare const UserLabelCluster: Cluster<import("../matter.js").BitSchema, {
|
|
14
|
+
labelList: WritableAttribute<{
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[]>;
|
|
18
|
+
clusterRevision: Attribute<number>;
|
|
19
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
20
|
+
}, import("./Cluster.js").Commands, import("./Cluster.js").Events>;
|
|
21
|
+
/**
|
|
22
|
+
* This cluster provides a feature for the device to tag an endpoint with zero or more read only labels.
|
|
23
|
+
* Derived from LabelCluster ({@link MatterCoreSpecificationV1_0} § 9.7)
|
|
24
|
+
*
|
|
25
|
+
* @see {@link MatterCoreSpecificationV1_0} § 9.8
|
|
26
|
+
*/
|
|
27
|
+
export declare const FixedLabelCluster: Cluster<import("../matter.js").BitSchema, {
|
|
28
|
+
labelList: Attribute<{
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}[]>;
|
|
32
|
+
clusterRevision: Attribute<number>;
|
|
33
|
+
featureMap: Attribute<import("../matter.js").TypeFromBitSchema<import("../matter.js").BitSchema>>;
|
|
34
|
+
}, import("./Cluster.js").Commands, import("./Cluster.js").Events>;
|