Skip to content

Commit 21e7502

Browse files
committed
display object ids as hex and dez
1 parent ff40227 commit 21e7502

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LibNoDaveConnectionLibrary/Projectfiles/TIA/Structs/TiaObjectHeader.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Enums;
33
using System;
44
using System.IO;
5+
using System.Text;
56

67
namespace DotNetSiemensPLCToolBoxLibrary.Projectfiles.TIA.Structs
78
{
@@ -19,9 +20,11 @@ public struct TiaObjectHeader
1920
public Guid Guid;
2021
public byte[] Data;
2122

23+
public string DataAsUtf8 => Encoding.UTF8.GetString(Data);
24+
2225
public override string ToString()
2326
{
24-
return TypeId.ToString("x") + "-" + InstanceId.ToString("x");
27+
return TypeId.ToString("x") + "-" + InstanceId.ToString("x") + " (" + TypeId.ToString() + "-" + InstanceId.ToString() + ")";
2528
}
2629

2730
public TiaObjectId GetTiaObjectId()

0 commit comments

Comments
 (0)