\ONUSigCompressor
This class is responsible for compressing ONU signal history logs by filtering and trimming the data.
It processes signal history files to retain only the first and last entries of each day,
while keeping the current month's logs unchanged.
Synopsis
class ONUSigCompressor
{
- // constants
- const PID = 'ONUSIGCOMPRESSOR';
- // members
- protected string $onuSigPath = '';
- protected array $allOnuSigFiles = ;
- protected string $curMonth = '';
- protected integer $recordsSkipped = 0;
- // methods
- public void __construct()
- protected void setOptions()
- protected void loadOnuSigDataList()
- protected array filterDailyLogs()
- protected void trimSignalData()
- public void run()
Constants
| Name | Value |
|---|---|
| PID | 'ONUSIGCOMPRESSOR' |
Members
protected
- $allOnuSigFiles
—
array
Contains list of all available ONU signal history files as fileName=>filePath - $curMonth
—
string
Contains current month in YYYY-MM- format - $onuSigPath
—
string
contains OLTattractor ONU signal history path - $recordsSkipped
—
int
Total skipped records count
Methods
protected
- filterDailyLogs() — Filters signal history data from obsolete data
- loadOnuSigDataList() — Loads the list of ONU signal data files into the `allOnuSigFiles` property.
- setOptions() — Sets some options for the ONU signal compressor.
- trimSignalData() — Trims signal data from the specified file by filtering out unnecessary logs.
public
- __construct()
- run() — Runs the ONUSIG compressor process.