aboutsummaryrefslogtreecommitdiffstats
path: root/core/control_ping.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/control_ping.go')
-rw-r--r--core/control_ping.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/control_ping.go b/core/control_ping.go
index 904068a..cd447b7 100644
--- a/core/control_ping.go
+++ b/core/control_ping.go
@@ -7,6 +7,16 @@ var (
msgControlPingReply api.Message = new(ControlPingReply)
)
+// SetControlPing sets the control ping message used by core.
+func SetControlPing(m api.Message) {
+ msgControlPing = m
+}
+
+// SetControlPingReply sets the control ping reply message used by core.
+func SetControlPingReply(m api.Message) {
+ msgControlPingReply = m
+}
+
type ControlPing struct{}
func (*ControlPing) GetMessageName() string {
@@ -34,3 +44,8 @@ func (*ControlPingReply) GetCrcString() string {
func (*ControlPingReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
+
+func init() {
+ api.RegisterMessage((*ControlPing)(nil), "ControlPing")
+ api.RegisterMessage((*ControlPingReply)(nil), "ControlPingReply")
+}