Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RS485 Monitor/src/TelegramParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class TelegramArgs : EventArgs
public TelegramArgs(BaseTelegram t)
{
Telegram = t;
Telegram.Timestamp = DateTime.Now;
}
}

Expand Down Expand Up @@ -200,7 +201,7 @@ private void FinishBlock()
}

// Check if we can convert
if ( tg.Type == BaseTelegram.TelegramType.READ_RESPONSE)
if (tg.Type == BaseTelegram.TelegramType.READ_RESPONSE)
{
if (tg.Source == 0xAA && tg.Destination == 0x5A && tg.PDU.Length == 10)
{
Expand Down
5 changes: 5 additions & 0 deletions RS485 Monitor/src/Telegrams/BaseTelegram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public enum TelegramType
/// </summary>
public TelegramType Type { get => (TelegramType)Start; }

/// <summary>
/// Timestamp of the telegram
/// </summary>
public DateTime Timestamp { get; set; }

#endregion

#region Constants
Expand Down