新增测试模块

This commit is contained in:
boyce
2019-09-23 14:38:44 +08:00
parent 6e1ccc9a36
commit 9623cd2735
11 changed files with 298 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package main
import (
"github.com/duanhf2012/origin/originnode"
"github.com/duanhf2012/origin/service"
)
type SubNet1_Service2 struct {
service.BaseService
}
func init() {
originnode.InitService(&SubNet1_Service2{})
}
//OnInit ...
func (ws *SubNet1_Service2) OnInit() error {
return nil
}
//OnRun ...
func (ws *SubNet1_Service2) OnRun() bool {
return false
}
func (slf *SubNet1_Service2) RPC_Sub(arg *InputData, ret *int) error {
*ret = arg.A1 - arg.A2
return nil
}