public MqttService(ILogger <MqttService> logger) { this.logger = logger; mQTTTran = new MQTTTranData(Program.configInfo.ClientId, Program.configInfo.MQTTerver, Program.configInfo.MQTTPort, Program.configInfo.MQTTUsr, Program.configInfo.MQTTPsw); mQTTTran.OnGetData += MQTTTran_OnGetData; mQTTTran.SubTopic(new string[] { "" }); mQTTTran.Connect(); this.bus = new BusClient(); this.bus.Subscribe(BusOption.CONFIG_CHANGE); this.bus.OnReceived += Bus_OnReceived; }