|
@@ -23,6 +23,7 @@ class DocsIfCmts extends \OSS_SNMP\MIB {
|
|
|
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";
|
|
|
|
|
|
|
|
|
public function docsIfCmtsCmPtr(){
|
|
@@ -257,14 +258,29 @@ accessDenied(7) The CMTS has sent a Registration Aborted message to the CM
|
|
|
return $rtr;
|
|
|
}
|
|
|
|
|
|
- public function docsIfSigQMicroreflections(){
|
|
|
- return $this->getSNMP()->walk1d(self::OID_docsIfSigQMicroreflections);
|
|
|
+ public function docsIfSigQMicroreflections($trans = false){
|
|
|
+ $oid = self::OID_docsIfSigQMicroreflections;
|
|
|
+ $rtr = array();
|
|
|
+ if($trans){
|
|
|
+ foreach($this->getSNMP()->realWalk($oid) as $oid => $val){
|
|
|
+ sscanf($val,"INTEGER: %f -dBc", $readval);
|
|
|
+ $rtr[substr($oid,strlen(self::OID_docsIfSigQSignalNoise)+2)] = $readval;
|
|
|
+ }
|
|
|
+ return $rtr;
|
|
|
+ }else{
|
|
|
+ return $this->getSNMP()->walk1d(self::OID_docsIfSigQMicroreflections);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public function docsIfCmtsChannelUtilization(){
|
|
|
return $this->getSNMP()->realWalk(self::docsIfCmtsChannelUtilization);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function docsIfCmStatusTxPower(){
|
|
|
+ return $this->getSNMP()->walk1d(self::OID_docsIfCmStatusTxPower);
|
|
|
+ }
|
|
|
+
|
|
|
public function getCmStatus($index){
|
|
|
$mibs = array(
|
|
|
'docsIfCmtsCmStatusMacAddress' => 'docsIfCmtsCmStatusMacAddress',
|
|
@@ -284,7 +300,9 @@ accessDenied(7) The CMTS has sent a Registration Aborted message to the CM
|
|
|
|
|
|
foreach($mibs as $k=> $m){
|
|
|
$m .= ".".$index;
|
|
|
- $v = current($this->getSNMP()->realWalk($m));
|
|
|
+ $rta = $this->getSNMP()->realWalk($m);
|
|
|
+ if(!$rta) continue;
|
|
|
+ $v = current($rta);
|
|
|
$dds = strpos($v, ':');
|
|
|
$v = substr($v, $dds+2);
|
|
|
$rtr[$k] = $v;
|