private void OnPropertiesGet(RawMessage message)
        {
            string requestId = IotUtil.GetRequestId(message.Topic);

            PropsGet propsGet = JsonUtil.ConvertJsonStringToObject <PropsGet>(message.ToString());

            if (propsGet == null)
            {
                return;
            }

            if (propertyListener != null && (propsGet.deviceId == null || propsGet.deviceId == this.deviceId))
            {
                propertyListener.OnPropertiesGet(requestId, propsGet.serviceId);

                return;
            }

            device.OnPropertiesGet(requestId, propsGet);
        }
        public void OnCommand(RawMessage message)
        {
            string requestId = IotUtil.GetRequestId(message.Topic);

            Command command = JsonUtil.ConvertJsonStringToObject <Command>(message.ToString());

            if (command == null)
            {
                Log.Error("invalid command");

                return;
            }

            if (commandListener != null && (command.deviceId == null || command.deviceId == deviceId))
            {
                commandListener.OnCommand(requestId, command.serviceId, command.commandName, command.paras);

                return;
            }

            device.OnCommand(requestId, command);
        }
        private void OnShadowCommand(RawMessage message)
        {
            string requestId = IotUtil.GetRequestId(message.Topic);

            deviceShadowListener.OnShadowCommand(requestId, message.Payload);
        }