handler stuff

This commit is contained in:
2023-11-27 15:21:28 +01:00
parent a1fbdb7677
commit a862b4bc2d
5 changed files with 55 additions and 5 deletions

View File

@ -0,0 +1,23 @@
package ttn
import "log"
var idSeq int = 0
type TTNHandler struct {
id int
}
func NewTTNHandler() *TTNHandler {
t := &TTNHandler {
id: idSeq,
}
idSeq += 1
return t
}
func (self *TTNHandler) Handle(topic, payload string) {
log.Printf("Handler TTN %d processing %s -> %s", self.id, topic, payload)
}