Browse Source

IDataTrace添加GetDeviceId

dev v0.0.9
yfh 7 months ago
parent
commit
5522c8be5b
  1. 4
      IotaData.go
  2. 5
      aggData.go
  3. 2
      dataTrace.go

4
IotaData.go

@ -70,3 +70,7 @@ func (the *IotaData) R() string {
func (the *IotaData) GetThingId() string {
return the.ThingId
}
func (the *IotaData) GetDeviceId() string {
return the.DeviceId
}

5
aggData.go

@ -33,6 +33,11 @@ func (the *AggData) GetThingId() string {
return the.ThingId
}
// GetDeviceId 功能未实现的功能,会返回“”,只是未了实现接口 IDataTrace
func (the *AggData) GetDeviceId() string {
return "unknown"
}
var typeDict = map[int]string{
2001: "d",
2002: "w",

2
dataTrace.go

@ -13,4 +13,6 @@ type IDataTrace interface {
R() string
GetThingId() string
GetDeviceId() string
}

Loading…
Cancel
Save