Exemplo n.º 1
0
 public ObjectType(string module, IList<Symbol> header, Lexer lexer)
 {
     _module = module;
     _name = header[0].ToString();
     _properties = ParseProperties(header);
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 2
0
 public ObjectType(string module, IList <Symbol> header, Lexer lexer)
 {
     _module     = module;
     _name       = header[0].ToString();
     _properties = ParseProperties(header);
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a <see cref="ObjectIdentity"/>.
 /// </summary>
 /// <param name="module">Module name</param>
 /// <param name="header">Header</param>
 /// <param name="lexer">Lexer</param>
 public ObjectIdentity(string module, IList<Symbol> header, Lexer lexer)
 {
     _module = module;
     _name = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
     if (_parent == "0")
     {
         _parent = "ccitt";
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a <see cref="ObjectIdentity"/>.
 /// </summary>
 /// <param name="module">Module name</param>
 /// <param name="header">Header</param>
 /// <param name="lexer">Lexer</param>
 public ObjectIdentity(string module, IList <Symbol> header, Lexer lexer)
 {
     _module = module;
     _name   = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
     if (_parent == "0")
     {
         _parent = "ccitt";
     }
 }
 public void TestMethod()
 {
     Lexer lexer = new Lexer();
     lexer.Parse(new StringReader("{ iso org(3) dod(6) 1 }"));
     string parent;
     uint value;
     lexer.ParseOidValue(out parent, out value);
     Assert.AreEqual("iso.org(3).dod(6)", parent);
     Assert.AreEqual(1, value);
 }
        public void TestMethod1()
        {
            Lexer lexer = new Lexer();
            lexer.Parse(new StringReader("{ iso(1) std(0) iso8802(8802) ieee802dot1(1)" + Environment.NewLine +
"     ieee802dot1mibs(1) 1 }"));
            string parent;
            uint value;
            lexer.ParseOidValue(out parent, out value);
            Assert.AreEqual("iso(1).std(0).iso8802(8802).ieee802dot1(1).ieee802dot1mibs(1)", parent);
            Assert.AreEqual(1, value);
        }
Exemplo n.º 7
0
        public NotificationType(string module, IList <Symbol> header, Lexer lexer)
        {
            _module = module;
            _name   = header[0].ToString();

            var enumerator = header.GetEnumerator();

            while (enumerator.MoveNext())
            {
                if (enumerator.Current.Equals(Symbol.Description) && enumerator.MoveNext())
                {
                    Description = enumerator.Current.ToString();
                }
            }

            lexer.ParseOidValue(out _parent, out _value);
        }
Exemplo n.º 8
0
 public ModuleCompliance(string module, IList<Symbol> header, Lexer lexer)
 {
     _module = module;
     _name = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 9
0
 public NotificationType(string module, IList<Symbol> header, Lexer lexer)
 {
     _module = module;
     _name = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }
 /// <summary>
 /// Creates an <see cref="AgentCapabilities"/> instance.
 /// </summary>
 /// <param name="module"></param>
 /// <param name="header"></param>
 /// <param name="lexer"></param>
 public AgentCapabilities(string module, IList<Symbol> header, Lexer lexer)
 {
     _module = module;
     _name = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 11
0
 public ModuleCompliance(string module, IList <Symbol> header, Lexer lexer)
 {
     _module = module;
     _name   = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 12
0
 public NotificationGroup(string module, IList <Symbol> header, Lexer lexer)
 {
     _module = module;
     _name   = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 13
0
 public ObjectGroup(string module, IList<Symbol> header, Lexer lexer)
 {
     _module = module;
     _name = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Creates an <see cref="AgentCapabilities"/> instance.
 /// </summary>
 /// <param name="module"></param>
 /// <param name="header"></param>
 /// <param name="lexer"></param>
 public AgentCapabilities(string module, IList <Symbol> header, Lexer lexer)
 {
     _module = module;
     _name   = header[0].ToString();
     lexer.ParseOidValue(out _parent, out _value);
 }