@@ -88,9 +88,6 @@ MTR_NEWLY_DEPRECATED("Please use {{objCEnumName (asUpperCamelCase ../name preser
88
88
{{/unless}}
89
89
;
90
90
91
- {{#if (isStrEqual (asUpperCamelCase ../name) "UnitTesting")}}
92
-
93
- {{/if}}
94
91
{{/zcl_enums}}
95
92
{{#zcl_bitmaps}}
96
93
{{#*inline "bitmapDef"}}
@@ -100,29 +97,26 @@ typedef NS_OPTIONS({{asUnderlyingZclType name}}, {{objCEnumName clusterName labe
100
97
{{/zcl_bitmap_items}}
101
98
}
102
99
{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }}
103
- {{#if (isStrEqual (asUpperCamelCase ../name ) "Switch")}}
100
+ {{#if (isStrEqual (asUpperCamelCase clusterName ) "Switch")}}
104
101
{{#if (isStrEqual (asUpperCamelCase label) "SwitchFeature")}}
105
102
API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
106
103
{{/if}}
107
104
{{/if}}
108
- {{#if (isStrEqual (asUpperCamelCase ../name ) "MediaPlayback")}}
105
+ {{#if (isStrEqual (asUpperCamelCase clusterName ) "MediaPlayback")}}
109
106
{{#if (isStrEqual (asUpperCamelCase label) "MediaPlaybackFeature")}}
110
107
API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
111
108
{{/if}}
112
109
{{/if}}
113
- {{#if (isStrEqual (asUpperCamelCase clusterName) "UnitTesting")}}
114
- MTR_NEWLY_AVAILABLE
115
- {{else if (isStrEqual (asUpperCamelCase clusterName) "TestCluster")}}
116
- MTR_NEWLY_DEPRECATED("Please use {{objCEnumName "UnitTesting" label}}")
117
- {{/if}}
118
- ;
119
110
{{/inline}}
120
- {{> bitmapDef name=name clusterName=../name label=label}}
111
+ {{> bitmapDef name=name clusterName=(asUpperCamelCase ../name preserveAcronyms=true) label=label}}
112
+ {{#unless (isStrEqual (asUpperCamelCase ../name preserveAcronyms=true) (compatClusterNameRemapping ../name))}}
113
+ MTR_NEWLY_AVAILABLE;
121
114
122
- {{#if (isStrEqual (asUpperCamelCase ../name) "UnitTesting")}}
123
- {{> bitmapDef name=name clusterName="TestCluster" label=label}}
115
+ {{> bitmapDef name=name clusterName=(compatClusterNameRemapping ../name) label=label}}
116
+ MTR_NEWLY_DEPRECATED("Please use {{objCEnumName (asUpperCamelCase ../name preserveAcronyms=true) label}}")
117
+ {{/unless}}
118
+ ;
124
119
125
- {{/if}}
126
120
{{/zcl_bitmaps}}
127
121
{{/zcl_clusters}}
128
122
@@ -153,21 +147,21 @@ MTR_NEWLY_DEPRECATED("Please use {{objCEnumName "UnitTesting" label}}")
153
147
CompletionHandler:
154
148
{{~/if_is_fabric_scoped_struct~}}
155
149
(void (^)({{asObjectiveCClass type parent.name compatRemapClusterName=true}} * _Nullable value, NSError * _Nullable error))completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}
156
- MTR_NEWLY_DEPRECATED("Please use read{{>attribute }}With{{#if_is_fabric_scoped_struct type}}Params:completion:{{else}}Completion:{{/if_is_fabric_scoped_struct}}");
150
+ MTR_NEWLY_DEPRECATED("Please use readAttribute{{asUpperCamelCase name preserveAcronyms=true }}With{{#if_is_fabric_scoped_struct type}}Params:completion:{{else}}Completion:{{/if_is_fabric_scoped_struct}}");
157
151
{{#if isWritableAttribute}}
158
152
- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name compatRemapClusterName=true}})value completionHandler:(MTRStatusCompletion)completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}
159
- MTR_NEWLY_DEPRECATED("Please use write{{>attribute }}WithValue:completion:");
153
+ MTR_NEWLY_DEPRECATED("Please use writeAttribute{{asUpperCamelCase name preserveAcronyms=true }}WithValue:completion:");
160
154
- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name compatRemapClusterName=true}})value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}
161
- MTR_NEWLY_DEPRECATED("Please use write{{>attribute }}WithValue:params:completion:");
155
+ MTR_NEWLY_DEPRECATED("Please use writeAttribute{{asUpperCamelCase name preserveAcronyms=true }}WithValue:params:completion:");
162
156
{{/if}}
163
157
{{#if isReportableAttribute}}
164
158
{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }}
165
159
- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval
166
160
params:(MTRSubscribeParams * _Nullable)params
167
161
subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)({{asObjectiveCClass type parent.name compatRemapClusterName=true}} * _Nullable value, NSError * _Nullable error))reportHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}
168
- MTR_NEWLY_DEPRECATED("Please use subscribe{{>attribute }}WithParams:subscriptionEstablished:");
162
+ MTR_NEWLY_DEPRECATED("Please use subscribeAttribute{{asUpperCamelCase name preserveAcronyms=true }}WithParams:subscriptionEstablished:");
169
163
+ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)({{asObjectiveCClass type parent.name compatRemapClusterName=true}} * _Nullable value, NSError * _Nullable error))completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "UnitTesting")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}
170
- MTR_NEWLY_DEPRECATED("Please use read{{>attribute }}WithAttributeCache:endpoint:queue:completion:");
164
+ MTR_NEWLY_DEPRECATED("Please use readAttribute{{asUpperCamelCase name preserveAcronyms=true }}WithAttributeCache:endpoint:queue:completion:");
171
165
{{/if}}
172
166
{{/chip_server_cluster_attributes}}
173
167
0 commit comments