aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen/go_reply.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/xgbgen/go_reply.go')
-rw-r--r--nexgb/xgbgen/go_reply.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/nexgb/xgbgen/go_reply.go b/nexgb/xgbgen/go_reply.go
new file mode 100644
index 0000000..e561d9c
--- /dev/null
+++ b/nexgb/xgbgen/go_reply.go
@@ -0,0 +1,19 @@
+package main
+
+func (r *Request) Define(c *Context) {
+ c.Putln("// Request %s", r.SrcName())
+ c.Putln("// size: %s", r.Size(c))
+ c.Putln("")
+ if r.Reply != nil {
+ c.Putln("// Request reply for %s", r.SrcName())
+ c.Putln("// size: %s", r.Reply.Size())
+ c.Putln("type %s struct {", r.ReplyName())
+ c.Putln("Sequence uint16")
+ for _, field := range r.Reply.Fields {
+ field.Define(c)
+ }
+ c.Putln("}")
+ c.Putln("")
+ }
+}
+