diff --git a/docs/zap-schema.svg b/docs/zap-schema.svg index 409cab84fd..138da6b0e8 100644 --- a/docs/zap-schema.svg +++ b/docs/zap-schema.svg @@ -1,2592 +1,3098 @@ - - - + + SchemaCrawler_Diagram - -generated by -SchemaCrawler 16.16.18 -generated on -2024-07-24 18:16:40 - + +generated by +SchemaCrawler 16.20.4 +generated on +2024-07-30 18:49:39 + access_72bb1dc3 - -ACCESS - -[table] -ACCESS_ID - -INTEGER - -auto-incremented -OPERATION_REF - -INTEGER -ROLE_REF - -INTEGER -ACCESS_MODIFIER_REF - -INTEGER - + +ACCESS + +[table] +ACCESS_ID + +INTEGER + +auto-incremented +OPERATION_REF + +INTEGER +ROLE_REF + +INTEGER +ACCESS_MODIFIER_REF + +INTEGER + access_modifier_f63f3fb1 - -ACCESS_MODIFIER - -[table] -ACCESS_MODIFIER_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT - + +ACCESS_MODIFIER + +[table] +ACCESS_MODIFIER_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT + access_72bb1dc3:w->access_modifier_f63f3fb1:e - - - - + + + + + + + +SCHCRWLR_F63ECB52_72BAA964 - + operation_93359a6 - -OPERATION - -[table] -OPERATION_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT - + +OPERATION + +[table] +OPERATION_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT + - + access_72bb1dc3:w->operation_93359a6:e - - - - + + + + + + + +SCHCRWLR_0932E547_72BAA964 - + role_26ecd5 - -ROLE - -[table] -ROLE_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -LEVEL - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT - + +ROLE + +[table] +ROLE_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +LEVEL + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT + - + access_72bb1dc3:w->role_26ecd5:e - - - - + + + + + + + +SCHCRWLR_00267876_72BAA964 attribute_access_b017dce6 - -ATTRIBUTE_ACCESS - -[table] -ATTRIBUTE_REF - -INTEGER -ACCESS_REF - -INTEGER - + +ATTRIBUTE_ACCESS + +[table] +ATTRIBUTE_REF + +INTEGER +ACCESS_REF + +INTEGER + attribute_access_b017dce6:w->access_72bb1dc3:e - - - - + + + + + + + +SCHCRWLR_72BAA964_B0176887 attribute_a6e02edb - -ATTRIBUTE - -[table] -ATTRIBUTE_ID - -INTEGER - -auto-incremented -CLUSTER_REF - -INTEGER -PACKAGE_REF - -INTEGER -CODE - -INTEGER -MANUFACTURER_CODE - -INTEGER -NAME - -TEXT -TYPE - -TEXT -SIDE - -TEXT -DEFINE - -TEXT -MIN - -TEXT -MAX - -TEXT -MIN_LENGTH - -INTEGER -MAX_LENGTH - -INTEGER -REPORT_MIN_INTERVAL - -INTEGER -REPORT_MAX_INTERVAL - -INTEGER -REPORTABLE_CHANGE - -TEXT -REPORTABLE_CHANGE_LENGTH - -INTEGER -IS_WRITABLE - -INTEGER -DEFAULT_VALUE - -TEXT -IS_SCENE_REQUIRED - -INTEGER -IS_OPTIONAL - -INTEGER -REPORTING_POLICY - -TEXT -STORAGE_POLICY - -TEXT -IS_NULLABLE - -INTEGER -ARRAY_TYPE - -TEXT -MUST_USE_TIMED_WRITE - -INTEGER -INTRODUCED_IN_REF - -INTEGER -REMOVED_IN_REF - -INTEGER -API_MATURITY - -TEXT -CHANGE_COMITTED - -INTEGER -PERSISTENCE - -TEXT - + +ATTRIBUTE + +[table] +ATTRIBUTE_ID + +INTEGER + +auto-incremented +CLUSTER_REF + +INTEGER +PACKAGE_REF + +INTEGER +CODE + +INTEGER +MANUFACTURER_CODE + +INTEGER +NAME + +TEXT +TYPE + +TEXT +SIDE + +TEXT +DEFINE + +TEXT +MIN + +TEXT +MAX + +TEXT +MIN_LENGTH + +INTEGER +MAX_LENGTH + +INTEGER +REPORT_MIN_INTERVAL + +INTEGER +REPORT_MAX_INTERVAL + +INTEGER +REPORTABLE_CHANGE + +TEXT +REPORTABLE_CHANGE_LENGTH + +INTEGER +IS_WRITABLE + +INTEGER +DEFAULT_VALUE + +TEXT +IS_SCENE_REQUIRED + +INTEGER +IS_OPTIONAL + +INTEGER +REPORTING_POLICY + +TEXT +STORAGE_POLICY + +TEXT +IS_NULLABLE + +INTEGER +ARRAY_TYPE + +TEXT +MUST_USE_TIMED_WRITE + +INTEGER +INTRODUCED_IN_REF + +INTEGER +REMOVED_IN_REF + +INTEGER +API_MATURITY + +TEXT +IS_CHANGE_COMITTED + +INTEGER +PERSISTENCE + +TEXT + attribute_access_b017dce6:w->attribute_a6e02edb:e - - - - + + + + + + + +SCHCRWLR_A6DFBA7C_B0176887 cluster_access_38ea13c8 - -CLUSTER_ACCESS - -[table] -CLUSTER_REF - -INTEGER -ACCESS_REF - -INTEGER - + +CLUSTER_ACCESS + +[table] +CLUSTER_REF + +INTEGER +ACCESS_REF + +INTEGER + cluster_access_38ea13c8:w->access_72bb1dc3:e - - - - + + + + + + + +SCHCRWLR_72BAA964_38E99F69 cluster_5ec71239 - -CLUSTER - -[table] -CLUSTER_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -DOMAIN_NAME - -TEXT -CODE - -INTEGER -MANUFACTURER_CODE - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT -DEFINE - -TEXT -IS_SINGLETON - -INTEGER -REVISION - -INTEGER -INTRODUCED_IN_REF - -INTEGER -REMOVED_IN_REF - -INTEGER -API_MATURITY - -TEXT - + +CLUSTER + +[table] +CLUSTER_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +DOMAIN_NAME + +TEXT +CODE + +INTEGER +MANUFACTURER_CODE + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT +DEFINE + +TEXT +IS_SINGLETON + +INTEGER +REVISION + +INTEGER +INTRODUCED_IN_REF + +INTEGER +REMOVED_IN_REF + +INTEGER +API_MATURITY + +TEXT + - + cluster_access_38ea13c8:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_38E99F69 command_access_b02dd957 - -COMMAND_ACCESS - -[table] -COMMAND_REF - -INTEGER -ACCESS_REF - -INTEGER - + +COMMAND_ACCESS + +[table] +COMMAND_REF + +INTEGER +ACCESS_REF + +INTEGER + command_access_b02dd957:w->access_72bb1dc3:e - - - - + + + + + + + +SCHCRWLR_72BAA964_B02D64F8 - + command_6371df8a - -COMMAND - -[table] -COMMAND_ID - -INTEGER - -auto-incremented -CLUSTER_REF - -INTEGER -PACKAGE_REF - -INTEGER -CODE - -INTEGER -MANUFACTURER_CODE - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT -SOURCE - -TEXT -IS_OPTIONAL - -INTEGER -MUST_USE_TIMED_INVOKE - -INTEGER -IS_FABRIC_SCOPED - -INTEGER -INTRODUCED_IN_REF - -INTEGER -REMOVED_IN_REF - -INTEGER -RESPONSE_NAME - -INTEGER -RESPONSE_REF - -INTEGER -IS_DEFAULT_RESPONSE_ENABLED - -INTEGER - + +COMMAND + +[table] +COMMAND_ID + +INTEGER + +auto-incremented +CLUSTER_REF + +INTEGER +PACKAGE_REF + +INTEGER +CODE + +INTEGER +MANUFACTURER_CODE + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT +SOURCE + +TEXT +IS_OPTIONAL + +INTEGER +MUST_USE_TIMED_INVOKE + +INTEGER +IS_FABRIC_SCOPED + +INTEGER +INTRODUCED_IN_REF + +INTEGER +REMOVED_IN_REF + +INTEGER +RESPONSE_NAME + +INTEGER +RESPONSE_REF + +INTEGER +IS_DEFAULT_RESPONSE_ENABLED + +INTEGER + command_access_b02dd957:w->command_6371df8a:e - - - - + + + + + + + +SCHCRWLR_63716B2B_B02D64F8 default_access_7ba041a1 - -DEFAULT_ACCESS - -[table] -PACKAGE_REF - -INTEGER -ENTITY_TYPE - -TEXT -ACCESS_REF - -INTEGER - + +DEFAULT_ACCESS + +[table] +PACKAGE_REF + +INTEGER +ENTITY_TYPE + +TEXT +ACCESS_REF + +INTEGER + default_access_7ba041a1:w->access_72bb1dc3:e - - - - + + + + + + + +SCHCRWLR_72BAA964_7B9FCD42 - + package_fab13485 - -PACKAGE - -[table] -PACKAGE_ID - -INTEGER - -auto-incremented -PARENT_PACKAGE_REF - -INTEGER -PATH - -TEXT NOT NULL -TYPE - -TEXT -CRC - -INTEGER -VERSION - -INTEGER -CATEGORY - -TEXT -DESCRIPTION - -TEXT -IS_IN_SYNC - -BOOLEAN - + +PACKAGE + +[table] +PACKAGE_ID + +INTEGER + +auto-incremented +PARENT_PACKAGE_REF + +INTEGER +PATH + +TEXT NOT NULL +TYPE + +TEXT +CRC + +INTEGER +VERSION + +INTEGER +CATEGORY + +TEXT +DESCRIPTION + +TEXT +IS_IN_SYNC + +BOOLEAN + - + default_access_7ba041a1:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_7B9FCD42 event_access_4668c328 - -EVENT_ACCESS - -[table] -EVENT_REF - -INTEGER -ACCESS_REF - -INTEGER - + +EVENT_ACCESS + +[table] +EVENT_REF + +INTEGER +ACCESS_REF + +INTEGER + event_access_4668c328:w->access_72bb1dc3:e - - - - + + + + + + + +SCHCRWLR_72BAA964_46684EC9 - + event_3f4eed9 - -EVENT - -[table] -EVENT_ID - -INTEGER - -auto-incremented -CLUSTER_REF - -INTEGER -PACKAGE_REF - -INTEGER -CODE - -INTEGER -MANUFACTURER_CODE - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT -SIDE - -TEXT -IS_OPTIONAL - -INTEGER -IS_FABRIC_SENSITIVE - -INTEGER -PRIORITY - -TEXT -INTRODUCED_IN_REF - -INTEGER -REMOVED_IN_REF - -INTEGER - + +EVENT + +[table] +EVENT_ID + +INTEGER + +auto-incremented +CLUSTER_REF + +INTEGER +PACKAGE_REF + +INTEGER +CODE + +INTEGER +MANUFACTURER_CODE + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT +SIDE + +TEXT +IS_OPTIONAL + +INTEGER +IS_FABRIC_SENSITIVE + +INTEGER +PRIORITY + +TEXT +INTRODUCED_IN_REF + +INTEGER +REMOVED_IN_REF + +INTEGER + - + event_access_4668c328:w->event_3f4eed9:e - - - - + + + + + + + +SCHCRWLR_03F47A7A_46684EC9 - + access_modifier_f63f3fb1:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_F63ECB52 atomic_73b03e8a - -"ATOMIC" - -[table] -ATOMIC_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT -ATOMIC_IDENTIFIER - -INTEGER -ATOMIC_SIZE - -INTEGER -IS_DISCRETE - -INTEGER -IS_STRING - -INTEGER -IS_LONG - -INTEGER -IS_CHAR - -INTEGER -IS_SIGNED - -INTEGER - + +"ATOMIC" + +[table] +ATOMIC_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT +ATOMIC_IDENTIFIER + +INTEGER +ATOMIC_SIZE + +INTEGER +IS_DISCRETE + +INTEGER +IS_STRING + +INTEGER +IS_LONG + +INTEGER +IS_CHAR + +INTEGER +IS_SIGNED + +INTEGER + - + atomic_73b03e8a:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_CE3170F5 - + attribute_a6e02edb:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_A6DFBA7C - + attribute_a6e02edb:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_A6DFBA7C - + spec_27641a - -SPEC - -[table] -SPEC_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -CODE - -TEXT NOT NULL -DESCRIPTION - -TEXT -CERTIFIABLE - -INTEGER - + +SPEC + +[table] +SPEC_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +CODE + +TEXT NOT NULL +DESCRIPTION + +TEXT +CERTIFIABLE + +INTEGER + - + attribute_a6e02edb:w->spec_27641a:e - - - - + + + + + + + +SCHCRWLR_0026EFBB_A6DFBA7C - + attribute_a6e02edb:w->spec_27641a:e - - - - - - - -attribute_mapping_caf33e4a - -ATTRIBUTE_MAPPING - -[table] -ATTRIBUTE_MAPPING_ID - -INTEGER - -auto-incremented -ATTRIBUTE_LEFT_REF - -INTEGER -ATTRIBUTE_RIGHT_REF - -INTEGER - - - - -attribute_mapping_caf33e4a:w->attribute_a6e02edb:e - - - - - - - - -attribute_mapping_caf33e4a:w->attribute_a6e02edb:e - - - - - + + + + + + + +SCHCRWLR_0026EFBB_A6DFBA7C - + device_type_attribute_ce5151f - -DEVICE_TYPE_ATTRIBUTE - -[table] -DEVICE_TYPE_CLUSTER_REF - -INTEGER -ATTRIBUTE_REF - -INTEGER -ATTRIBUTE_NAME - -TEXT - + +DEVICE_TYPE_ATTRIBUTE + +[table] +DEVICE_TYPE_CLUSTER_REF + +INTEGER +ATTRIBUTE_REF + +INTEGER +ATTRIBUTE_NAME + +TEXT + - + device_type_attribute_ce5151f:w->attribute_a6e02edb:e - - - - + + + + + + + +SCHCRWLR_A6DFBA7C_0CE4A0C0 - + device_type_cluster_7298b97d - -DEVICE_TYPE_CLUSTER - -[table] -DEVICE_TYPE_CLUSTER_ID - -INTEGER - -auto-incremented -DEVICE_TYPE_REF - -INTEGER -CLUSTER_REF - -INTEGER -CLUSTER_NAME - -TEXT -INCLUDE_CLIENT - -INTEGER -INCLUDE_SERVER - -INTEGER -LOCK_CLIENT - -INTEGER -LOCK_SERVER - -INTEGER - + +DEVICE_TYPE_CLUSTER + +[table] +DEVICE_TYPE_CLUSTER_ID + +INTEGER + +auto-incremented +DEVICE_TYPE_REF + +INTEGER +CLUSTER_REF + +INTEGER +CLUSTER_NAME + +TEXT +INCLUDE_CLIENT + +INTEGER +INCLUDE_SERVER + +INTEGER +LOCK_CLIENT + +INTEGER +LOCK_SERVER + +INTEGER + device_type_attribute_ce5151f:w->device_type_cluster_7298b97d:e - - - - + + + + + + + +SCHCRWLR_7298451E_0CE4A0C0 - + endpoint_type_attribute_c265400 - -ENDPOINT_TYPE_ATTRIBUTE - -[table] -ENDPOINT_TYPE_ATTRIBUTE_ID - -INTEGER - -auto-incremented -ENDPOINT_TYPE_CLUSTER_REF - -INTEGER -ATTRIBUTE_REF - -INTEGER -INCLUDED - -INTEGER -STORAGE_OPTION - -TEXT -SINGLETON - -INTEGER -BOUNDED - -INTEGER -DEFAULT_VALUE - -TEXT -INCLUDED_REPORTABLE - -INTEGER -MIN_INTERVAL - -INTEGER -MAX_INTERVAL - -INTEGER -REPORTABLE_CHANGE - -INTEGER - + +ENDPOINT_TYPE_ATTRIBUTE + +[table] +ENDPOINT_TYPE_ATTRIBUTE_ID + +INTEGER + +auto-incremented +ENDPOINT_TYPE_CLUSTER_REF + +INTEGER +ATTRIBUTE_REF + +INTEGER +INCLUDED + +INTEGER +STORAGE_OPTION + +TEXT +SINGLETON + +INTEGER +BOUNDED + +INTEGER +DEFAULT_VALUE + +TEXT +INCLUDED_REPORTABLE + +INTEGER +MIN_INTERVAL + +INTEGER +MAX_INTERVAL + +INTEGER +REPORTABLE_CHANGE + +INTEGER + - + endpoint_type_attribute_c265400:w->attribute_a6e02edb:e - - - - - + + + + + + + +SCHCRWLR_A6DFBA7C_0C25DFA1 - + endpoint_type_cluster_c12e3c9e - -ENDPOINT_TYPE_CLUSTER - -[table] -ENDPOINT_TYPE_CLUSTER_ID - -INTEGER - -auto-incremented -ENDPOINT_TYPE_REF - -INTEGER -CLUSTER_REF - -INTEGER -SIDE - -TEXT -ENABLED - -INTEGER - + +ENDPOINT_TYPE_CLUSTER + +[table] +ENDPOINT_TYPE_CLUSTER_ID + +INTEGER + +auto-incremented +ENDPOINT_TYPE_REF + +INTEGER +CLUSTER_REF + +INTEGER +SIDE + +TEXT +ENABLED + +INTEGER + - + endpoint_type_attribute_c265400:w->endpoint_type_cluster_c12e3c9e:e - - - - - + + + + + + + +SCHCRWLR_C12DC83F_0C25DFA1 - + global_attribute_default_73c65a21 - -GLOBAL_ATTRIBUTE_DEFAULT - -[table] -GLOBAL_ATTRIBUTE_DEFAULT_ID - -INTEGER - -auto-incremented -CLUSTER_REF - -INTEGER NOT NULL -ATTRIBUTE_REF - -INTEGER NOT NULL -DEFAULT_VALUE - -TEXT - + +GLOBAL_ATTRIBUTE_DEFAULT + +[table] +GLOBAL_ATTRIBUTE_DEFAULT_ID + +INTEGER + +auto-incremented +CLUSTER_REF + +INTEGER NOT NULL +ATTRIBUTE_REF + +INTEGER NOT NULL +DEFAULT_VALUE + +TEXT + - + global_attribute_default_73c65a21:w->attribute_a6e02edb:e - - - - + + + + + + + +SCHCRWLR_A6DFBA7C_73C5E5C2 - + global_attribute_default_73c65a21:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_73C5E5C2 + + + +attribute_mapping_caf33e4a + +ATTRIBUTE_MAPPING + +[table] +ATTRIBUTE_MAPPING_ID + +INTEGER + +auto-incremented +ATTRIBUTE_LEFT_REF + +INTEGER +ATTRIBUTE_RIGHT_REF + +INTEGER + + + + +attribute_mapping_caf33e4a:w->attribute_a6e02edb:e + + + + + + + + +SCHCRWLR_A6DFBA7C_CAF2C9EB + + + +attribute_mapping_caf33e4a:w->attribute_a6e02edb:e + + + + + + + + +SCHCRWLR_A6DFBA7C_CAF2C9EB bitmap_74cc598e - -BITMAP - -[table] -BITMAP_ID - -INTEGER NOT NULL -SIZE - -INTEGER - + +BITMAP + +[table] +BITMAP_ID + +INTEGER NOT NULL +SIZE + +INTEGER + data_type_9233070e - -DATA_TYPE - -[table] -DATA_TYPE_ID - -INTEGER NOT NULL - -auto-incremented -NAME - -TEXT -DESCRIPTION - -TEXT -DISCRIMINATOR_REF - -INTEGER -PACKAGE_REF - -INTEGER - + +DATA_TYPE + +[table] +DATA_TYPE_ID + +INTEGER NOT NULL + +auto-incremented +NAME + +TEXT +DESCRIPTION + +TEXT +DISCRIMINATOR_REF + +INTEGER +PACKAGE_REF + +INTEGER + bitmap_74cc598e:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_74CBE52F bitmap_field_bfea8629 - -BITMAP_FIELD - -[table] -BITMAP_FIELD_ID - -INTEGER NOT NULL - -auto-incremented -BITMAP_REF - -INTEGER -FIELD_IDENTIFIER - -INTEGER -NAME - -TEXT(100) -MASK - -INTEGER -TYPE - -TEXT(100) - + +BITMAP_FIELD + +[table] +BITMAP_FIELD_ID + +INTEGER NOT NULL + +auto-incremented +BITMAP_REF + +INTEGER +FIELD_IDENTIFIER + +INTEGER +NAME + +TEXT(100) +MASK + +INTEGER +TYPE + +TEXT(100) + bitmap_field_bfea8629:w->bitmap_74cc598e:e - - - - + + + + + + + +SCHCRWLR_74CBE52F_BFEA11CA - + cluster_5ec71239:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_5EC69DDA - + cluster_5ec71239:w->spec_27641a:e - - - - + + + + + + + +SCHCRWLR_0026EFBB_5EC69DDA - + cluster_5ec71239:w->spec_27641a:e - - - - + + + + + + + +SCHCRWLR_0026EFBB_5EC69DDA + + + +command_6371df8a:w->cluster_5ec71239:e + + + + + + + +SCHCRWLR_5EC69DDA_63716B2B + + + +command_6371df8a:w->command_6371df8a:e + + + + + + + +SCHCRWLR_63716B2B_63716B2B + + + +command_6371df8a:w->package_fab13485:e + + + + + + + +SCHCRWLR_FAB0C026_63716B2B + + + +command_6371df8a:w->spec_27641a:e + + + + + + + +SCHCRWLR_0026EFBB_63716B2B + + + +command_6371df8a:w->spec_27641a:e + + + + + + + +SCHCRWLR_0026EFBB_63716B2B - + data_type_cluster_8d9f2ca9 - -DATA_TYPE_CLUSTER - -[table] -DATA_TYPE_CLUSTER_ID - -INTEGER NOT NULL - -auto-incremented -CLUSTER_REF - -INTEGER -CLUSTER_CODE - -INTEGER -DATA_TYPE_REF - -INTEGER - + +DATA_TYPE_CLUSTER + +[table] +DATA_TYPE_CLUSTER_ID + +INTEGER NOT NULL + +auto-incremented +CLUSTER_REF + +INTEGER +CLUSTER_CODE + +INTEGER +DATA_TYPE_REF + +INTEGER + - + data_type_cluster_8d9f2ca9:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_8D9EB84A - + data_type_cluster_8d9f2ca9:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_8D9EB84A - + device_type_cluster_7298b97d:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_7298451E - + device_type_2620a7e2 - -DEVICE_TYPE - -[table] -DEVICE_TYPE_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -DOMAIN - -TEXT -CODE - -INTEGER -PROFILE_ID - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT -CLASS - -TEXT -"SCOPE" - -TEXT -SUPERSET - -TEXT - + +DEVICE_TYPE + +[table] +DEVICE_TYPE_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +DOMAIN + +TEXT +CODE + +INTEGER +PROFILE_ID + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT +CLASS + +TEXT +"SCOPE" + +TEXT +SUPERSET + +TEXT + device_type_cluster_7298b97d:w->device_type_2620a7e2:e - - - - + + + + + + + +SCHCRWLR_26203383_7298451E - + endpoint_type_cluster_c12e3c9e:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_C12DC83F - + endpoint_type_9857dc03 - -ENDPOINT_TYPE - -[table] -ENDPOINT_TYPE_ID - -INTEGER - -auto-incremented -SESSION_PARTITION_REF - -INTEGER -NAME - -TEXT - + +ENDPOINT_TYPE + +[table] +ENDPOINT_TYPE_ID + +INTEGER + +auto-incremented +SESSION_PARTITION_REF + +INTEGER +NAME + +TEXT + - + endpoint_type_cluster_c12e3c9e:w->endpoint_type_9857dc03:e - - - - + + + + + + + +SCHCRWLR_985767A4_C12DC83F + + + +event_3f4eed9:w->cluster_5ec71239:e + + + + + + + +SCHCRWLR_5EC69DDA_03F47A7A + + + +event_3f4eed9:w->package_fab13485:e + + + + + + + +SCHCRWLR_FAB0C026_03F47A7A + + + +event_3f4eed9:w->spec_27641a:e + + + + + + + +SCHCRWLR_0026EFBB_03F47A7A + + + +event_3f4eed9:w->spec_27641a:e + + + + + + + +SCHCRWLR_0026EFBB_03F47A7A - + feature_f06e7b35 - -FEATURE - -[table] -FEATURE_ID - -INTEGER - -auto-incremented -NAME - -TEXT -CODE - -TEXT -BIT - -INTEGER -DEFAULT_VALUE - -INTEGER -DESCRIPTION - -TEXT -CONFORMANCE - -TEXT -PACKAGE_REF - -INTEGER -CLUSTER_REF - -INTEGER - + +FEATURE + +[table] +FEATURE_ID + +INTEGER + +auto-incremented +NAME + +TEXT +CODE + +TEXT +BIT + +INTEGER +DEFAULT_VALUE + +INTEGER +DESCRIPTION + +TEXT +CONFORMANCE + +TEXT +PACKAGE_REF + +INTEGER +CLUSTER_REF + +INTEGER + - + feature_f06e7b35:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_F06E06D6 - + feature_f06e7b35:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_F06E06D6 - + tag_1b7d9 - -TAG - -[table] -TAG_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -CLUSTER_REF - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT - + +TAG + +[table] +TAG_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +CLUSTER_REF + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT + - + tag_1b7d9:w->cluster_5ec71239:e - - - - + + + + + + + +SCHCRWLR_5EC69DDA_0001437A - + tag_1b7d9:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_0001437A - - -event_3f4eed9:w->cluster_5ec71239:e - - - - - - - -event_3f4eed9:w->package_fab13485:e - - - - + + +command_arg_294e7f81 + +COMMAND_ARG + +[table] +COMMAND_REF + +INTEGER +FIELD_IDENTIFIER + +INTEGER +NAME + +TEXT +TYPE + +TEXT +MIN + +TEXT +MAX + +TEXT +MIN_LENGTH + +INTEGER +MAX_LENGTH + +INTEGER +IS_ARRAY + +INTEGER +PRESENT_IF + +TEXT +IS_NULLABLE + +INTEGER +IS_OPTIONAL + +INTEGER +COUNT_ARG + +TEXT +INTRODUCED_IN_REF + +INTEGER +REMOVED_IN_REF + +INTEGER + - - -event_3f4eed9:w->spec_27641a:e - - - - + + +command_arg_294e7f81:w->command_6371df8a:e + + + + + + + +SCHCRWLR_63716B2B_294E0B22 - + -event_3f4eed9:w->spec_27641a:e - - - - - - - -command_6371df8a:w->cluster_5ec71239:e - - - - - - - -command_6371df8a:w->command_6371df8a:e - - - - - - - -command_6371df8a:w->package_fab13485:e - - - - +command_arg_294e7f81:w->spec_27641a:e + + + + + + + +SCHCRWLR_0026EFBB_294E0B22 - + -command_6371df8a:w->spec_27641a:e - - - - - - - -command_6371df8a:w->spec_27641a:e - - - - +command_arg_294e7f81:w->spec_27641a:e + + + + + + + +SCHCRWLR_0026EFBB_294E0B22 - + device_type_command_774386ce - -DEVICE_TYPE_COMMAND - -[table] -DEVICE_TYPE_CLUSTER_REF - -INTEGER -COMMAND_REF - -INTEGER -COMMAND_NAME - -TEXT - + +DEVICE_TYPE_COMMAND + +[table] +DEVICE_TYPE_CLUSTER_REF + +INTEGER +COMMAND_REF + +INTEGER +COMMAND_NAME + +TEXT + + + + +device_type_command_774386ce:w->command_6371df8a:e + + + + + + + +SCHCRWLR_63716B2B_7743126F device_type_command_774386ce:w->device_type_cluster_7298b97d:e - - - - - - - -device_type_command_774386ce:w->command_6371df8a:e - - - - + + + + + + + +SCHCRWLR_7298451E_7743126F - + endpoint_type_command_c5d909ef - -ENDPOINT_TYPE_COMMAND - -[table] -ENDPOINT_TYPE_COMMAND_ID - -INTEGER - -auto-incremented -ENDPOINT_TYPE_CLUSTER_REF - -INTEGER -COMMAND_REF - -INTEGER -IS_INCOMING - -INTEGER -IS_ENABLED - -INTEGER - - - - -endpoint_type_command_c5d909ef:w->endpoint_type_cluster_c12e3c9e:e - - - - + +ENDPOINT_TYPE_COMMAND + +[table] +ENDPOINT_TYPE_COMMAND_ID + +INTEGER + +auto-incremented +ENDPOINT_TYPE_CLUSTER_REF + +INTEGER +COMMAND_REF + +INTEGER +IS_INCOMING + +INTEGER +IS_ENABLED + +INTEGER + - -endpoint_type_command_c5d909ef:w->command_6371df8a:e - - - - - - - -command_arg_294e7f81 - -COMMAND_ARG - -[table] -COMMAND_REF - -INTEGER -FIELD_IDENTIFIER - -INTEGER -NAME - -TEXT -TYPE - -TEXT -MIN - -TEXT -MAX - -TEXT -MIN_LENGTH - -INTEGER -MAX_LENGTH - -INTEGER -IS_ARRAY - -INTEGER -PRESENT_IF - -TEXT -IS_NULLABLE - -INTEGER -IS_OPTIONAL - -INTEGER -COUNT_ARG - -TEXT -INTRODUCED_IN_REF - -INTEGER -REMOVED_IN_REF - -INTEGER - - - -command_arg_294e7f81:w->command_6371df8a:e - - - - - - - -command_arg_294e7f81:w->spec_27641a:e - - - - +endpoint_type_command_c5d909ef:w->command_6371df8a:e + + + + + + + +SCHCRWLR_63716B2B_C5D89590 - - -command_arg_294e7f81:w->spec_27641a:e - - - - + + +endpoint_type_command_c5d909ef:w->endpoint_type_cluster_c12e3c9e:e + + + + + + + +SCHCRWLR_C12DC83F_C5D89590 - + discriminator_4931d2db - -DISCRIMINATOR - -[table] -DISCRIMINATOR_ID - -INTEGER NOT NULL - -auto-incremented -NAME - -TEXT -PACKAGE_REF - -INTEGER - + +DISCRIMINATOR + +[table] +DISCRIMINATOR_ID + +INTEGER NOT NULL + +auto-incremented +NAME + +TEXT +PACKAGE_REF + +INTEGER + data_type_9233070e:w->discriminator_4931d2db:e - - - - + + + + + + + +SCHCRWLR_49315E7C_923292AF - + data_type_9233070e:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_923292AF enum_210160 - -ENUM - -[table] -ENUM_ID - -INTEGER NOT NULL -SIZE - -INTEGER - + +ENUM + +[table] +ENUM_ID + +INTEGER NOT NULL +SIZE + +INTEGER + - + enum_210160:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_00208D01 number_89ec43a8 - -NUMBER - -[table] -NUMBER_ID - -INTEGER NOT NULL -SIZE - -INTEGER -IS_SIGNED - -INTEGER - + +NUMBER + +[table] +NUMBER_ID + +INTEGER NOT NULL +SIZE + +INTEGER +IS_SIGNED + +INTEGER + - + number_89ec43a8:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_89EBCF49 string_9268c870 - -STRING - -[table] -STRING_ID - -INTEGER NOT NULL -IS_LONG - -INTEGER -SIZE - -INTEGER -IS_CHAR - -INTEGER - + +STRING + +[table] +STRING_ID + +INTEGER NOT NULL +IS_LONG + +INTEGER +SIZE + +INTEGER +IS_CHAR + +INTEGER + - + string_9268c870:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_92685411 struct_9268f434 - -STRUCT - -[table] -STRUCT_ID - -INTEGER NOT NULL -IS_FABRIC_SCOPED - -INTEGER -SIZE - -INTEGER -API_MATURITY - -TEXT - + +STRUCT + +[table] +STRUCT_ID + +INTEGER NOT NULL +IS_FABRIC_SCOPED + +INTEGER +SIZE + +INTEGER +API_MATURITY + +TEXT + - + struct_9268f434:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_92687FD5 struct_item_d6e4bd9c - -STRUCT_ITEM - -[table] -STRUCT_ITEM_ID - -INTEGER NOT NULL - -auto-incremented -STRUCT_REF - -INTEGER -FIELD_IDENTIFIER - -INTEGER -NAME - -TEXT(100) -IS_ARRAY - -INTEGER -IS_ENUM - -INTEGER -MIN_LENGTH - -INTEGER -MAX_LENGTH - -INTEGER -IS_WRITABLE - -INTEGER -IS_NULLABLE - -INTEGER -IS_OPTIONAL - -INTEGER -IS_FABRIC_SENSITIVE - -INTEGER -SIZE - -INTEGER -DATA_TYPE_REF - -INTEGER NOT NULL - + +STRUCT_ITEM + +[table] +STRUCT_ITEM_ID + +INTEGER NOT NULL + +auto-incremented +STRUCT_REF + +INTEGER +FIELD_IDENTIFIER + +INTEGER +NAME + +TEXT(100) +IS_ARRAY + +INTEGER +IS_ENUM + +INTEGER +MIN_LENGTH + +INTEGER +MAX_LENGTH + +INTEGER +IS_WRITABLE + +INTEGER +IS_NULLABLE + +INTEGER +IS_OPTIONAL + +INTEGER +IS_FABRIC_SENSITIVE + +INTEGER +SIZE + +INTEGER +DATA_TYPE_REF + +INTEGER NOT NULL + struct_item_d6e4bd9c:w->data_type_9233070e:e - - - - + + + + + + + +SCHCRWLR_923292AF_D6E4493D - + struct_item_d6e4bd9c:w->struct_9268f434:e - - - - + + + + + + + +SCHCRWLR_92687FD5_D6E4493D + + + +device_composition_eab6b180 + +DEVICE_COMPOSITION + +[table] +DEVICE_COMPOSITION_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +CODE + +INTEGER +ENDPOINT_COMPOSITION_REF + +INTEGER +CONFORMANCE + +TEXT +"CONSTRAINT" + +INTEGER + + + + +endpoint_composition_fdc3c63f + +ENDPOINT_COMPOSITION + +[table] +ENDPOINT_COMPOSITION_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +TYPE + +TEXT +CODE + +INTEGER + + + + +device_composition_eab6b180:w->endpoint_composition_fdc3c63f:e + + + + + + + +SCHCRWLR_FDC351E0_EAB63D21 + + + +device_composition_eab6b180:w->package_fab13485:e + + + + + + + +SCHCRWLR_FAB0C026_EAB63D21 - + device_type_2620a7e2:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_26203383 - + endpoint_type_device_e685fbb0 - -ENDPOINT_TYPE_DEVICE - -[table] -ENDPOINT_TYPE_DEVICE_ID - -INTEGER - -auto-incremented -DEVICE_TYPE_REF - -INTEGER -ENDPOINT_TYPE_REF - -INTEGER -DEVICE_TYPE_ORDER - -INTEGER -DEVICE_IDENTIFIER - -INTEGER -DEVICE_VERSION - -INTEGER - + +ENDPOINT_TYPE_DEVICE + +[table] +ENDPOINT_TYPE_DEVICE_ID + +INTEGER + +auto-incremented +DEVICE_TYPE_REF + +INTEGER +ENDPOINT_TYPE_REF + +INTEGER +DEVICE_TYPE_ORDER + +INTEGER +DEVICE_IDENTIFIER + +INTEGER +DEVICE_VERSION + +INTEGER + endpoint_type_device_e685fbb0:w->device_type_2620a7e2:e - - - - + + + + + + + +SCHCRWLR_26203383_E6858751 - + endpoint_type_device_e685fbb0:w->endpoint_type_9857dc03:e - - - - + + + + + + + +SCHCRWLR_985767A4_E6858751 - + device_type_feature_4402279 - -DEVICE_TYPE_FEATURE - -[table] -DEVICE_TYPE_CLUSTER_REF - -INTEGER -FEATURE_REF - -INTEGER -FEATURE_CODE - -TEXT - + +DEVICE_TYPE_FEATURE + +[table] +DEVICE_TYPE_CLUSTER_REF + +INTEGER +FEATURE_REF + +INTEGER +FEATURE_CODE + +TEXT + device_type_feature_4402279:w->device_type_cluster_7298b97d:e - - - - + + + + + + + +SCHCRWLR_7298451E_043FAE1A - + device_type_feature_4402279:w->feature_f06e7b35:e - - - - + + + + + + + +SCHCRWLR_F06E06D6_043FAE1A - + discriminator_4931d2db:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_49315E7C - + domain_78873d23 - -DOMAIN - -[table] -DOMAIN_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -NAME - -TEXT -LATEST_SPEC_REF - -INTEGER - + +DOMAIN + +[table] +DOMAIN_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +NAME + +TEXT +LATEST_SPEC_REF + +INTEGER + - + domain_78873d23:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_7886C8C4 - + domain_78873d23:w->spec_27641a:e - - - - + + + + + + + +SCHCRWLR_0026EFBB_7886C8C4 - + endpoint_966d81f4 - -ENDPOINT - -[table] -ENDPOINT_ID - -INTEGER - -auto-incremented -SESSION_REF - -INTEGER -ENDPOINT_TYPE_REF - -INTEGER -PROFILE - -INTEGER -ENDPOINT_IDENTIFIER - -INTEGER -NETWORK_IDENTIFIER - -INTEGER -PARENT_ENDPOINT_REF - -INTEGER - + +ENDPOINT + +[table] +ENDPOINT_ID + +INTEGER + +auto-incremented +SESSION_REF + +INTEGER +ENDPOINT_TYPE_REF + +INTEGER +PROFILE + +INTEGER +ENDPOINT_IDENTIFIER + +INTEGER +NETWORK_IDENTIFIER + +INTEGER +PARENT_ENDPOINT_REF + +INTEGER + endpoint_966d81f4:w->endpoint_966d81f4:e - - - - + + + + + + + +SCHCRWLR_966D0D95_966D0D95 - + endpoint_966d81f4:w->endpoint_type_9857dc03:e - - - - + + + + + + + +SCHCRWLR_985767A4_966D0D95 - + session_a11c82d5 - -SESSION - -[table] -SESSION_ID - -INTEGER - -auto-incremented -USER_REF - -INTEGER -SESSION_KEY - -TEXT -CREATION_TIME - -INTEGER -DIRTY - -INTEGER -NEW_NOTIFICATION - -INTEGER - + +SESSION + +[table] +SESSION_ID + +INTEGER + +auto-incremented +USER_REF + +INTEGER +SESSION_KEY + +TEXT +CREATION_TIME + +INTEGER +DIRTY + +INTEGER +NEW_NOTIFICATION + +INTEGER + - + endpoint_966d81f4:w->session_a11c82d5:e - - - - + + + + + + + +SCHCRWLR_A11C0E76_966D0D95 + + + +endpoint_composition_fdc3c63f:w->package_fab13485:e + + + + + + + +SCHCRWLR_FAB0C026_FDC351E0 - + session_partition_f35f84a0 - -SESSION_PARTITION - -[table] -SESSION_PARTITION_ID - -INTEGER - -auto-incremented -SESSION_PARTITION_NUMBER - -INTEGER -SESSION_REF - -INTEGER - + +SESSION_PARTITION + +[table] +SESSION_PARTITION_ID + +INTEGER + +auto-incremented +SESSION_PARTITION_NUMBER + +INTEGER +SESSION_REF + +INTEGER + - + endpoint_type_9857dc03:w->session_partition_f35f84a0:e - - - - + + + + + + + +SCHCRWLR_F35F1041_985767A4 - + endpoint_type_event_e67d6e7e - -ENDPOINT_TYPE_EVENT - -[table] -ENDPOINT_TYPE_EVENT_ID - -INTEGER - -auto-incremented -ENDPOINT_TYPE_CLUSTER_REF - -INTEGER -EVENT_REF - -INTEGER -INCLUDED - -INTEGER - + +ENDPOINT_TYPE_EVENT + +[table] +ENDPOINT_TYPE_EVENT_ID + +INTEGER + +auto-incremented +ENDPOINT_TYPE_CLUSTER_REF + +INTEGER +EVENT_REF + +INTEGER +INCLUDED + +INTEGER + - + endpoint_type_event_e67d6e7e:w->endpoint_type_cluster_c12e3c9e:e - - - - + + + + + + + +SCHCRWLR_C12DC83F_E67CFA1F - + endpoint_type_event_e67d6e7e:w->event_3f4eed9:e - - - - + + + + + + + +SCHCRWLR_03F47A7A_E67CFA1F - + enum_item_b6420bf0 - -ENUM_ITEM - -[table] -ENUM_ITEM_ID - -INTEGER NOT NULL - -auto-incremented -ENUM_REF - -INTEGER -NAME - -TEXT -DESCRIPTION - -TEXT -FIELD_IDENTIFIER - -INTEGER -"VALUE" - -INTEGER - + +ENUM_ITEM + +[table] +ENUM_ITEM_ID + +INTEGER NOT NULL + +auto-incremented +ENUM_REF + +INTEGER +NAME + +TEXT +DESCRIPTION + +TEXT +FIELD_IDENTIFIER + +INTEGER +"VALUE" + +INTEGER + - + enum_item_b6420bf0:w->enum_210160:e - - - - + + + + + + + +SCHCRWLR_00208D01_B6419791 - + event_field_d102b734 - -EVENT_FIELD - -[table] -EVENT_REF - -INTEGER -FIELD_IDENTIFIER - -INTEGER -NAME - -TEXT -TYPE - -TEXT -IS_ARRAY - -INTEGER -IS_NULLABLE - -INTEGER -IS_OPTIONAL - -INTEGER -INTRODUCED_IN_REF - -INTEGER -REMOVED_IN_REF - -INTEGER - + +EVENT_FIELD + +[table] +EVENT_REF + +INTEGER +FIELD_IDENTIFIER + +INTEGER +NAME + +TEXT +TYPE + +TEXT +IS_ARRAY + +INTEGER +IS_NULLABLE + +INTEGER +IS_OPTIONAL + +INTEGER +INTRODUCED_IN_REF + +INTEGER +REMOVED_IN_REF + +INTEGER + - + event_field_d102b734:w->event_3f4eed9:e - - - - + + + + + + + +SCHCRWLR_03F47A7A_D10242D5 - + event_field_d102b734:w->spec_27641a:e - - - - + + + + + + + +SCHCRWLR_0026EFBB_D10242D5 - + event_field_d102b734:w->spec_27641a:e - - - - + + + + + + + +SCHCRWLR_0026EFBB_D10242D5 - + global_attribute_bit_e934f16d - -GLOBAL_ATTRIBUTE_BIT - -[table] -GLOBAL_ATTRIBUTE_DEFAULT_REF - -INTEGER NOT NULL -BIT - -INTEGER NOT NULL -"VALUE" - -INTEGER -TAG_REF - -INTEGER NOT NULL - + +GLOBAL_ATTRIBUTE_BIT + +[table] +GLOBAL_ATTRIBUTE_DEFAULT_REF + +INTEGER NOT NULL +BIT + +INTEGER NOT NULL +"VALUE" + +INTEGER +TAG_REF + +INTEGER NOT NULL + - + global_attribute_bit_e934f16d:w->global_attribute_default_73c65a21:e - - - - + + + + + + + +SCHCRWLR_73C5E5C2_E9347D0E - + global_attribute_bit_e934f16d:w->tag_1b7d9:e - - - - + + + + + + + +SCHCRWLR_0001437A_E9347D0E - + operation_93359a6:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_0932E547 - + package_fab13485:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_FAB0C026 - + package_extension_2789e3a5 - -PACKAGE_EXTENSION - -[table] -PACKAGE_EXTENSION_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -ENTITY - -TEXT -PROPERTY - -TEXT -TYPE - -TEXT -CONFIGURABILITY - -TEXT -LABEL - -TEXT -GLOBAL_DEFAULT - -TEXT - + +PACKAGE_EXTENSION + +[table] +PACKAGE_EXTENSION_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +ENTITY + +TEXT +PROPERTY + +TEXT +TYPE + +TEXT +CONFIGURABILITY + +TEXT +LABEL + +TEXT +GLOBAL_DEFAULT + +TEXT + - + package_extension_2789e3a5:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_27896F46 - + package_notice_176ee570 - -PACKAGE_NOTICE - -[table] -PACKAGE_REF - -INTEGER -NOTICE_TYPE - -TEXT -NOTICE_MESSAGE - -TEXT -NOTICE_SEVERITY - -INTEGER -NOTICE_ID - -INTEGER - -auto-incremented - + +PACKAGE_NOTICE + +[table] +PACKAGE_REF + +INTEGER +NOTICE_TYPE + +TEXT +NOTICE_MESSAGE + +TEXT +NOTICE_SEVERITY + +INTEGER +NOTICE_ID + +INTEGER + +auto-incremented + - + package_notice_176ee570:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_176E7111 - + package_option_1931d70d - -PACKAGE_OPTION - -[table] -OPTION_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -OPTION_CATEGORY - -TEXT -OPTION_CODE - -TEXT -OPTION_LABEL - -TEXT - + +PACKAGE_OPTION + +[table] +OPTION_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +OPTION_CATEGORY + +TEXT +OPTION_CODE + +TEXT +OPTION_LABEL + +TEXT + - + package_option_1931d70d:w->package_fab13485:e - - - - - - - -role_26ecd5:w->package_fab13485:e - - - - - - - -spec_27641a:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_193162AE package_option_default_64a251ef - -PACKAGE_OPTION_DEFAULT - -[table] -OPTION_DEFAULT_ID - -INTEGER - -auto-incremented -PACKAGE_REF - -INTEGER -OPTION_CATEGORY - -TEXT -OPTION_REF - -INTEGER - + +PACKAGE_OPTION_DEFAULT + +[table] +OPTION_DEFAULT_ID + +INTEGER + +auto-incremented +PACKAGE_REF + +INTEGER +OPTION_CATEGORY + +TEXT +OPTION_REF + +INTEGER + - + package_option_default_64a251ef:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_64A1DD90 - + package_option_default_64a251ef:w->package_option_1931d70d:e - - - - + + + + + + + +SCHCRWLR_193162AE_64A1DD90 + + + +role_26ecd5:w->package_fab13485:e + + + + + + + +SCHCRWLR_FAB0C026_00267876 - + session_package_61fa13bc - -SESSION_PACKAGE - -[table] -SESSION_PARTITION_REF - -INTEGER -PACKAGE_REF - -INTEGER -REQUIRED - -INTEGER -ENABLED - -INTEGER - + +SESSION_PACKAGE + +[table] +SESSION_PARTITION_REF + +INTEGER +PACKAGE_REF + +INTEGER +REQUIRED + +INTEGER +ENABLED + +INTEGER + - + session_package_61fa13bc:w->package_fab13485:e - - - - + + + + + + + +SCHCRWLR_FAB0C026_61F99F5D - + session_package_61fa13bc:w->session_partition_f35f84a0:e - - - - + + + + + + + +SCHCRWLR_F35F1041_61F99F5D + + + +spec_27641a:w->package_fab13485:e + + + + + + + +SCHCRWLR_FAB0C026_0026EFBB - + package_extension_default_d8d04687 - -PACKAGE_EXTENSION_DEFAULT - -[table] -PACKAGE_EXTENSION_REF - -INTEGER -ENTITY_CODE - -INTEGER -ENTITY_QUALIFIER - -TEXT -PARENT_CODE - -INTEGER -MANUFACTURER_CODE - -INTEGER -"VALUE" - -TEXT - + +PACKAGE_EXTENSION_DEFAULT + +[table] +PACKAGE_EXTENSION_REF + +INTEGER +ENTITY_CODE + +INTEGER +ENTITY_QUALIFIER + +TEXT +PARENT_CODE + +INTEGER +MANUFACTURER_CODE + +INTEGER +"VALUE" + +TEXT + - + package_extension_default_d8d04687:w->package_extension_2789e3a5:e - - - - + + + + + + + +SCHCRWLR_27896F46_D8CFD228 - + package_extension_value_8e65d377 - -PACKAGE_EXTENSION_VALUE - -[table] -PACKAGE_EXTENSION_VALUE_ID - -INTEGER - -auto-incremented -PACKAGE_EXTENSION_REF - -INTEGER -SESSION_REF - -INTEGER -ENTITY_CODE - -INTEGER -PARENT_CODE - -INTEGER -"VALUE" - -TEXT - + +PACKAGE_EXTENSION_VALUE + +[table] +PACKAGE_EXTENSION_VALUE_ID + +INTEGER + +auto-incremented +PACKAGE_EXTENSION_REF + +INTEGER +SESSION_REF + +INTEGER +ENTITY_CODE + +INTEGER +PARENT_CODE + +INTEGER +"VALUE" + +TEXT + - + package_extension_value_8e65d377:w->package_extension_2789e3a5:e - - - - + + + + + + + +SCHCRWLR_27896F46_8E655F18 package_extension_value_8e65d377:w->session_a11c82d5:e - - - - + + + + + + + +SCHCRWLR_A11C0E76_8E655F18 - + user_28582a - -"USER" - -[table] -USER_ID - -INTEGER - -auto-incremented -USER_KEY - -TEXT -CREATION_TIME - -INTEGER - + +"USER" + +[table] +USER_ID + +INTEGER + +auto-incremented +USER_KEY + +TEXT +CREATION_TIME + +INTEGER + - + session_a11c82d5:w->user_28582a:e - - - - + + + + + + + +SCHCRWLR_3ED95AD5_A11C0E76 - + session_key_value_334d9527 - -SESSION_KEY_VALUE - -[table] -SESSION_REF - -INTEGER -KEY - -TEXT -"VALUE" - -TEXT - + +SESSION_KEY_VALUE + +[table] +SESSION_REF + +INTEGER +KEY + +TEXT +"VALUE" + +TEXT + - + session_key_value_334d9527:w->session_a11c82d5:e - - - - + + + + + + + +SCHCRWLR_A11C0E76_334D20C8 - + session_log_7f10ae3a - -SESSION_LOG - -[table] -SESSION_REF - -INTEGER -"TIMESTAMP" - -TEXT -LOG - -TEXT - + +SESSION_LOG + +[table] +SESSION_REF + +INTEGER +"TIMESTAMP" + +TEXT +LOG + +TEXT + - + session_log_7f10ae3a:w->session_a11c82d5:e - - - - + + + + + + + +SCHCRWLR_A11C0E76_7F1039DB - + session_notice_84addd20 - -SESSION_NOTICE - -[table] -SESSION_REF - -INTEGER -NOTICE_TYPE - -TEXT -NOTICE_MESSAGE - -TEXT -NOTICE_SEVERITY - -INTEGER -NOTICE_ID - -INTEGER - -auto-incremented -DISPLAY - -INTEGER -SEEN - -INTEGER - + +SESSION_NOTICE + +[table] +SESSION_REF + +INTEGER +NOTICE_TYPE + +TEXT +NOTICE_MESSAGE + +TEXT +NOTICE_SEVERITY + +INTEGER +NOTICE_ID + +INTEGER + +auto-incremented +DISPLAY + +INTEGER +SEEN + +INTEGER + - + session_notice_84addd20:w->session_a11c82d5:e - - - - + + + + + + + +SCHCRWLR_A11C0E76_84AD68C1 - + session_partition_f35f84a0:w->session_a11c82d5:e - - - - + + + + + + + +SCHCRWLR_A11C0E76_F35F1041 - + setting_a12b0e8f - -SETTING - -[table] -CATEGORY - -TEXT -KEY - -TEXT -"VALUE" - -TEXT - + +SETTING + +[table] +CATEGORY + +TEXT +KEY + +TEXT +"VALUE" + +TEXT + diff --git a/src-electron/db/db-mapping.js b/src-electron/db/db-mapping.js index a7cb18ffa5..bc380ad1bf 100644 --- a/src-electron/db/db-mapping.js +++ b/src-electron/db/db-mapping.js @@ -562,6 +562,7 @@ exports.map = { featureName: x.FEATURE_NAME, featureBit: x.FEATURE_BIT, clusterId: x.CLUSTER_REF, + composition: x.TYPE, } }, endpointTypeCluster: (x) => { diff --git a/src-electron/db/query-device-type.js b/src-electron/db/query-device-type.js index 0a7c0b6f86..3f2a8d8462 100644 --- a/src-electron/db/query-device-type.js +++ b/src-electron/db/query-device-type.js @@ -369,6 +369,44 @@ async function updateDeviceTypeEntityReferences(db, packageId) { return updateFeatureReferencesForDeviceTypeReferences(db, packageId) } +/** + * Asynchronously selects device types with their compositions by a specific endpoint type ID. + * + * This function queries the database for device types associated with a given endpoint type ID, + * including details about the device type and any endpoint compositions linked to it. + * + * @param {Object} db - The database connection object. + * @param {number} endpointTypeId - The ID of the endpoint type used to filter the device types. + * @returns {Promise} A promise that resolves with an array of device types and their compositions. + */ +async function selectDeviceTypesWithCompositionByEndpointTypeId( + db, + endpointTypeId +) { + let rows = await dbApi.dbAll( + db, + ` + SELECT + ETD.ENDPOINT_TYPE_DEVICE_ID, + ETD.DEVICE_TYPE_REF, + ETD.ENDPOINT_TYPE_REF, + ETD.DEVICE_TYPE_ORDER, + ETD.DEVICE_IDENTIFIER, + ETD.DEVICE_VERSION, + EC.TYPE + FROM + ENDPOINT_TYPE_DEVICE AS ETD + JOIN + DEVICE_TYPE AS DT ON ETD.DEVICE_TYPE_REF = DT.DEVICE_TYPE_ID + LEFT JOIN + ENDPOINT_COMPOSITION AS EC ON DT.CODE = EC.CODE + WHERE + ETD.ENDPOINT_TYPE_REF = ?`, + [endpointTypeId] + ) + return rows.map(dbMapping.map.endpointTypeDeviceExtended) +} + /** * Retrieves the zcl device type information based on an endpoint type id * @param {*} db @@ -467,3 +505,5 @@ exports.updateDeviceTypeEntityReferences = updateDeviceTypeEntityReferences exports.selectDeviceTypesByEndpointTypeId = selectDeviceTypesByEndpointTypeId exports.selectDeviceTypeFeaturesByEndpointTypeIdAndClusterId = selectDeviceTypeFeaturesByEndpointTypeIdAndClusterId +exports.selectDeviceTypesWithCompositionByEndpointTypeId = + selectDeviceTypesWithCompositionByEndpointTypeId diff --git a/src-electron/db/query-loader.js b/src-electron/db/query-loader.js index bd817a8e54..74eaefb46a 100644 --- a/src-electron/db/query-loader.js +++ b/src-electron/db/query-loader.js @@ -23,6 +23,7 @@ const env = require('../util/env') const dbApi = require('./db-api.js') const queryNotification = require('../db/query-package-notification') +const dbEnum = require('../../src-shared/db-enum.js') // Some loading queries that are reused few times. @@ -926,6 +927,67 @@ async function insertAtomics(db, packageId, data) { ) } +/** + * Inserts endpoint composition data into the database based on the context's mandatory device type. + * This function checks if the context's mandatory device type matches the composition code. + * If they match, it performs an insert operation with a specific type from `dbEnum.mandatoryDeviceType`. + * If they do not match, it performs an insert with the composition's type. + * + * @param {*} db - The database connection object. + * @param {*} composition - The composition data to be inserted. + * @param {*} context - The context containing the mandatory device type to check against. + * @returns A promise resolved with the result of the database insert operation. + */ +function insertEndpointComposition(db, composition, context) { + if (parseInt(context.mandatoryDeviceTypes, 16) === composition.code) { + return dbApi.dbInsert( + db, + 'INSERT INTO ENDPOINT_COMPOSITION (TYPE, CODE) VALUES (?, ?)', + [dbEnum.composition.mandatoryEndpoint, composition.code] + ) + } else { + return dbApi.dbInsert( + db, + 'INSERT INTO ENDPOINT_COMPOSITION (TYPE, CODE) VALUES (?, ?)', + [composition.compositionType, composition.code] + ) + } +} + +/** + * Asynchronously retrieves the ID of an endpoint composition based on its code. + * + * @param {Object} db - The database connection object. + * @param {Object} deviceType - An object representing the device type, which contains the 'code' property. + * @returns {Promise} A promise that resolves with the ID of the endpoint composition if found, or null otherwise. + */ +async function getEndpointCompositionIdByCode(db, deviceType) { + const query = + 'SELECT ENDPOINT_COMPOSITION_ID FROM ENDPOINT_COMPOSITION WHERE CODE = ?' + const result = await dbApi.dbGet(db, query, [deviceType.code]) + return result ? result.ENDPOINT_COMPOSITION_ID : null +} + +/** + * Inserts a new device composition record into the database. + * + * @param {Object} db - The database connection object. + * @param {Object} deviceType - An object representing the device type, which contains the 'childDeviceId' property. + * @param {number} endpointCompositionId - The ID of the endpoint composition associated with this device composition. + * @returns {Promise} A promise that resolves with the result of the database insertion operation. + */ + +function insertDeviceComposition(db, deviceType, endpointCompositionId) { + const insertQuery = ` + INSERT INTO DEVICE_COMPOSITION (CODE, ENDPOINT_COMPOSITION_REF) + VALUES (?, ?) + ` + return dbApi.dbInsert(db, insertQuery, [ + parseInt(deviceType.childDeviceId, 16), + endpointCompositionId, + ]) +} + /** * Inserts device types into the database. * @@ -984,13 +1046,40 @@ async function insertDeviceTypes(db, packageId, data) { } }) ) - ).then((dtClusterRefDataPairs) => { - let promises = [] - promises.push(insertDeviceTypeAttributes(db, dtClusterRefDataPairs)) - promises.push(insertDeviceTypeCommands(db, dtClusterRefDataPairs)) - promises.push(insertDeviceTypeFeatures(db, dtClusterRefDataPairs)) - return Promise.all(promises) - }) + ) + .then((dtClusterRefDataPairs) => { + let promises = [] + promises.push( + insertDeviceTypeAttributes(db, dtClusterRefDataPairs) + ) + promises.push(insertDeviceTypeCommands(db, dtClusterRefDataPairs)) + promises.push(insertDeviceTypeFeatures(db, dtClusterRefDataPairs)) + return Promise.all(promises) + }) + .then(() => { + // Update ENDPOINT_COMPOSITION with DEVICE_TYPE_REF + const updateEndpointComposition = ` + UPDATE ENDPOINT_COMPOSITION + SET DEVICE_TYPE_REF = ( + SELECT DEVICE_TYPE_ID + FROM DEVICE_TYPE + WHERE DEVICE_TYPE.CODE = ENDPOINT_COMPOSITION.CODE + ) + ` + return dbApi.dbAll(db, updateEndpointComposition) + }) + .then(() => { + // Update DEVICE_COMPOSITION with DEVICE_TYPE_REF + const updateDeviceComposition = ` + UPDATE DEVICE_COMPOSITION + SET DEVICE_TYPE_REF = ( + SELECT DEVICE_TYPE_ID + FROM DEVICE_TYPE + WHERE DEVICE_TYPE.CODE = DEVICE_COMPOSITION.CODE + ) + ` + return dbApi.dbAll(db, updateDeviceComposition) + }) } } return zclIdsPromises @@ -1997,3 +2086,6 @@ exports.insertStruct = insertStruct exports.insertStructItems = insertStructItems exports.updateDataTypeClusterReferences = updateDataTypeClusterReferences exports.insertAttributeMappings = insertAttributeMappings +exports.insertEndpointComposition = insertEndpointComposition +exports.insertDeviceComposition = insertDeviceComposition +exports.getEndpointCompositionIdByCode = getEndpointCompositionIdByCode diff --git a/src-electron/db/zap-schema.sql b/src-electron/db/zap-schema.sql index 12ba79e292..a33bd854a3 100644 --- a/src-electron/db/zap-schema.sql +++ b/src-electron/db/zap-schema.sql @@ -355,6 +355,53 @@ CREATE TABLE IF NOT EXISTS "DEVICE_TYPE" ( "SUPERSET" text, foreign key (PACKAGE_REF) references PACKAGE(PACKAGE_ID) ON DELETE CASCADE ON UPDATE CASCADE ); +/* + This table stores information about endpoint compositions. + Each record represents a composition associated with a specific device type. + + Columns: + ENDPOINT_COMPOSITION_ID: The primary key of the table, auto-incremented for each new record. + DEVICE_TYPE_REF: A foreign key linking to the DEVICE_TYPE table, indicating the device type associated with this composition. + TYPE: A text field describing the type of the endpoint composition. + CODE: An integer representing a unique code for the endpoint composition. + + Foreign Key Constraints: + The DEVICE_TYPE_REF column references the DEVICE_TYPE_ID column of the DEVICE_TYPE table. + On deletion of a referenced device type, corresponding records in this table are deleted (CASCADE). +*/ +CREATE TABLE IF NOT EXISTS "ENDPOINT_COMPOSITION" ( + "ENDPOINT_COMPOSITION_ID" integer PRIMARY KEY AUTOINCREMENT, + "DEVICE_TYPE_REF" integer, + "TYPE" text, + "CODE" integer, + FOREIGN KEY ("DEVICE_TYPE_REF") REFERENCES "DEVICE_TYPE"("DEVICE_TYPE_ID") ON DELETE CASCADE +); +/* + This table defines the composition of devices within the system. + It links devices to their types and endpoint compositions, specifying their conformance and constraints. + + Columns: + DEVICE_COMPOSITION_ID: The primary key of the table, auto-incremented for each new record. + DEVICE_TYPE_REF: An integer that acts as a foreign key to reference a specific device type. + ENDPOINT_COMPOSITION_REF: A foreign key linking to the ENDPOINT_COMPOSITION table to specify the endpoint composition associated with this device. + CONFORMANCE: A text field describing the conformance level of the device composition. + CONSTRAINT: An integer representing any constraints applied to the device composition. + + Foreign Key Constraints: + The DEVICE_TYPE_REF column references the DEVICE_TYPE_ID column of the DEVICE_TYPE table. On deletion of a device type, corresponding records in this table are deleted (CASCADE). + The ENDPOINT_COMPOSITION_REF column references the ENDPOINT_COMPOSITION_ID column of the ENDPOINT_COMPOSITION table. On deletion of an endpoint composition, corresponding records in this table are deleted (CASCADE). +*/ +CREATE TABLE IF NOT EXISTS "DEVICE_COMPOSITION" ( + "DEVICE_COMPOSITION_ID" integer PRIMARY KEY AUTOINCREMENT, + "CODE" integer, + "DEVICE_TYPE_REF" integer, + "ENDPOINT_COMPOSITION_REF" integer, + "CONFORMANCE" text, + "CONSTRAINT" integer, + FOREIGN KEY ("ENDPOINT_COMPOSITION_REF") REFERENCES "ENDPOINT_COMPOSITION"("ENDPOINT_COMPOSITION_ID") ON DELETE CASCADE + FOREIGN KEY ("DEVICE_TYPE_REF") REFERENCES "DEVICE_TYPE"("DEVICE_TYPE_ID") ON DELETE CASCADE +); + /* DEVICE_TYPE_CLUSTER contains clusters that belong to the device type. */ diff --git a/src-electron/generator/helper-session.js b/src-electron/generator/helper-session.js index c30e53cfb1..a530f13349 100644 --- a/src-electron/generator/helper-session.js +++ b/src-electron/generator/helper-session.js @@ -115,11 +115,13 @@ function user_endpoints(options) { */ async function user_device_types(options) { let promise = queryDeviceType - .selectDeviceTypesByEndpointTypeId(this.global.db, this.endpointTypeId) + .selectDeviceTypesWithCompositionByEndpointTypeId( + this.global.db, + this.endpointTypeId + ) .then((deviceTypes) => templateUtil.collectBlocks(deviceTypes, options, this) ) - return templateUtil.templatePromise(this.global, promise) } diff --git a/src-electron/zcl/zcl-loader-silabs.js b/src-electron/zcl/zcl-loader-silabs.js index 99522dba5d..061c0f3afe 100644 --- a/src-electron/zcl/zcl-loader-silabs.js +++ b/src-electron/zcl/zcl-loader-silabs.js @@ -124,6 +124,9 @@ async function collectDataFromJsonFile(metadataFile, data) { returnObject.attributeAccessInterfaceAttributes = obj.attributeAccessInterfaceAttributes } + if ('mandatoryDeviceTypes' in obj) { + returnObject.mandatoryDeviceTypes = obj.mandatoryDeviceTypes + } if ('ZCLDataTypes' in obj) { returnObject.ZCLDataTypes = obj.ZCLDataTypes @@ -1599,6 +1602,16 @@ function prepareDeviceType(deviceType) { class: deviceType.class ? deviceType.class[0] : '', scope: deviceType.scope ? deviceType.scope[0] : '', superset: deviceType.superset ? deviceType.superset[0] : '', + compositionType: null, + } + if ('endpointComposition' in deviceType) { + try { + ret.compositionType = deviceType.endpointComposition[0].compositionType[0] + ret.childDeviceId = + deviceType.endpointComposition[0].endpoint[0].deviceType[0] + } catch (error) { + console.error('Error processing endpoint composition:', error) + } } if ('clusters' in deviceType) { ret.clusters = [] @@ -1641,21 +1654,41 @@ function prepareDeviceType(deviceType) { } /** - * Process all device types. + * Processes and inserts device types into the database. + * This function logs the number of device types being processed for debugging purposes. + * It maps over the provided data to prepare each device type and then iterates over each prepared device type. + * If a device type has a compositionType, it inserts the endpoint composition into the database, + * retrieves the endpoint composition ID, and then inserts the device composition. + * Finally, it inserts all prepared device types into the database. * - * @param {*} db - * @param {*} filePath - * @param {*} packageId - * @param {*} data - * @returns Promise of a resolved device types. + * @param {*} db - The database connection object. + * @param {string} filePath - The file path from which the device types are being processed. + * @param {*} packageId - The package ID associated with the device types. + * @param {Array} data - The array of device types to be processed. + * @param {*} context - Additional context that might be required for processing. + * @returns {Promise} A promise that resolves after all device types have been inserted into the database. */ -async function processDeviceTypes(db, filePath, packageId, data) { +async function processDeviceTypes(db, filePath, packageId, data, context) { env.logDebug(`${filePath}, ${packageId}: ${data.length} deviceTypes.`) - return queryLoader.insertDeviceTypes( - db, - packageId, - data.map((x) => prepareDeviceType(x)) - ) + let deviceTypes = data.map((x) => prepareDeviceType(x)) + for (let deviceType of deviceTypes) { + if ( + deviceType.compositionType != null || + deviceType.code == parseInt(context.mandatoryDeviceTypes, 16) + ) { + await queryLoader.insertEndpointComposition(db, deviceType, context) + if (deviceType.code !== parseInt(context.mandatoryDeviceTypes, 16)) { + let endpointCompositionId = + await queryLoader.getEndpointCompositionIdByCode(db, deviceType) + await queryLoader.insertDeviceComposition( + db, + deviceType, + endpointCompositionId + ) + } + } + } + return queryLoader.insertDeviceTypes(db, packageId, deviceTypes) } /** @@ -1717,7 +1750,13 @@ async function processParsedZclData( let batch2 = [] if ('deviceType' in toplevel) { batch2.push( - processDeviceTypes(db, filePath, packageId, toplevel.deviceType) + processDeviceTypes( + db, + filePath, + packageId, + toplevel.deviceType, + context + ) ) } if ('global' in toplevel) { @@ -2254,11 +2293,16 @@ async function parseBoolOptions(db, pkgRef, booleanCategories) { } /** - * Parses the attributeAccessInterfaceAttributes values inside the options. + * Asynchronously parses and inserts attribute access interface attributes into the database. + * This function iterates over the attributeAccessInterfaceAttributes object, processing each cluster + * by mapping its values to a specific structure and then inserting them into the database using + * the insertOptionsKeyValues function. * - * @param {*} db - * @param {*} ctx - * @returns Promised of parsed attributeAccessInterfaceAttributes. + * @param {*} db - The database connection object. + * @param {*} pkgRef - The package reference id for which the attributes are being parsed. + * @param {*} attributeAccessInterfaceAttributes - An object containing the attribute access interface attributes, + * structured by cluster. + * @returns {Promise} A promise that resolves when all attributes have been processed and inserted. */ async function parseattributeAccessInterfaceAttributes( @@ -2266,19 +2310,25 @@ async function parseattributeAccessInterfaceAttributes( pkgRef, attributeAccessInterfaceAttributes ) { - Object.keys(attributeAccessInterfaceAttributes).map((cluster) => { - let val = attributeAccessInterfaceAttributes[cluster] - return queryPackage.insertOptionsKeyValues( - db, - pkgRef, - cluster, - val.map((optionValue) => { - return { - code: dbEnum.storagePolicy.attributeAccessInterface, - label: optionValue, - } - }) - ) + // Use forEach for side effects without expecting a return value + Object.keys(attributeAccessInterfaceAttributes).forEach(async (cluster) => { + const values = attributeAccessInterfaceAttributes[cluster] + // Prepare the data for insertion + const optionsKeyValues = values.map((optionValue) => ({ + code: dbEnum.storagePolicy.attributeAccessInterface, + label: optionValue, + })) + // Insert the data into the database + try { + await queryPackage.insertOptionsKeyValues( + db, + pkgRef, + cluster, + optionsKeyValues + ) + } catch (error) { + console.error(`Error inserting attributes for cluster ${cluster}:`, error) + } }) } diff --git a/src-shared/db-enum.js b/src-shared/db-enum.js index 794ab5da4f..6d6e80494c 100644 --- a/src-shared/db-enum.js +++ b/src-shared/db-enum.js @@ -74,6 +74,12 @@ exports.storageOption = { external: 'External', } +exports.composition = { + fullFamily: 'fullFamily', + tree: 'tree', + mandatoryEndpoint: 'mandatoryEndpoint', +} + exports.zclType = { struct: 'struct', enum: 'enum', diff --git a/test/gen-matter-3-1.test.js b/test/gen-matter-3-1.test.js index 0ce36a073c..e2852a55f0 100644 --- a/test/gen-matter-3-1.test.js +++ b/test/gen-matter-3-1.test.js @@ -41,6 +41,7 @@ const testFile2 = testUtil.matterTestFile.allClustersFileFormat2 const multipleDeviceTypePerEndpointTestFile = testUtil.matterTestFile.multipleDeviceTypesPerEndpoint const templateCount = testUtil.testTemplate.matter3Count +const endpointComposition = testUtil.matterTestFile.endpointComposition beforeAll(async () => { env.setDevelopmentEnv() @@ -564,3 +565,35 @@ test( }, testUtil.timeout.long() ) +test(`Zap file generation: ${path.relative( + __dirname, + endpointComposition +)}`, async () => { + let sessionId = await querySession.createBlankSession(db) + + await importJs.importDataFromFile(db, endpointComposition, { + sessionId: sessionId, + }) + + let genResult = await genEngine.generate( + db, + sessionId, + templateContext.packageId, + {}, + { disableDeprecationWarnings: true } + ) + expect(genResult.hasErrors).toEqual(false) + + // Note: A lot of these tests here are for sake of backwards + // compatibility. Latest ZAP must be able to generate content for + // the old SDKs, so if you changed something that generates + // endpoint_config differently, please be very very careful and + // make sure you can answer positively the following question: + // after my changes, will zap still be able to generate content + // that works with an older SDK. + // + let ept = genResult.content['endpoint_config.h'] + expect(ept).toContain( + 'Endpoint 1, DeviceId: 112, DeviceVersion: 1, Composition: tree' + ) +}) diff --git a/test/gen-template/matter3/endpoint_config.zapt b/test/gen-template/matter3/endpoint_config.zapt index eba57ead63..c1ff67c571 100644 --- a/test/gen-template/matter3/endpoint_config.zapt +++ b/test/gen-template/matter3/endpoint_config.zapt @@ -101,7 +101,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of profile ids #define FIXED_PROFILE_IDS {{endpoint_fixed_profile_id_array}} -/ Array of parent endpoint ids +// Array of parent endpoint ids #define FIXED_PARENT_IDS {{endpoint_fixed_parent_id_array}} // Array of device types @@ -127,6 +127,6 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Test device types per endpoint {{#user_endpoints}} {{#user_device_types}} - Endpoint {{../endpointId}}, DeviceId: {{deviceIdentifier}}, DeviceVersion: {{deviceVersion}} + Endpoint {{../endpointId}}, DeviceId: {{deviceIdentifier}}, DeviceVersion: {{deviceVersion}}, Composition:{{composition}} {{/user_device_types}} {{/user_endpoints}} \ No newline at end of file diff --git a/test/resource/matter-endpointComposition.zap b/test/resource/matter-endpointComposition.zap new file mode 100644 index 0000000000..c38da3f6ad --- /dev/null +++ b/test/resource/matter-endpointComposition.zap @@ -0,0 +1,454 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../zcl-builtin/matter/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../gen-template/matter/gen-test.json", + "type": "gen-templates-json", + "category": "matter", + "version": "test-matter" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + }, + "deviceTypes": [ + { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 112 + ], + "deviceTypeName": "MA-refrigerator", + "deviceTypeCode": 112, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": 1 + } + ] +} \ No newline at end of file diff --git a/test/test-util.js b/test/test-util.js index 96250c4afb..18ef068cfd 100644 --- a/test/test-util.js +++ b/test/test-util.js @@ -138,6 +138,10 @@ exports.matterTestFile = { __dirname, 'resource/matter-api-maturity-test.zap' ), + endpointComposition: path.join( + __dirname, + 'resource/matter-endpointComposition.zap' + ), } exports.testZclMetafile = path.join(__dirname, './resource/meta/zcl.json') @@ -169,7 +173,7 @@ exports.totalDotDotEnums = 106 exports.totalDotDotEnumItems = 637 exports.totalMatterClusters = 72 -exports.totalMatterDeviceTypes = 117 +exports.totalMatterDeviceTypes = 119 exports.totalMatterCommandArgs = 595 exports.totalMatterCommands = 248 exports.totalMatterAttributes = 784 diff --git a/zcl-builtin/matter/data-model/chip/matter-devices.xml b/zcl-builtin/matter/data-model/chip/matter-devices.xml index 4cb71b1d87..47e9575dae 100644 --- a/zcl-builtin/matter/data-model/chip/matter-devices.xml +++ b/zcl-builtin/matter/data-model/chip/matter-devices.xml @@ -2042,4 +2042,60 @@ limitations under the License. + + MA-refrigerator + CHIP + Matter Refrigerator + 0x0103 + 0x0070 + Simple + Endpoint + + tree + + 0x0071 + + + + + + + + + + + + + + + + + MA-temperature-controlled-cabinet + CHIP + Matter Temperature Controlled Cabinet + 0x0103 + 0x0071 + Simple + Endpoint + + + + + + + + + + + + + + + + + + + + + diff --git a/zcl-builtin/matter/zcl.json b/zcl-builtin/matter/zcl.json index 60797dd0b5..b2f7366c70 100644 --- a/zcl-builtin/matter/zcl.json +++ b/zcl-builtin/matter/zcl.json @@ -273,6 +273,7 @@ "OverrunCount" ] }, + "mandatoryDeviceTypes": "0x0016", "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], "fabricHandling": {