Changeset 887 for trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php
r874 r887 3 3 class ConfigRouterOSSignal extends NetworkConfigItem 4 4 { 5 function ReadWirelessRegistration() 5 function ReadWirelessRegistration(): void 6 6 { 7 7 $Time = time(); … … 66 66 $this->Database->Transaction($Queries); 67 67 } 68 69 function StripUnits($Value) 68 69 function StripUnits($Value): string 70 70 { 71 71 if (strpos($Value, '-') !== false) $Value = substr($Value, 0, strpos($Value, '-') - 1); // without channel info 72 72 if (substr($Value, -3, 3) == "MHz") $Value = substr($Value, 0, -3); // without MHz unit 73 if (substr($Value, -4, 4) == "Mbps") $Value = substr($Value, 0, -4); // without Mbps unit 74 if (substr($Value, -3, 3) == "Mbp") $Value = substr($Value, 0, -3); // without Mbp unit 73 if (substr($Value, -4, 4) == "Mbps") $Value = substr($Value, 0, -4); // without Mbps unit 74 if (substr($Value, -3, 3) == "Mbp") $Value = substr($Value, 0, -3); // without Mbp unit 75 75 if (substr($Value, -1, 1) == "M") $Value = substr($Value, 0, -1); // without M unit 76 76 return $Value; 77 77 } 78 78 79 function Run() 79 function Run(): void 80 80 { 81 81 RepeatFunction(60 * 60, array($this, 'ReadWirelessRegistration'));
Note:
See TracChangeset
for help on using the changeset viewer.