Skip to content

Commit a4c734d

Browse files
committed
Fix Zap branch on main
1 parent 5a4de35 commit a4c734d

5 files changed

Lines changed: 10 additions & 20 deletions

File tree

matter/bitmap.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,6 @@ func (bs BitSet) Identifier(name string) (types.Entity, bool) {
341341
return nil, false
342342
}
343343

344-
func (bs BitSet) Iterate() iter.Seq[types.Entity] {
345-
return func(yield func(types.Entity) bool) {
346-
for _, b := range bs {
347-
if !yield(b) {
348-
return
349-
}
350-
}
351-
}
352-
}
353-
354344
type AnonymousBitmap struct {
355345
entity
356346
Type *types.DataType `json:"type,omitempty"`

zap/regen/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func commandFieldsHelper(spec *spec.Specification) func(matter.Command, *raymond
4040
return func(cmd matter.Command, options *raymond.Options) raymond.SafeString {
4141
fields := filterEntities(cmd.Fields)
4242
if cmd.Access.FabricSensitivity == matter.FabricSensitivitySensitive {
43-
fields = append(fields, &matter.Field{ID: matter.NewNumber(254), Name: "FabricIndex", Type: types.NewDataType(types.BaseDataTypeFabricIndex, false), Conformance: conformance.Set{&conformance.Mandatory{}}})
43+
fields = append(fields, &matter.Field{ID: matter.NewNumber(254), Name: "FabricIndex", Type: types.NewDataType(types.BaseDataTypeFabricIndex, types.DataTypeRankScalar), Conformance: conformance.Set{&conformance.Mandatory{}}})
4444
}
4545
return enumerateEntitiesHelper(fields, spec, options)
4646
}

zap/regen/field.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func structFieldsHelper(spec *spec.Specification) func(s matter.Struct, options
4545
return func(s matter.Struct, options *raymond.Options) raymond.SafeString {
4646
fields := filterEntities(s.Fields)
4747
if s.FabricScoping == matter.FabricScopingScoped {
48-
fabricIndex := &matter.Field{ID: matter.NewNumber(254), Name: "FabricIndex", Type: types.NewDataType(types.BaseDataTypeFabricIndex, false), Conformance: conformance.Set{&conformance.Mandatory{}}}
48+
fabricIndex := &matter.Field{ID: matter.NewNumber(254), Name: "FabricIndex", Type: types.NewDataType(types.BaseDataTypeFabricIndex, types.DataTypeRankScalar), Conformance: conformance.Set{&conformance.Mandatory{}}}
4949
fabricIndex.SetParent(&s)
5050
fields = append(fields, fabricIndex)
5151
}
@@ -57,7 +57,7 @@ func eventFieldsHelper(spec *spec.Specification) func(e matter.Event, options *r
5757
return func(e matter.Event, options *raymond.Options) raymond.SafeString {
5858
fields := filterEntities(e.Fields)
5959
if e.Access.FabricSensitivity == matter.FabricSensitivitySensitive {
60-
fabricIndex := &matter.Field{ID: matter.NewNumber(254), Name: "FabricIndex", Type: types.NewDataType(types.BaseDataTypeFabricIndex, false), Conformance: conformance.Set{&conformance.Mandatory{}}}
60+
fabricIndex := &matter.Field{ID: matter.NewNumber(254), Name: "FabricIndex", Type: types.NewDataType(types.BaseDataTypeFabricIndex, types.DataTypeRankScalar), Conformance: conformance.Set{&conformance.Mandatory{}}}
6161
fabricIndex.SetParent(&e)
6262

6363
fields = append(fields, fabricIndex)

zap/regen/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func maxValue(field matter.Field, fs matter.FieldSet) (max types.DataTypeExtreme
144144

145145
var maxDueToNullable bool
146146
if hasNumericMax {
147-
maxDueToNullable = types.Max(sdk.ToUnderlyingType(sdk.FindBaseType(field.Type)), true).ValueEquals(max)
147+
maxDueToNullable = types.Max(sdk.ToUnderlyingType(sdk.FindBaseType(field.Type)), types.NullabilityNullable).ValueEquals(max)
148148
}
149149
if maxDueToNullable {
150150
return

zap/regen/render.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,35 @@ func NewIdlRenderer(spec *spec.Specification) (IdlRenderer, error) {
3434
&matter.Field{
3535
Name: "GeneratedCommandList",
3636
ID: matter.NewNumber(65528),
37-
Type: types.NewDataType(types.BaseDataTypeCommandID, true),
37+
Type: types.NewDataType(types.BaseDataTypeCommandID, types.DataTypeRankList),
3838
Access: matter.Access{Read: matter.PrivilegeView},
3939
Conformance: conformance.Set{&conformance.Mandatory{}},
4040
},
4141
&matter.Field{
4242
Name: "AcceptedCommandList",
4343
ID: matter.NewNumber(65529),
44-
Type: types.NewDataType(types.BaseDataTypeCommandID, true),
44+
Type: types.NewDataType(types.BaseDataTypeCommandID, types.DataTypeRankList),
4545
Access: matter.Access{Read: matter.PrivilegeView},
4646
Conformance: conformance.Set{&conformance.Mandatory{}},
4747
},
4848
&matter.Field{
4949
Name: "AttributeList",
5050
ID: matter.NewNumber(65531),
51-
Type: types.NewDataType(types.BaseDataTypeAttributeID, true),
51+
Type: types.NewDataType(types.BaseDataTypeAttributeID, types.DataTypeRankList),
5252
Access: matter.Access{Read: matter.PrivilegeView},
5353
Conformance: conformance.Set{&conformance.Mandatory{}},
5454
},
5555
&matter.Field{
5656
Name: "FeatureMap",
5757
ID: matter.NewNumber(65532),
58-
Type: types.NewDataType(types.BaseDataTypeMap32, false),
58+
Type: types.NewDataType(types.BaseDataTypeMap32, types.DataTypeRankScalar),
5959
Access: matter.Access{Read: matter.PrivilegeView},
6060
Conformance: conformance.Set{&conformance.Mandatory{}},
6161
},
6262
&matter.Field{
6363
Name: "ClusterRevision",
6464
ID: matter.NewNumber(65533),
65-
Type: types.NewDataType(types.BaseDataTypeUInt16, false),
65+
Type: types.NewDataType(types.BaseDataTypeUInt16, types.DataTypeRankScalar),
6666
Access: matter.Access{Read: matter.PrivilegeView},
6767
Conformance: conformance.Set{&conformance.Mandatory{}},
6868
},
@@ -194,7 +194,7 @@ func (p IdlRenderer) Process(cxt context.Context, input *pipeline.Data[*zap.File
194194
for fieldName, ns := range namespaces {
195195
en := matter.NewEnum(ns.Source(), ns.Parent())
196196
en.Name = fieldName + "Tag"
197-
en.Type = types.NewDataType(types.BaseDataTypeEnum8, false)
197+
en.Type = types.NewDataType(types.BaseDataTypeEnum8, types.DataTypeRankScalar)
198198
for _, tag := range ns.SemanticTags {
199199
nst := matter.NewEnumValue(tag.Source(), ns)
200200
nst.Name = tag.Name

0 commit comments

Comments
 (0)