1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| package msg
|
| import (
| "encoding/json"
| "plc-recorder/config"
| "plc-recorder/logger"
| "plc-recorder/nsqclient"
| )
|
| func SendDeviceLiveData(response *PLCResponse) {
| logger.Debug("plc live data: %+v", response)
| b, _ := json.Marshal(response)
|
| nsqclient.Produce(config.Options.PLCDataTopic, b)
| }
|
|