Pārlūkot izejas kodu

Merge branch 'master' of ssh://dev.cablenet.net.ar/gits/OSS_SNMP

Luciano Andrade 11 gadi atpakaļ
vecāks
revīzija
c4988a7d76
1 mainītis faili ar 36 papildinājumiem un 2 dzēšanām
  1. 36 2
      OSS_SNMP/MIBS/DocsIfCmts.php

+ 36 - 2
OSS_SNMP/MIBS/DocsIfCmts.php

@@ -20,11 +20,44 @@ class DocsIfCmts extends \OSS_SNMP\MIB {
     const OID_docsQos3ServiceFlowOctets 	= "1.3.6.1.4.1.4491.2.1.21.1.4.1.2";
     const OID_docsIfSigQSignalNoise		= "1.3.6.1.2.1.10.127.1.1.4.1.5";
     const OID_docsIfSigQMicroreflections        = "1.3.6.1.2.1.10.127.1.1.4.1.6";
-    const docsIfCmtsChannelUtilization        = "1.3.6.1.2.1.10.127.1.3.9.1.3";
+    const docsIfCmtsChannelUtilization          = "1.3.6.1.2.1.10.127.1.3.9.1.3";
     const OID_ipNetToMediaPhysAddress 		= "1.3.6.1.2.1.4.22.1.2";
     const OID_docsIfCmtsCmPtr  			= "1.3.6.1.2.1.10.127.1.3.7.1.2";
     const OID_docsIfCmStatusTxPower 		= "1.3.6.1.2.1.10.127.1.2.2.1.3";
+    const OID_docsIfDownChannelFrequency	= "1.3.6.1.2.1.10.127.1.1.1.1.2";
+    const OID_docsIfDownChannelModulation       = "1.3.6.1.2.1.10.127.1.1.1.1.4";
+    const OID_docsIfDownChannelPower		= "1.3.6.1.2.1.10.127.1.1.1.1.6";
+    const OID_docsIfUpChannelFrequency		= "1.3.6.1.2.1.10.127.1.1.2.1.2";
+    const OID_docsIfUpChannelWidth 		= "1.3.6.1.2.1.10.127.1.1.2.1.3";
+
+    public function docsIfUpChannelWidth(){
+		return $this->getSNMP()->walk1d(self::OID_docsIfUpChannelWidth);
+    }
+
+    public function docsIfUPChannelFrequency(){
+		return $this->getSNMP()->walk1d(self::OID_docsIfUpChannelFrequency);
+    }
 
+    public function docsIfDownChannelPower(){
+		return $this->getSNMP()->walk1d(self::OID_docsIfDownChannelPower);
+    }
+
+    public function docsIfDownChannelModulation($decode = false){
+	if(!$decode) {
+		return $this->getSNMP()->walk1d(self::OID_docsIfDownChannelModulation);
+	}else{
+		$trans = array(1 => "unknown", 2 => "other", 3 => "qam64", 4 => "qam256");
+		$rtr = array();
+		foreach($this->getSNMP()->walk1d(self::OID_docsIfDownChannelModulation) as $if => $val){
+			$rtr[$if] = $trans[$val];
+		}
+		return $rtr;
+	}
+    }
+
+    public function docsIfDownChannelFrequency(){
+	return $this->getSNMP()->walk1d(self::OID_docsIfDownChannelFrequency);
+    }
 
     public function docsIfCmtsCmPtr(){
 	$ptr = array();
@@ -250,7 +283,8 @@ accessDenied(7)   The CMTS has sent a Registration Aborted message   to the CM
 
     public function docsIfSigQSignalNoise(){
 	$rtr = array();
-	foreach($this->getSNMP()->realWalk(self::OID_docsIfSigQSignalNoise) as $oid => $val){
+	$data = $this->getSNMP()->realWalk(self::OID_docsIfSigQSignalNoise);
+	foreach($data as $oid => $val){
 		sscanf($val,"INTEGER: %f TenthdB", $readval);
 		$rtr[substr($oid,strlen(self::OID_docsIfSigQSignalNoise)+2)] = $readval;
 	}