aboutsummaryrefslogtreecommitdiff
path: root/parse/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'parse/parse.go')
-rw-r--r--parse/parse.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/parse/parse.go b/parse/parse.go
index 3d74e58..f8ad251 100644
--- a/parse/parse.go
+++ b/parse/parse.go
@@ -41,7 +41,11 @@ func main() {
if err != nil {
fmt.Println(err)
}
- if opcode == csta.SystemStatusOpcode {
+ if m, ok := csta.Modules[opcode]; ok {
+ fmt.Println("Opcode:", m)
+ }
+ switch opcode {
+ case csta.SystemStatusOpcode:
ss := &csta.SystemStatusArg{}
asn1.Unmarshal(buf, ss)
fmt.Println("Status", ss.SystemStatus)
@@ -52,7 +56,10 @@ func main() {
}
fmt.Printf("%x\n", s)
fmt.Printf("%x\n", res)
- } else {
+ case csta.EscapeServiceOpcode:
+ fmt.Println("Escape")
+ fallthrough
+ default:
unmarshal(s, &rose.Invoke{})
}
case 0xa2: