diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 601b3e82450bd2..22ca859b26a104 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -2617,6 +2617,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -2729,6 +2732,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -2766,6 +2772,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -2926,6 +2933,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -3006,6 +3015,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3171,6 +3189,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -3209,6 +3234,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** Provides an interface for controlling and adjusting automatic window coverings. */ diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 8aaa1ee81997f2..646f2cc00279fa 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1318,6 +1318,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -1430,6 +1433,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -1467,6 +1473,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -1627,6 +1634,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -1707,6 +1716,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1872,6 +1890,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -1910,6 +1935,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } endpoint 0 { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 3642db616340de..dbdbf5ffedeec5 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1846,6 +1846,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -1958,6 +1961,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -1995,6 +2001,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -2155,6 +2162,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -2235,6 +2244,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2400,6 +2418,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -2438,6 +2463,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } endpoint 0 { diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 6813051a938d09..ea056faf9147ea 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1105,6 +1105,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -1217,6 +1220,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -1254,6 +1260,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -1414,6 +1421,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -1494,6 +1503,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1659,6 +1677,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -1697,6 +1722,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } endpoint 0 { diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index e936096318362f..b337ae771cf3bb 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1502,6 +1502,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -1614,6 +1617,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -1651,6 +1657,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -1811,6 +1818,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -1891,6 +1900,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2056,6 +2074,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -2094,6 +2119,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } endpoint 0 { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index c096d265aa0628..63d8ce3b2975a9 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -3211,6 +3211,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -3323,6 +3326,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -3360,6 +3366,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -3520,6 +3527,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -3600,6 +3609,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3765,6 +3783,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -3803,6 +3828,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** An interface to a generic way to secure a door */ @@ -3833,6 +3862,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -3945,6 +3977,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -3982,6 +4017,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -4142,6 +4178,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -4222,6 +4260,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4387,6 +4434,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -4425,6 +4479,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** Provides an interface for controlling and adjusting automatic window coverings. */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 6fc557367ce7d5..fe9b811c1bea1d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -3168,6 +3168,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -3280,6 +3283,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -3317,6 +3323,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -3477,6 +3484,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -3557,6 +3566,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3722,6 +3740,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -3760,6 +3785,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** An interface to a generic way to secure a door */ @@ -3790,6 +3819,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -3902,6 +3934,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -3939,6 +3974,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -4099,6 +4135,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -4179,6 +4217,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4344,6 +4391,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -4382,6 +4436,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** Provides an interface for controlling and adjusting automatic window coverings. */ diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index ec813150847955..f2b4890912d2b7 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -2093,6 +2093,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -2205,6 +2208,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -2242,6 +2248,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -2402,6 +2409,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -2482,6 +2491,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2647,6 +2665,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -2685,6 +2710,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** Attributes and commands for controlling the color properties of a color-capable light. */ diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 2e825934187738..b51a10e6f02744 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 - 2024 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1569,6 +1569,9 @@ bool DoorLockServer::getMaxNumberOfCredentials(chip::EndpointId endpointId, Cred case CredentialTypeEnum::kFace: status = emberAfPluginDoorLockGetNumberOfFaceCredentialsSupported(endpointId, maxNumberOfCredentials); break; + case CredentialTypeEnum::kAliroCredentialIssuerKey: + case CredentialTypeEnum::kAliroEvictableEndpointKey: + case CredentialTypeEnum::kAliroNonEvictableEndpointKey: default: return false; } @@ -3167,6 +3170,12 @@ LockDataTypeEnum DoorLockServer::credentialTypeToLockDataType(CredentialTypeEnum return LockDataTypeEnum::kFingerVein; case CredentialTypeEnum::kFace: return LockDataTypeEnum::kFace; + case CredentialTypeEnum::kAliroCredentialIssuerKey: + return LockDataTypeEnum::kAliroCredentialIssuerKey; + case CredentialTypeEnum::kAliroEvictableEndpointKey: + return LockDataTypeEnum::kAliroEvictableEndpointKey; + case CredentialTypeEnum::kAliroNonEvictableEndpointKey: + return LockDataTypeEnum::kAliroNonEvictableEndpointKey; case CredentialTypeEnum::kUnknownEnumValue: return LockDataTypeEnum::kUnspecified; } diff --git a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml index 6673d4644e3105..1c179f9324422a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml @@ -38,6 +38,7 @@ limitations under the License. + true true @@ -54,11 +55,13 @@ limitations under the License. true false true - true + true false true true true + true + true + + AliroReaderVerificationKey + + + + + AliroReaderGroupIdentifier + + + + + AliroReaderGroupSubIdentifier + + + + + AliroExpeditedTransactionSupportedProtocolVersions + + + + + AliroGroupResolvingKey + + + + + AliroSupportedBLEUWBProtocolVersions + + + + + AliroBLEAdvertisingVersion + + + + NumberOfAliroCredentialIssuerKeysSupported + + NumberOfAliroEndpointKeysSupported @@ -400,6 +442,18 @@ limitations under the License. + + This command communicates an Aliro Reader configuration to the lock. + + + + + + + + This command clears an existing Aliro Reader configuration for the lock. + + @@ -487,6 +541,9 @@ limitations under the License. + + + @@ -530,6 +587,9 @@ limitations under the License. + + + @@ -571,6 +631,7 @@ limitations under the License. + @@ -769,6 +830,8 @@ limitations under the License. + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index da1924a65e1823..79c94d6f48843b 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -4819,6 +4819,9 @@ cluster DoorLock = 257 { kFingerprint = 3; kFingerVein = 4; kFace = 5; + kAliroCredentialIssuerKey = 6; + kAliroEvictableEndpointKey = 7; + kAliroNonEvictableEndpointKey = 8; } enum DataOperationTypeEnum : enum8 { @@ -4931,6 +4934,9 @@ cluster DoorLock = 257 { kFingerprint = 8; kFingerVein = 9; kFace = 10; + kAliroCredentialIssuerKey = 11; + kAliroEvictableEndpointKey = 12; + kAliroNonEvictableEndpointKey = 13; } enum LockOperationTypeEnum : enum8 { @@ -4968,6 +4974,7 @@ cluster DoorLock = 257 { kRemote = 7; kRFID = 8; kBiometric = 9; + kAliro = 10; } enum UserStatusEnum : enum8 { @@ -5128,6 +5135,8 @@ cluster DoorLock = 257 { kYearDayAccessSchedules = 0x400; kHolidaySchedules = 0x800; kUnbolt = 0x1000; + kAliroProvisioning = 0x2000; + kAliroBLEUWB = 0x4000; } struct CredentialStruct { @@ -5208,6 +5217,15 @@ cluster DoorLock = 257 { attribute access(write: administer) optional boolean sendPINOverTheAir = 50; attribute access(write: administer) optional boolean requirePINforRemoteOperation = 51; attribute access(write: administer) optional int16u expiringUserTimeout = 53; + readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129; + readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130; + readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131; + readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132; + readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133; + readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134; + readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135; + readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5373,6 +5391,13 @@ cluster DoorLock = 257 { optional octet_string PINCode = 0; } + request struct SetAliroReaderConfigRequest { + octet_string<32> signingKey = 0; + octet_string<65> verificationKey = 1; + octet_string<16> groupIdentifier = 2; + optional octet_string<16> groupResolvingKey = 3; + } + /** This command causes the lock device to lock the door. */ timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; /** This command causes the lock device to unlock the door. */ @@ -5411,6 +5436,10 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; /** This command causes the lock device to unlock the door without pulling the latch. */ timed command UnboltDoor(UnboltDoorRequest): DefaultSuccess = 39; + /** This command communicates an Aliro Reader configuration to the lock. */ + timed command access(invoke: administer) SetAliroReaderConfig(SetAliroReaderConfigRequest): DefaultSuccess = 40; + /** This command clears an existing Aliro Reader configuration for the lock. */ + timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } /** Provides an interface for controlling and adjusting automatic window coverings. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index eb221bfec1730b..c29fb9b8ca3714 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -31230,6 +31230,15 @@ public static class DoorLockCluster extends BaseChipCluster { private static final long SEND_P_I_N_OVER_THE_AIR_ATTRIBUTE_ID = 50L; private static final long REQUIRE_P_I_NFOR_REMOTE_OPERATION_ATTRIBUTE_ID = 51L; private static final long EXPIRING_USER_TIMEOUT_ATTRIBUTE_ID = 53L; + private static final long ALIRO_READER_VERIFICATION_KEY_ATTRIBUTE_ID = 128L; + private static final long ALIRO_READER_GROUP_IDENTIFIER_ATTRIBUTE_ID = 129L; + private static final long ALIRO_READER_GROUP_SUB_IDENTIFIER_ATTRIBUTE_ID = 130L; + private static final long ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID = 131L; + private static final long ALIRO_GROUP_RESOLVING_KEY_ATTRIBUTE_ID = 132L; + private static final long ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID = 133L; + private static final long ALIRO_B_L_E_ADVERTISING_VERSION_ATTRIBUTE_ID = 134L; + private static final long NUMBER_OF_ALIRO_CREDENTIAL_ISSUER_KEYS_SUPPORTED_ATTRIBUTE_ID = 135L; + private static final long NUMBER_OF_ALIRO_ENDPOINT_KEYS_SUPPORTED_ATTRIBUTE_ID = 136L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -31985,6 +31994,48 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + + public void setAliroReaderConfig(DefaultClusterCallback callback, byte[] signingKey, byte[] verificationKey, byte[] groupIdentifier, Optional groupResolvingKey, int timedInvokeTimeoutMs) { + final long commandId = 40L; + + ArrayList elements = new ArrayList<>(); + final long signingKeyFieldID = 0L; + BaseTLVType signingKeytlvValue = new ByteArrayType(signingKey); + elements.add(new StructElement(signingKeyFieldID, signingKeytlvValue)); + + final long verificationKeyFieldID = 1L; + BaseTLVType verificationKeytlvValue = new ByteArrayType(verificationKey); + elements.add(new StructElement(verificationKeyFieldID, verificationKeytlvValue)); + + final long groupIdentifierFieldID = 2L; + BaseTLVType groupIdentifiertlvValue = new ByteArrayType(groupIdentifier); + elements.add(new StructElement(groupIdentifierFieldID, groupIdentifiertlvValue)); + + final long groupResolvingKeyFieldID = 3L; + BaseTLVType groupResolvingKeytlvValue = groupResolvingKey.map((nonOptionalgroupResolvingKey) -> new ByteArrayType(nonOptionalgroupResolvingKey)).orElse(new EmptyType()); + elements.add(new StructElement(groupResolvingKeyFieldID, groupResolvingKeytlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + + public void clearAliroReaderConfig(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 41L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + public interface GetWeekDayScheduleResponseCallback extends BaseClusterCallback { void onSuccess(Integer weekDayIndex, Integer userIndex, Integer status, Optional daysMask, Optional startHour, Optional startMinute, Optional endHour, Optional endMinute); } @@ -32017,6 +32068,26 @@ public interface DoorStateAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Integer value); } + public interface AliroReaderVerificationKeyAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable byte[] value); + } + + public interface AliroReaderGroupIdentifierAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable byte[] value); + } + + public interface AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AliroGroupResolvingKeyAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable byte[] value); + } + + public interface AliroSupportedBLEUWBProtocolVersionsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -33095,6 +33166,231 @@ public void onSuccess(byte[] tlv) { }, EXPIRING_USER_TIMEOUT_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readAliroReaderVerificationKeyAttribute( + AliroReaderVerificationKeyAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_READER_VERIFICATION_KEY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_READER_VERIFICATION_KEY_ATTRIBUTE_ID, true); + } + + public void subscribeAliroReaderVerificationKeyAttribute( + AliroReaderVerificationKeyAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_READER_VERIFICATION_KEY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_READER_VERIFICATION_KEY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAliroReaderGroupIdentifierAttribute( + AliroReaderGroupIdentifierAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_READER_GROUP_IDENTIFIER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_READER_GROUP_IDENTIFIER_ATTRIBUTE_ID, true); + } + + public void subscribeAliroReaderGroupIdentifierAttribute( + AliroReaderGroupIdentifierAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_READER_GROUP_IDENTIFIER_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_READER_GROUP_IDENTIFIER_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAliroReaderGroupSubIdentifierAttribute( + OctetStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_READER_GROUP_SUB_IDENTIFIER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_READER_GROUP_SUB_IDENTIFIER_ATTRIBUTE_ID, true); + } + + public void subscribeAliroReaderGroupSubIdentifierAttribute( + OctetStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_READER_GROUP_SUB_IDENTIFIER_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_READER_GROUP_SUB_IDENTIFIER_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAliroExpeditedTransactionSupportedProtocolVersionsAttribute( + AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID, true); + } + + public void subscribeAliroExpeditedTransactionSupportedProtocolVersionsAttribute( + AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAliroGroupResolvingKeyAttribute( + AliroGroupResolvingKeyAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_GROUP_RESOLVING_KEY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_GROUP_RESOLVING_KEY_ATTRIBUTE_ID, true); + } + + public void subscribeAliroGroupResolvingKeyAttribute( + AliroGroupResolvingKeyAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_GROUP_RESOLVING_KEY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_GROUP_RESOLVING_KEY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAliroSupportedBLEUWBProtocolVersionsAttribute( + AliroSupportedBLEUWBProtocolVersionsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID, true); + } + + public void subscribeAliroSupportedBLEUWBProtocolVersionsAttribute( + AliroSupportedBLEUWBProtocolVersionsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAliroBLEAdvertisingVersionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_B_L_E_ADVERTISING_VERSION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALIRO_B_L_E_ADVERTISING_VERSION_ATTRIBUTE_ID, true); + } + + public void subscribeAliroBLEAdvertisingVersionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_B_L_E_ADVERTISING_VERSION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ALIRO_B_L_E_ADVERTISING_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfAliroCredentialIssuerKeysSupportedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_ALIRO_CREDENTIAL_ISSUER_KEYS_SUPPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_ALIRO_CREDENTIAL_ISSUER_KEYS_SUPPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfAliroCredentialIssuerKeysSupportedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_ALIRO_CREDENTIAL_ISSUER_KEYS_SUPPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_ALIRO_CREDENTIAL_ISSUER_KEYS_SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfAliroEndpointKeysSupportedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_ALIRO_ENDPOINT_KEYS_SUPPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_ALIRO_ENDPOINT_KEYS_SUPPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfAliroEndpointKeysSupportedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_ALIRO_ENDPOINT_KEYS_SUPPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_ALIRO_ENDPOINT_KEYS_SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 79440eeed9f239..f2456f7b226195 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -9895,6 +9895,15 @@ public enum Attribute { SendPINOverTheAir(50L), RequirePINforRemoteOperation(51L), ExpiringUserTimeout(53L), + AliroReaderVerificationKey(128L), + AliroReaderGroupIdentifier(129L), + AliroReaderGroupSubIdentifier(130L), + AliroExpeditedTransactionSupportedProtocolVersions(131L), + AliroGroupResolvingKey(132L), + AliroSupportedBLEUWBProtocolVersions(133L), + AliroBLEAdvertisingVersion(134L), + NumberOfAliroCredentialIssuerKeysSupported(135L), + NumberOfAliroEndpointKeysSupported(136L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -9964,7 +9973,9 @@ public enum Command { SetCredential(34L), GetCredentialStatus(36L), ClearCredential(38L), - UnboltDoor(39L),; + UnboltDoor(39L), + SetAliroReaderConfig(40L), + ClearAliroReaderConfig(41L),; private final long id; Command(long id) { this.id = id; @@ -10305,6 +10316,23 @@ public static UnboltDoorCommandField value(int id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } + }public enum SetAliroReaderConfigCommandField {SigningKey(0),VerificationKey(1),GroupIdentifier(2),GroupResolvingKey(3),; + private final int id; + SetAliroReaderConfigCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetAliroReaderConfigCommandField value(int id) throws NoSuchFieldError { + for (SetAliroReaderConfigCommandField field : SetAliroReaderConfigCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index a0a05852bd9c69..94cda4091ba5dc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -11276,6 +11276,111 @@ public void onError(Exception ex) { } } + public static class DelegatedDoorLockClusterAliroReaderVerificationKeyAttributeCallback implements ChipClusters.DoorLockCluster.AliroReaderVerificationKeyAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable byte[] value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDoorLockClusterAliroReaderGroupIdentifierAttributeCallback implements ChipClusters.DoorLockCluster.AliroReaderGroupIdentifierAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable byte[] value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDoorLockClusterAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback implements ChipClusters.DoorLockCluster.AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDoorLockClusterAliroGroupResolvingKeyAttributeCallback implements ChipClusters.DoorLockCluster.AliroGroupResolvingKeyAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable byte[] value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDoorLockClusterAliroSupportedBLEUWBProtocolVersionsAttributeCallback implements ChipClusters.DoorLockCluster.AliroSupportedBLEUWBProtocolVersionsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDoorLockClusterGeneratedCommandListAttributeCallback implements ChipClusters.DoorLockCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -23724,6 +23829,50 @@ public Map> getCommandMap() { ); doorLockClusterInteractionInfoMap.put("unboltDoor", doorLockunboltDoorInteractionInfo); + Map doorLocksetAliroReaderConfigCommandParams = new LinkedHashMap(); + + CommandParameterInfo doorLocksetAliroReaderConfigsigningKeyCommandParameterInfo = new CommandParameterInfo("signingKey", byte[].class, byte[].class); + doorLocksetAliroReaderConfigCommandParams.put("signingKey",doorLocksetAliroReaderConfigsigningKeyCommandParameterInfo); + + CommandParameterInfo doorLocksetAliroReaderConfigverificationKeyCommandParameterInfo = new CommandParameterInfo("verificationKey", byte[].class, byte[].class); + doorLocksetAliroReaderConfigCommandParams.put("verificationKey",doorLocksetAliroReaderConfigverificationKeyCommandParameterInfo); + + CommandParameterInfo doorLocksetAliroReaderConfiggroupIdentifierCommandParameterInfo = new CommandParameterInfo("groupIdentifier", byte[].class, byte[].class); + doorLocksetAliroReaderConfigCommandParams.put("groupIdentifier",doorLocksetAliroReaderConfiggroupIdentifierCommandParameterInfo); + + CommandParameterInfo doorLocksetAliroReaderConfiggroupResolvingKeyCommandParameterInfo = new CommandParameterInfo("groupResolvingKey", Optional.class, byte[].class); + doorLocksetAliroReaderConfigCommandParams.put("groupResolvingKey",doorLocksetAliroReaderConfiggroupResolvingKeyCommandParameterInfo); + InteractionInfo doorLocksetAliroReaderConfigInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster) + .setAliroReaderConfig((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("signingKey") + , (byte[]) + commandArguments.get("verificationKey") + , (byte[]) + commandArguments.get("groupIdentifier") + , (Optional) + commandArguments.get("groupResolvingKey"), 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + doorLocksetAliroReaderConfigCommandParams + ); + doorLockClusterInteractionInfoMap.put("setAliroReaderConfig", doorLocksetAliroReaderConfigInteractionInfo); + + Map doorLockclearAliroReaderConfigCommandParams = new LinkedHashMap(); + InteractionInfo doorLockclearAliroReaderConfigInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster) + .clearAliroReaderConfig((DefaultClusterCallback) callback, 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + doorLockclearAliroReaderConfigCommandParams + ); + doorLockClusterInteractionInfoMap.put("clearAliroReaderConfig", doorLockclearAliroReaderConfigInteractionInfo); + commandMap.put("doorLock", doorLockClusterInteractionInfoMap); Map windowCoveringClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index b00f3c842b6656..a7be9d13bcd95e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -10206,6 +10206,105 @@ private static Map readDoorLockInteractionInfo() { readDoorLockExpiringUserTimeoutCommandParams ); result.put("readExpiringUserTimeoutAttribute", readDoorLockExpiringUserTimeoutAttributeInteractionInfo); + Map readDoorLockAliroReaderVerificationKeyCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroReaderVerificationKeyAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroReaderVerificationKeyAttribute( + (ChipClusters.DoorLockCluster.AliroReaderVerificationKeyAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterAliroReaderVerificationKeyAttributeCallback(), + readDoorLockAliroReaderVerificationKeyCommandParams + ); + result.put("readAliroReaderVerificationKeyAttribute", readDoorLockAliroReaderVerificationKeyAttributeInteractionInfo); + Map readDoorLockAliroReaderGroupIdentifierCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroReaderGroupIdentifierAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroReaderGroupIdentifierAttribute( + (ChipClusters.DoorLockCluster.AliroReaderGroupIdentifierAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterAliroReaderGroupIdentifierAttributeCallback(), + readDoorLockAliroReaderGroupIdentifierCommandParams + ); + result.put("readAliroReaderGroupIdentifierAttribute", readDoorLockAliroReaderGroupIdentifierAttributeInteractionInfo); + Map readDoorLockAliroReaderGroupSubIdentifierCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroReaderGroupSubIdentifierAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroReaderGroupSubIdentifierAttribute( + (ChipClusters.OctetStringAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOctetStringAttributeCallback(), + readDoorLockAliroReaderGroupSubIdentifierCommandParams + ); + result.put("readAliroReaderGroupSubIdentifierAttribute", readDoorLockAliroReaderGroupSubIdentifierAttributeInteractionInfo); + Map readDoorLockAliroExpeditedTransactionSupportedProtocolVersionsCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroExpeditedTransactionSupportedProtocolVersionsAttribute( + (ChipClusters.DoorLockCluster.AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback(), + readDoorLockAliroExpeditedTransactionSupportedProtocolVersionsCommandParams + ); + result.put("readAliroExpeditedTransactionSupportedProtocolVersionsAttribute", readDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeInteractionInfo); + Map readDoorLockAliroGroupResolvingKeyCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroGroupResolvingKeyAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroGroupResolvingKeyAttribute( + (ChipClusters.DoorLockCluster.AliroGroupResolvingKeyAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterAliroGroupResolvingKeyAttributeCallback(), + readDoorLockAliroGroupResolvingKeyCommandParams + ); + result.put("readAliroGroupResolvingKeyAttribute", readDoorLockAliroGroupResolvingKeyAttributeInteractionInfo); + Map readDoorLockAliroSupportedBLEUWBProtocolVersionsCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroSupportedBLEUWBProtocolVersionsAttribute( + (ChipClusters.DoorLockCluster.AliroSupportedBLEUWBProtocolVersionsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterAliroSupportedBLEUWBProtocolVersionsAttributeCallback(), + readDoorLockAliroSupportedBLEUWBProtocolVersionsCommandParams + ); + result.put("readAliroSupportedBLEUWBProtocolVersionsAttribute", readDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeInteractionInfo); + Map readDoorLockAliroBLEAdvertisingVersionCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockAliroBLEAdvertisingVersionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readAliroBLEAdvertisingVersionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockAliroBLEAdvertisingVersionCommandParams + ); + result.put("readAliroBLEAdvertisingVersionAttribute", readDoorLockAliroBLEAdvertisingVersionAttributeInteractionInfo); + Map readDoorLockNumberOfAliroCredentialIssuerKeysSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfAliroCredentialIssuerKeysSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfAliroCredentialIssuerKeysSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfAliroCredentialIssuerKeysSupportedCommandParams + ); + result.put("readNumberOfAliroCredentialIssuerKeysSupportedAttribute", readDoorLockNumberOfAliroCredentialIssuerKeysSupportedAttributeInteractionInfo); + Map readDoorLockNumberOfAliroEndpointKeysSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfAliroEndpointKeysSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster).readNumberOfAliroEndpointKeysSupportedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfAliroEndpointKeysSupportedCommandParams + ); + result.put("readNumberOfAliroEndpointKeysSupportedAttribute", readDoorLockNumberOfAliroEndpointKeysSupportedAttributeInteractionInfo); Map readDoorLockGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readDoorLockGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt index 98640cae466121..f0a27f30273c39 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt @@ -23,6 +23,7 @@ import java.util.logging.Logger import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.transform import matter.controller.BooleanSubscriptionState +import matter.controller.ByteArraySubscriptionState import matter.controller.InvokeRequest import matter.controller.InvokeResponse import matter.controller.MatterController @@ -120,6 +121,66 @@ class DoorLockCluster(private val controller: MatterController, private val endp object SubscriptionEstablished : DoorStateAttributeSubscriptionState() } + class AliroReaderVerificationKeyAttribute(val value: ByteArray?) + + sealed class AliroReaderVerificationKeyAttributeSubscriptionState { + data class Success(val value: ByteArray?) : + AliroReaderVerificationKeyAttributeSubscriptionState() + + data class Error(val exception: Exception) : + AliroReaderVerificationKeyAttributeSubscriptionState() + + object SubscriptionEstablished : AliroReaderVerificationKeyAttributeSubscriptionState() + } + + class AliroReaderGroupIdentifierAttribute(val value: ByteArray?) + + sealed class AliroReaderGroupIdentifierAttributeSubscriptionState { + data class Success(val value: ByteArray?) : + AliroReaderGroupIdentifierAttributeSubscriptionState() + + data class Error(val exception: Exception) : + AliroReaderGroupIdentifierAttributeSubscriptionState() + + object SubscriptionEstablished : AliroReaderGroupIdentifierAttributeSubscriptionState() + } + + class AliroExpeditedTransactionSupportedProtocolVersionsAttribute(val value: List?) + + sealed class AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState { + data class Success(val value: List?) : + AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState() + + data class Error(val exception: Exception) : + AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState() + + object SubscriptionEstablished : + AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState() + } + + class AliroGroupResolvingKeyAttribute(val value: ByteArray?) + + sealed class AliroGroupResolvingKeyAttributeSubscriptionState { + data class Success(val value: ByteArray?) : AliroGroupResolvingKeyAttributeSubscriptionState() + + data class Error(val exception: Exception) : AliroGroupResolvingKeyAttributeSubscriptionState() + + object SubscriptionEstablished : AliroGroupResolvingKeyAttributeSubscriptionState() + } + + class AliroSupportedBLEUWBProtocolVersionsAttribute(val value: List?) + + sealed class AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState { + data class Success(val value: List?) : + AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState() + + data class Error(val exception: Exception) : + AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState() + + object SubscriptionEstablished : + AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState() + } + class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -1389,6 +1450,62 @@ class DoorLockCluster(private val controller: MatterController, private val endp logger.log(Level.FINE, "Invoke command succeeded: ${response}") } + suspend fun setAliroReaderConfig( + signingKey: ByteArray, + verificationKey: ByteArray, + groupIdentifier: ByteArray, + groupResolvingKey: ByteArray?, + timedInvokeTimeout: Duration + ) { + val commandId: UInt = 40u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_SIGNING_KEY_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_SIGNING_KEY_REQ), signingKey) + + val TAG_VERIFICATION_KEY_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_VERIFICATION_KEY_REQ), verificationKey) + + val TAG_GROUP_IDENTIFIER_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_GROUP_IDENTIFIER_REQ), groupIdentifier) + + val TAG_GROUP_RESOLVING_KEY_REQ: Int = 3 + groupResolvingKey?.let { + tlvWriter.put(ContextSpecificTag(TAG_GROUP_RESOLVING_KEY_REQ), groupResolvingKey) + } + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun clearAliroReaderConfig(timedInvokeTimeout: Duration) { + val commandId: UInt = 41u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + suspend fun readLockStateAttribute(): LockStateAttribute { val ATTRIBUTE_ID: UInt = 0u @@ -5435,6 +5552,926 @@ class DoorLockCluster(private val controller: MatterController, private val endp } } + suspend fun readAliroReaderVerificationKeyAttribute(): AliroReaderVerificationKeyAttribute { + val ATTRIBUTE_ID: UInt = 128u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Aliroreaderverificationkey attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return AliroReaderVerificationKeyAttribute(decodedValue) + } + + suspend fun subscribeAliroReaderVerificationKeyAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 128u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AliroReaderVerificationKeyAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Aliroreaderverificationkey attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { + emit(AliroReaderVerificationKeyAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit(AliroReaderVerificationKeyAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAliroReaderGroupIdentifierAttribute(): AliroReaderGroupIdentifierAttribute { + val ATTRIBUTE_ID: UInt = 129u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Aliroreadergroupidentifier attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return AliroReaderGroupIdentifierAttribute(decodedValue) + } + + suspend fun subscribeAliroReaderGroupIdentifierAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 129u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AliroReaderGroupIdentifierAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Aliroreadergroupidentifier attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { + emit(AliroReaderGroupIdentifierAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit(AliroReaderGroupIdentifierAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAliroReaderGroupSubIdentifierAttribute(): ByteArray? { + val ATTRIBUTE_ID: UInt = 130u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Aliroreadergroupsubidentifier attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeAliroReaderGroupSubIdentifierAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 130u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + ByteArraySubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Aliroreadergroupsubidentifier attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(ByteArraySubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(ByteArraySubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAliroExpeditedTransactionSupportedProtocolVersionsAttribute(): + AliroExpeditedTransactionSupportedProtocolVersionsAttribute { + val ATTRIBUTE_ID: UInt = 131u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Aliroexpeditedtransactionsupportedprotocolversions attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return AliroExpeditedTransactionSupportedProtocolVersionsAttribute(decodedValue) + } + + suspend fun subscribeAliroExpeditedTransactionSupportedProtocolVersionsAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 131u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Aliroexpeditedtransactionsupportedprotocolversions attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { + emit( + AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState.Success( + it + ) + ) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit( + AliroExpeditedTransactionSupportedProtocolVersionsAttributeSubscriptionState + .SubscriptionEstablished + ) + } + } + } + } + + suspend fun readAliroGroupResolvingKeyAttribute(): AliroGroupResolvingKeyAttribute { + val ATTRIBUTE_ID: UInt = 132u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Alirogroupresolvingkey attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return AliroGroupResolvingKeyAttribute(decodedValue) + } + + suspend fun subscribeAliroGroupResolvingKeyAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 132u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AliroGroupResolvingKeyAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Alirogroupresolvingkey attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { emit(AliroGroupResolvingKeyAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(AliroGroupResolvingKeyAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAliroSupportedBLEUWBProtocolVersionsAttribute(): + AliroSupportedBLEUWBProtocolVersionsAttribute { + val ATTRIBUTE_ID: UInt = 133u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Alirosupportedbleuwbprotocolversions attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return AliroSupportedBLEUWBProtocolVersionsAttribute(decodedValue) + } + + suspend fun subscribeAliroSupportedBLEUWBProtocolVersionsAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 133u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Alirosupportedbleuwbprotocolversions attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { + emit(AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit( + AliroSupportedBLEUWBProtocolVersionsAttributeSubscriptionState.SubscriptionEstablished + ) + } + } + } + } + + suspend fun readAliroBLEAdvertisingVersionAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 134u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Alirobleadvertisingversion attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeAliroBLEAdvertisingVersionAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 134u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Alirobleadvertisingversion attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNumberOfAliroCredentialIssuerKeysSupportedAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 135u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Numberofalirocredentialissuerkeyssupported attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeNumberOfAliroCredentialIssuerKeysSupportedAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 135u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Numberofalirocredentialissuerkeyssupported attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNumberOfAliroEndpointKeysSupportedAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 136u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Numberofaliroendpointkeyssupported attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeNumberOfAliroEndpointKeysSupportedAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 136u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Numberofaliroendpointkeyssupported attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index a3c49585581cf4..d6b6c5fe685f8b 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -24132,6 +24132,183 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::AliroReaderVerificationKey::Id: { + using TypeInfo = Attributes::AliroReaderVerificationKey::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); + env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), + reinterpret_cast(cppValue.Value().data())); + value = valueByteArray; + } + return value; + } + case Attributes::AliroReaderGroupIdentifier::Id: { + using TypeInfo = Attributes::AliroReaderGroupIdentifier::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); + env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), + reinterpret_cast(cppValue.Value().data())); + value = valueByteArray; + } + return value; + } + case Attributes::AliroReaderGroupSubIdentifier::Id: { + using TypeInfo = Attributes::AliroReaderGroupSubIdentifier::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.size())); + env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.size()), + reinterpret_cast(cppValue.data())); + value = valueByteArray; + return value; + } + case Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id: { + using TypeInfo = Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AliroGroupResolvingKey::Id: { + using TypeInfo = Attributes::AliroGroupResolvingKey::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); + env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), + reinterpret_cast(cppValue.Value().data())); + value = valueByteArray; + } + return value; + } + case Attributes::AliroSupportedBLEUWBProtocolVersions::Id: { + using TypeInfo = Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AliroBLEAdvertisingVersion::Id: { + using TypeInfo = Attributes::AliroBLEAdvertisingVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id: { + using TypeInfo = Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::NumberOfAliroEndpointKeysSupported::Id: { + using TypeInfo = Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index de2ce285d6513e..14101937393e4c 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -793,6 +793,10 @@ typedef void (*EnergyPreferenceEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EnergyPreferenceAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DoorLockAliroExpeditedTransactionSupportedProtocolVersionsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DoorLockAliroSupportedBLEUWBProtocolVersionsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 6cc3a266a05bbd..fbfd2968e4217b 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -35232,6 +35232,352 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPDoorLockAliroReaderVerificationKeyAttributeCallback::CHIPDoorLockAliroReaderVerificationKeyAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAliroReaderVerificationKeyAttributeCallback::~CHIPDoorLockAliroReaderVerificationKeyAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAliroReaderVerificationKeyAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback::CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback::~CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAliroReaderGroupIdentifierAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback:: + CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback:: + ~CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDoorLockAliroGroupResolvingKeyAttributeCallback::CHIPDoorLockAliroGroupResolvingKeyAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAliroGroupResolvingKeyAttributeCallback::~CHIPDoorLockAliroGroupResolvingKeyAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAliroGroupResolvingKeyAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback:: + CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback:: + ~CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDoorLockAliroSupportedBLEUWBProtocolVersionsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPDoorLockGeneratedCommandListAttributeCallback::CHIPDoorLockGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 59c67cbe244eb2..cef21fceaf4451 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7188,6 +7188,22 @@ class ChipClusters: "PINCode": "bytes", }, }, + 0x00000028: { + "commandId": 0x00000028, + "commandName": "SetAliroReaderConfig", + "args": { + "signingKey": "bytes", + "verificationKey": "bytes", + "groupIdentifier": "bytes", + "groupResolvingKey": "bytes", + }, + }, + 0x00000029: { + "commandId": 0x00000029, + "commandName": "ClearAliroReaderConfig", + "args": { + }, + }, }, "attributes": { 0x00000000: { @@ -7424,6 +7440,60 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x00000080: { + "attributeName": "AliroReaderVerificationKey", + "attributeId": 0x00000080, + "type": "bytes", + "reportable": True, + }, + 0x00000081: { + "attributeName": "AliroReaderGroupIdentifier", + "attributeId": 0x00000081, + "type": "bytes", + "reportable": True, + }, + 0x00000082: { + "attributeName": "AliroReaderGroupSubIdentifier", + "attributeId": 0x00000082, + "type": "bytes", + "reportable": True, + }, + 0x00000083: { + "attributeName": "AliroExpeditedTransactionSupportedProtocolVersions", + "attributeId": 0x00000083, + "type": "bytes", + "reportable": True, + }, + 0x00000084: { + "attributeName": "AliroGroupResolvingKey", + "attributeId": 0x00000084, + "type": "bytes", + "reportable": True, + }, + 0x00000085: { + "attributeName": "AliroSupportedBLEUWBProtocolVersions", + "attributeId": 0x00000085, + "type": "bytes", + "reportable": True, + }, + 0x00000086: { + "attributeName": "AliroBLEAdvertisingVersion", + "attributeId": 0x00000086, + "type": "int", + "reportable": True, + }, + 0x00000087: { + "attributeName": "NumberOfAliroCredentialIssuerKeysSupported", + "attributeId": 0x00000087, + "type": "int", + "reportable": True, + }, + 0x00000088: { + "attributeName": "NumberOfAliroEndpointKeysSupported", + "attributeId": 0x00000088, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 4087ed2ff58c53..5f550a479c89a6 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -25096,6 +25096,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sendPINOverTheAir", Tag=0x00000032, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="requirePINforRemoteOperation", Tag=0x00000033, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="expiringUserTimeout", Tag=0x00000035, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="aliroReaderVerificationKey", Tag=0x00000080, Type=typing.Union[None, Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="aliroReaderGroupIdentifier", Tag=0x00000081, Type=typing.Union[None, Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="aliroReaderGroupSubIdentifier", Tag=0x00000082, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="aliroExpeditedTransactionSupportedProtocolVersions", Tag=0x00000083, Type=typing.Optional[typing.List[bytes]]), + ClusterObjectFieldDescriptor(Label="aliroGroupResolvingKey", Tag=0x00000084, Type=typing.Union[None, Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="aliroSupportedBLEUWBProtocolVersions", Tag=0x00000085, Type=typing.Optional[typing.List[bytes]]), + ClusterObjectFieldDescriptor(Label="aliroBLEAdvertisingVersion", Tag=0x00000086, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfAliroCredentialIssuerKeysSupported", Tag=0x00000087, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfAliroEndpointKeysSupported", Tag=0x00000088, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -25140,6 +25149,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: sendPINOverTheAir: 'typing.Optional[bool]' = None requirePINforRemoteOperation: 'typing.Optional[bool]' = None expiringUserTimeout: 'typing.Optional[uint]' = None + aliroReaderVerificationKey: 'typing.Union[None, Nullable, bytes]' = None + aliroReaderGroupIdentifier: 'typing.Union[None, Nullable, bytes]' = None + aliroReaderGroupSubIdentifier: 'typing.Optional[bytes]' = None + aliroExpeditedTransactionSupportedProtocolVersions: 'typing.Optional[typing.List[bytes]]' = None + aliroGroupResolvingKey: 'typing.Union[None, Nullable, bytes]' = None + aliroSupportedBLEUWBProtocolVersions: 'typing.Optional[typing.List[bytes]]' = None + aliroBLEAdvertisingVersion: 'typing.Optional[uint]' = None + numberOfAliroCredentialIssuerKeysSupported: 'typing.Optional[uint]' = None + numberOfAliroEndpointKeysSupported: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -25180,11 +25198,14 @@ class CredentialTypeEnum(MatterIntEnum): kFingerprint = 0x03 kFingerVein = 0x04 kFace = 0x05 + kAliroCredentialIssuerKey = 0x06 + kAliroEvictableEndpointKey = 0x07 + kAliroNonEvictableEndpointKey = 0x08 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 9, class DataOperationTypeEnum(MatterIntEnum): kAdd = 0x00 @@ -25336,11 +25357,14 @@ class LockDataTypeEnum(MatterIntEnum): kFingerprint = 0x08 kFingerVein = 0x09 kFace = 0x0A + kAliroCredentialIssuerKey = 0x0B + kAliroEvictableEndpointKey = 0x0C + kAliroNonEvictableEndpointKey = 0x0D # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 11, + kUnknownEnumValue = 14, class LockOperationTypeEnum(MatterIntEnum): kLock = 0x00 @@ -25389,11 +25413,12 @@ class OperationSourceEnum(MatterIntEnum): kRemote = 0x07 kRfid = 0x08 kBiometric = 0x09 + kAliro = 0x0A # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 11, class UserStatusEnum(MatterIntEnum): kAvailable = 0x00 @@ -25548,6 +25573,8 @@ class Feature(IntFlag): kYearDayAccessSchedules = 0x400 kHolidaySchedules = 0x800 kUnbolt = 0x1000 + kAliroProvisioning = 0x2000 + kAliroBLEUWB = 0x4000 class Structs: @dataclass @@ -26112,6 +26139,49 @@ def must_use_timed_invoke(cls) -> bool: PINCode: 'typing.Optional[bytes]' = None + @dataclass + class SetAliroReaderConfig(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000028 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="signingKey", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="verificationKey", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="groupIdentifier", Tag=2, Type=bytes), + ClusterObjectFieldDescriptor(Label="groupResolvingKey", Tag=3, Type=typing.Optional[bytes]), + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + + signingKey: 'bytes' = b"" + verificationKey: 'bytes' = b"" + groupIdentifier: 'bytes' = b"" + groupResolvingKey: 'typing.Optional[bytes]' = None + + @dataclass + class ClearAliroReaderConfig(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000101 + command_id: typing.ClassVar[int] = 0x00000029 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @ChipUtility.classproperty + def must_use_timed_invoke(cls) -> bool: + return True + class Attributes: @dataclass class LockState(ClusterAttributeDescriptor): @@ -26689,6 +26759,150 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AliroReaderVerificationKey(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) + + value: 'typing.Union[None, Nullable, bytes]' = None + + @dataclass + class AliroReaderGroupIdentifier(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) + + value: 'typing.Union[None, Nullable, bytes]' = None + + @dataclass + class AliroReaderGroupSubIdentifier(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000082 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) + + value: 'typing.Optional[bytes]' = None + + @dataclass + class AliroExpeditedTransactionSupportedProtocolVersions(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000083 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[bytes]]) + + value: 'typing.Optional[typing.List[bytes]]' = None + + @dataclass + class AliroGroupResolvingKey(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000084 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) + + value: 'typing.Union[None, Nullable, bytes]' = None + + @dataclass + class AliroSupportedBLEUWBProtocolVersions(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000085 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[bytes]]) + + value: 'typing.Optional[typing.List[bytes]]' = None + + @dataclass + class AliroBLEAdvertisingVersion(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000086 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfAliroCredentialIssuerKeysSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000087 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfAliroEndpointKeysSupported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000088 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 9563685182a1be..88f37a8531d706 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3324,6 +3324,33 @@ static BOOL AttributeIsSpecifiedInDoorLockCluster(AttributeId aAttributeId) case Attributes::ExpiringUserTimeout::Id: { return YES; } + case Attributes::AliroReaderVerificationKey::Id: { + return YES; + } + case Attributes::AliroReaderGroupIdentifier::Id: { + return YES; + } + case Attributes::AliroReaderGroupSubIdentifier::Id: { + return YES; + } + case Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id: { + return YES; + } + case Attributes::AliroGroupResolvingKey::Id: { + return YES; + } + case Attributes::AliroSupportedBLEUWBProtocolVersions::Id: { + return YES; + } + case Attributes::AliroBLEAdvertisingVersion::Id: { + return YES; + } + case Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id: { + return YES; + } + case Attributes::NumberOfAliroEndpointKeysSupported::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index b31bee80bbf65a..c1aa94bb30c8e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9360,6 +9360,147 @@ static id _Nullable DecodeAttributeValueForDoorLockCluster(AttributeId aAttribut value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } + case Attributes::AliroReaderVerificationKey::Id: { + using TypeInfo = Attributes::AliroReaderVerificationKey::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); + } + return value; + } + case Attributes::AliroReaderGroupIdentifier::Id: { + using TypeInfo = Attributes::AliroReaderGroupIdentifier::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); + } + return value; + } + case Attributes::AliroReaderGroupSubIdentifier::Id: { + using TypeInfo = Attributes::AliroReaderGroupSubIdentifier::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nonnull value; + value = AsData(cppValue); + return value; + } + case Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id: { + using TypeInfo = Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = AsData(entry_0); + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AliroGroupResolvingKey::Id: { + using TypeInfo = Attributes::AliroGroupResolvingKey::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); + } + return value; + } + case Attributes::AliroSupportedBLEUWBProtocolVersions::Id: { + using TypeInfo = Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = AsData(entry_0); + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AliroBLEAdvertisingVersion::Id: { + using TypeInfo = Attributes::AliroBLEAdvertisingVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id: { + using TypeInfo = Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::NumberOfAliroEndpointKeysSupported::Id: { + using TypeInfo = Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 1ae4424f2229fb..af7aa37fc94591 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -8132,6 +8132,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)unboltDoorWithCompletion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetAliroReaderConfig + * + * This command communicates an Aliro Reader configuration to the lock. + */ +- (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ClearAliroReaderConfig + * + * This command clears an existing Aliro Reader configuration for the lock. + */ +- (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearAliroReaderConfigWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams *)params @@ -8385,6 +8399,60 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAliroReaderVerificationKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroReaderVerificationKeyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroReaderVerificationKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAliroReaderGroupIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroReaderGroupIdentifierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroReaderGroupIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAliroReaderGroupSubIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroReaderGroupSubIdentifierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroReaderGroupSubIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAliroGroupResolvingKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroGroupResolvingKeyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroGroupResolvingKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAliroBLEAdvertisingVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAliroBLEAdvertisingVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAliroBLEAdvertisingVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfAliroEndpointKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -17272,6 +17340,9 @@ typedef NS_ENUM(uint8_t, MTRDoorLockCredentialType) { MTRDoorLockCredentialTypeFingerprint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, MTRDoorLockCredentialTypeFingerVein MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, MTRDoorLockCredentialTypeFace MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRDoorLockCredentialTypeAliroCredentialIssuerKey MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDoorLockCredentialTypeAliroEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDoorLockCredentialTypeAliroNonEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x08, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_ENUM(uint8_t, MTRDoorLockDlCredentialType) { @@ -17392,6 +17463,9 @@ typedef NS_ENUM(uint8_t, MTRDoorLockLockDataType) { MTRDoorLockLockDataTypeFingerprint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, MTRDoorLockLockDataTypeFingerVein MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, MTRDoorLockLockDataTypeFace MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, + MTRDoorLockLockDataTypeAliroCredentialIssuerKey MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDoorLockLockDataTypeAliroEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDoorLockLockDataTypeAliroNonEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x0D, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_ENUM(uint8_t, MTRDoorLockDlLockDataType) { @@ -17464,6 +17538,7 @@ typedef NS_ENUM(uint8_t, MTRDoorLockOperationSource) { MTRDoorLockOperationSourceRemote MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, MTRDoorLockOperationSourceRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, MTRDoorLockOperationSourceBiometric MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, + MTRDoorLockOperationSourceAliro MTR_PROVISIONALLY_AVAILABLE = 0x0A, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); typedef NS_ENUM(uint8_t, MTRDoorLockDlOperationSource) { @@ -17677,6 +17752,8 @@ typedef NS_OPTIONS(uint32_t, MTRDoorLockFeature) { MTRDoorLockFeatureYearDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureYearDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x400, MTRDoorLockFeatureHolidaySchedules MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, MTRDoorLockFeatureUnbolt MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRDoorLockFeatureAliroProvisioning MTR_PROVISIONALLY_AVAILABLE = 0x2000, + MTRDoorLockFeatureAliroBLEUWB MTR_PROVISIONALLY_AVAILABLE = 0x4000, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRWindowCoveringEndProductType) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 1050bcbbc044ca..6e3cff24c0b3df 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -54476,6 +54476,64 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par queue:self.callbackQueue completion:responseHandler]; } +- (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetAliroReaderConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetAliroReaderConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearAliroReaderConfigWithCompletion:(MTRStatusCompletion)completion +{ + [self clearAliroReaderConfigWithParams:nil completion:completion]; +} +- (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearAliroReaderConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearAliroReaderConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -56277,6 +56335,330 @@ + (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCa completion:completion]; } +- (void)readAttributeAliroReaderVerificationKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroReaderVerificationKeyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroReaderVerificationKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAliroReaderGroupIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroReaderGroupIdentifierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroReaderGroupIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAliroReaderGroupSubIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroReaderGroupSubIdentifierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroReaderGroupSubIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAliroGroupResolvingKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroGroupResolvingKeyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroGroupResolvingKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAliroBLEAdvertisingVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAliroBLEAdvertisingVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAliroBLEAdvertisingVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfAliroEndpointKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 3f811984b055e7..20719ef212e0a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2863,6 +2863,15 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDoorLockAttributeSendPINOverTheAirID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000032, MTRAttributeIDTypeClusterDoorLockAttributeRequirePINforRemoteOperationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000033, MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000035, + MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderVerificationKeyID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, + MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupIdentifierID MTR_PROVISIONALLY_AVAILABLE = 0x00000081, + MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupSubIdentifierID MTR_PROVISIONALLY_AVAILABLE = 0x00000082, + MTRAttributeIDTypeClusterDoorLockAttributeAliroExpeditedTransactionSupportedProtocolVersionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000083, + MTRAttributeIDTypeClusterDoorLockAttributeAliroGroupResolvingKeyID MTR_PROVISIONALLY_AVAILABLE = 0x00000084, + MTRAttributeIDTypeClusterDoorLockAttributeAliroSupportedBLEUWBProtocolVersionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000085, + MTRAttributeIDTypeClusterDoorLockAttributeAliroBLEAdvertisingVersionID MTR_PROVISIONALLY_AVAILABLE = 0x00000086, + MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroCredentialIssuerKeysSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000087, + MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroEndpointKeysSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000088, MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterDoorLockAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -6398,6 +6407,8 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterDoorLockCommandGetCredentialStatusResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000025, MTRCommandIDTypeClusterDoorLockCommandClearCredentialID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000026, MTRCommandIDTypeClusterDoorLockCommandUnboltDoorID MTR_PROVISIONALLY_AVAILABLE = 0x00000027, + MTRCommandIDTypeClusterDoorLockCommandSetAliroReaderConfigID MTR_PROVISIONALLY_AVAILABLE = 0x00000028, + MTRCommandIDTypeClusterDoorLockCommandClearAliroReaderConfigID MTR_PROVISIONALLY_AVAILABLE = 0x00000029, // Cluster WindowCovering deprecated command id names MTRClusterWindowCoveringCommandUpOrOpenID diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index b377db1108216e..6e302f13b87c21 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3800,6 +3800,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)unboltDoorWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)clearAliroReaderConfigWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3909,6 +3913,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary * _Nullable)readAttributeAliroReaderVerificationKeyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAliroReaderGroupIdentifierWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAliroReaderGroupSubIdentifierWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAliroGroupResolvingKeyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAliroBLEAdvertisingVersionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f8bb88a0ef0152..40e6d9ce2f62f8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -10873,6 +10873,70 @@ - (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)par completion:responseHandler]; } +- (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetAliroReaderConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetAliroReaderConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)clearAliroReaderConfigWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self clearAliroReaderConfigWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearAliroReaderConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearAliroReaderConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeLockStateID) params:params]; @@ -11251,6 +11315,51 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeExpiringUserTimeoutID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } +- (NSDictionary * _Nullable)readAttributeAliroReaderVerificationKeyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderVerificationKeyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAliroReaderGroupIdentifierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupIdentifierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAliroReaderGroupSubIdentifierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroReaderGroupSubIdentifierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroExpeditedTransactionSupportedProtocolVersionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAliroGroupResolvingKeyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroGroupResolvingKeyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroSupportedBLEUWBProtocolVersionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAliroBLEAdvertisingVersionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAliroBLEAdvertisingVersionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroCredentialIssuerKeysSupportedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroEndpointKeysSupportedID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index a3177639b26409..5f90f0d869be60 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7208,6 +7208,70 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDoorLockClusterSetAliroReaderConfigParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull signingKey MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nonnull verificationKey MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nonnull groupIdentifier MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable groupResolvingKey MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRDoorLockClusterClearAliroReaderConfigParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRWindowCoveringClusterUpOrOpenParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 368ac07c4a2ac3..4090cfe1b4ed09 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -20077,6 +20077,179 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRDoorLockClusterSetAliroReaderConfigParams +- (instancetype)init +{ + if (self = [super init]) { + + _signingKey = [NSData data]; + + _verificationKey = [NSData data]; + + _groupIdentifier = [NSData data]; + + _groupResolvingKey = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterSetAliroReaderConfigParams alloc] init]; + + other.signingKey = self.signingKey; + other.verificationKey = self.verificationKey; + other.groupIdentifier = self.groupIdentifier; + other.groupResolvingKey = self.groupResolvingKey; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: signingKey:%@; verificationKey:%@; groupIdentifier:%@; groupResolvingKey:%@; >", NSStringFromClass([self class]), [_signingKey base64EncodedStringWithOptions:0], [_verificationKey base64EncodedStringWithOptions:0], [_groupIdentifier base64EncodedStringWithOptions:0], [_groupResolvingKey base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterSetAliroReaderConfigParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.signingKey = AsByteSpan(self.signingKey); + } + { + encodableStruct.verificationKey = AsByteSpan(self.verificationKey); + } + { + encodableStruct.groupIdentifier = AsByteSpan(self.groupIdentifier); + } + { + if (self.groupResolvingKey != nil) { + auto & definedValue_0 = encodableStruct.groupResolvingKey.Emplace(); + definedValue_0 = AsByteSpan(self.groupResolvingKey); + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRDoorLockClusterClearAliroReaderConfigParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterClearAliroReaderConfigParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterClearAliroReaderConfigParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + @implementation MTRWindowCoveringClusterUpOrOpenParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index eaf1bf2b744f8c..f2f3b125a44afd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1288,6 +1288,18 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRDoorLockClusterSetAliroReaderConfigParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRDoorLockClusterClearAliroReaderConfigParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRWindowCoveringClusterUpOrOpenParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 3c5c7439d15e2c..9b9dfa867c5d24 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -684,6 +684,12 @@ static BOOL CommandNeedsTimedInvokeInDoorLockCluster(AttributeId aAttributeId) case Commands::UnboltDoor::Id: { return YES; } + case Commands::SetAliroReaderConfig::Id: { + return YES; + } + case Commands::ClearAliroReaderConfig::Id: { + return YES; + } default: { return NO; } diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 12d34873854914..5960985c1dcc4b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -13138,6 +13138,277 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace ExpiringUserTimeout +namespace AliroReaderVerificationKey { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[65 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 65, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 65); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(65 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 65, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[65 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace AliroReaderVerificationKey + +namespace AliroReaderGroupIdentifier { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 16); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace AliroReaderGroupIdentifier + +namespace AliroReaderGroupSubIdentifier { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) +{ + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + + VerifyOrReturnError(value.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(value.data(), &zclString[1], 16); + value.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +} // namespace AliroReaderGroupSubIdentifier + +namespace AliroGroupResolvingKey { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 16); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace AliroGroupResolvingKey + +namespace AliroBLEAdvertisingVersion { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace AliroBLEAdvertisingVersion + +namespace NumberOfAliroCredentialIssuerKeysSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfAliroCredentialIssuerKeysSupported + +namespace NumberOfAliroEndpointKeysSupported { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfAliroEndpointKeysSupported + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 9540569158a171..415de298e294d7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2461,6 +2461,47 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ExpiringUserTimeout +namespace AliroReaderVerificationKey { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace AliroReaderVerificationKey + +namespace AliroReaderGroupIdentifier { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace AliroReaderGroupIdentifier + +namespace AliroReaderGroupSubIdentifier { +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +} // namespace AliroReaderGroupSubIdentifier + +namespace AliroGroupResolvingKey { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace AliroGroupResolvingKey + +namespace AliroBLEAdvertisingVersion { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace AliroBLEAdvertisingVersion + +namespace NumberOfAliroCredentialIssuerKeysSupported { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace NumberOfAliroCredentialIssuerKeysSupported + +namespace NumberOfAliroEndpointKeysSupported { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace NumberOfAliroEndpointKeysSupported + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 61c909519685e1..43d31bc3c8d5fe 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -10351,6 +10351,18 @@ bool emberAfDoorLockClusterClearCredentialCallback( bool emberAfDoorLockClusterUnboltDoorCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::DoorLock::Commands::UnboltDoor::DecodableType & commandData); +/** + * @brief Door Lock Cluster SetAliroReaderConfig Command callback (from client) + */ +bool emberAfDoorLockClusterSetAliroReaderConfigCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::DecodableType & commandData); +/** + * @brief Door Lock Cluster ClearAliroReaderConfig Command callback (from client) + */ +bool emberAfDoorLockClusterClearAliroReaderConfigCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::DecodableType & commandData); /** * @brief Window Covering Cluster UpOrOpen Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 0b450692c1486f..9e47611bbd47e8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1828,9 +1828,12 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::CredentialTyp case EnumType::kFingerprint: case EnumType::kFingerVein: case EnumType::kFace: + case EnumType::kAliroCredentialIssuerKey: + case EnumType::kAliroEvictableEndpointKey: + case EnumType::kAliroNonEvictableEndpointKey: return val; default: - return static_cast(6); + return static_cast(9); } } static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::DataOperationTypeEnum val) @@ -2017,9 +2020,12 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::LockDataTypeE case EnumType::kFingerprint: case EnumType::kFingerVein: case EnumType::kFace: + case EnumType::kAliroCredentialIssuerKey: + case EnumType::kAliroEvictableEndpointKey: + case EnumType::kAliroNonEvictableEndpointKey: return val; default: - return static_cast(11); + return static_cast(14); } } static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::LockOperationTypeEnum val) @@ -2082,9 +2088,10 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::OperationSour case EnumType::kRemote: case EnumType::kRfid: case EnumType::kBiometric: + case EnumType::kAliro: return val; default: - return static_cast(10); + return static_cast(11); } } static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::UserStatusEnum val) diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 1bcc2a286d63c3..6a08eefc633f2e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -2594,17 +2594,20 @@ enum class CredentialRuleEnum : uint8_t // Enum for CredentialTypeEnum enum class CredentialTypeEnum : uint8_t { - kProgrammingPIN = 0x00, - kPin = 0x01, - kRfid = 0x02, - kFingerprint = 0x03, - kFingerVein = 0x04, - kFace = 0x05, + kProgrammingPIN = 0x00, + kPin = 0x01, + kRfid = 0x02, + kFingerprint = 0x03, + kFingerVein = 0x04, + kFace = 0x05, + kAliroCredentialIssuerKey = 0x06, + kAliroEvictableEndpointKey = 0x07, + kAliroNonEvictableEndpointKey = 0x08, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 9, }; // Enum for DataOperationTypeEnum @@ -2778,22 +2781,25 @@ enum class DoorStateEnum : uint8_t // Enum for LockDataTypeEnum enum class LockDataTypeEnum : uint8_t { - kUnspecified = 0x00, - kProgrammingCode = 0x01, - kUserIndex = 0x02, - kWeekDaySchedule = 0x03, - kYearDaySchedule = 0x04, - kHolidaySchedule = 0x05, - kPin = 0x06, - kRfid = 0x07, - kFingerprint = 0x08, - kFingerVein = 0x09, - kFace = 0x0A, + kUnspecified = 0x00, + kProgrammingCode = 0x01, + kUserIndex = 0x02, + kWeekDaySchedule = 0x03, + kYearDaySchedule = 0x04, + kHolidaySchedule = 0x05, + kPin = 0x06, + kRfid = 0x07, + kFingerprint = 0x08, + kFingerVein = 0x09, + kFace = 0x0A, + kAliroCredentialIssuerKey = 0x0B, + kAliroEvictableEndpointKey = 0x0C, + kAliroNonEvictableEndpointKey = 0x0D, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 11, + kUnknownEnumValue = 14, }; // Enum for LockOperationTypeEnum @@ -2854,11 +2860,12 @@ enum class OperationSourceEnum : uint8_t kRemote = 0x07, kRfid = 0x08, kBiometric = 0x09, + kAliro = 0x0A, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 11, }; // Enum for UserStatusEnum @@ -3063,6 +3070,8 @@ enum class Feature : uint32_t kYearDayAccessSchedules = 0x400, kHolidaySchedules = 0x800, kUnbolt = 0x1000, + kAliroProvisioning = 0x2000, + kAliroBLEUWB = 0x4000, }; } // namespace DoorLock diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index a4c47d609ff048..f90d3c76caae32 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -17729,6 +17729,75 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace UnboltDoor. +namespace SetAliroReaderConfig { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kSigningKey), signingKey); + encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); + encoder.Encode(to_underlying(Fields::kGroupIdentifier), groupIdentifier); + encoder.Encode(to_underlying(Fields::kGroupResolvingKey), groupResolvingKey); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSigningKey)) + { + err = DataModel::Decode(reader, signingKey); + } + else if (__context_tag == to_underlying(Fields::kVerificationKey)) + { + err = DataModel::Decode(reader, verificationKey); + } + else if (__context_tag == to_underlying(Fields::kGroupIdentifier)) + { + err = DataModel::Decode(reader, groupIdentifier); + } + else if (__context_tag == to_underlying(Fields::kGroupResolvingKey)) + { + err = DataModel::Decode(reader, groupResolvingKey); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetAliroReaderConfig. +namespace ClearAliroReaderConfig { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace ClearAliroReaderConfig. } // namespace Commands namespace Attributes { @@ -17808,6 +17877,24 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, requirePINforRemoteOperation); case Attributes::ExpiringUserTimeout::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, expiringUserTimeout); + case Attributes::AliroReaderVerificationKey::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroReaderVerificationKey); + case Attributes::AliroReaderGroupIdentifier::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroReaderGroupIdentifier); + case Attributes::AliroReaderGroupSubIdentifier::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroReaderGroupSubIdentifier); + case Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroExpeditedTransactionSupportedProtocolVersions); + case Attributes::AliroGroupResolvingKey::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroGroupResolvingKey); + case Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroSupportedBLEUWBProtocolVersions); + case Attributes::AliroBLEAdvertisingVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, aliroBLEAdvertisingVersion); + case Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfAliroCredentialIssuerKeysSupported); + case Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfAliroEndpointKeysSupported); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -28290,6 +28377,8 @@ bool CommandNeedsTimedInvoke(ClusterId aCluster, CommandId aCommand) case Clusters::DoorLock::Commands::SetCredential::Id: case Clusters::DoorLock::Commands::ClearCredential::Id: case Clusters::DoorLock::Commands::UnboltDoor::Id: + case Clusters::DoorLock::Commands::SetAliroReaderConfig::Id: + case Clusters::DoorLock::Commands::ClearAliroReaderConfig::Id: return true; default: return false; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index e511659d9c7f68..c1047052385535 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -23216,6 +23216,16 @@ struct Type; struct DecodableType; } // namespace UnboltDoor +namespace SetAliroReaderConfig { +struct Type; +struct DecodableType; +} // namespace SetAliroReaderConfig + +namespace ClearAliroReaderConfig { +struct Type; +struct DecodableType; +} // namespace ClearAliroReaderConfig + } // namespace Commands namespace Commands { @@ -24193,6 +24203,75 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace UnboltDoor +namespace SetAliroReaderConfig { +enum class Fields : uint8_t +{ + kSigningKey = 0, + kVerificationKey = 1, + kGroupIdentifier = 2, + kGroupResolvingKey = 3, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetAliroReaderConfig::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + chip::ByteSpan signingKey; + chip::ByteSpan verificationKey; + chip::ByteSpan groupIdentifier; + Optional groupResolvingKey; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetAliroReaderConfig::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + chip::ByteSpan signingKey; + chip::ByteSpan verificationKey; + chip::ByteSpan groupIdentifier; + Optional groupResolvingKey; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetAliroReaderConfig +namespace ClearAliroReaderConfig { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ClearAliroReaderConfig::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ClearAliroReaderConfig::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ClearAliroReaderConfig } // namespace Commands namespace Attributes { @@ -24630,6 +24709,118 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ExpiringUserTimeout +namespace AliroReaderVerificationKey { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroReaderVerificationKey::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 65; } +}; +} // namespace AliroReaderVerificationKey +namespace AliroReaderGroupIdentifier { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroReaderGroupIdentifier::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace AliroReaderGroupIdentifier +namespace AliroReaderGroupSubIdentifier { +struct TypeInfo +{ + using Type = chip::ByteSpan; + using DecodableType = chip::ByteSpan; + using DecodableArgType = chip::ByteSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroReaderGroupSubIdentifier::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace AliroReaderGroupSubIdentifier +namespace AliroExpeditedTransactionSupportedProtocolVersions { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AliroExpeditedTransactionSupportedProtocolVersions +namespace AliroGroupResolvingKey { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroGroupResolvingKey::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace AliroGroupResolvingKey +namespace AliroSupportedBLEUWBProtocolVersions { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroSupportedBLEUWBProtocolVersions::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AliroSupportedBLEUWBProtocolVersions +namespace AliroBLEAdvertisingVersion { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AliroBLEAdvertisingVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AliroBLEAdvertisingVersion +namespace NumberOfAliroCredentialIssuerKeysSupported { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfAliroCredentialIssuerKeysSupported +namespace NumberOfAliroEndpointKeysSupported { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfAliroEndpointKeysSupported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfAliroEndpointKeysSupported namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -24720,6 +24911,18 @@ struct TypeInfo Attributes::SendPINOverTheAir::TypeInfo::DecodableType sendPINOverTheAir = static_cast(0); Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType requirePINforRemoteOperation = static_cast(0); Attributes::ExpiringUserTimeout::TypeInfo::DecodableType expiringUserTimeout = static_cast(0); + Attributes::AliroReaderVerificationKey::TypeInfo::DecodableType aliroReaderVerificationKey; + Attributes::AliroReaderGroupIdentifier::TypeInfo::DecodableType aliroReaderGroupIdentifier; + Attributes::AliroReaderGroupSubIdentifier::TypeInfo::DecodableType aliroReaderGroupSubIdentifier; + Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo::DecodableType + aliroExpeditedTransactionSupportedProtocolVersions; + Attributes::AliroGroupResolvingKey::TypeInfo::DecodableType aliroGroupResolvingKey; + Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo::DecodableType aliroSupportedBLEUWBProtocolVersions; + Attributes::AliroBLEAdvertisingVersion::TypeInfo::DecodableType aliroBLEAdvertisingVersion = static_cast(0); + Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo::DecodableType numberOfAliroCredentialIssuerKeysSupported = + static_cast(0); + Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo::DecodableType numberOfAliroEndpointKeysSupported = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 3e23f66beb1d2c..36f3a2ef154181 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4142,6 +4142,42 @@ namespace ExpiringUserTimeout { static constexpr AttributeId Id = 0x00000035; } // namespace ExpiringUserTimeout +namespace AliroReaderVerificationKey { +static constexpr AttributeId Id = 0x00000080; +} // namespace AliroReaderVerificationKey + +namespace AliroReaderGroupIdentifier { +static constexpr AttributeId Id = 0x00000081; +} // namespace AliroReaderGroupIdentifier + +namespace AliroReaderGroupSubIdentifier { +static constexpr AttributeId Id = 0x00000082; +} // namespace AliroReaderGroupSubIdentifier + +namespace AliroExpeditedTransactionSupportedProtocolVersions { +static constexpr AttributeId Id = 0x00000083; +} // namespace AliroExpeditedTransactionSupportedProtocolVersions + +namespace AliroGroupResolvingKey { +static constexpr AttributeId Id = 0x00000084; +} // namespace AliroGroupResolvingKey + +namespace AliroSupportedBLEUWBProtocolVersions { +static constexpr AttributeId Id = 0x00000085; +} // namespace AliroSupportedBLEUWBProtocolVersions + +namespace AliroBLEAdvertisingVersion { +static constexpr AttributeId Id = 0x00000086; +} // namespace AliroBLEAdvertisingVersion + +namespace NumberOfAliroCredentialIssuerKeysSupported { +static constexpr AttributeId Id = 0x00000087; +} // namespace NumberOfAliroCredentialIssuerKeysSupported + +namespace NumberOfAliroEndpointKeysSupported { +static constexpr AttributeId Id = 0x00000088; +} // namespace NumberOfAliroEndpointKeysSupported + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index e5d62e248f7cdc..4aa2dada3394fb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1142,6 +1142,14 @@ namespace UnboltDoor { static constexpr CommandId Id = 0x00000027; } // namespace UnboltDoor +namespace SetAliroReaderConfig { +static constexpr CommandId Id = 0x00000028; +} // namespace SetAliroReaderConfig + +namespace ClearAliroReaderConfig { +static constexpr CommandId Id = 0x00000029; +} // namespace ClearAliroReaderConfig + } // namespace Commands } // namespace DoorLock diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index aee55fe90ccc5d..8cc714a74381d8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -7509,6 +7509,8 @@ class EnergyEvseClearTargets : public ClusterCommand | * GetCredentialStatus | 0x24 | | * ClearCredential | 0x26 | | * UnboltDoor | 0x27 | +| * SetAliroReaderConfig | 0x28 | +| * ClearAliroReaderConfig | 0x29 | |------------------------------------------------------------------------------| | Attributes: | | | * LockState | 0x0000 | @@ -7547,6 +7549,15 @@ class EnergyEvseClearTargets : public ClusterCommand | * SendPINOverTheAir | 0x0032 | | * RequirePINforRemoteOperation | 0x0033 | | * ExpiringUserTimeout | 0x0035 | +| * AliroReaderVerificationKey | 0x0080 | +| * AliroReaderGroupIdentifier | 0x0081 | +| * AliroReaderGroupSubIdentifier | 0x0082 | +| * AliroExpeditedTransactionSupportedProtocolVersions | 0x0083 | +| * AliroGroupResolvingKey | 0x0084 | +| * AliroSupportedBLEUWBProtocolVersions | 0x0085 | +| * AliroBLEAdvertisingVersion | 0x0086 | +| * NumberOfAliroCredentialIssuerKeysSupported | 0x0087 | +| * NumberOfAliroEndpointKeysSupported | 0x0088 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -8310,6 +8321,84 @@ class DoorLockUnboltDoor : public ClusterCommand chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; +/* + * Command SetAliroReaderConfig + */ +class DoorLockSetAliroReaderConfig : public ClusterCommand +{ +public: + DoorLockSetAliroReaderConfig(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-aliro-reader-config", credsIssuerConfig) + { + AddArgument("SigningKey", &mRequest.signingKey); + AddArgument("VerificationKey", &mRequest.verificationKey); + AddArgument("GroupIdentifier", &mRequest.groupIdentifier); + AddArgument("GroupResolvingKey", &mRequest.groupResolvingKey); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type mRequest; +}; + +/* + * Command ClearAliroReaderConfig + */ +class DoorLockClearAliroReaderConfig : public ClusterCommand +{ +public: + DoorLockClearAliroReaderConfig(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-aliro-reader-config", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster WindowCovering | 0x0102 | |------------------------------------------------------------------------------| @@ -20061,26 +20150,28 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -20130,8 +20221,25 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre credsIssuerConfig), // make_unique(Id, "send-pinover-the-air", Attributes::SendPINOverTheAir::Id, credsIssuerConfig), // make_unique(Id, "require-pinfor-remote-operation", Attributes::RequirePINforRemoteOperation::Id, - credsIssuerConfig), // - make_unique(Id, "expiring-user-timeout", Attributes::ExpiringUserTimeout::Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "expiring-user-timeout", Attributes::ExpiringUserTimeout::Id, credsIssuerConfig), // + make_unique(Id, "aliro-reader-verification-key", Attributes::AliroReaderVerificationKey::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-reader-group-identifier", Attributes::AliroReaderGroupIdentifier::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-reader-group-sub-identifier", Attributes::AliroReaderGroupSubIdentifier::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-expedited-transaction-supported-protocol-versions", + Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id, credsIssuerConfig), // + make_unique(Id, "aliro-group-resolving-key", Attributes::AliroGroupResolvingKey::Id, credsIssuerConfig), // + make_unique(Id, "aliro-supported-bleuwbprotocol-versions", + Attributes::AliroSupportedBLEUWBProtocolVersions::Id, credsIssuerConfig), // + make_unique(Id, "aliro-bleadvertising-version", Attributes::AliroBLEAdvertisingVersion::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-aliro-credential-issuer-keys-supported", + Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id, credsIssuerConfig), // + make_unique(Id, "number-of-aliro-endpoint-keys-supported", + Attributes::NumberOfAliroEndpointKeysSupported::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -20223,6 +20331,34 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "expiring-user-timeout", 0, UINT16_MAX, Attributes::ExpiringUserTimeout::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "aliro-reader-verification-key", Attributes::AliroReaderVerificationKey::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "aliro-reader-group-identifier", Attributes::AliroReaderGroupIdentifier::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "aliro-reader-group-sub-identifier", + Attributes::AliroReaderGroupSubIdentifier::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "aliro-expedited-transaction-supported-protocol-versions", + Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "aliro-group-resolving-key", Attributes::AliroGroupResolvingKey::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "aliro-supported-bleuwbprotocol-versions", Attributes::AliroSupportedBLEUWBProtocolVersions::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "aliro-bleadvertising-version", 0, UINT8_MAX, + Attributes::AliroBLEAdvertisingVersion::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "number-of-aliro-credential-issuer-keys-supported", 0, UINT16_MAX, + Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-aliro-endpoint-keys-supported", 0, UINT16_MAX, + Attributes::NumberOfAliroEndpointKeysSupported::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20288,8 +20424,26 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre credsIssuerConfig), // make_unique(Id, "send-pinover-the-air", Attributes::SendPINOverTheAir::Id, credsIssuerConfig), // make_unique(Id, "require-pinfor-remote-operation", Attributes::RequirePINforRemoteOperation::Id, - credsIssuerConfig), // - make_unique(Id, "expiring-user-timeout", Attributes::ExpiringUserTimeout::Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "expiring-user-timeout", Attributes::ExpiringUserTimeout::Id, credsIssuerConfig), // + make_unique(Id, "aliro-reader-verification-key", Attributes::AliroReaderVerificationKey::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-reader-group-identifier", Attributes::AliroReaderGroupIdentifier::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-reader-group-sub-identifier", Attributes::AliroReaderGroupSubIdentifier::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-expedited-transaction-supported-protocol-versions", + Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id, credsIssuerConfig), // + make_unique(Id, "aliro-group-resolving-key", Attributes::AliroGroupResolvingKey::Id, + credsIssuerConfig), // + make_unique(Id, "aliro-supported-bleuwbprotocol-versions", + Attributes::AliroSupportedBLEUWBProtocolVersions::Id, credsIssuerConfig), // + make_unique(Id, "aliro-bleadvertising-version", Attributes::AliroBLEAdvertisingVersion::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-aliro-credential-issuer-keys-supported", + Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id, credsIssuerConfig), // + make_unique(Id, "number-of-aliro-endpoint-keys-supported", + Attributes::NumberOfAliroEndpointKeysSupported::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index d8203d12d7ad27..1986bba20c640d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -12399,6 +12399,51 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ExpiringUserTimeout", 1, value); } + case DoorLock::Attributes::AliroReaderVerificationKey::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroReaderVerificationKey", 1, value); + } + case DoorLock::Attributes::AliroReaderGroupIdentifier::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroReaderGroupIdentifier", 1, value); + } + case DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id: { + chip::ByteSpan value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroReaderGroupSubIdentifier", 1, value); + } + case DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroExpeditedTransactionSupportedProtocolVersions", 1, value); + } + case DoorLock::Attributes::AliroGroupResolvingKey::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroGroupResolvingKey", 1, value); + } + case DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroSupportedBLEUWBProtocolVersions", 1, value); + } + case DoorLock::Attributes::AliroBLEAdvertisingVersion::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AliroBLEAdvertisingVersion", 1, value); + } + case DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfAliroCredentialIssuerKeysSupported", 1, value); + } + case DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfAliroEndpointKeysSupported", 1, value); + } case DoorLock::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 7b9ab81c027db2..7bf92641d4b8f6 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -84726,6 +84726,8 @@ class SubscribeAttributeEnergyPreferenceClusterRevision : public SubscribeAttrib | * GetCredentialStatus | 0x24 | | * ClearCredential | 0x26 | | * UnboltDoor | 0x27 | +| * SetAliroReaderConfig | 0x28 | +| * ClearAliroReaderConfig | 0x29 | |------------------------------------------------------------------------------| | Attributes: | | | * LockState | 0x0000 | @@ -84764,6 +84766,15 @@ class SubscribeAttributeEnergyPreferenceClusterRevision : public SubscribeAttrib | * SendPINOverTheAir | 0x0032 | | * RequirePINforRemoteOperation | 0x0033 | | * ExpiringUserTimeout | 0x0035 | +| * AliroReaderVerificationKey | 0x0080 | +| * AliroReaderGroupIdentifier | 0x0081 | +| * AliroReaderGroupSubIdentifier | 0x0082 | +| * AliroExpeditedTransactionSupportedProtocolVersions | 0x0083 | +| * AliroGroupResolvingKey | 0x0084 | +| * AliroSupportedBLEUWBProtocolVersions | 0x0085 | +| * AliroBLEAdvertisingVersion | 0x0086 | +| * NumberOfAliroCredentialIssuerKeysSupported | 0x0087 | +| * NumberOfAliroEndpointKeysSupported | 0x0088 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -85833,6 +85844,127 @@ class DoorLockUnboltDoor : public ClusterCommand { chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetAliroReaderConfig + */ +class DoorLockSetAliroReaderConfig : public ClusterCommand { +public: + DoorLockSetAliroReaderConfig() + : ClusterCommand("set-aliro-reader-config") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("SigningKey", &mRequest.signingKey); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupIdentifier", &mRequest.groupIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupResolvingKey", &mRequest.groupResolvingKey); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetAliroReaderConfigParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.signingKey = [NSData dataWithBytes:mRequest.signingKey.data() length:mRequest.signingKey.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.data() length:mRequest.verificationKey.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.groupIdentifier = [NSData dataWithBytes:mRequest.groupIdentifier.data() length:mRequest.groupIdentifier.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.groupResolvingKey.HasValue()) { + params.groupResolvingKey = [NSData dataWithBytes:mRequest.groupResolvingKey.Value().data() length:mRequest.groupResolvingKey.Value().size()]; + } else { + params.groupResolvingKey = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setAliroReaderConfigWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ClearAliroReaderConfig + */ +class DoorLockClearAliroReaderConfig : public ClusterCommand { +public: + DoorLockClearAliroReaderConfig() + : ClusterCommand("clear-aliro-reader-config") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearAliroReaderConfigParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearAliroReaderConfigWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + #endif // MTR_ENABLE_PROVISIONAL /* @@ -89525,6 +89657,772 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroReaderVerificationKey + */ +class ReadDoorLockAliroReaderVerificationKey : public ReadAttribute { +public: + ReadDoorLockAliroReaderVerificationKey() + : ReadAttribute("aliro-reader-verification-key") + { + } + + ~ReadDoorLockAliroReaderVerificationKey() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderVerificationKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroReaderVerificationKeyWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderVerificationKey response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroReaderVerificationKey read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroReaderVerificationKey : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroReaderVerificationKey() + : SubscribeAttribute("aliro-reader-verification-key") + { + } + + ~SubscribeAttributeDoorLockAliroReaderVerificationKey() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderVerificationKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroReaderVerificationKeyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderVerificationKey response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroReaderGroupIdentifier + */ +class ReadDoorLockAliroReaderGroupIdentifier : public ReadAttribute { +public: + ReadDoorLockAliroReaderGroupIdentifier() + : ReadAttribute("aliro-reader-group-identifier") + { + } + + ~ReadDoorLockAliroReaderGroupIdentifier() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupIdentifier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroReaderGroupIdentifierWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupIdentifier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroReaderGroupIdentifier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroReaderGroupIdentifier : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroReaderGroupIdentifier() + : SubscribeAttribute("aliro-reader-group-identifier") + { + } + + ~SubscribeAttributeDoorLockAliroReaderGroupIdentifier() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupIdentifier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroReaderGroupIdentifierWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupIdentifier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroReaderGroupSubIdentifier + */ +class ReadDoorLockAliroReaderGroupSubIdentifier : public ReadAttribute { +public: + ReadDoorLockAliroReaderGroupSubIdentifier() + : ReadAttribute("aliro-reader-group-sub-identifier") + { + } + + ~ReadDoorLockAliroReaderGroupSubIdentifier() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroReaderGroupSubIdentifierWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupSubIdentifier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroReaderGroupSubIdentifier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier() + : SubscribeAttribute("aliro-reader-group-sub-identifier") + { + } + + ~SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroReaderGroupSubIdentifierWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupSubIdentifier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroExpeditedTransactionSupportedProtocolVersions + */ +class ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public ReadAttribute { +public: + ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + : ReadAttribute("aliro-expedited-transaction-supported-protocol-versions") + { + } + + ~ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroExpeditedTransactionSupportedProtocolVersions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroExpeditedTransactionSupportedProtocolVersions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + : SubscribeAttribute("aliro-expedited-transaction-supported-protocol-versions") + { + } + + ~SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroExpeditedTransactionSupportedProtocolVersions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroGroupResolvingKey + */ +class ReadDoorLockAliroGroupResolvingKey : public ReadAttribute { +public: + ReadDoorLockAliroGroupResolvingKey() + : ReadAttribute("aliro-group-resolving-key") + { + } + + ~ReadDoorLockAliroGroupResolvingKey() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroGroupResolvingKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroGroupResolvingKeyWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroGroupResolvingKey response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroGroupResolvingKey read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroGroupResolvingKey : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroGroupResolvingKey() + : SubscribeAttribute("aliro-group-resolving-key") + { + } + + ~SubscribeAttributeDoorLockAliroGroupResolvingKey() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroGroupResolvingKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroGroupResolvingKeyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroGroupResolvingKey response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroSupportedBLEUWBProtocolVersions + */ +class ReadDoorLockAliroSupportedBLEUWBProtocolVersions : public ReadAttribute { +public: + ReadDoorLockAliroSupportedBLEUWBProtocolVersions() + : ReadAttribute("aliro-supported-bleuwbprotocol-versions") + { + } + + ~ReadDoorLockAliroSupportedBLEUWBProtocolVersions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroSupportedBLEUWBProtocolVersions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroSupportedBLEUWBProtocolVersions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions() + : SubscribeAttribute("aliro-supported-bleuwbprotocol-versions") + { + } + + ~SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroSupportedBLEUWBProtocolVersions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute AliroBLEAdvertisingVersion + */ +class ReadDoorLockAliroBLEAdvertisingVersion : public ReadAttribute { +public: + ReadDoorLockAliroBLEAdvertisingVersion() + : ReadAttribute("aliro-bleadvertising-version") + { + } + + ~ReadDoorLockAliroBLEAdvertisingVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroBLEAdvertisingVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAliroBLEAdvertisingVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroBLEAdvertisingVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AliroBLEAdvertisingVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockAliroBLEAdvertisingVersion : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAliroBLEAdvertisingVersion() + : SubscribeAttribute("aliro-bleadvertising-version") + { + } + + ~SubscribeAttributeDoorLockAliroBLEAdvertisingVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroBLEAdvertisingVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAliroBLEAdvertisingVersionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroBLEAdvertisingVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute NumberOfAliroCredentialIssuerKeysSupported + */ +class ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported : public ReadAttribute { +public: + ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported() + : ReadAttribute("number-of-aliro-credential-issuer-keys-supported") + { + } + + ~ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfAliroCredentialIssuerKeysSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfAliroCredentialIssuerKeysSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported() + : SubscribeAttribute("number-of-aliro-credential-issuer-keys-supported") + { + } + + ~SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfAliroCredentialIssuerKeysSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute NumberOfAliroEndpointKeysSupported + */ +class ReadDoorLockNumberOfAliroEndpointKeysSupported : public ReadAttribute { +public: + ReadDoorLockNumberOfAliroEndpointKeysSupported() + : ReadAttribute("number-of-aliro-endpoint-keys-supported") + { + } + + ~ReadDoorLockNumberOfAliroEndpointKeysSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfAliroEndpointKeysSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfAliroEndpointKeysSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported() + : SubscribeAttribute("number-of-aliro-endpoint-keys-supported") + { + } + + ~SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfAliroEndpointKeysSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -178343,6 +179241,12 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // #if MTR_ENABLE_PROVISIONAL make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // @@ -178437,6 +179341,42 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), //