diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 4413794832b9b2..e655d572d01a62 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2403,6 +2403,20 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } +/** This cluster provides Apple-specific information about the device. */ +cluster AppleDeviceInformation = 323615744 { + revision 1; + + readonly attribute optional boolean supportsTapToUnlock = 0; + readonly attribute optional boolean supportsWED = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + endpoint 0 { device type ma_rootdevice = 22, version 1; device type ma_powersource = 17, version 1; @@ -2784,6 +2798,13 @@ endpoint 0 { ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 2; } + + server cluster AppleDeviceInformation { + ram attribute supportsTapToUnlock default = 1; + ram attribute supportsWED default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type ma_powersource = 17, version 1; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 7fe61b8e12e219..ce4e33b10648f7 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -4821,6 +4821,82 @@ "reportableChange": 0 } ] + }, + { + "mfgCode": null, + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "mfgCode": null, + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "reportable": 1, + "minInterval": 0, + "maxInterval": 1, + "reportableChange": 0, + "name": "SupportsTapToUnlock", + "side": "server", + "code": 0, + "type": "boolean", + "defaultValue": "1" + }, + { + "mfgCode": null, + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "reportable": 1, + "minInterval": 0, + "maxInterval": 1, + "reportableChange": 0, + "name": "SupportsWED", + "side": "server", + "code": 1, + "type": "boolean", + "defaultValue": "1" + }, + { + "mfgCode": null, + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "reportable": 1, + "minInterval": 0, + "maxInterval": 1, + "reportableChange": 0, + "name": "ClusterRevision", + "side": "server", + "code": 65533, + "type": "int16u", + "defaultValue": "1" + }, + { + "mfgCode": null, + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "reportable": 1, + "minInterval": 0, + "maxInterval": 1, + "reportableChange": 0, + "name": "FeatureMap", + "side": "server", + "code": 65532, + "type": "bitmap32", + "defaultValue": "0" + } + ], + "events": [], + "name": "Apple Device Information", + "code": 323615744, + "define": "APPLE_DEVICE_INFORMATION_CLUSTER" } ] }, diff --git a/src/app/clusters/apple-device-information-server/apple-device-information-server.cpp b/src/app/clusters/apple-device-information-server/apple-device-information-server.cpp new file mode 100644 index 00000000000000..9f243608895b75 --- /dev/null +++ b/src/app/clusters/apple-device-information-server/apple-device-information-server.cpp @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2023 Apple Inc. All rights reserved. + * + * Apple Matter Extensions is licensed under Apple Inc.'s MFi Sample Code + * License Agreement, which is contained in the LICENSE file distributed with + * the Apple Matter Extensions, and only to those who accept that license. + */ + +void MatterAppleDeviceInformationPluginServerInitCallback() +{ +} diff --git a/src/app/zap-templates/zcl/data-model/apple/apple-device-information-cluster.xml b/src/app/zap-templates/zcl/data-model/apple/apple-device-information-cluster.xml new file mode 100644 index 00000000000000..fdae2d8eabbb7d --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/apple/apple-device-information-cluster.xml @@ -0,0 +1,25 @@ + + + + + + + Apple Device Information + CHIP + 0x1349FC00 + APPLE_DEVICE_INFORMATION_CLUSTER + This cluster provides Apple-specific information about the device. + + + + SupportsTapToUnlock + SupportsWED + + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index dcfbaf6986c23c..93e1fca1363669 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -6,7 +6,8 @@ ".", "./data-model/chip/", "./data-model/draft/", - "./data-model/silabs/" + "./data-model/silabs/", + "./data-model/apple/" ], "_comment": "Ensure access-control-definitions.xml is first in xmlFile array", "xmlFile": [ @@ -127,14 +128,21 @@ "sample-mei-cluster.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", - "types/thermostat-user-interface-configuration.xml" + "types/thermostat-user-interface-configuration.xml", + "apple-device-information-cluster.xml" ], "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { "text": { - "defaultResponsePolicy": ["Always", "Conditional", "Never"] + "defaultResponsePolicy": [ + "Always", + "Conditional", + "Never" + ] }, - "bool": ["commandDiscovery"] + "bool": [ + "commandDiscovery" + ] }, "defaults": { "text": { @@ -180,8 +188,13 @@ "SpecificationVersion", "MaxPathsPerInvoke" ], - "Bridged Device Basic Information": ["ProductAppearance"], - "Descriptor": ["ClusterRevision", "FeatureMap"], + "Bridged Device Basic Information": [ + "ProductAppearance" + ], + "Descriptor": [ + "ClusterRevision", + "FeatureMap" + ], "Device Energy Management": [ "ESAType", "ESACanGenerate", @@ -224,7 +237,11 @@ "SessionEnergyDischarged", "FeatureMap" ], - "Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "Energy EVSE Mode": [ + "SupportedModes", + "CurrentMode", + "FeatureMap" + ], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -363,14 +380,21 @@ "CurrentMaxRate", "OverrunCount" ], - "Channel": ["Lineup", "CurrentChannel"], + "Channel": [ + "Lineup", + "CurrentChannel" + ], "Media Playback": [ "SampledPosition", "ActiveAudioTrack", "ActiveTextTrack" ], - "Application Launcher": ["CurrentApp"], - "Application Basic": ["Application"], + "Application Launcher": [ + "CurrentApp" + ], + "Application Basic": [ + "Application" + ], "Time Synchronization": [ "TrustedTimeSource", "DefaultNTP", @@ -382,7 +406,9 @@ "TimeZoneListMaxSize", "DSTOffsetListMaxSize" ], - "Temperature Control": ["SupportedTemperatureLevels"], + "Temperature Control": [ + "SupportedTemperatureLevels" + ], "Dishwasher Mode": [ "SupportedModes", "CurrentMode", @@ -390,7 +416,11 @@ "OnMode", "FeatureMap" ], - "Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "Microwave Oven Mode": [ + "SupportedModes", + "CurrentMode", + "FeatureMap" + ], "Microwave Oven Control": [ "CookTime", "MaxCookTime", @@ -417,8 +447,16 @@ "OnMode", "FeatureMap" ], - "RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], - "RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "RVC Clean Mode": [ + "SupportedModes", + "CurrentMode", + "FeatureMap" + ], + "RVC Run Mode": [ + "SupportedModes", + "CurrentMode", + "FeatureMap" + ], "Operational State": [ "OperationalState", "OperationalError", @@ -595,8 +633,13 @@ "LevelValue", "FeatureMap" ], - "Air Quality": ["AirQuality", "FeatureMap"], - "Thermostat": ["QueuedPreset"], + "Air Quality": [ + "AirQuality", + "FeatureMap" + ], + "Thermostat": [ + "QueuedPreset" + ], "Electrical Energy Measurement": [ "Accuracy", "CumulativeEnergyImported", @@ -628,16 +671,29 @@ "NeutralCurrent", "FeatureMap" ], - "Power Topology": ["FeatureMap"], - "Valve Configuration and Control": ["RemainingDuration"], - "Boolean State Configuration": ["CurrentSensitivityLevel"] + "Power Topology": [ + "FeatureMap" + ], + "Valve Configuration and Control": [ + "RemainingDuration" + ], + "Boolean State Configuration": [ + "CurrentSensitivityLevel" + ] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], + "ZCLDataTypes": [ + "ARRAY", + "BITMAP", + "ENUM", + "NUMBER", + "STRING", + "STRUCT" + ], "fabricHandling": { "automaticallyCreateFields": true, "indexFieldId": 254, "indexFieldName": "FabricIndex", "indexType": "fabric_idx" } -} +} \ No newline at end of file diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 2edfb272ad23e1..5cff9157aa83f2 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -70,7 +70,9 @@ "NETWORK_COMMISSIONING_CLUSTER": [], "SAMPLE_MEI_CLUSTER": [], "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], - "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"], + "OCCUPANCY_SENSING_CLUSTER": [ + "occupancy-sensor-server" + ], "ON_OFF_CLUSTER": [], "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], "OPERATIONAL_CREDENTIALS_CLUSTER": [], @@ -112,7 +114,9 @@ "TARGET_NAVIGATOR_CLUSTER": [], "TEMPERATURE_CONTROL_CLUSTER": [], "TEMPERATURE_MEASUREMENT_CLUSTER": [], - "THERMOSTAT_CLUSTER": ["thermostat-client"], + "THERMOSTAT_CLUSTER": [ + "thermostat-client" + ], "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [], "THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [], "TIME_CLUSTER": [], @@ -133,8 +137,12 @@ "ZLL_COMMISSIONING_CLUSTER": [] }, "ServerDirectories": { - "ACCESS_CONTROL_CLUSTER": ["access-control-server"], - "ACCOUNT_LOGIN_CLUSTER": ["account-login-server"], + "ACCESS_CONTROL_CLUSTER": [ + "access-control-server" + ], + "ACCOUNT_LOGIN_CLUSTER": [ + "account-login-server" + ], "ACTIONS_CLUSTER": [], "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [ "resource-monitoring-server" @@ -142,16 +150,30 @@ "ADMINISTRATOR_COMMISSIONING_CLUSTER": [ "administrator-commissioning-server" ], - "AIR_QUALITY_CLUSTER": ["air-quality-server"], + "AIR_QUALITY_CLUSTER": [ + "air-quality-server" + ], "ALARM_CLUSTER": [], - "APPLICATION_BASIC_CLUSTER": ["application-basic-server"], - "APPLICATION_LAUNCHER_CLUSTER": ["application-launcher-server"], - "AUDIO_OUTPUT_CLUSTER": ["audio-output-server"], + "APPLICATION_BASIC_CLUSTER": [ + "application-basic-server" + ], + "APPLICATION_LAUNCHER_CLUSTER": [ + "application-launcher-server" + ], + "AUDIO_OUTPUT_CLUSTER": [ + "audio-output-server" + ], "BALLAST_CONFIGURATION_CLUSTER": [], - "BARRIER_CONTROL_CLUSTER": ["barrier-control-server"], - "BASIC_INFORMATION_CLUSTER": ["basic-information"], + "BARRIER_CONTROL_CLUSTER": [ + "barrier-control-server" + ], + "BASIC_INFORMATION_CLUSTER": [ + "basic-information" + ], "BINARY_INPUT_BASIC_CLUSTER": [], - "BINDING_CLUSTER": ["bindings"], + "BINDING_CLUSTER": [ + "bindings" + ], "BOOLEAN_STATE_CLUSTER": [], "BOOLEAN_STATE_CONFIGURATION_CLUSTER": [ "boolean-state-configuration-server" @@ -165,21 +187,47 @@ "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], - "CHANNEL_CLUSTER": ["channel-server"], - "COLOR_CONTROL_CLUSTER": ["color-control-server"], + "CHANNEL_CLUSTER": [ + "channel-server" + ], + "COLOR_CONTROL_CLUSTER": [ + "color-control-server" + ], "COMMISSIONING_CLUSTER": [], - "CONTENT_LAUNCHER_CLUSTER": ["content-launch-server"], - "CONTENT_CONTROL_CLUSTER": ["content-control-server"], - "CONTENT_APP_OBSERVER_CLUSTER": ["content-app-observer"], - "DESCRIPTOR_CLUSTER": ["descriptor"], - "DEVICE_ENERGY_MANAGEMENT_CLUSTER": ["device-energy-management-server"], - "DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER": ["mode-base-server"], + "CONTENT_LAUNCHER_CLUSTER": [ + "content-launch-server" + ], + "CONTENT_CONTROL_CLUSTER": [ + "content-control-server" + ], + "CONTENT_APP_OBSERVER_CLUSTER": [ + "content-app-observer" + ], + "DESCRIPTOR_CLUSTER": [ + "descriptor" + ], + "DEVICE_ENERGY_MANAGEMENT_CLUSTER": [ + "device-energy-management-server" + ], + "DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER": [ + "mode-base-server" + ], "DEVICE_TEMP_CLUSTER": [], - "DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"], - "DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"], - "DISHWASHER_MODE_CLUSTER": ["mode-base-server"], - "MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"], - "DOOR_LOCK_CLUSTER": ["door-lock-server"], + "DIAGNOSTIC_LOGS_CLUSTER": [ + "diagnostic-logs-server" + ], + "DISHWASHER_ALARM_CLUSTER": [ + "dishwasher-alarm-server" + ], + "DISHWASHER_MODE_CLUSTER": [ + "mode-base-server" + ], + "MICROWAVE_OVEN_MODE_CLUSTER": [ + "mode-base-server" + ], + "DOOR_LOCK_CLUSTER": [ + "door-lock-server" + ], "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [ "electrical-energy-measurement-server" ], @@ -187,57 +235,125 @@ "ELECTRICAL_POWER_MEASUREMENT_CLUSTER": [ "electrical-power-measurement-server" ], - "ENERGY_EVSE_CLUSTER": ["energy-evse-server"], - "ENERGY_EVSE_MODE_CLUSTER": ["mode-base-server"], + "ENERGY_EVSE_CLUSTER": [ + "energy-evse-server" + ], + "ENERGY_EVSE_MODE_CLUSTER": [ + "mode-base-server" + ], "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [ "ethernet-network-diagnostics-server" ], - "ENERGY_PREFERENCE_CLUSTER": ["energy-preference-server"], - "FAN_CONTROL_CLUSTER": ["fan-control-server"], - "FAULT_INJECTION_CLUSTER": ["fault-injection-server"], - "FIXED_LABEL_CLUSTER": ["fixed-label-server"], + "ENERGY_PREFERENCE_CLUSTER": [ + "energy-preference-server" + ], + "FAN_CONTROL_CLUSTER": [ + "fan-control-server" + ], + "FAULT_INJECTION_CLUSTER": [ + "fault-injection-server" + ], + "FIXED_LABEL_CLUSTER": [ + "fixed-label-server" + ], "FLOW_MEASUREMENT_CLUSTER": [], "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], - "GENERAL_COMMISSIONING_CLUSTER": ["general-commissioning-server"], - "GENERAL_DIAGNOSTICS_CLUSTER": ["general-diagnostics-server"], - "GROUPS_CLUSTER": ["groups-server"], - "HEPA_FILTER_MONITORING_CLUSTER": ["resource-monitoring-server"], - "GROUP_KEY_MANAGEMENT_CLUSTER": ["group-key-mgmt-server"], + "GENERAL_COMMISSIONING_CLUSTER": [ + "general-commissioning-server" + ], + "GENERAL_DIAGNOSTICS_CLUSTER": [ + "general-diagnostics-server" + ], + "GROUPS_CLUSTER": [ + "groups-server" + ], + "HEPA_FILTER_MONITORING_CLUSTER": [ + "resource-monitoring-server" + ], + "GROUP_KEY_MANAGEMENT_CLUSTER": [ + "group-key-mgmt-server" + ], "IAS_ZONE_CLUSTER": [], - "ICD_MANAGEMENT_CLUSTER": ["icd-management-server"], - "IDENTIFY_CLUSTER": ["identify-server"], + "ICD_MANAGEMENT_CLUSTER": [ + "icd-management-server" + ], + "IDENTIFY_CLUSTER": [ + "identify-server" + ], "ILLUMINANCE_MEASUREMENT_CLUSTER": [], - "KEYPAD_INPUT_CLUSTER": ["keypad-input-server"], - "LAUNDRY_WASHER_MODE_CLUSTER": ["mode-base-server"], - "LEVEL_CONTROL_CLUSTER": ["level-control"], + "KEYPAD_INPUT_CLUSTER": [ + "keypad-input-server" + ], + "LAUNDRY_WASHER_MODE_CLUSTER": [ + "mode-base-server" + ], + "LEVEL_CONTROL_CLUSTER": [ + "level-control" + ], "LOCALIZATION_CONFIGURATION_CLUSTER": [ "localization-configuration-server" ], - "LOW_POWER_CLUSTER": ["low-power-server"], - "MEDIA_INPUT_CLUSTER": ["media-input-server"], - "MEDIA_PLAYBACK_CLUSTER": ["media-playback-server"], - "MICROWAVE_OVEN_CONTROL_CLUSTER": ["microwave-oven-control-server"], - "MESSAGES_CLUSTER": ["messages-server"], - "MODE_SELECT_CLUSTER": ["mode-select-server"], - "NETWORK_COMMISSIONING_CLUSTER": ["network-commissioning"], + "LOW_POWER_CLUSTER": [ + "low-power-server" + ], + "MEDIA_INPUT_CLUSTER": [ + "media-input-server" + ], + "MEDIA_PLAYBACK_CLUSTER": [ + "media-playback-server" + ], + "MICROWAVE_OVEN_CONTROL_CLUSTER": [ + "microwave-oven-control-server" + ], + "MESSAGES_CLUSTER": [ + "messages-server" + ], + "MODE_SELECT_CLUSTER": [ + "mode-select-server" + ], + "NETWORK_COMMISSIONING_CLUSTER": [ + "network-commissioning" + ], "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], - "SAMPLE_MEI_CLUSTER": ["sample-mei-server"], - "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"], - "ON_OFF_CLUSTER": ["on-off-server"], - "POWER_TOPOLOGY_CLUSTER": ["power-topology-server"], + "SAMPLE_MEI_CLUSTER": [ + "sample-mei-server" + ], + "OCCUPANCY_SENSING_CLUSTER": [ + "occupancy-sensor-server" + ], + "ON_OFF_CLUSTER": [ + "on-off-server" + ], + "POWER_TOPOLOGY_CLUSTER": [ + "power-topology-server" + ], "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], - "OPERATIONAL_CREDENTIALS_CLUSTER": ["operational-credentials-server"], - "OPERATIONAL_STATE_CLUSTER": ["operational-state-server"], - "OPERATIONAL_STATE_OVEN_CLUSTER": ["operational-state-server"], - "OPERATIONAL_STATE_RVC_CLUSTER": ["operational-state-server"], + "OPERATIONAL_CREDENTIALS_CLUSTER": [ + "operational-credentials-server" + ], + "OPERATIONAL_STATE_CLUSTER": [ + "operational-state-server" + ], + "OPERATIONAL_STATE_OVEN_CLUSTER": [ + "operational-state-server" + ], + "OPERATIONAL_STATE_RVC_CLUSTER": [ + "operational-state-server" + ], "OTA_BOOTLOAD_CLUSTER": [], - "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"], - "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"], - "OVEN_MODE_CLUSTER": ["mode-base-server"], + "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [ + "ota-provider" + ], + "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [ + "ota-requestor" + ], + "OVEN_MODE_CLUSTER": [ + "mode-base-server" + ], "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], @@ -253,7 +369,9 @@ "POLL_CONTROL_CLUSTER": [], "POWER_CONFIG_CLUSTER": [], "POWER_PROFILE_CLUSTER": [], - "POWER_SOURCE_CLUSTER": ["power-source-server"], + "POWER_SOURCE_CLUSTER": [ + "power-source-server" + ], "POWER_SOURCE_CONFIGURATION_CLUSTER": [ "power-source-configuration-server" ], @@ -268,21 +386,41 @@ "RADON_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], - "REFRIGERATOR_ALARM_CLUSTER": ["refrigerator-alarm-server"], + "REFRIGERATOR_ALARM_CLUSTER": [ + "refrigerator-alarm-server" + ], "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER": [ "mode-base-server" ], "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [], - "RVC_CLEAN_MODE_CLUSTER": ["mode-base-server"], - "RVC_RUN_MODE_CLUSTER": ["mode-base-server"], - "SCENES_CLUSTER": ["scenes-server"], - "SMOKE_CO_ALARM_CLUSTER": ["smoke-co-alarm-server"], - "SOFTWARE_DIAGNOSTICS_CLUSTER": ["software-diagnostics-server"], - "SWITCH_CLUSTER": ["switch-server"], - "TARGET_NAVIGATOR_CLUSTER": ["target-navigator-server"], - "TEMPERATURE_CONTROL_CLUSTER": ["temperature-control-server"], + "RVC_CLEAN_MODE_CLUSTER": [ + "mode-base-server" + ], + "RVC_RUN_MODE_CLUSTER": [ + "mode-base-server" + ], + "SCENES_CLUSTER": [ + "scenes-server" + ], + "SMOKE_CO_ALARM_CLUSTER": [ + "smoke-co-alarm-server" + ], + "SOFTWARE_DIAGNOSTICS_CLUSTER": [ + "software-diagnostics-server" + ], + "SWITCH_CLUSTER": [ + "switch-server" + ], + "TARGET_NAVIGATOR_CLUSTER": [ + "target-navigator-server" + ], + "TEMPERATURE_CONTROL_CLUSTER": [ + "temperature-control-server" + ], "TEMPERATURE_MEASUREMENT_CLUSTER": [], - "THERMOSTAT_CLUSTER": ["thermostat-server"], + "THERMOSTAT_CLUSTER": [ + "thermostat-server" + ], "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [ "thermostat-user-interface-configuration-server" ], @@ -290,23 +428,46 @@ "thread-network-diagnostics-server" ], "TIME_CLUSTER": [], - "TIME_FORMAT_LOCALIZATION_CLUSTER": ["time-format-localization-server"], - "TIME_SYNCHRONIZATION_CLUSTER": ["time-synchronization-server"], - "TIMER_CLUSTER": ["timer-server"], + "TIME_FORMAT_LOCALIZATION_CLUSTER": [ + "time-format-localization-server" + ], + "TIME_SYNCHRONIZATION_CLUSTER": [ + "time-synchronization-server" + ], + "TIMER_CLUSTER": [ + "timer-server" + ], "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], "UNIT_LOCALIZATION_CLUSTER": [], - "UNIT_TESTING_CLUSTER": ["test-cluster-server"], - "USER_LABEL_CLUSTER": ["user-label-server"], + "UNIT_TESTING_CLUSTER": [ + "test-cluster-server" + ], + "USER_LABEL_CLUSTER": [ + "user-label-server" + ], "VALVE_CONFIGURATION_AND_CONTROL_CLUSTER": [ "valve-configuration-and-control-server" ], - "WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"], - "LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"], - "LAUNDRY_DRYER_CONTROLS_CLUSTER": ["laundry-dryer-controls-server"], - "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"], - "WINDOW_COVERING_CLUSTER": ["window-covering-server"], - "ZLL_COMMISSIONING_CLUSTER": [] + "WAKE_ON_LAN_CLUSTER": [ + "wake-on-lan-server" + ], + "LAUNDRY_WASHER_CONTROLS_CLUSTER": [ + "laundry-washer-controls-server" + ], + "LAUNDRY_DRYER_CONTROLS_CLUSTER": [ + "laundry-dryer-controls-server" + ], + "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [ + "wifi-network-diagnostics-server" + ], + "WINDOW_COVERING_CLUSTER": [ + "window-covering-server" + ], + "ZLL_COMMISSIONING_CLUSTER": [], + "APPLE_DEVICE_INFORMATION_CLUSTER": [ + "apple-device-information-server" + ] } -} +} \ No newline at end of file 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 a3e74424d0768b..e59e2f03dda8e5 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 @@ -29135,6 +29135,140 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu } // namespace Attributes } // namespace ElectricalMeasurement +namespace AppleDeviceInformation { +namespace Attributes { + +namespace SupportsTapToUnlock { + +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = + emberAfReadAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + *value = Traits::StorageToWorking(temp); + return status; +} +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace SupportsTapToUnlock + +namespace SupportsWED { + +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = + emberAfReadAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + *value = Traits::StorageToWorking(temp); + return status; +} +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace SupportsWED + +namespace FeatureMap { + +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = + emberAfReadAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + *value = Traits::StorageToWorking(temp); + return status; +} +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = + emberAfReadAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + *value = Traits::StorageToWorking(temp); + return status; +} +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AppleDeviceInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace AppleDeviceInformation + namespace UnitTesting { namespace Attributes { 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 3a35e3511a6747..4541e631cd9450 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 @@ -5191,6 +5191,32 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu } // namespace Attributes } // namespace ElectricalMeasurement +namespace AppleDeviceInformation { +namespace Attributes { + +namespace SupportsTapToUnlock { +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +} // namespace SupportsTapToUnlock + +namespace SupportsWED { +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +} // namespace SupportsWED + +namespace FeatureMap { +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace AppleDeviceInformation + namespace UnitTesting { namespace Attributes { 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 350190a22e5762..3b94e617a17189 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -608,6 +608,11 @@ void emberAfContentAppObserverClusterInitCallback(chip::EndpointId endpoint); */ void emberAfElectricalMeasurementClusterInitCallback(chip::EndpointId endpoint); +/** + * @param endpoint Endpoint that is being initialized + */ +void emberAfAppleDeviceInformationClusterInitCallback(chip::EndpointId endpoint); + /** * @param endpoint Endpoint that is being initialized */ @@ -5070,6 +5075,44 @@ chip::Protocols::InteractionModel::Status MatterElectricalMeasurementClusterServ */ void emberAfElectricalMeasurementClusterServerTickCallback(chip::EndpointId endpoint); +// +// Apple Device Information Cluster +// + +/** + * @param endpoint Endpoint that is being initialized + */ +void emberAfAppleDeviceInformationClusterServerInitCallback(chip::EndpointId endpoint); + +/** + * @param endpoint Endpoint that is being shutdown + */ +void MatterAppleDeviceInformationClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** + * @param endpoint Endpoint that is being initialized + */ +void emberAfAppleDeviceInformationClusterClientInitCallback(chip::EndpointId endpoint); + +/** + * @param attributePath Concrete attribute path that changed + */ +void MatterAppleDeviceInformationClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterAppleDeviceInformationClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** + * @param endpoint Endpoint that is being served + */ +void emberAfAppleDeviceInformationClusterServerTickCallback(chip::EndpointId endpoint); + // // Unit Testing Cluster // 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 42a54b95ee944f..9dc0a15ef766a7 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 @@ -4807,6 +4807,8 @@ enum class StatusEnum : uint8_t namespace ElectricalMeasurement {} // namespace ElectricalMeasurement +namespace AppleDeviceInformation {} // namespace AppleDeviceInformation + namespace UnitTesting { // Enum for SimpleEnum 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 32b62631ed30fd..ef38532fb21cea 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 @@ -27189,6 +27189,40 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace ElectricalMeasurement +namespace AppleDeviceInformation { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SupportsTapToUnlock::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportsTapToUnlock); + case Attributes::SupportsWED::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportsWED); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace AppleDeviceInformation namespace UnitTesting { namespace Structs { 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 89c36f3c6f147d..ef6ee6464555ba 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 @@ -41355,6 +41355,91 @@ struct TypeInfo }; } // namespace Attributes } // namespace ElectricalMeasurement +namespace AppleDeviceInformation { + +namespace Attributes { + +namespace SupportsTapToUnlock { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportsTapToUnlock::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportsTapToUnlock +namespace SupportsWED { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportsWED::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportsWED +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::AppleDeviceInformation::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SupportsTapToUnlock::TypeInfo::DecodableType supportsTapToUnlock = static_cast(0); + Attributes::SupportsWED::TypeInfo::DecodableType supportsWED = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace AppleDeviceInformation namespace UnitTesting { namespace Structs { namespace SimpleStruct { 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 8ff6313abe5940..5e1eb324ef1794 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 @@ -7713,6 +7713,44 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace ElectricalMeasurement +namespace AppleDeviceInformation { +namespace Attributes { + +namespace SupportsTapToUnlock { +static constexpr AttributeId Id = 0x00000000; +} // namespace SupportsTapToUnlock + +namespace SupportsWED { +static constexpr AttributeId Id = 0x00000001; +} // namespace SupportsWED + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace AppleDeviceInformation + namespace UnitTesting { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index f457887220abad..16044397fe5406 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -370,6 +370,9 @@ static constexpr ClusterId Id = 0x00000510; namespace ElectricalMeasurement { static constexpr ClusterId Id = 0x00000B04; } // namespace ElectricalMeasurement +namespace AppleDeviceInformation { +static constexpr ClusterId Id = 0x1349FC00; +} // namespace AppleDeviceInformation namespace UnitTesting { static constexpr ClusterId Id = 0xFFF1FC05; } // namespace UnitTesting