From 885df8059cb2886a1d1c2a41fda8a6f3bbe39ef4 Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Thu, 14 Feb 2019 20:59:54 +0100 Subject: [PATCH] Removing the folders that are now repositories --- ConnectorDataMqtt/ConnectorDataMqtt.sln | 37 --------- .../ConnectorDataMqtt.csproj | 51 ------------ ConnectorDataMqtt/ConnectorDataMqtt/Mqtt.cs | 83 ------------------- .../Properties/AssemblyInfo.cs | 36 -------- 4 files changed, 207 deletions(-) delete mode 100644 ConnectorDataMqtt/ConnectorDataMqtt.sln delete mode 100644 ConnectorDataMqtt/ConnectorDataMqtt/ConnectorDataMqtt.csproj delete mode 100644 ConnectorDataMqtt/ConnectorDataMqtt/Mqtt.cs delete mode 100644 ConnectorDataMqtt/ConnectorDataMqtt/Properties/AssemblyInfo.cs diff --git a/ConnectorDataMqtt/ConnectorDataMqtt.sln b/ConnectorDataMqtt/ConnectorDataMqtt.sln deleted file mode 100644 index ebca17e..0000000 --- a/ConnectorDataMqtt/ConnectorDataMqtt.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectorDataMqtt", "ConnectorDataMqtt\ConnectorDataMqtt.csproj", "{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT.csproj", "{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2Mqtt_4.7.1", "..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj", "{A11AEF5A-B246-4FE8-8330-06DB73CC8074}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Release|Any CPU.Build.0 = Release|Any CPU - {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.Build.0 = Release|Any CPU - {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B90F7B1F-FDD8-4B59-AAA5-218655C2716C} - EndGlobalSection -EndGlobal diff --git a/ConnectorDataMqtt/ConnectorDataMqtt/ConnectorDataMqtt.csproj b/ConnectorDataMqtt/ConnectorDataMqtt/ConnectorDataMqtt.csproj deleted file mode 100644 index 975113d..0000000 --- a/ConnectorDataMqtt/ConnectorDataMqtt/ConnectorDataMqtt.csproj +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Debug - AnyCPU - {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2} - Library - Properties - BlubbFish.Utils.IoT.Connector.Data - ConnectorDataMqtt - v4.7.1 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - {a11aef5a-b246-4fe8-8330-06db73cc8074} - M2Mqtt_4.7.1 - - - {b870e4d5-6806-4a0b-b233-8907eedc5afc} - Utils-IoT - - - - - - - \ No newline at end of file diff --git a/ConnectorDataMqtt/ConnectorDataMqtt/Mqtt.cs b/ConnectorDataMqtt/ConnectorDataMqtt/Mqtt.cs deleted file mode 100644 index 0ebd821..0000000 --- a/ConnectorDataMqtt/ConnectorDataMqtt/Mqtt.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using BlubbFish.Utils.IoT.Events; -using uPLibrary.Networking.M2Mqtt; -using uPLibrary.Networking.M2Mqtt.Messages; - -namespace BlubbFish.Utils.IoT.Connector.Data { - public class Mqtt : ADataBackend, IDisposable { - private MqttClient client; - - public Mqtt(Dictionary settings) : base(settings) { - Int32 port = 1883; - if(this.settings.ContainsKey("port")) { - port = Int32.Parse(this.settings["port"]); - } - this.client = new MqttClient(this.settings["server"], port, false, null, null, MqttSslProtocols.None); - Connect(); - } - - private void Connect() { - this.client.MqttMsgPublishReceived += this.Client_MqttMsgPublishReceived; - if (this.settings.ContainsKey("user") && this.settings.ContainsKey("pass")) { - this.client.Connect(Guid.NewGuid().ToString(), this.settings["user"], this.settings["pass"]); - } else { - this.client.Connect(Guid.NewGuid().ToString()); - } - if (this.settings.ContainsKey("topic")) { - Int32 l = this.settings["topic"].Split(';').Length; - Byte[] qos = new Byte[l]; - for (Int32 i = 0; i < qos.Length; i++) { - qos[i] = MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE; - } - this.client.Subscribe(this.settings["topic"].Split(';'), qos); - } else { - this.client.Subscribe(new String[] { "#" }, new Byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE }); - } - } - - private void Client_MqttMsgPublishReceived(Object sender, MqttMsgPublishEventArgs e) { - this.NotifyClientIncomming(new DataEvent(Encoding.UTF8.GetString(e.Message), e.Topic, DateTime.Now)); - } - - public override void Send(String topic, String data) { - this.client.Publish(topic, Encoding.UTF8.GetBytes(data)); - this.NotifyClientSending(new DataEvent(data, topic, DateTime.Now)); - } - - #region IDisposable Support - private Boolean disposedValue = false; - - public override Boolean IsConnected { - get { - if(this.client != null) { - return this.client.IsConnected; - } else { - return false; - } - } - } - - protected virtual void Dispose(Boolean disposing) { - if(!this.disposedValue) { - if(disposing) {try { - this.client.MqttMsgPublishReceived -= this.Client_MqttMsgPublishReceived; - this.client.Unsubscribe(new String[] { "#" }); - this.client.Disconnect(); - } catch (Exception) { } - } - - this.client = null; - - this.disposedValue = true; - } - } - - public override void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - #endregion - } -} diff --git a/ConnectorDataMqtt/ConnectorDataMqtt/Properties/AssemblyInfo.cs b/ConnectorDataMqtt/ConnectorDataMqtt/Properties/AssemblyInfo.cs deleted file mode 100644 index d73f1be..0000000 --- a/ConnectorDataMqtt/ConnectorDataMqtt/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die einer Assembly zugeordnet sind. -[assembly: AssemblyTitle("ConnectorDataMqtt")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ConnectorDataMqtt")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly -// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von -// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("ee6c8f68-ed46-4c1c-abdd-cfcdf75104f2")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, -// indem Sie "*" wie unten gezeigt eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")]