diff --git a/iot_device.go b/iot_device.go index 365e488..31a8e6d 100644 --- a/iot_device.go +++ b/iot_device.go @@ -636,6 +636,10 @@ func (device *iotDevice) SetPropertyQueryHandler(handler DevicePropertyQueryHand } 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.Id = id device.Password = password @@ -645,7 +649,7 @@ func CreateIotDevice(id, password, servers string) Device { device.fileUrls = map[string]string{} - device.qos = 0 + device.qos = qos return device }