Skip to content

Commit 2e9d4ab

Browse files
committed
Support command response
1 parent 374f0a1 commit 2e9d4ab

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

errata/sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ type SDKType struct {
109109
Quality string `yaml:"quality,omitempty"`
110110
Access string `yaml:"access,omitempty"`
111111
Direction string `yaml:"direction,omitempty"`
112+
Response string `yaml:"response,omitempty"`
112113
FabricScoping string `yaml:"fabric-scoping,omitempty"`
113114

114115
Attributes map[string]*SDKType `yaml:"attributes,omitempty"`

sdk/errata.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func applyErrataToCommand(st *matter.Command, typeNames map[string]string, typeO
7070
if override.Conformance != "" {
7171
st.Conformance = conformance.ParseConformance(override.Conformance)
7272
}
73+
if override.Response != "" {
74+
st.Response = types.ParseDataType(override.Response, types.DataTypeRankScalar)
75+
}
7376
applyErrataToFields(st.Fields, override)
7477
}
7578
st.Name = applyTypeName(typeNames, st.Name)

sdk/extra.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ func addExtraCommands(cluster *matter.Cluster, extra *errata.SDKType) {
214214
command.Direction = matter.InterfaceServer
215215
}
216216
}
217+
if cmd.Response != "" {
218+
command.Response = types.ParseDataType(cmd.Response, types.DataTypeRankScalar)
219+
}
217220
for i, f := range cmd.Fields {
218221
field := matter.NewField(nil, command, types.EntityTypeCommandField)
219222
field.Name = f.Name

0 commit comments

Comments
 (0)