implement Matrix type

add comp,eq factory methods for Matrix type

update address maps
This commit is contained in:
2026-02-07 03:51:47 +00:00
parent 65d20408b1
commit 904e6c02d8
5 changed files with 100 additions and 15 deletions

View File

@@ -24,9 +24,7 @@ func newCompForStrip(c *Client) *Comp {
return &Comp{
client: c,
baseAddress: c.addressMap["strip"],
AddressFunc: func(fmtString string, args ...any) string {
return fmt.Sprintf(fmtString, args...)
},
AddressFunc: fmt.Sprintf,
}
}
@@ -35,9 +33,16 @@ func newCompForBus(c *Client) *Comp {
return &Comp{
client: c,
baseAddress: c.addressMap["bus"],
AddressFunc: func(fmtString string, args ...any) string {
return fmt.Sprintf(fmtString, args...)
},
AddressFunc: fmt.Sprintf,
}
}
// Factory function to create Comp instance for Matrix
func newCompForMatrix(c *Client) *Comp {
return &Comp{
client: c,
baseAddress: c.addressMap["matrix"],
AddressFunc: fmt.Sprintf,
}
}