#1 support client define qos

This commit is contained in:
ctlove0523 2021-02-26 18:59:35 +08:00
parent 3ecc09d3b4
commit 2181695565
1 changed files with 5 additions and 1 deletions

View File

@ -636,6 +636,10 @@ func (device *iotDevice) SetPropertyQueryHandler(handler DevicePropertyQueryHand
} }
func CreateIotDevice(id, password, servers string) Device { func CreateIotDevice(id, password, servers string) Device {
return CreateIotDeviceWithQos(id, password, servers, 0)
}
func CreateIotDeviceWithQos(id, password, servers string, qos byte) Device {
device := &iotDevice{} device := &iotDevice{}
device.Id = id device.Id = id
device.Password = password device.Password = password
@ -645,7 +649,7 @@ func CreateIotDevice(id, password, servers string) Device {
device.fileUrls = map[string]string{} device.fileUrls = map[string]string{}
device.qos = 0 device.qos = qos
return device return device
} }