<?php private function fetchData() { if (is_null($this->data)) { // wAP 60G device uses the mtxrWl60GTable and mtxrwl60GStaTable // (does not use normal mtxrWlApTable or mtxrWlStatTable). // https://wiki.mikrotik.com/wiki/Manual:Interface/W60G#SNMP_OIDs_for_monitoring // Try to walk a wAP 60G table $wl60 = snmpwalk_cache_oid( $this->getDevice(), 'mtxrWl60GTable', array(), 'MIKROTIK-MIB' ); if ( !empty($wl60) ) { // This is a wAP 60G, get only the wAP 60G tables $wl60sta = snmpwalk_cache_oid( $this->getDevice(), 'mtxrWl60GStaTable', array(), 'MIKROTIK-MIB' ); $this->data = $wl60+$wl60sta; } else { // Get regular AP + Station tables // Device may be in both AP and Station mode using multiple // radios (or one radio with Virtual AP/STA feature) $wlap = snmpwalk_cache_oid( $this->getDevice(), 'mtxrWlApTable', array(), 'MIKROTIK-MIB' ); $wlsta = snmpwalk_cache_oid( $this->getDevice(), 'mtxrWlStatTable', array(), 'MIKROTIK-MIB' ); $this->data = $wlap+$wlsta; } } return $this->data; } ?>