@@ -25,53 +25,6 @@ const ChipTypesHelper = require('../../../../../src/app/zap-templates/common/Chi
25
25
const StringHelper = require ( '../../../../../src/app/zap-templates/common/StringHelper.js' ) ;
26
26
const appHelper = require ( '../../../../../src/app/zap-templates/templates/app/helper.js' ) ;
27
27
28
- // Ideally those clusters clusters endpoints should be retrieved from the
29
- // descriptor cluster.
30
- function asExpectedEndpointForCluster ( clusterName )
31
- {
32
- switch ( clusterName ) {
33
- case 'AccessControl' :
34
- case 'AdministratorCommissioning' :
35
- case 'Basic' :
36
- case 'Descriptor' :
37
- case 'DiagnosticLogs' :
38
- case 'GeneralCommissioning' :
39
- case 'GeneralDiagnostics' :
40
- case 'LocalizationConfiguration' :
41
- case 'SoftwareDiagnostics' :
42
- case 'ThreadNetworkDiagnostics' :
43
- case 'EthernetNetworkDiagnostics' :
44
- case 'WiFiNetworkDiagnostics' :
45
- case 'GroupKeyManagement' :
46
- case 'NetworkCommissioning' :
47
- case 'OperationalCredentials' :
48
- case 'TimeFormatLocalization' :
49
- case 'TrustedRootCertificates' :
50
- case 'OtaSoftwareUpdateProvider' :
51
- case 'OtaSoftwareUpdateRequestor' :
52
- case 'PowerSourceConfiguration' :
53
- case 'UnitLocalization' :
54
- return 0 ;
55
- }
56
- return 1 ;
57
- }
58
-
59
- async function asTestValue ( cluster , options )
60
- {
61
- if ( StringHelper . isOctetString ( this . type ) ) {
62
- return `[@"${ "Test" . substring ( 0 , this . maxLength ) } " dataUsingEncoding:NSUTF8StringEncoding]` ;
63
- } else if ( StringHelper . isCharString ( this . type ) ) {
64
- return `@"${ "Test" . substring ( 0 , this . maxLength ) } "` ;
65
- } else if ( this . isArray ) {
66
- return '[NSArray array]' ;
67
- } else if ( this . isStruct ) {
68
- let ourClass = await asObjectiveCClass . call ( this , this . type , cluster , options ) ;
69
- return `[[${ ourClass } alloc] init]` ;
70
- } else {
71
- return `@(${ this . min || this . max || 0 } )` ;
72
- }
73
- }
74
-
75
28
function asObjectiveCBasicType ( type , options )
76
29
{
77
30
if ( StringHelper . isOctetString ( type ) ) {
@@ -200,13 +153,11 @@ function commandHasRequiredField(command)
200
153
//
201
154
// Module exports
202
155
//
203
- exports . asObjectiveCBasicType = asObjectiveCBasicType ;
204
- exports . asObjectiveCNumberType = asObjectiveCNumberType ;
205
- exports . asExpectedEndpointForCluster = asExpectedEndpointForCluster ;
206
- exports . asTestIndex = asTestIndex ;
207
- exports . asTestValue = asTestValue ;
208
- exports . asObjectiveCClass = asObjectiveCClass ;
209
- exports . asObjectiveCType = asObjectiveCType ;
210
- exports . asStructPropertyName = asStructPropertyName ;
211
- exports . asGetterName = asGetterName ;
212
- exports . commandHasRequiredField = commandHasRequiredField ;
156
+ exports . asObjectiveCBasicType = asObjectiveCBasicType ;
157
+ exports . asObjectiveCNumberType = asObjectiveCNumberType ;
158
+ exports . asTestIndex = asTestIndex ;
159
+ exports . asObjectiveCClass = asObjectiveCClass ;
160
+ exports . asObjectiveCType = asObjectiveCType ;
161
+ exports . asStructPropertyName = asStructPropertyName ;
162
+ exports . asGetterName = asGetterName ;
163
+ exports . commandHasRequiredField = commandHasRequiredField ;
0 commit comments