move Iot to Iot-Interfaces
This commit is contained in:
		
							parent
							
								
									cc8ae919fd
								
							
						
					
					
						commit
						be9a8b640b
					
				| @ -1,20 +1,20 @@ | |||||||
| using System; | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
| using System.Linq; | using System.Linq; | ||||||
| using System.Text; | using System.Text; | ||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| 
 | 
 | ||||||
| namespace BlubbFish.Utils.IoT.Interfaces { | namespace BlubbFish.Utils.IoT.Interfaces { | ||||||
|   public interface IMqtt { |   public interface IMqtt { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Gibt einen JSON-String der Eigenschaften eines Objekts zurück |     /// Gibt einen JSON-String der Eigenschaften eines Objekts zurück | ||||||
|     /// </summary> |     /// </summary> | ||||||
|     /// <returns>JSON-String</returns> |     /// <returns>JSON-String</returns> | ||||||
|     String ToJson(); |     String ToJson(); | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Gibt das MQTT-Topic als String zurück unter dem die Daten des Objekts Publiziert werden sollen |     /// Gibt das MQTT-Topic als String zurück unter dem die Daten des Objekts Publiziert werden sollen | ||||||
|     /// </summary> |     /// </summary> | ||||||
|     /// <returns>MQTT-Topic</returns> |     /// <returns>MQTT-Topic</returns> | ||||||
|     String MqttTopic(); |     String MqttTopic(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -1,20 +1,20 @@ | |||||||
| using System; | using System; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
| using System.Linq; | using System.Linq; | ||||||
| using System.Text; | using System.Text; | ||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| 
 | 
 | ||||||
| namespace BlubbFish.Utils.IoT.Interfaces { | namespace BlubbFish.Utils.IoT.Interfaces { | ||||||
|   public interface ISenml { |   public interface ISenml { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Gibt einen Senml-JSON-String der Eigenschaften eines Objekts zurück |     /// Gibt einen Senml-JSON-String der Eigenschaften eines Objekts zurück | ||||||
|     /// </summary> |     /// </summary> | ||||||
|     /// <returns>Senml-JSON-String</returns> |     /// <returns>Senml-JSON-String</returns> | ||||||
|     String ToSenml(); |     String ToSenml(); | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Gibt das Senml-Topic als String zurück unter dem die Daten des Objekts Publiziert werden sollen |     /// Gibt das Senml-Topic als String zurück unter dem die Daten des Objekts Publiziert werden sollen | ||||||
|     /// </summary> |     /// </summary> | ||||||
|     /// <returns>Senml-Topic</returns> |     /// <returns>Senml-Topic</returns> | ||||||
|     String SenmlTopic(); |     String SenmlTopic(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -1,50 +1,50 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||||
|   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||||||
|     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||||||
|     <ProjectGuid>{4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}</ProjectGuid> |     <ProjectGuid>{4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}</ProjectGuid> | ||||||
|     <OutputType>Library</OutputType> |     <OutputType>Library</OutputType> | ||||||
|     <AppDesignerFolder>Properties</AppDesignerFolder> |     <AppDesignerFolder>Properties</AppDesignerFolder> | ||||||
|     <RootNamespace>BlubbFish.Utils.IoT.Interfaces</RootNamespace> |     <RootNamespace>BlubbFish.Utils.IoT.Interfaces</RootNamespace> | ||||||
|     <AssemblyName>Iot-Interfaces</AssemblyName> |     <AssemblyName>Iot-Interfaces</AssemblyName> | ||||||
|     <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> |     <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> | ||||||
|     <FileAlignment>512</FileAlignment> |     <FileAlignment>512</FileAlignment> | ||||||
|     <TargetFrameworkProfile /> |     <TargetFrameworkProfile /> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||||||
|     <DebugSymbols>true</DebugSymbols> |     <DebugSymbols>true</DebugSymbols> | ||||||
|     <DebugType>full</DebugType> |     <DebugType>full</DebugType> | ||||||
|     <Optimize>false</Optimize> |     <Optimize>false</Optimize> | ||||||
|     <OutputPath>bin\Debug\</OutputPath> |     <OutputPath>bin\Debug\</OutputPath> | ||||||
|     <DefineConstants>DEBUG;TRACE</DefineConstants> |     <DefineConstants>DEBUG;TRACE</DefineConstants> | ||||||
|     <ErrorReport>prompt</ErrorReport> |     <ErrorReport>prompt</ErrorReport> | ||||||
|     <WarningLevel>4</WarningLevel> |     <WarningLevel>4</WarningLevel> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||||||
|     <DebugType>pdbonly</DebugType> |     <DebugType>pdbonly</DebugType> | ||||||
|     <Optimize>true</Optimize> |     <Optimize>true</Optimize> | ||||||
|     <OutputPath>bin\Release\</OutputPath> |     <OutputPath>bin\Release\</OutputPath> | ||||||
|     <DefineConstants>TRACE</DefineConstants> |     <DefineConstants>TRACE</DefineConstants> | ||||||
|     <ErrorReport>prompt</ErrorReport> |     <ErrorReport>prompt</ErrorReport> | ||||||
|     <WarningLevel>4</WarningLevel> |     <WarningLevel>4</WarningLevel> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <Reference Include="System" /> |     <Reference Include="System" /> | ||||||
|     <Reference Include="System.Core" /> |     <Reference Include="System.Core" /> | ||||||
|     <Reference Include="System.Xml.Linq" /> |     <Reference Include="System.Xml.Linq" /> | ||||||
|     <Reference Include="System.Data.DataSetExtensions" /> |     <Reference Include="System.Data.DataSetExtensions" /> | ||||||
|     <Reference Include="Microsoft.CSharp" /> |     <Reference Include="Microsoft.CSharp" /> | ||||||
|     <Reference Include="System.Data" /> |     <Reference Include="System.Data" /> | ||||||
|     <Reference Include="System.Net.Http" /> |     <Reference Include="System.Net.Http" /> | ||||||
|     <Reference Include="System.Xml" /> |     <Reference Include="System.Xml" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <Compile Include="ISenml.cs" /> |     <Compile Include="ISenml.cs" /> | ||||||
|     <Compile Include="IMqtt.cs" /> |     <Compile Include="IMqtt.cs" /> | ||||||
|     <Compile Include="Language\Senml.cs" /> |     <Compile Include="Language\Senml.cs" /> | ||||||
|     <Compile Include="Properties\AssemblyInfo.cs" /> |     <Compile Include="Properties\AssemblyInfo.cs" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||||||
| </Project> | </Project> | ||||||
| @ -1,62 +1,62 @@ | |||||||
| using System; | using System; | ||||||
| using System.ComponentModel; | using System.ComponentModel; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace BlubbFish.Utils.IoT.Interfaces.Language { | namespace BlubbFish.Utils.IoT.Interfaces.Language { | ||||||
|   public abstract class Senml { |   public abstract class Senml { | ||||||
|     #pragma warning disable IDE1006 // Benennungsstile |     #pragma warning disable IDE1006 // Benennungsstile | ||||||
|     public String n { get; } |     public String n { get; } | ||||||
|     public String u { get; } |     public String u { get; } | ||||||
|     public Int32 t { get; } |     public Int32 t { get; } | ||||||
|     #pragma warning restore IDE1006 // Benennungsstile |     #pragma warning restore IDE1006 // Benennungsstile | ||||||
| 
 | 
 | ||||||
|     public enum Units { |     public enum Units { | ||||||
|       [Description("%")] |       [Description("%")] | ||||||
|       Percent, |       Percent, | ||||||
|       [Description("count")] |       [Description("count")] | ||||||
|       CounterValue, |       CounterValue, | ||||||
|       [Description("W")] |       [Description("W")] | ||||||
|       Watt, |       Watt, | ||||||
|       [Description("J")] |       [Description("J")] | ||||||
|       Joule, |       Joule, | ||||||
|       [Description("Cel")] |       [Description("Cel")] | ||||||
|       Celsius, |       Celsius, | ||||||
|       [Description("lx")] |       [Description("lx")] | ||||||
|       Lux |       Lux | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public Senml(String name, Units unit) { |     public Senml(String name, Units unit) { | ||||||
|       this.n = name; |       this.n = name; | ||||||
|       this.u = this.GetEnumDescription(unit); |       this.u = this.GetEnumDescription(unit); | ||||||
|       this.t = 0; |       this.t = 0; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     private String GetEnumDescription(Enum value) { |     private String GetEnumDescription(Enum value) { | ||||||
|       FieldInfo fi = value.GetType().GetField(value.ToString()); |       FieldInfo fi = value.GetType().GetField(value.ToString()); | ||||||
| 
 | 
 | ||||||
|       DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); |       DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); | ||||||
| 
 | 
 | ||||||
|       if (attributes != null && attributes.Length > 0) { |       if (attributes != null && attributes.Length > 0) { | ||||||
|         return attributes[0].Description; |         return attributes[0].Description; | ||||||
|       } else { |       } else { | ||||||
|         return value.ToString(); |         return value.ToString(); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   public class SenmlBool : Senml { |   public class SenmlBool : Senml { | ||||||
|     #pragma warning disable IDE1006 // Benennungsstile |     #pragma warning disable IDE1006 // Benennungsstile | ||||||
|     public Boolean bv { get; } |     public Boolean bv { get; } | ||||||
|     #pragma warning restore IDE1006 // Benennungsstile |     #pragma warning restore IDE1006 // Benennungsstile | ||||||
|     public SenmlBool(String name, Units unit, Boolean level) : base(name, unit) { |     public SenmlBool(String name, Units unit, Boolean level) : base(name, unit) { | ||||||
|       this.bv = level; |       this.bv = level; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   public class SenmlDouble : Senml { |   public class SenmlDouble : Senml { | ||||||
|     #pragma warning disable IDE1006 // Benennungsstile |     #pragma warning disable IDE1006 // Benennungsstile | ||||||
|     public Double v { get; } |     public Double v { get; } | ||||||
|     #pragma warning restore IDE1006 // Benennungsstile |     #pragma warning restore IDE1006 // Benennungsstile | ||||||
|     public SenmlDouble(String name, Units unit, Double level) : base(name, unit) { |     public SenmlDouble(String name, Units unit, Double level) : base(name, unit) { | ||||||
|       this.v = level; |       this.v = level; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -1,36 +1,36 @@ | |||||||
| using System.Reflection; | using System.Reflection; | ||||||
| using System.Runtime.CompilerServices; | using System.Runtime.CompilerServices; | ||||||
| using System.Runtime.InteropServices; | using System.Runtime.InteropServices; | ||||||
| 
 | 
 | ||||||
| // Allgemeine Informationen über eine Assembly werden über die folgenden | // Allgemeine Informationen über eine Assembly werden über die folgenden | ||||||
| // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, | ||||||
| // die einer Assembly zugeordnet sind. | // die einer Assembly zugeordnet sind. | ||||||
| [assembly: AssemblyTitle("Iot-Interfaces")] | [assembly: AssemblyTitle("Iot-Interfaces")] | ||||||
| [assembly: AssemblyDescription("Interfaces for IoT-Stuff")] | [assembly: AssemblyDescription("Interfaces for IoT-Stuff")] | ||||||
| [assembly: AssemblyConfiguration("")] | [assembly: AssemblyConfiguration("")] | ||||||
| [assembly: AssemblyCompany("BlubbFish")] | [assembly: AssemblyCompany("BlubbFish")] | ||||||
| [assembly: AssemblyProduct("Iot-Interfaces")] | [assembly: AssemblyProduct("Iot-Interfaces")] | ||||||
| [assembly: AssemblyCopyright("Copyright ©  2018 - 02.05.2018")] | [assembly: AssemblyCopyright("Copyright ©  2018 - 02.05.2018")] | ||||||
| [assembly: AssemblyTrademark("BlubbFish")] | [assembly: AssemblyTrademark("BlubbFish")] | ||||||
| [assembly: AssemblyCulture("")] | [assembly: AssemblyCulture("")] | ||||||
| 
 | 
 | ||||||
| // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly | // 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 | // 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. | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. | ||||||
| [assembly: ComVisible(false)] | [assembly: ComVisible(false)] | ||||||
| 
 | 
 | ||||||
| // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird | ||||||
| [assembly: Guid("4daada29-c600-4cf3-8ad3-9c97c8d7f632")] | [assembly: Guid("4daada29-c600-4cf3-8ad3-9c97c8d7f632")] | ||||||
| 
 | 
 | ||||||
| // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: | ||||||
| // | // | ||||||
| //      Hauptversion | //      Hauptversion | ||||||
| //      Nebenversion | //      Nebenversion | ||||||
| //      Buildnummer | //      Buildnummer | ||||||
| //      Revision | //      Revision | ||||||
| // | // | ||||||
| // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, | ||||||
| // indem Sie "*" wie unten gezeigt eingeben: | // indem Sie "*" wie unten gezeigt eingeben: | ||||||
| // [assembly: AssemblyVersion("1.0.*")] | // [assembly: AssemblyVersion("1.0.*")] | ||||||
| [assembly: AssemblyVersion("1.0.0.0")] | [assembly: AssemblyVersion("1.0.0.0")] | ||||||
| [assembly: AssemblyFileVersion("1.0.0.0")] | [assembly: AssemblyFileVersion("1.0.0.0")] | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user