123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <?php
- namespace FurukawaBundle\SNMP\MIBS;
- class OIDSFurukawaG8SV1 extends \FurukawaBundle\SNMP\MIB {
-
- const OID_authOnuListSlot = "1.3.6.1.4.1.5875.800.3.10.1.1.2";
- const OID_authOnuListPon = "1.3.6.1.4.1.5875.800.3.10.1.1.3";
- const OID_authOnuListOnuid = "1.3.6.1.4.1.10428.9.1.101.23.3.1.1.1";
- // 1.3.6.1.4.1.2011.6.128.1.1.4.42.1.3
- const OID_authOnuListMac = "1.3.6.1.4.1.10428.9.1.101.23.3.1.1.11";
- const OID_onuPonRxOpticalPower = "1.3.6.1.4.1.10428.101.23.3.1.1.16";
- const OID_onuPonTxOpticalPower = "1.3.6.1.4.1.2011.6.128.1.1.2.51.1.3";
- const OID_onuPonOpticalVltage = "1.3.6.1.4.1.2011.6.128.1.1.2.51.1.5";
- const OID_onuPonOpticalTemperature = "1.3.6.1.4.1.2011.6.128.1.1.2.51.1.1";
- const OID_onuPonOpticalCurrent = "1.3.6.1.4.1.2011.6.128.1.1.2.51.1.2";
-
- const OID_onuStatus = "1.3.6.1.4.1.10428.101.23.3.1.1.2";
- const OID_oltPonDesc = "1.3.6.1.2.1.31.1.1.1.1";
- const OID_oltPonEnableStatus = "1.3.6.1.4.1.5875.800.3.9.3.4.1.4";
-
- const OID_oltPonRxOpticalPower = "1.3.6.1.4.1.10428.101.23.3.1.1.21"; // (value - 10000) * 0.01
- const OID_oltPonTxOpticalPower = "1.3.6.1.4.1.2011.6.128.1.1.2.23.1.4";
- const OID_oltPonOpticalVltage = "1.3.6.1.4.1.2011.6.128.1.1.2.23.1.2";
- const OID_oltPonOpticalCurrent = "1.3.6.1.4.1.2011.6.128.1.1.2.23.1.3";
- const OID_oltPonOpticalTemperature = "1.3.6.1.4.1.2011.6.128.1.1.2.23.1.1";
- //1.3.6.1.4.1.2011.6.128.1.1.4.42.1.3
-
- //Genericos
- const OID_ifHCInOctets = "1.3.6.1.2.1.31.1.1.1.6";
- const OID_ifHCOutOctets = "1.3.6.1.2.1.31.1.1.1.10";
- const OID_ifInOctets = "1.3.6.1.2.1.2.2.1.10";
- const OID_ifOutOctets = "1.3.6.1.2.1.2.2.1.16";
- const OID_ifDescr = "1.3.6.1.2.1.2.2.1.2";
-
- const OID_cardCpu = "1.3.6.1.4.1.2011.2.6.7.1.1.2.1.5";
- const OID_cardMemory = "1.3.6.1.4.1.2011.2.6.7.1.1.2.1.6";
- function convertIndex($index, $values) {
- $data = array();
- foreach($values as $i => $v) {
- if(isset($index[$i])) {
- $data[$index[$i]] = $v;
- }
- }
- if(!empty($index)) return $data;
-
- return $values;
- }
-
- public function onuSlot() {
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListSlot,14);
- }
- public function onuPon() {
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListPon,14);
- }
-
- public function onuOnuid() {
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListOnuid,14);
- }
- public function onuSerialNumber($index = null) {
- if(is_null($index)) {
- return $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,16);
- }
-
- $values = $this->getSNMP()->lastOidWalk(self::OID_authOnuListMac,16);
- return $this->convertIndex($index, $values);
- }
-
- public function onuPonRxOpticalPower($index = null) {
- if(is_null($index)) {
- return $this->getSNMP()->lastOidWalk(self::OID_onuPonRxOpticalPower,16);
- }
-
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonRxOpticalPower,16);
- return $this->convertIndex($index, $values);
-
- }
-
- public function onuPonTxOpticalPower($index = null) {
- if(is_null($index)) {
- return $this->getSNMP()->lastOidWalk(self::OID_onuPonTxOpticalPower,16);
- }
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonTxOpticalPower,16);
- return $this->convertIndex($index, $values);
- }
-
- public function onuPonOpticalVltage($index = null) {
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonOpticalVltage,16);
- return $this->convertIndex($index, $values);
- }
-
- public function onuPonOpticalTemperature($index = null) {
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuPonOpticalTemperature,16);
- return $this->convertIndex($index, $values);
- }
-
- public function onuStatus($index = null) {
- $values = $this->getSNMP()->lastOidWalk(self::OID_onuStatus,14);
- return $this->convertIndex($index, $values);
- }
-
- /* OLT PON */
- public function oltPonDesc($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonDesc,12);
- }
- public function oltPonEnableStatus($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonEnableStatus,15);
- // return $this->convertIndex($index, $values);
- }
-
- public function oltPonRxOpticalPower($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonRxOpticalPower,16);
- // return $this->convertIndex($index, $values);
- }
-
- public function oltPonTxOpticalPower($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonTxOpticalPower,16);
- // return $this->convertIndex($index, $values);
- }
-
- public function oltPonOpticalVltage($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonOpticalVltage,16);
- // return $this->convertIndex($index, $values);
- }
-
- public function oltPonOpticalCurrent($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonOpticalCurrent,16);
- // return $this->convertIndex($index, $values);
- }
-
- public function oltPonOpticalTemperature($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_oltPonOpticalTemperature,16);
- // return $this->convertIndex($index, $values);
- }
-
- public function ifInOctets() {
- return $this->getSNMP()->lastOidWalk(self::OID_ifInOctets,11);
- }
-
- public function ifOutOctets() {
- return $this->getSNMP()->lastOidWalk(self::OID_ifOutOctets,11);
- }
-
- public function ifHCInOctets() {
- return $this->getSNMP()->lastOidWalk(self::OID_ifHCInOctets,12);
- }
-
- public function ifHCOutOctets() {
- return $this->getSNMP()->lastOidWalk(self::OID_ifHCOutOctets,12);
- }
-
- public function ifDescr() {
- return $this->getSNMP()->lastOidWalk(self::OID_ifDescr,11);
- }
- public function oltCardCpu($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_cardCpu,16);
- }
-
- public function oltCardMemory($index = null) {
- return $this->getSNMP()->lastOidWalk(self::OID_cardMemory,16);
- }
- }
|