diff --git a/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13.cs b/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13.cs index 40cabfe4..69e38914 100644 --- a/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13.cs +++ b/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13.cs @@ -1,16 +1,10 @@ +using DotNetSiemensPLCToolBoxLibrary.General; +using Microsoft.Win32; using System; -using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; using System.Xml; -using DotNetSiemensPLCToolBoxLibrary.General; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs; -using Microsoft.Win32; namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles { diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/AttribSets/CoreAttributes.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/AttribSets/CoreAttributes.cs deleted file mode 100644 index f0263f8c..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/AttribSets/CoreAttributes.cs +++ /dev/null @@ -1,49 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; - -//namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.AttribSets -//{ -// public class CoreAttributes -// { -// private string Author { get; set; } -// //ICoreText Comment { get; set; } -// private DateTime CreationTime { get; set; } -// private string Culture { get; set; } -// //ICoreObject DerivedFrom { get; set; } -// //ICoreObject Environment { get; } -// //ICoreObject InstanceOf { get; set; } -// private bool IsConstant { get; set; } -// private bool IsCreated { get; } -// private bool IsCreating { get; } -// private bool IsDeleted { get; } -// private bool IsDeleting { get; } -// private bool IsInternal { get; set; } - -// [Obsolete( -// "The attribute is marked as 'obsolete' in the meta model and is about to be removed later on, its use should be avoided" -// )] -// private bool IsKnowHowProtected { get; set; } - -// private bool IsModified { get; } -// private bool IsReadLocked { get; } -// private bool IsReadOnly { get; } -// private bool IsShell { get; set; } -// private bool IsType { get; } -// private bool IsTypePart { get; } -// private bool IsUndeletable { get; set; } -// private bool IsWriteLocked { get; } -// private string LastModifiedBy { get; set; } -// private DateTime ModifiedTime { get; set; } -// private string Name { get; set; } -// //ICoreObject Parent { get; set; } -// private string Password { get; set; } -// //ProtectionMode Protection { get; set; } -// private int ProtectionVersionId { get; set; } -// private string Subtype { get; set; } -// //ICoreObject Target { get; } -// //TRefStateEnum TRefState { get; } -// private string Version { get; set; } -// } -//} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/BinaryReaderExtensions.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/BinaryReaderExtensions.cs deleted file mode 100644 index c4a017d2..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/BinaryReaderExtensions.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public static class BinaryReaderExtensions - { - public static TiaObjectId ReadTiaObjectId(this BinaryReader rd) - { - return new TiaObjectId(rd.ReadInt32(), rd.ReadInt64()); - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaAttribSets.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaAttribSets.cs deleted file mode 100644 index eaa8ab56..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaAttribSets.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - public enum TiaAttribSets - { - ICoreAttributes = 0x13001, //77825 - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFileProtocol.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFileProtocol.cs deleted file mode 100644 index ea437f20..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFileProtocol.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - public enum TiaFileProtocol : short - { - None, - Plain, - ObjectHeaderCompressing - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFileType.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFileType.cs deleted file mode 100644 index 23a8beb8..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFileType.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - [Flags] - public enum TiaFileType : short - { - Composite = 0x40, - CompositeIndex = 0x80, - Index = 2, - Linked = 8, - None = 0, - Session = 4, - Storage = 1, - Trace = 0x20, - Unsupported = 0x10 - } - -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFixedRootObjectInstanceIds.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFixedRootObjectInstanceIds.cs deleted file mode 100644 index 04dcd8ac..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaFixedRootObjectInstanceIds.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - public enum TiaFixedRootObjectInstanceIds : long - { - MetaId = 1L, - StorageMetaMappingTableId = 2L, - ObjectInstanceAlloctionTableId = 3L, - ClusterAllocationTableId = 5L, - SystemAllocationTableId = 6L, - ExpandoMappingTableId = 7L, - ClusterMappingTableId = 8L, - StorageInformationId = 9L, - PropertySetMappingTableId = 10L, - BlobMappingTableId = 11L, - ProjectAnnotationTableId = 12L, - StorageStatisticsId = 14L, - SessionInfoId = 15L, - StorageVersionId = 0x10L, - RootObjectCollectionId = 20L, - ClusterCollectionId = 0x15L, - LocalizatonTableId = 0x16L, - EndBlockId = 30L, - TeminatorId = 0x1fL, - DefectEntryId = 100L, - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaObjectStates.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaObjectStates.cs deleted file mode 100644 index 8bc7b481..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaObjectStates.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - [Flags] - public enum TiaObjectStates : short - { - Created = 1, - Deleted = 4, - Modified = 2, - None = 0, - Destroyed = 8, //Reserved on Legacy - Transient = 0x10, //LinksModified on Legacy - TRef = 0x20, //Reserved_0x20 on Legacy - TRefCreatedViaDelete = 0x80, //Reserved_0x80 on Legacy - TRefIdRef = 0x40 //Transient on Legacy - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaObjectStatesLegacy.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaObjectStatesLegacy.cs deleted file mode 100644 index e5fc2155..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaObjectStatesLegacy.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - [Flags] - public enum TiaObjectStatesLegacy : short - { - Created = 1, - Deleted = 4, - Modified = 2, - None = 0, - Reserved = 8, - LinksModified = 0x10, - Reserved_0x20 = 0x20, - Reserved_0x80 = 0x80, - TRefITransientdRef = 0x40 - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaTypeIds.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaTypeIds.cs deleted file mode 100644 index 18d5183e..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Enums/TiaTypeIds.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums -{ - public enum TiaTypeIds - { - Siemens_Automation_DomainModel_ProjectData = 135208, - Siemens_Automation_DomainModel_FolderData = 135182, - Siemens_Simatic_HwConfiguration_Model_DeviceData = 1052686, - Siemens_Simatic_HwConfiguration_Model_S7ControllerTargetData = 1052700, - Siemens_Automation_DomainModel_EAMTZTagTableData = 135266, - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Step7ProjectTiaBinaryParsed.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Step7ProjectTiaBinaryParsed.cs deleted file mode 100644 index c8af2cb3..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Step7ProjectTiaBinaryParsed.cs +++ /dev/null @@ -1,154 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; -using System.Xml; -using DotNetSiemensPLCToolBoxLibrary.DataTypes; -using DotNetSiemensPLCToolBoxLibrary.General; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public class Step7ProjectTiaBinaryParsed : Project - { - private readonly Credentials _credentials; - - private string DataFile = null; - - private XmlDocument tiaProject; - - internal ZipHelper _ziphelper = new ZipHelper(null); - - public CultureInfo Culture { get; set; } - - //will be removed later... - public List TiaObjectsList; - - public void BinaryParseTIAFile() - { - using (var sourceStream = _ziphelper.GetReadStream(DataFile)) - { - var rd = new BinaryReader(sourceStream); - var header = TiaFileHeader.Deserialize(rd); - - TiaObjectsList = new List(); - try - { - while (true) - { - var hd = TiaObjectHeader.Deserialize(rd); - TiaObjectsList.Add(hd); - - if (hd.TypeId == 0x70000 + 14) //localization_table - { - var langs = new List(); - using var ms = new MemoryStream(hd.Data); - using var br = new BinaryReader(ms); - var maybe_length_including_itself = br.ReadInt32(); - - var count = br.ReadInt32(); - for (int i = 0; i < count;i++) - { - var lng = br.ReadInt32(); - langs.Add(lng); - var unkown_maybe_flags = br.ReadByte(); - } - } - else if (hd.TypeId == 0x70000 + 9) //Root Object Table - { - var rootObjs = new List(); - using var ms = new MemoryStream(hd.Data); - using var br = new BinaryReader(ms); - var maybe_length_including_itself = br.ReadInt32(); - - var count = br.ReadInt32(); - for (int i = 0; i < count; i++) - { - var id = br.ReadInt32(); - var instId = br.ReadInt64(); - var ln = br.ReadByte(); - var nm = Encoding.UTF8.GetString(br.ReadBytes(ln)); - } - } - } - } - catch (EndOfStreamException) // Zip File Stream has no length - { } - - /*var rootId = new TiaObjectId(TiaFixedRootObjectInstanceIds.RootObjectCollectionId); - var rootObjects = new TiaRootObjectList(TiaObjects[rootId]); - var projectid = rootObjects.TiaRootObjectEntrys.FirstOrDefault(x => x.ObjectId.TypeId == (int)TiaTypeIds.Siemens_Automation_DomainModel_ProjectData).ObjectId; - var projectobj = TiaObjects[projectid];*/ - } - } - - public Step7ProjectTiaBinaryParsed(string projectfile, CultureInfo culture = null) : this(projectfile, culture, null) - { - } - - public Step7ProjectTiaBinaryParsed(string projectfile, CultureInfo culture = null, Credentials credentials = null) - { - _credentials = credentials; - if (culture == null) - Culture = CultureInfo.CurrentCulture; - else - Culture = culture; - - ProjectFile = projectfile; - - if (ProjectFile.ToLower().EndsWith("zip") || Path.GetExtension(ProjectFile.ToLower()).Contains("zap")) - { - this._ziphelper = new ZipHelper(projectfile); - if (string.IsNullOrEmpty(ProjectFile)) - ProjectFile = _ziphelper.GetFirstZipEntryWithMatch("\\.ap.*"); - if (string.IsNullOrEmpty(ProjectFile)) - ProjectFile = _ziphelper.GetFirstZipEntryWithMatch("\\.al.*"); - if (string.IsNullOrEmpty(projectfile)) - throw new Exception("Zip-File contains no valid TIA Project !"); - } - - try - { - using (var stream = _ziphelper.GetReadStream(projectfile)) - { - var xmlDoc = new XmlDocument(); - xmlDoc.Load(stream); - - XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable); - nsmgr.AddNamespace("x", "http://www.siemens.com/2007/07/Automation/CommonServices/DataInfoValueData"); - - var nd = xmlDoc.SelectSingleNode("x:Data", nsmgr); - this.ProjectName = nd.Attributes["Name"].Value; - } - } - catch (Exception) - { } - - if (_ziphelper.IsZipFile) - DataFile = "System\\PEData.plf"; - else - DataFile = Path.GetDirectoryName(projectfile) + "\\System\\PEData.plf"; - ProjectFolder = projectfile.Substring(0, projectfile.LastIndexOf(Path.DirectorySeparatorChar)) + Path.DirectorySeparatorChar; - - BinaryParseTIAFile(); - } - - internal XmlDocument xmlDoc; - - private object tiaExport; - private Type tiaExportType; - - - public override ProjectType ProjectType - { - get { return ProjectType.TiaBinary; } - } - - protected override void LoadProject() - { - _projectLoaded = true; - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaFileHeader.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaFileHeader.cs deleted file mode 100644 index 09ed2383..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaFileHeader.cs +++ /dev/null @@ -1,38 +0,0 @@ -using DotNetSiemensPLCToolBoxLibrary.General; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums; -using System; -using System.IO; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs -{ - public struct TiaFileHeader - { - public TiaFileType FileType; - public TiaFileProtocol FileProtocol; - [Obsolete] - public int StoreId; - public Guid FileId; - public Version Version; - public Version FileFormat; - public byte Node; - public byte[] Hash; - public byte EndByte; - - public static TiaFileHeader Deserialize(BinaryReader reader) - { - - return new TiaFileHeader() - { - FileType = (TiaFileType)reader.ReadInt16(), - FileProtocol = (TiaFileProtocol)reader.ReadInt16(), - StoreId = reader.ReadInt32(), - FileId = reader.ReadGuid(), - Version = reader.ReadVersion(), - FileFormat = reader.ReadVersion(), - Node = reader.ReadByte(), - Hash = reader.ReadBytes(40), - EndByte = reader.ReadByte() - }; - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaObjectHeader.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaObjectHeader.cs deleted file mode 100644 index ba3ec540..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaObjectHeader.cs +++ /dev/null @@ -1,55 +0,0 @@ -using DotNetSiemensPLCToolBoxLibrary.General; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums; -using System; -using System.IO; -using System.Text; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs -{ - public struct TiaObjectHeader - { - public int Size; - public int TypeId; - public long InstanceId; - public int ClusterId; - public short ObjectInfo; - public short res; - public TiaObjectStates StateFlags; - public sbyte OffsetCount; - public sbyte MetaInfo; - public Guid Guid; - public byte[] Data; - - public string DataAsUtf8 => Encoding.UTF8.GetString(Data); - - public override string ToString() - { - return TypeId.ToString("x") + "-" + InstanceId.ToString("x") + " (" + TypeId.ToString() + "-" + InstanceId.ToString() + ")"; - } - - public TiaObjectId GetTiaObjectId() - { - return new TiaObjectId(TypeId, InstanceId); - } - - public static TiaObjectHeader Deserialize(BinaryReader reader) - { - var size = reader.ReadInt32(); - return new TiaObjectHeader() - { - Size = size, // 4 - TypeId = reader.ReadInt32(), // 4 - InstanceId = reader.ReadInt64(), // 8 - ClusterId = reader.ReadInt32(), // 4 - ObjectInfo = reader.ReadInt16(), // 2 - res = reader.ReadInt16(), // 2 - StateFlags = (TiaObjectStates)reader.ReadInt16(), // 2 - OffsetCount = reader.ReadSByte(), // 1 - MetaInfo = reader.ReadSByte(), // 1 - Guid = reader.ReadGuid(), // 16 - Data = reader.ReadBytes(size - 12), // 4+4+8+4+2+2+2+1+1+16 - //siemens scheint nicht 44 abzuziehen, sondern nur 12, aber vlt gehören die daten auch nicht dazu - }; - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaCompression.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaCompression.cs deleted file mode 100644 index 5319f3cc..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaCompression.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -//using ZLibNet; -using CompressionMode = System.IO.Compression.CompressionMode; -using DeflateStream = System.IO.Compression.DeflateStream; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public class TiaCompression - { - public static bool IsDeflateStream(Stream compressedStream) - { - if (compressedStream == null) - { - throw new ArgumentNullException("compressedStream"); - } - byte[] buffer = new byte[4]; - compressedStream.Read(buffer, 0, 4); - compressedStream.Position -= 4L; - return (BitConverter.ToInt32(buffer, 0) == 0x6007bded); - } - - public static Stream DecompressStream(Stream compressedStream) - { - compressedStream.Position = 0L; - - if (IsDeflateStream(compressedStream)) - { - return new DeflateStream(compressedStream, CompressionMode.Decompress, true); - } - - return null; - //else - //{ - // return new ZLibNet.ZLibStream(compressedStream, ZLibNet.CompressionMode.Decompress, CompressionLevel.BestCompression, true); - //} - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaFileObject.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaFileObject.cs deleted file mode 100644 index 60a07b9a..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaFileObject.cs +++ /dev/null @@ -1,15 +0,0 @@ -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public class TiaFileObject - { - public TiaObjectHeader Header { get; set; } - public byte[] Data { get; set; } - public TiaFileObject(TiaObjectHeader header, byte[] data) - { - this.Header = header; - this.Data = data; - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaObjectId.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaObjectId.cs deleted file mode 100644 index 3bdf32d0..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaObjectId.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public class TiaObjectId : IComparable, IComparable, IEquatable - { - public TiaObjectId(int typeId, long instanceId) - { - TypeId = typeId; - InstanceId = instanceId; - } - - public TiaObjectId(TiaFixedRootObjectInstanceIds tiaFixedRootObjectInstanceIds) - { - TypeId = 0; - InstanceId = (long)tiaFixedRootObjectInstanceIds; - } - - public TiaObjectId(string tiaObjectId) - { - var s = tiaObjectId.Split(new[] { '-' }); - TypeId = int.Parse(s[0]); - InstanceId = long.Parse(s[1]); - } - - public int TypeId { get; set; } - - public long InstanceId { get; set; } - - public int CompareTo(object obj) - { - return this.CompareTo((TiaObjectId)obj); - } - public int CompareTo(TiaObjectId other) - { - if (this.TypeId == other.TypeId) - { - if (this.InstanceId == other.InstanceId) - return 0; - if (this.InstanceId >= other.InstanceId) - return 1; - - return -1; - } - if (this.TypeId >= other.TypeId) - return 1; - return -1; - } - - public bool Equals(TiaObjectId other) - { - return (this == (other)); - } - - public static bool operator ==(TiaObjectId obj1, TiaObjectId obj2) - { - return ((obj1.TypeId == obj2.TypeId) && (obj1.InstanceId == obj2.InstanceId)); - } - - public static bool operator !=(TiaObjectId obj1, TiaObjectId obj2) - { - return ((obj1.TypeId != obj2.TypeId) || (obj1.InstanceId != obj2.InstanceId)); - } - - public override string ToString() - { - return (this.TypeId + "-" + this.InstanceId); - } - - public override int GetHashCode() - { - unchecked - { - var result = 0; - result = (result * 397) ^ InstanceId.GetHashCode(); - result = (result * 397) ^ TypeId.GetHashCode(); - return result; - } - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaRootObjectEntry.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaRootObjectEntry.cs deleted file mode 100644 index a1451ad1..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaRootObjectEntry.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public class TiaRootObjectEntry - { - public TiaObjectId ObjectId { get; set; } - public string Name { get; set; } - - public override string ToString() - { - return ObjectId.ToString() + " (" + Name + ")"; - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaRootObjectList.cs b/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaRootObjectList.cs deleted file mode 100644 index 944b4e54..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/TiaRootObjectList.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using System.IO; - -namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA -{ - public class TiaRootObjectList - { - private TiaFileObject obj; - - public List TiaRootObjectEntrys { get; set; } - public TiaRootObjectList(TiaFileObject obj) - { - this.obj = obj; - - TiaRootObjectEntrys = new List(); - - var b = new BinaryReader(new MemoryStream(obj.Data)); - var bytesize = b.ReadInt32(); - - var cnt = b.ReadInt32(); - for (int i = 0; i < cnt; i++) - { - TiaRootObjectEntrys.Add(new TiaRootObjectEntry() { ObjectId = b.ReadTiaObjectId(), Name = b.ReadString() }); - } - } - } -} diff --git a/LibNoDaveConnectionLibrary/Projectfiles/TIA/info.txt b/LibNoDaveConnectionLibrary/Projectfiles/TIA/info.txt deleted file mode 100644 index 01ad0382..00000000 --- a/LibNoDaveConnectionLibrary/Projectfiles/TIA/info.txt +++ /dev/null @@ -1,2 +0,0 @@ -Siemens.Automation.ObjectFrame.FileStorage.Base.SystemObject.SystemObjectMeta -=> contains ID's for different system objects like commitPoint, closePoint, object, .... \ No newline at end of file diff --git a/ToolBoxLibUnitTests/TestTia.cs b/ToolBoxLibUnitTests/TestTia.cs deleted file mode 100644 index fbd8d494..00000000 --- a/ToolBoxLibUnitTests/TestTia.cs +++ /dev/null @@ -1,18 +0,0 @@ -using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA; -using NUnit.Framework; - -namespace ToolBoxLibUnitTests -{ - [TestFixture] - public class TestTia - { - - [Test] - public void TiaTest1() - { - var prj = new Step7ProjectTiaBinaryParsed(".\\S7Blocks\\TestProjekt.zap19", null); - - var lst = prj.TiaObjectsList; - } - } -}