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