Class CDataDevice
java.lang.Object
org.bgerp.plugin.bgb.getolt.telnet.OltDevice
org.bgerp.plugin.bgb.getolt.telnet.vendor.CDataDevice
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
CDataFD1208Device,CDataFD1608Device,CDataGponDevice
CData EPON OLT device. Ported from GetOltv2 CData.java.
Base class for CData family (CDataGpon, CDataFD1608, CDataFD1208).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bgerp.plugin.bgb.getolt.telnet.OltDevice
OltDevice.AuthenticationException, OltDevice.OLTException, OltDevice.ONUInfo -
Field Summary
Fields inherited from class org.bgerp.plugin.bgb.getolt.telnet.OltDevice
AUTH_ERROR, curLogin, curPass, log, logMessages, loop_detection, MAX_RETRY_COUNT, passCurPos, patterns, port_isolation, portsCount, s1, sessionState, telnet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcleanConfigurationOutput(String config) Очищает конфигурацию от пагинационных промптов, системных сообщений и некорректных строк согласно синтаксису CData OLT устройствprotected voidprotected voidEnters interface mode (epon or gpon 0/0).Получает информацию о дистанции и RTT для всех ONU на всех портах.getInfo()protected StringReturns interface type for this device family.getMacToOnuRawForPort(int port) getOnuMacAddressesRawForPort(int port) getOpticalInfo(int port) getOpticalInfo(int port, Map<Integer, Boolean> loopDetectionMap) Get optical information for a specific port with loop detection statusprotected intprotected static StringnormalizeMac(String mac) parseDistanceInfo(String response) Парсит вывод команды "show ont basic-info 0/0all" и извлекает distance для каждой ONU. parseDistanceInfoForPort(String response, int port) Парсит вывод команды "show ont basic-info 0/0all" и извлекает distance для ONU на конкретном порту. voidrebootOnu(int port, int onuId) Methods inherited from class org.bgerp.plugin.bgb.getolt.telnet.OltDevice
addlog, addlog, authenticate, close, convertUtilsToLog, firmwareVersionInfo, getAllMac, getCurLogin, getCurPass, getDefaultPatterns, getLog, getLoopDetectionCached, getMacToOnu, getMacToOnuForPort, getOnuMacAddresses, getOnuMacAddressesForPort, getPortCount, getPortIsolationCached, getServerIp, getSessionState, getStatsOnuAllPorts, getStatsOnuInPort, getTelnet, isConnected, setAuthenticationResult, setAuthenticationResult
-
Constructor Details
-
CDataDevice
- Throws:
IOException
-
CDataDevice
- Throws:
IOException
-
-
Method Details
-
getVendor
-
getInterfaceType
Returns interface type for this device family. Override in GPON subclasses to return "gpon". -
getSerialNumber
- Specified by:
getSerialNumberin classOltDevice
-
getSystemTime
- Specified by:
getSystemTimein classOltDevice
-
getDistanceInfo
Получает информацию о дистанции и RTT для всех ONU на всех портах. EPON CData не поддерживает единую команду для всех портов, поэтому опрашиваем каждый порт отдельно.- Specified by:
getDistanceInfoin classOltDevice- Returns:
- Mapinvalid input: '<'port, Mapinvalid input: '<'onuId, int[]{distance, rtt}>> где int[0]=distance в метрах, int[1]=RTT в Time Quanta
- Throws:
IOException
-
parseDistanceInfo
Парсит вывод команды "show ont basic-info 0/0all" и извлекает distance для каждой ONU. Формат вывода CData: gpon-onu_1/1/1 distance : 123(m) gpon-onu_1/1/1 RTT : 456(TQ) -
parseDistanceInfoForPort
Парсит вывод команды "show ont basic-info 0/0all" и извлекает distance для ONU на конкретном порту. Формат вывода: F/S P ONT MAC Type Distance Up Extended ID (m) Time Model 0/0 1 1 00:6D:61:A9:50:20 SFU 5249 0:01:58:15 D401 0/0 1 2 E0:E8:E6:1B:02:3C SFU 6978 12:04:42:12 101Z - Parameters:
response- ответ от OLTport- номер порта- Returns:
- Mapinvalid input: '<'onuId, int[]{distance, rtt}>
-
getLoopDetection
- Specified by:
getLoopDetectionin classOltDevice- Throws:
IOException
-
getPortIsolation
- Specified by:
getPortIsolationin classOltDevice- Throws:
IOException
-
getMacToOnuRaw
- Overrides:
getMacToOnuRawin classOltDevice- Throws:
IOException
-
getMacToOnuRawForPort
- Overrides:
getMacToOnuRawForPortin classOltDevice- Throws:
IOException
-
getPortsCount
- Specified by:
getPortsCountin classOltDevice- Throws:
IOException
-
getOpticalInfo
- Specified by:
getOpticalInfoin classOltDevice- Throws:
IOException
-
getOpticalInfo
- Specified by:
getOpticalInfoin classOltDevice- Throws:
IOException
-
getOpticalInfo
public List<OpticalInfo> getOpticalInfo(int port, Map<Integer, Boolean> loopDetectionMap) throws IOExceptionGet optical information for a specific port with loop detection status- Parameters:
port- Port numberloopDetectionMap- Map of port numbers to loop detection status- Returns:
- List of OpticalInfo objects with loop detection status set
- Throws:
IOException- If an I/O error occurs
-
enableConfigMode
protected void enableConfigMode() -
enterInterfaceMode
Enters interface mode (epon or gpon 0/0).- Throws:
IOException
-
getInfo
- Specified by:
getInfoin classOltDevice- Throws:
IOException
-
getOnuMacAddressesRaw
- Overrides:
getOnuMacAddressesRawin classOltDevice- Throws:
IOException
-
getOnuMacAddressesRawForPort
protected Map<Integer,List<Map<String, getOnuMacAddressesRawForPortString>>> (int port) throws IOException - Overrides:
getOnuMacAddressesRawForPortin classOltDevice- Throws:
IOException
-
cleanConfigurationOutput
Очищает конфигурацию от пагинационных промптов, системных сообщений и некорректных строк согласно синтаксису CData OLT устройств -
getRunningConfig
- Overrides:
getRunningConfigin classOltDevice
-
getStartupConfig
- Overrides:
getStartupConfigin classOltDevice
-
rebootOnu
- Specified by:
rebootOnuin classOltDevice- Throws:
IOException
-
normalizeMac
-