diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-07-29 19:53:35 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-07-29 19:53:35 +0300 |
| commit | a802fe75f9538371004f1833e69a69b798892d0c (patch) | |
| tree | 9d4612cf4dd6c543650b9ee10599db4b30782391 /Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs | |
| parent | 72c6399ec345ec26bd7f79651667ffa585474919 (diff) | |
| download | Tango-a802fe75f9538371004f1833e69a69b798892d0c.tar.gz Tango-a802fe75f9538371004f1833e69a69b798892d0c.zip | |
Telemetry
Diffstat (limited to 'Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs b/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs index da5856848..424249f7d 100644 --- a/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs +++ b/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs @@ -12,16 +12,17 @@ namespace Tango.Telemetry public String MachineID { get; set; } public MachineTypes MachineType { get; set; } public String Environment { get; set; } - public TimeSpan DiagnosticsSamplingInterval { get; set; } public TimeSpan PendingStorageCheckInterval { get; set; } - public List<ITelemetryDestination> TelemetryDestinations { get; private set; } + public int MaxPendingStorageTelemetriesPerCycle { get; set; } + public TimeSpan HistoryModulesRequestInterval { get; set; } + public int MaxPendingTelemetries { get; set; } public TelemetryPublisherConfiguration() { - TelemetryDestinations = new List<ITelemetryDestination>(); - - DiagnosticsSamplingInterval = TimeSpan.FromSeconds(10); PendingStorageCheckInterval = TimeSpan.FromMinutes(1); + MaxPendingStorageTelemetriesPerCycle = 100; + HistoryModulesRequestInterval = TimeSpan.FromMinutes(1); + MaxPendingTelemetries = 200; } public void Validate() @@ -35,23 +36,8 @@ namespace Tango.Telemetry if (!Enum.IsDefined(typeof(MachineTypes), MachineType)) throw new ArgumentOutOfRangeException(nameof(MachineType), "MachineType is not a valid enum value."); - if (DiagnosticsSamplingInterval.TotalSeconds < 1) - throw new ArgumentOutOfRangeException(nameof(DiagnosticsSamplingInterval), "DiagnosticsSamplingInterval must be at least 1 second."); - if (PendingStorageCheckInterval.TotalSeconds < 5) throw new ArgumentOutOfRangeException(nameof(PendingStorageCheckInterval), "PendingStorageCheckInterval must be at least 5 seconds."); - - if (TelemetryDestinations == null || TelemetryDestinations.Count == 0) - throw new InvalidOperationException("At least one telemetry destination must be provided."); - - foreach (var destination in TelemetryDestinations) - { - if (destination == null) - throw new InvalidOperationException("Telemetry destination list contains a null entry."); - - if (destination.SupportedSources == null || destination.SupportedSources.Count == 0) - throw new InvalidOperationException($"Telemetry destination '{destination.Name}' has no supported sources defined."); - } } } } |
