Skip to content

Commit

Permalink
display object ids as hex and dez
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Aug 25, 2024
1 parent ff40227 commit 21e7502
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums;
using System;
using System.IO;
using System.Text;

namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs
{
Expand All @@ -19,9 +20,11 @@ public struct TiaObjectHeader
public Guid Guid;
public byte[] Data;

public string DataAsUtf8 => Encoding.UTF8.GetString(Data);

public override string ToString()
{
return TypeId.ToString("x") + "-" + InstanceId.ToString("x");
return TypeId.ToString("x") + "-" + InstanceId.ToString("x") + " (" + TypeId.ToString() + "-" + InstanceId.ToString() + ")";
}

public TiaObjectId GetTiaObjectId()
Expand Down

0 comments on commit 21e7502

Please sign in to comment.