handover FrmPayload to model parsers too
This commit is contained in:
@ -26,7 +26,7 @@ type message struct {
|
||||
TempC_DS18B20 string `json:"TempC_DS18B20"`
|
||||
}
|
||||
|
||||
func Parse(fPort int, decodedPayload []byte, variables *map[string]database.VariableType, device *database.Device) error {
|
||||
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, device *database.Device) error {
|
||||
if fPort != 2 {
|
||||
return fmt.Errorf("Unexpected fPort %d", fPort)
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ type message struct {
|
||||
Dis2 int `json:"dis2"`
|
||||
}
|
||||
|
||||
func Parse(fPort int, decodedPayload []byte, variables *map[string]database.VariableType, device *database.Device) error {
|
||||
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, device *database.Device) error {
|
||||
if fPort != 2 {
|
||||
return fmt.Errorf("Unexpected fPort %d", fPort)
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ type message struct {
|
||||
Water_SOIL string `json:"water_SOIL"`
|
||||
}
|
||||
|
||||
func Parse(fPort int, decodedPayload []byte, variables *map[string]database.VariableType, device *database.Device) error {
|
||||
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, device *database.Device) error {
|
||||
if fPort != 2 {
|
||||
return fmt.Errorf("Unexpected fPort %d", fPort)
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ type emuMessage1 struct {
|
||||
|
||||
|
||||
|
||||
func Parse(fPort int, decodedPayload []byte, variables *map[string]database.VariableType, _ *database.Device) error {
|
||||
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, _ *database.Device) error {
|
||||
//log.Printf("Parse input: %d, %s", fPort, decodedPayload)
|
||||
switch fPort {
|
||||
case 1:
|
||||
|
Reference in New Issue
Block a user