代码重构
This commit is contained in:
parent
4120bf44f9
commit
78ee43d54d
|
@ -36,6 +36,7 @@ type Gateway interface {
|
||||||
type Device interface {
|
type Device interface {
|
||||||
Gateway
|
Gateway
|
||||||
Init() bool
|
Init() bool
|
||||||
|
DisConnect()
|
||||||
IsConnected() bool
|
IsConnected() bool
|
||||||
SendMessage(message Message) bool
|
SendMessage(message Message) bool
|
||||||
ReportProperties(properties ServiceProperty) bool
|
ReportProperties(properties ServiceProperty) bool
|
||||||
|
@ -64,6 +65,9 @@ type iotDevice struct {
|
||||||
fileUrls map[string]string
|
fileUrls map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (device *iotDevice) DisConnect() () {
|
||||||
|
device.client.Disconnect(0)
|
||||||
|
}
|
||||||
func (device *iotDevice) SyncAllVersionSubDevices() {
|
func (device *iotDevice) SyncAllVersionSubDevices() {
|
||||||
dataEntry := DataEntry{
|
dataEntry := DataEntry{
|
||||||
ServiceId: "$sub_device_manager",
|
ServiceId: "$sub_device_manager",
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue