STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
OctetStringType.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2 
3 namespace Lextm.SharpSnmpLib.Mib.Elements.Types
4 {
5  public class OctetStringType : BaseType
6  {
7  private ValueRanges _size;
8 
9  public OctetStringType(IModule module, string name, ISymbolEnumerator symbols)
10  : base(module, name)
11  {
12  Symbol current = symbols.NextNonEOLSymbol();
13  if (current == Symbol.OpenParentheses)
14  {
15  symbols.PutBack(current);
16  _size = Lexer.DecodeRanges(symbols);
17  current.Assert(_size.IsSizeDeclaration, "SIZE keyword is required for ranges of octet string!");
18  }
19  else
20  {
21  symbols.PutBack(current);
22  _size = new ValueRanges(isSizeDecl: true);
23  }
24  }
25 
26  public ValueRanges Size
27  {
28  get { return _size; }
29  }
30  }
31 }
MIB Module interface.
Definition: IModule.cs:36
static ValueRanges DecodeRanges(ISymbolEnumerator symbols)
Definition: Lexer.cs:409
static readonly Symbol OpenParentheses
Definition: Symbol.cs:211
Lexer class that parses MIB files into symbol list.
Definition: Lexer.cs:21
Description of Symbol.
Definition: Symbol.cs:20
OctetStringType(IModule module, string name, ISymbolEnumerator symbols)