2 using System.Collections.Generic;
4 namespace Lextm.SharpSnmpLib.Mib
6 public class ValueMap : Dictionary<Int64, string>
22 List<Int64> values =
new List<long>(this.Keys);
25 Int64 last = values[0];
26 Int64 offset = values[0];
27 for (
int i=1; i<values.Count; i++)
29 if (values[i] != last + 1)
67 foreach (Int64 value
in this.Keys)
86 foreach (Int64 key
in this.Keys)
90 throw new NotSupportedException(
"Negative numbers are not allowed for Bits!");
94 throw new NotSupportedException(
"Bits with more than 32 bits are not supported!");
97 result |= (UInt32)(1 << (
int)key);
ValueRanges GetContinousRanges()
Returns the values of the map as continous range. At best as one range.
UInt32 GetBitMask()
Interprets the single values as bit positions and creates a mask of it.
Int64 GetHighestValue()
Gets the highest value contained in this value map.