Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ICD] Add User active mode trigger types and attributes #30053

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2463,6 +2463,26 @@ server cluster IcdManagement = 70 {
kLongIdleTimeSupport = 0x4;
}

bitmap UserActiveModeTriggerBitmap : bitmap32 {
kPowerCycle = 0x1;
kSettingsMenu = 0x2;
kCustomInstruction = 0x4;
kDeviceManual = 0x8;
kActuateSensor = 0x10;
kActuateSensorSeconds = 0x20;
kActuateSensorTimes = 0x40;
kActuateSensorLightsBlink = 0x80;
kResetButton = 0x100;
kResetButtonLightsBlink = 0x200;
kResetButtonSeconds = 0x400;
kResetButtonTimes = 0x800;
kSetupButton = 0x1000;
kSetupButtonSeconds = 0x2000;
kSetupButtonLightsBlink = 0x4000;
kSetupButtonTimes = 0x8000;
kAppDefinedButton = 0x10000;
}

fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,26 @@ server cluster IcdManagement = 70 {
kLongIdleTimeSupport = 0x4;
}

bitmap UserActiveModeTriggerBitmap : bitmap32 {
kPowerCycle = 0x1;
kSettingsMenu = 0x2;
kCustomInstruction = 0x4;
kDeviceManual = 0x8;
kActuateSensor = 0x10;
kActuateSensorSeconds = 0x20;
kActuateSensorTimes = 0x40;
kActuateSensorLightsBlink = 0x80;
kResetButton = 0x100;
kResetButtonLightsBlink = 0x200;
kResetButtonSeconds = 0x400;
kResetButtonTimes = 0x800;
kSetupButton = 0x1000;
kSetupButtonSeconds = 0x2000;
kSetupButtonLightsBlink = 0x4000;
kSetupButtonTimes = 0x8000;
kAppDefinedButton = 0x10000;
}

fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
Expand Down
20 changes: 20 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,26 @@ server cluster IcdManagement = 70 {
kLongIdleTimeSupport = 0x4;
}

bitmap UserActiveModeTriggerBitmap : bitmap32 {
kPowerCycle = 0x1;
kSettingsMenu = 0x2;
kCustomInstruction = 0x4;
kDeviceManual = 0x8;
kActuateSensor = 0x10;
kActuateSensorSeconds = 0x20;
kActuateSensorTimes = 0x40;
kActuateSensorLightsBlink = 0x80;
kResetButton = 0x100;
kResetButtonLightsBlink = 0x200;
kResetButtonSeconds = 0x400;
kResetButtonTimes = 0x800;
kSetupButton = 0x1000;
kSetupButtonSeconds = 0x2000;
kSetupButtonLightsBlink = 0x4000;
kSetupButtonTimes = 0x8000;
kAppDefinedButton = 0x10000;
}

fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,26 @@ server cluster IcdManagement = 70 {
kLongIdleTimeSupport = 0x4;
}

bitmap UserActiveModeTriggerBitmap : bitmap32 {
kPowerCycle = 0x1;
kSettingsMenu = 0x2;
kCustomInstruction = 0x4;
kDeviceManual = 0x8;
kActuateSensor = 0x10;
kActuateSensorSeconds = 0x20;
kActuateSensorTimes = 0x40;
kActuateSensorLightsBlink = 0x80;
kResetButton = 0x100;
kResetButtonLightsBlink = 0x200;
kResetButtonSeconds = 0x400;
kResetButtonTimes = 0x800;
kSetupButton = 0x1000;
kSetupButtonSeconds = 0x2000;
kSetupButtonLightsBlink = 0x4000;
kSetupButtonTimes = 0x8000;
kAppDefinedButton = 0x10000;
}

fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ limitations under the License.
<field name="LongIdleTimeSupport" mask="0x4"/>
</bitmap>

<bitmap name="UserActiveModeTriggerBitmap" type="bitmap32">
<cluster code="0x0046"/>
<field name="PowerCycle" mask="0x1"/>
<field name="SettingsMenu" mask="0x2"/>
<field name="CustomInstruction" mask="0x4"/>
<field name="DeviceManual" mask="0x8"/>
<field name="ActuateSensor" mask="0x10"/>
<field name="ActuateSensorSeconds" mask="0x20"/>
<field name="ActuateSensorTimes" mask="0x40"/>
<field name="ActuateSensorLightsBlink" mask="0x80"/>
<field name="ResetButton" mask="0x100"/>
<field name="ResetButtonLightsBlink" mask="0x200"/>
<field name="ResetButtonSeconds" mask="0x400"/>
<field name="ResetButtonTimes" mask="0x800"/>
<field name="SetupButton" mask="0x1000"/>
<field name="SetupButtonSeconds" mask="0x2000"/>
<field name="SetupButtonLightsBlink" mask="0x4000"/>
<field name="SetupButtonTimes" mask="0x8000"/>
<field name="AppDefinedButton" mask="0x10000"/>
</bitmap>

<struct name = "MonitoringRegistrationStruct" isFabricScoped="true">
<cluster code="0x0046"/>
<item fieldId="1" name="CheckInNodeID" type="node_id" isFabricSensitive="true"/>
Expand Down Expand Up @@ -56,6 +77,8 @@ limitations under the License.
<access op="read" privilege="administer"/>
</attribute>
<attribute side="server" code="0x05" define="CLIENTS_SUPPORTED_PER_FABRIC" type="int16u" min="1" default="1" writable="false" optional="true" isNullable="false">ClientsSupportedPerFabric</attribute>
<attribute side="server" code="0x06" define="USER_ACTIVE_MODE_TRIGGER_HINT" type="UserActiveModeTriggerBitmap" writable="false" optional="true" isNullable="false">UserActiveModeTriggerHint</attribute>
<attribute side="server" code="0x07" define="USER_ACTIVE_MODE_TRIGGER_INSTRUCTION" type="char_string" length="128" writable="false" optional="true" isNullable="false">UserActiveModeTriggerInstruction</attribute>

<command source="client" code="0x00" name="RegisterClient" response="RegisterClientResponse" isFabricScoped="true" optional="true">
<description> Register a client to the end device </description>
Expand Down
4 changes: 3 additions & 1 deletion src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@
"ActiveModeThreshold",
"RegisteredClients",
"ICDCounter",
"ClientsSupportedPerFabric"
"ClientsSupportedPerFabric",
"UserActiveModeTriggerHint",
"UserActiveModeTriggerInstruction"
],
"Operational Credentials": [
"SupportedFabrics",
Expand Down
4 changes: 3 additions & 1 deletion src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@
"ActiveModeThreshold",
"RegisteredClients",
"ICDCounter",
"ClientsSupportedPerFabric"
"ClientsSupportedPerFabric",
"UserActiveModeTriggerHint",
"UserActiveModeTriggerInstruction"
],
"Operational Credentials": [
"SupportedFabrics",
Expand Down
22 changes: 22 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2727,6 +2727,26 @@ client cluster IcdManagement = 70 {
kLongIdleTimeSupport = 0x4;
}

bitmap UserActiveModeTriggerBitmap : bitmap32 {
kPowerCycle = 0x1;
kSettingsMenu = 0x2;
kCustomInstruction = 0x4;
kDeviceManual = 0x8;
kActuateSensor = 0x10;
kActuateSensorSeconds = 0x20;
kActuateSensorTimes = 0x40;
kActuateSensorLightsBlink = 0x80;
kResetButton = 0x100;
kResetButtonLightsBlink = 0x200;
kResetButtonSeconds = 0x400;
kResetButtonTimes = 0x800;
kSetupButton = 0x1000;
kSetupButtonSeconds = 0x2000;
kSetupButtonLightsBlink = 0x4000;
kSetupButtonTimes = 0x8000;
kAppDefinedButton = 0x10000;
}

fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
Expand All @@ -2739,6 +2759,8 @@ client cluster IcdManagement = 70 {
readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3;
readonly attribute access(read: administer) optional int32u ICDCounter = 4;
readonly attribute optional int16u clientsSupportedPerFabric = 5;
readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6;
readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10938,6 +10938,26 @@ public void subscribeClientsSupportedPerFabricAttribute(
subscribeClientsSupportedPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readUserActiveModeTriggerHintAttribute(
LongAttributeCallback callback) {
readUserActiveModeTriggerHintAttribute(chipClusterPtr, callback);
}

public void subscribeUserActiveModeTriggerHintAttribute(
LongAttributeCallback callback, int minInterval, int maxInterval) {
subscribeUserActiveModeTriggerHintAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readUserActiveModeTriggerInstructionAttribute(
CharStringAttributeCallback callback) {
readUserActiveModeTriggerInstructionAttribute(chipClusterPtr, callback);
}

public void subscribeUserActiveModeTriggerInstructionAttribute(
CharStringAttributeCallback callback, int minInterval, int maxInterval) {
subscribeUserActiveModeTriggerInstructionAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
readGeneratedCommandListAttribute(chipClusterPtr, callback);
Expand Down Expand Up @@ -11022,6 +11042,14 @@ public void subscribeClusterRevisionAttribute(

private native void subscribeClientsSupportedPerFabricAttribute(long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval);

private native void readUserActiveModeTriggerHintAttribute(long chipClusterPtr, LongAttributeCallback callback);

private native void subscribeUserActiveModeTriggerHintAttribute(long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval);

private native void readUserActiveModeTriggerInstructionAttribute(long chipClusterPtr, CharStringAttributeCallback callback);

private native void subscribeUserActiveModeTriggerInstructionAttribute(long chipClusterPtr, CharStringAttributeCallback callback, int minInterval, int maxInterval);

private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback);

private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5968,6 +5968,8 @@ public enum Attribute {
RegisteredClients(3L),
ICDCounter(4L),
ClientsSupportedPerFabric(5L),
UserActiveModeTriggerHint(6L),
UserActiveModeTriggerInstruction(7L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5917,6 +5917,28 @@ private static Map<String, InteractionInfo> readIcdManagementInteractionInfo() {
readIcdManagementClientsSupportedPerFabricCommandParams
);
result.put("readClientsSupportedPerFabricAttribute", readIcdManagementClientsSupportedPerFabricAttributeInteractionInfo);
Map<String, CommandParameterInfo> readIcdManagementUserActiveModeTriggerHintCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readIcdManagementUserActiveModeTriggerHintAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.IcdManagementCluster) cluster).readUserActiveModeTriggerHintAttribute(
(ChipClusters.LongAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
readIcdManagementUserActiveModeTriggerHintCommandParams
);
result.put("readUserActiveModeTriggerHintAttribute", readIcdManagementUserActiveModeTriggerHintAttributeInteractionInfo);
Map<String, CommandParameterInfo> readIcdManagementUserActiveModeTriggerInstructionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readIcdManagementUserActiveModeTriggerInstructionAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.IcdManagementCluster) cluster).readUserActiveModeTriggerInstructionAttribute(
(ChipClusters.CharStringAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(),
readIcdManagementUserActiveModeTriggerInstructionCommandParams
);
result.put("readUserActiveModeTriggerInstructionAttribute", readIcdManagementUserActiveModeTriggerInstructionAttributeInteractionInfo);
Map<String, CommandParameterInfo> readIcdManagementGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readIcdManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
Expand Down
28 changes: 28 additions & 0 deletions src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/controller/python/chip/clusters/CHIPClusters.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.