Beispiel #1
0
        //-------------------------------------------------------
        private void m_menuWalk_Click(object sender, EventArgs e)
        {
            IDefinition definition = GetCurrent();

            if (definition != null)
            {
                if (m_connexion == null)
                {
                    if (!SetupConnexion())
                    {
                        return;
                    }
                }
                CResultAErreurType <IList <Variable> > result = m_connexion.Walk(definition.GetNumericalForm());
                if (!result)
                {
                    CFormAfficheErreur.Show(result.Erreur);
                }
                else
                {
                    CFormViewSNMPResult.ViewResult("Walk " + definition.Name,
                                                   result.DataType,
                                                   this,
                                                   definition.Tree);
                }
            }
        }
Beispiel #2
0
        //----------------------------------
        public void GetSNMP()
        {
            IDefinition definition = GetCurrent();

            if (definition != null)
            {
                if (m_connexion == null)
                {
                    if (!SetupConnexion())
                    {
                        return;
                    }
                }
                List <uint> lstOID = new List <uint>(definition.GetNumericalForm());
                lstOID.Add(0);
                CResultAErreurType <Variable> result = m_connexion.Get(lstOID.ToArray());
                if (!result)
                {
                    CFormAfficheErreur.Show(result.Erreur);
                }
                else
                {
                    CFormViewSNMPResult.ViewResult("Get " + definition.Name,
                                                   result.DataType,
                                                   this,
                                                   definition.Tree);
                }
            }
        }