Parcourir la source

Se agregan dos métodos para consultar octetos y retornar la respuesta cruda del snmp, se podría haber realizado un realwalk directo, pero mejor utilizar las funciones con su correspondiente excepciones.

Maxi Schvindt il y a 8 ans
Parent
commit
4600236ba7
1 fichiers modifiés avec 42 ajouts et 0 suppressions
  1. 42 0
      OSS_SNMP/MIBS/DocsIfCmts.php

+ 42 - 0
OSS_SNMP/MIBS/DocsIfCmts.php

@@ -427,5 +427,47 @@ accessDenied(7)   The CMTS has sent a Registration Aborted message   to the CM
         }
         return $rtr;
     }
+    
+    public function docsQosServiceFlowOctetsRealValues($ifId=null){
+        try{
+            
+            if(!is_null($ifId)){
+                $oid = self::OID_docsQosServiceFlowOctets ."." .$ifId;
+            }else{
+                $oid = self::OID_docsQosServiceFlowOctets;
+            }	
+            
+            $stats = $this->getSNMP()->realWalk($oid);
+            
+            if(!is_array($stats)){return array();}
+
+            return $stats;
+            
+        }catch (\Exception $e){ 
+	    echo "ouch! ".$e->getMessage()."\n";
+	    return array();
+	}
+    }
+    
+    public function docsQos3ServiceFlowOctetsRealValues($ifId=null){
+	try{
+            
+	    if(!is_null($ifId)){
+		$oid = self::OID_docsQos3ServiceFlowOctets ."." .$ifId;
+	    }else{
+		$oid = self::OID_docsQos3ServiceFlowOctets;
+            }
+            
+            $stats = $this->getSNMP()->realWalk($oid);
+            
+            if(!is_array($stats)){return array();}
+
+            return $stats;
+
+        }catch (\Exception $e){ 
+	    echo "ouch! ".$e->getMessage()."\n";
+	    return array();
+	}
+   }
 
 }