handler stuff
This commit is contained in:
23
src/udi/handlers/ttn/ttn.go
Normal file
23
src/udi/handlers/ttn/ttn.go
Normal 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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user