diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-02 21:38:19 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-02 21:38:19 +0300 |
| commit | 0df9f37075dd697ac34f4ed2a2749f62aa27a654 (patch) | |
| tree | 5d95103b41d4954eff9f266317c5a525e9a0e3e9 /Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs | |
| parent | 4222eddece906d6f0877022c06b853deb5068472 (diff) | |
| download | Tango-0df9f37075dd697ac34f4ed2a2749f62aa27a654.tar.gz Tango-0df9f37075dd697ac34f4ed2a2749f62aa27a654.zip | |
Telemetry Testing.
Diffstat (limited to 'Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs b/Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs index 20d5211e7..c2879e9db 100644 --- a/Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs +++ b/Software/Visual_Studio/Tango.Telemetry/TelemetryBase.cs @@ -10,14 +10,22 @@ namespace Tango.Telemetry { public class TelemetryBase : ITelemetry { + public string ID { get; set; } + + public DateTime Time { get; set; } + + public TelemetryBase() + { + ID = Guid.NewGuid().ToString(); + Time = DateTime.UtcNow; + } + [BsonIgnore] //This will be used for column mapping in ADX public String Type { get { return this.ToTelemetryName(); } } - public DateTime Time { get; set; } - public byte[] ToBytes(Formatting format = Formatting.None, bool flatten = true) { return Encoding.UTF8.GetBytes(ToJson(format, flatten)); |
