Ejemplo n.º 1
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);
                }
            }
        }
Ejemplo n.º 2
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);
                }
            }
        }
Ejemplo n.º 3
0
        public static void ViewResult(
            string strInfoRequete,
            IList <Variable> lstVariables,
            IMibNavigator navigateur,
            IObjectTree mibTree)
        {
            CFormViewSNMPResult form = new CFormViewSNMPResult();

            form.m_listeVariables = lstVariables;
            form.m_strInfoRequete = strInfoRequete;
            form.m_navigateur     = navigateur;
            form.m_mibTree        = mibTree;
            form.Show();
        }