This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"log"
|
||||
"reflect"
|
||||
"time"
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"udi/config"
|
||||
"udi/handlers/handler"
|
||||
@ -39,7 +40,7 @@ type PvValue struct {
|
||||
}
|
||||
|
||||
|
||||
func NewPvHandler(config config.HandlerConfigT) *PvHandler {
|
||||
func NewPvHandler(config config.HandlerConfigT) handler.Handler {
|
||||
t := &PvHandler {
|
||||
id: idSeq,
|
||||
}
|
||||
@ -48,6 +49,10 @@ func NewPvHandler(config config.HandlerConfigT) *PvHandler {
|
||||
return t
|
||||
}
|
||||
|
||||
func (self *PvHandler) GetId() string {
|
||||
return fmt.Sprintf("PV%d", self.id)
|
||||
}
|
||||
|
||||
func (self *PvHandler) Handle(message handler.MessageT) {
|
||||
//log.Printf("Handler PV %d processing %s -> %s", self.id, message.Topic, message.Payload)
|
||||
|
||||
|
Reference in New Issue
Block a user