public CResultAErreur MibAuto() { CResultAErreur result = CResultAErreur.True; if (Automatic_MIB && AlarmgereeSeuilNom != null && AlarmgereeSeuilNom.Length > 0 && TypeAccesAlarme.SpvTypeq.TypeqModulesMIB.Count > 0) { CSpvMibobj mibObj = CSpvMibmodule.GetVariable(ContexteDonnee, AlarmgereeSeuilNom, (CSpvMibmodule[])TypeAccesAlarme.SpvTypeq.ModulesMIB.ToArray(typeof(CSpvMibmodule))); /* * string[] nomModules = new string[TypeAccesAlarme.SpvTypeq.ModulesMIB.Count]; * int index = 0; * foreach (CSpvTypeq_Mibmodule typeqMibModule in TypeAccesAlarme.SpvTypeq.ModulesMIB) * nomModules[index++] = typeqMibModule.SpvMibmodule.NomModuleOfficiel; * * CSpvMibobj mibObj = CSpvMibmodule.GetVariable(ContexteDonnee, AlarmgereeSeuilNom, nomModules);*/ if (mibObj != null) { this.Threshold_OID = mibObj.OidObjet; } else { result.EmpileErreur(I.T("Threshold variable not found in the MIBs associated with the equipement type|50004")); } } return(result); }
public CResultAErreur MibAuto() { CResultAErreur result = CResultAErreur.True; if (ChercheOIDParMIB && NomIdentifiantSnmp != null && NomIdentifiantSnmp.Length > 0 && TypeqModulesMIB.Count > 0) { CSpvMibobj mibObj = CSpvMibmodule.GetVariable(ContexteDonnee, NomIdentifiantSnmp, (CSpvMibmodule[])ModulesMIB.ToArray(typeof(CSpvMibmodule))); if (mibObj != null) { OIDIdentifiantSnmp = mibObj.OidObjet; } else { result.EmpileErreur(I.T("<Secondary (Name)> not found (SNMP identification) in the MIBs associated with the equipement type|50005")); } } return(result); }