Changeset 682 for trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
- Timestamp:
- Aug 5, 2014, 10:49:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
r679 r682 7 7 $System->Run(); 8 8 9 function RepeatFunction($Period, $Function)10 {11 while(1)12 {13 $StartTime = time();14 $Function();15 $EndTime = time();16 $Delay = $Period - ($EndTime - $StartTime);17 if($Delay < 0) $Delay = 0;18 19 echo('Waiting '.$Delay.' seconds...'."\n");20 sleep($Delay);21 }22 }23 24 9 function ReadWirelessRegistration() 25 10 { 26 11 global $System, $Config; 27 12 28 $Path = array('interface', 'wireless', 'registration-table');29 13 $Time = time(); 30 14 … … 40 24 //$Routerboard->Port = 8729; 41 25 $Routerboard->Connect($Device['LocalIP'], $Config['API']['UserName'], $Config['API']['Password']); 26 if(!$Routerboard->Connected) continue; 42 27 $Routerboard->Write('/interface/wireless/registration-table/getall', false); 43 28 $Routerboard->Write('=.proplist=signal-strength,mac-address,rx-rate,tx-rate', false);
Note:
See TracChangeset
for help on using the changeset viewer.