[NF] Filter topics if usefull
This commit is contained in:
parent
6e077355da
commit
f57af3c45a
@ -17,6 +17,7 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
|||||||
this.message = "";
|
this.message = "";
|
||||||
this.p = new Process();
|
this.p = new Process();
|
||||||
this.p.StartInfo.FileName = "mosquitto_sub";
|
this.p.StartInfo.FileName = "mosquitto_sub";
|
||||||
|
String topic = "#";
|
||||||
String args = "-h " + this.settings["server"]+" ";
|
String args = "-h " + this.settings["server"]+" ";
|
||||||
if(this.settings.ContainsKey("port")) {
|
if(this.settings.ContainsKey("port")) {
|
||||||
args += "-p "+ this.settings["port"]+" ";
|
args += "-p "+ this.settings["port"]+" ";
|
||||||
@ -30,7 +31,10 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
|||||||
if (this.settings.ContainsKey("key")) {
|
if (this.settings.ContainsKey("key")) {
|
||||||
args += "--key " + this.settings["key"] + " ";
|
args += "--key " + this.settings["key"] + " ";
|
||||||
}
|
}
|
||||||
this.p.StartInfo.Arguments = args+"-t \"#\" -v -d";
|
if(this.settings.ContainsKey("topic")) {
|
||||||
|
topic = this.settings["topic"];
|
||||||
|
}
|
||||||
|
this.p.StartInfo.Arguments = args+"-t \""+ topic + "\" -v -d";
|
||||||
this.p.StartInfo.CreateNoWindow = true;
|
this.p.StartInfo.CreateNoWindow = true;
|
||||||
this.p.StartInfo.UseShellExecute = false;
|
this.p.StartInfo.UseShellExecute = false;
|
||||||
this.p.StartInfo.RedirectStandardOutput = true;
|
this.p.StartInfo.RedirectStandardOutput = true;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user