\PonZte
ZTE-like PON devices management
Synopsis
class PonZte
{
- // constants
- const DESC_PONTYPE = 1;
- const DESC_SHELF = 2;
- const DESC_SLOT = 3;
- const DESC_OLT = 4;
- const DESC_ONU = 5;
- // members
- protected array $oltParameters = ;
- protected array $eponCards = ;
- protected array $gponCards = ;
- protected $snmp;
- protected $olt = '';
- protected array $snmpTemplates = ;
- protected array $allOltSnmp = ;
- protected array $allOltModels = ;
- protected array $allOltDevices = ;
- protected integer $oltid = 0;
- protected string $oltIp = '';
- protected string $oltFullAddress = '';
- protected string $oltCommunity = '';
- protected $currentSnmpTemplate;
- protected array $macIndex = ;
- protected array $sigIndex = ;
- protected array $intIndex = ;
- protected array $fdbIndex = ;
- public string $ponType = '';
- protected array $snIndex = ;
- protected array $distanceIndex = ;
- // methods
- public void __construct()
- protected void initSNMP()
- protected void initOltAttractor()
- protected void loadOltModels()
- protected void loadOltDevices()
- protected array snmpwalk()
- protected string hexToString()
- protected string strRemoveOidWithDot()
- protected string strRemove()
- protected array signalIndexProcessing()
- protected array macIndexEponProcessing()
- protected void serialIndexGponProcessing()
- protected array() getDecodeType()
- protected array() getDecodeTypeC6XX()
- protected string stdDecodeOutput()
- protected string gponOltInterfaceDecode()
- protected void intIndexCalcEpon()
- protected array cardsEponCalc()
- protected array macIndexRawCalc()
- protected void macIndexCalc()
- protected array sigIndexCalc()
- protected void fdbCalc()
- protected string interfaceDecode()
- protected void snIndexProcess()
- protected void distanceIndexProcess()
- protected void onuidParseEpon()
- protected array macPartParse()
- protected void fdbParseEpon()
- protected void interfaceParseEpon()
- protected void signalParseEpon()
- protected void signalParseGpon()
- protected void distanceParseGpon()
- protected void fdbParseGpon()
- protected void interfaceParseGpon()
- protected void onuidParseGpon()
- protected void serialNumberParse()
- protected string serialNumberBinaryParse()
- protected string serialNumberHexParse()
- protected string serialNumberPartsTranslate()
- protected void uptimeParse()
- protected void temperatureParse()
- public void pollEpon()
- public void pollGpon()
- public void huaweiPollGpon()
Constants
Name | Value |
---|---|
DESC_PONTYPE | 1 |
DESC_SHELF | 2 |
DESC_SLOT | 3 |
DESC_OLT | 4 |
DESC_ONU | 5 |
Members
protected
- $allOltDevices
—
array
Contains all OLTs devices - $allOltModels
—
array
Contains all olt models - $allOltSnmp
—
array
Contains all OLTs devices with proper snmp config - $currentSnmpTemplate
—
array
Take only needed SNMP template for current OLT. - $distanceIndex
—
array
Contains distances for ONTs - $eponCards
—
array
Array for checking ports count for EPON cards - $fdbIndex
—
array
Contains FDB - $gponCards
—
array
Array for checking ports count for GPON cards - $intIndex
—
array
Contains all interface names => ONU ID - $macIndex
—
array
Contains all ONUs MAC addresses. - $olt
—
Contains OLTData - $oltCommunity
—
string
Current OLT snmp community - $oltFullAddress
—
string
Current OLT IP with SNMP port - $oltIp
—
string
Current OLT IP with SNMP port - $oltParameters
—
array
Contains current HAL instance OLT parameters - $oltid
—
int
Current OLT switch id - $sigIndex
—
array
Contains all signals - $snIndex
—
array
Contains all serial numbers => index - $snmp
—
Contains snmp helper object - $snmpTemplates
—
array
Contains all OLTs snmp tmplates
public
- $ponType
—
string
Contains type EPON or GPON.
Methods
protected
- cardsEponCalc() — Check out which cards are installed
- distanceIndexProcess() — Preproccess distances indexes.
- distanceParseGpon() — Parsing distance for ZTE/Huawei GPON
- fdbCalc() — Getting FDB
- fdbParseEpon() — Parses & stores in cache OLT ONU interfaces
- fdbParseGpon() — Parses & stores in cache OLT ONU interfaces
- getDecodeType() — Coverts dec value to binary with byte offset.
- getDecodeTypeC6XX() — Coverts dec value to binary with byte offset. For ZTE C6XX/
- gponOltInterfaceDecode() — Converts dec number to gpon interface name. Looks dirty but seems working.
- hexToString() — Converts hex to string value
- initOltAttractor() — Inits current OLT data abstraction layer for further usage
- initSNMP() — Creates single instance of SNMPHelper object
- intIndexCalcEpon() — Calculation ZTE epon interfaces indexes.
- interfaceDecode() — Function for fixing fucking zte interfaces snmp id.
- interfaceParseEpon() — Parses & stores in cache ZTE OLT ONU interfaces
- interfaceParseGpon() — Parses & stores in cache ZTE OLT ONU interfaces
- loadOltDevices() — Loads all available devices set as OLT
- loadOltModels() — Loads all available snmp models data into private data property
- macIndexCalc() — Prettyfying result of macIndexRawCalc
- macIndexEponProcessing() — Epon mac indexes preprocessing
- macIndexRawCalc() — Getting raw snmp interface index => mac onu
- macPartParse() — Parsing and validating input array. Getting hex from dec values.
- onuidParseEpon() — Parses & stores in cache ZTE OLT ONU ID
- onuidParseGpon() — Parses & stores in cache ZTE OLT ONU ID
- serialIndexGponProcessing() — Serial number indexes preprocessing.
- serialNumberBinaryParse() — Parsing serial number in binary format and coverting it to needed format.
- serialNumberHexParse() — Parsing serial number in hex format and coverting it to needed format.
- serialNumberParse() — Parsing serial numbers;
- serialNumberPartsTranslate() — Check mode to convert serial number string vs raw.
- sigIndexCalc() — Getting signals => snmp interface id.
- signalIndexProcessing() — Epon signals preprocessing
- signalParseEpon() — Performs signal preprocessing for sig/mac index arrays and stores it into cache for ZTE OLT
- signalParseGpon() — Performs signal preprocessing for sig/sn index arrays and stores it into cache for ZTE OLT
- snIndexProcess() — Preprocessing serial index array with removing unneded substrings.
- snmpwalk() — Wrapper around $this->snmp->walk method and explodeRows function to get less string length.
- stdDecodeOutput() — Converts binary string to human readable format like epon-olt_1/1/10:16
- strRemove() — Wrapper around str_replace to make code more pretty
- strRemoveOidWithDot() — Remove oid + dot from string
- temperatureParse() — Parses temperature data and saves it into uptime cache
- uptimeParse() — Parses uptime data and saves it into uptime cache
public
- __construct() — Creates new PON poller/parser proto
- huaweiPollGpon() — Polling Huawei GPON device
- pollEpon() — Polling EPON device
- pollGpon() — Polling GPON device