|
6 | 6 |
|
7 | 7 | using Skyline.DataMiner.Scripting;
|
8 | 8 | using Skyline.DataMiner.Utils.Interfaces;
|
| 9 | + using Skyline.DataMiner.Utils.Protocol.Extension; |
9 | 10 | using Skyline.DataMiner.Utils.Rates.Protocol;
|
10 | 11 | using Skyline.DataMiner.Utils.SafeConverters;
|
11 | 12 | using Skyline.DataMiner.Utils.SNMP;
|
12 |
| - using Skyline.Protocol.Extension; |
13 | 13 | using Skyline.Protocol.Interface;
|
14 | 14 |
|
15 | 15 | public class IfTableTimeoutProcessor
|
@@ -150,7 +150,7 @@ public void ProcessData()
|
150 | 150 | ProcessUtilization(duplexStatuses, i, key, bitrateIn, bitrateOut);
|
151 | 151 | }
|
152 | 152 |
|
153 |
| - if (iftableGetter.IsSnmpAgentRestarted == SnmpAgentStates.Restarted) |
| 153 | + if (iftableGetter.IsSnmpAgentRestarted) |
154 | 154 | {
|
155 | 155 | iftableSetter.SetParamsData[Parameter.iftablesnmpagentrestartflag] = 0;
|
156 | 156 | }
|
@@ -180,7 +180,7 @@ private void ProcessBitRates(SnmpDeltaHelper snmpDeltaHelper, int getPosition, o
|
180 | 180 | string discontinuityTime = Convert.ToString(iftableGetter.Discontinuity[getPosition]);
|
181 | 181 | bool discontinuity = Interface.HasDiscontinuity(discontinuityTime, rateData.DiscontinuityTime);
|
182 | 182 |
|
183 |
| - if (iftableGetter.IsSnmpAgentRestarted == SnmpAgentStates.Restarted || discontinuity) |
| 183 | + if (iftableGetter.IsSnmpAgentRestarted || discontinuity) |
184 | 184 | {
|
185 | 185 | rateData.BitrateIn = SnmpRate32.FromJsonString(String.Empty, MinDelta, MaxDelta);
|
186 | 186 | rateData.BitrateOut = SnmpRate32.FromJsonString(String.Empty, MinDelta, MaxDelta);
|
@@ -281,12 +281,11 @@ public IfTableGetter(SLProtocol protocol)
|
281 | 281 |
|
282 | 282 | public object[] RateData { get; private set; }
|
283 | 283 |
|
284 |
| - public SnmpAgentStates IsSnmpAgentRestarted { get; private set; } |
| 284 | + public bool IsSnmpAgentRestarted { get; private set; } |
285 | 285 |
|
286 | 286 | public void Load()
|
287 | 287 | {
|
288 |
| - Enum.TryParse<SnmpAgentStates>(Convert.ToString(protocol.GetParameter(Parameter.iftablesnmpagentrestartflag)), out var snmpAgentState); |
289 |
| - IsSnmpAgentRestarted = snmpAgentState; |
| 288 | + IsSnmpAgentRestarted = Convert.ToBoolean(protocol.GetParameter(Parameter.iftablesnmpagentrestartflag)); |
290 | 289 | LoadIfTable();
|
291 | 290 | LoadIfXTable();
|
292 | 291 | }
|
|
0 commit comments