Class OltDevice
java.lang.Object
org.bgerp.plugin.bgb.getolt.telnet.OltDevice
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BdComDevice,CDataDevice,GateRayDevice
Abstract OLT device. Ported 1:1 from GetOltv2 OLT.java.
Each vendor subclass implements specific Telnet commands and parsers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(String login, String password) Authenticates with the OLT device via Telnet.voidclose()protected static StringconvertUtilsToLog(String utils) firmwareVersionInfo(String info) protected String[]getInfo()getLog()getMacToOnuForPort(int port) getMacToOnuRawForPort(int port) getOnuMacAddressesForPort(int port) getOnuMacAddressesRawForPort(int port) abstract Map<Integer, List<OpticalInfo>> abstract List<OpticalInfo> getOpticalInfo(int port) intprotected abstract intabstract StringgetStatsOnuInPort(int port) abstract Stringabstract Stringbooleanabstract voidrebootOnu(int port, int onuId) voidsetAuthenticationResult(String login, String password) voidsetAuthenticationResult(String login, String password, String sessionState)
-
Field Details
-
log
-
AUTH_ERROR
- See Also:
-
MAX_RETRY_COUNT
protected static final int MAX_RETRY_COUNT- See Also:
-
telnet
-
patterns
-
portsCount
protected int portsCount -
sessionState
-
curLogin
-
curPass
-
passCurPos
protected int passCurPos -
s1
-
loop_detection
-
port_isolation
-
logMessages
-
-
Constructor Details
-
OltDevice
- Throws:
IOException
-
OltDevice
- Throws:
IOException
-
-
Method Details
-
getServerIp
-
getTelnet
-
addlog
-
addlog
-
getLog
-
getCurLogin
-
getCurPass
-
getSessionState
-
getVendor
-
getInfo
- Throws:
IOException
-
getPortsCount
- Throws:
IOException
-
getSerialNumber
-
getSystemTime
-
getRunningConfig
-
getStartupConfig
-
getLoopDetection
- Throws:
IOException
-
getPortIsolation
- Throws:
IOException
-
getOpticalInfo
- Throws:
IOException
-
getOpticalInfo
- Throws:
IOException
-
getDistanceInfo
- Throws:
IOException
-
rebootOnu
- Throws:
IOException
-
getMacToOnu
- Throws:
IOException
-
getMacToOnuForPort
- Throws:
IOException
-
getOnuMacAddresses
- Throws:
IOException
-
getOnuMacAddressesForPort
- Throws:
IOException
-
getOnuMacAddressesRaw
- Throws:
IOException
-
getOnuMacAddressesRawForPort
protected Map<Integer,List<Map<String, getOnuMacAddressesRawForPortString>>> (int port) throws IOException - Throws:
IOException
-
getPortCount
- Throws:
IOException
-
getMacToOnuRaw
- Throws:
IOException
-
getMacToOnuRawForPort
- Throws:
IOException
-
getStatsOnuAllPorts
- Throws:
IOException
-
getAllMac
-
getStatsOnuInPort
-
setAuthenticationResult
-
setAuthenticationResult
-
authenticate
Authenticates with the OLT device via Telnet. Handles Username/Password prompts in greeting. ERP-specific method (not in v2 OLT.java — v2 uses separate OltAuthenticator).- Throws:
IOException
-
convertUtilsToLog
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getDefaultPatterns
-
getLoopDetectionCached
- Throws:
IOException
-
getPortIsolationCached
- Throws:
IOException
-
firmwareVersionInfo
-
isConnected
public boolean isConnected()
-