Ignore:
Timestamp:
Feb 25, 2022, 9:30:55 AM (2 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r917 r921  
    3939    $Read = $Routerboard->Read(false);
    4040    $Array = $Routerboard->ParseResponse($Read);
     41    $NetworkMac = new NetworkMac($this->System);
    4142    foreach ($Array as $Properties)
    4243    {
     
    7576      $RateRx = $this->StripUnits($Properties['rx-rate']);
    7677      $RateTx = $this->StripUnits($Properties['tx-rate']);
     78      $MacRef = $NetworkMac->GetIndex($Properties['mac-address']);
    7779      $Queries[] = 'INSERT INTO `NetworkSignal` (`MAC`, `Value`, `Remote`, `RateRx`, `RateTx`, `Time`, `Interface`, `Device`) VALUES '.
    78         '("'.$Properties['mac-address'].'", '.$Strength.', '.$RemoteSignal.', '.$RateRx.', '.$RateTx.', "'.
     80        '('.$MacRef.', '.$Strength.', '.$RemoteSignal.', '.$RateRx.', '.$RateTx.', "'.
    7981        TimeToMysqlDateTime($this->Time).'", '.$Interface.', '.$Device['Id'].')';             
    8082    }
     
    98100      return array();
    99101    }   
     102    $NetworkMac = new NetworkMac($this->System);
    100103    foreach ($Array as $Properties)
    101104    {
     
    119122
    120123      $RateTx = $this->StripUnits($Properties['tx-phy-rate']);
     124     
     125      $MacRef = $NetworkMac->GetIndex($Properties['remote-address']);
    121126      $Queries[] = 'INSERT INTO `NetworkSignal` (`MAC`, `Value`, `Remote`, `RateRx`, `RateTx`, `Time`, `Interface`, `Device`) VALUES '.
    122         '("'.$Properties['remote-address'].'", '.$Strength.', 0, 0, '.round($RateTx / 1000000).', "'.
     127        '('.$MacRef.', '.$Strength.', 0, 0, '.round($RateTx / 1000000).', "'.
    123128        TimeToMysqlDateTime($this->Time).'", '.$Interface.', '.$Device['Id'].')';             
    124129    }
Note: See TracChangeset for help on using the changeset viewer.