local S=require("transformer.shared.cmdhelper")local U=require("transformer.mapper.ucihelper")local n=require("luabcm")local D,o,C,T,s,e=tonumber,tostring,os,setmetatable,string,lower
local a={}local r={["off"]=0,["on"]=1,["enabled"]=1,["disabled"]=0}local function t(e)e=e and s.lower(e)return r[e]or""end
local function l(e)return e and o(e/10)or"0"end
local e={}local r={}local m={[0]={},[1]={}}local s
local c={[0]=0,[1]=0}local i={command="xdslctl info --show",lookup={status={pat="^Status:%s+(%S+)"},tpstc={pat="^TPS%-TC:%s+(.*)$"},linit={pat="^Last initialization procedure status:%s+(.*)$"}}}local u={command="xdslctl1 info --show",lookup={status={pat="^Status:%s+(%S+)"},tpstc={pat="^TPS%-TC:%s+(.*)$"}}}local u={line0=i,line1=u}local function d(r,e)local e={__index=function()return e
end}T(r,e)end
d(u,i)local function d(a,s,r,t)S.parseCmd(a,{s},e)local e=e[s]if e and e[r]then
return e[r]elseif e then
return e
end
return t
end
local function e(s,t,e,a)r[s]=t
if e then
r[e]=a
end
end
local function T()r={}e("GDMT",0)e("GLITE",0)e("T1413",0)e("ADSL2",0)e("ANNEXL",0)e("ADSL2P",0)e("ANNEXM",0)e("VDSL2",0)e("GFAST",0)e("LinePair",1)e("Bitswap",0)e("SRA",0)e("Trellis",0)e("SESDrop",0)e("CoMinMgn",0)e("24k",0)e("PhyReXmtUs",0)e("PhyReXmtDs",0)e("TpsTc",nil)e("MonitorTone",0)e("DynamicD",0)e("DynamicF",0)e("V43",0)e("SOS",0)e("TrainingMargin",0)e("GINPUs",0)e("GINPDs",0)e("IKNS",0)e("TrainingStatus","Disabled")e("Mode","Unknown")e("LastRetrainReason","")e("LastInitializationProcedureStatus",0)e("DownstreamMaxBitRate",0,"UpstreamMaxBitRate",0)e("DownstreamCurrRate",0,"UpstreamCurrRate",0)e("PowerManagementState",0)e("CurrentProfile",0)e("TpsTcBcm")e("LineStatus","Disabled")e("TrainingStatus","Disabled")e("TRELLISds",0,"TRELLISus",0)e("DownstreamSNR",0,"UpstreamSNR",0)e("DownstreamAttenuation",0,"UpstreamAttenuation",0)e("DownstreamPower",0,"UpstreamPower",0)e("DownstreamFramingMSGc",0,"UpstreamFramingMSGc",0)e("DownstreamFramingB",0,"UpstreamFramingB",0)e("DownstreamFramingM",0,"UpstreamFramingM",0)e("DownstreamFramingT",0,"UpstreamFramingT",0)e("DownstreamFramingR",0,"UpstreamFramingR",0)e("DownstreamFramingS",0,"UpstreamFramingS",0)e("DownstreamFramingL",0,"UpstreamFramingL",0)e("DownstreamInterleaveDepth",0,"UpstreamInterleaveDepth",0)e("DownstreamFramingI",0,"UpstreamFramingI",0)e("DownstreamFramingN",0,"UpstreamFramingN",0)e("DownstreamFramingQ",0,"UpstreamFramingQ",0)e("DownstreamFramingV",0,"UpstreamFramingV",0)e("DownstreamFramingK",0,"UpstreamFramingK",0)e("OHFDs",0,"OHFUs",0)e("OHFErrDs",0,"OHFErrUs",0)e("SFDs",0,"SFUs",0)e("SFErrDs",0,"SFErrUs",0)e("RSDs",0,"RSUs",0)e("RSCorrDs",0,"RSCorrUs",0)e("RSUnCorrDs",0,"RSUnCorrUs",0)e("ShowtimeXTURHECErrors",0,"ShowtimeXTUCHECErrors",0)e("OCDDs",0,"OCDUs",0)e("LCDDs",0,"LCDUs",0)e("BytesReceived",0,"BytesSent",0)e("PacketsReceived",0,"PacketsSent",0)e("DiscardPacektsReceived",0,"DiscardPacektsSent",0)e("ErrorsReceived",0,"ErrorsSent",0)e("ShowtimeErroredSecsDs",0,"ShowtimeErroredSecsUs",0)e("ShowtimeSeverelyErroredSecsDs",0,"ShowtimeSeverelyErroredSecsUs",0)e("ShowtimeUnavailableSecsDs",0,"ShowtimeUnavailableSecsUs",0)e("ShowtimeAvailableSecs",0)e("INPDs",0,"INPUs",0)e("INPReinDs",0,"INPReinUs",0)e("DownstreamDelay",0,"UpstreamDelay",0)e("PERDs",0,"PERUs",0)e("ORDs",0,"ORUs",0)e("AGRDs",0,"AGRUs",0)e("BitswapDs",0,"BitswapUs",0)e("DownstreamNoiseMargin",0,"UpstreamNoiseMargin",0)e("TotalXTURFECErrors",0,"TotalXTUCFECErrors",0)e("TotalXTURCRCErrors",0,"TotalXTUCCRCErrors",0)e("TotalXTURHECErrors",0,"TotalXTUCHECErrors",0)e("TotalErroredSecsDs",0,"TotalErroredSecsUs",0)e("TotalSeverelyErroredSecsDs",0,"TotalSeverelyErroredSecsUs",0)e("TotalUnavailableSecsDs",0,"TotalUnavailableSecsUs",0)e("TotalLossOfSignalSecsDs",0,"TotalLossOfSignalSecsUs",0)e("TotalLossOfFramingSecsDs",0,"TotalLossOfFramingSecsUs",0)e("TotalLossOfMarginSecsDs",0,"TotalLossOfMarginSecsUs",0)e("TotalRetrainCount","0")e("TotalTime",0)e("TotalStart",0)e("QuarterHourXTURFECErrors",0,"QuarterHourXTUCFECErrors",0)e("QuarterHourXTURCRCErrors",0,"QuarterHourXTUCCRCErrors",0)e("QuarterHourXTURHECErrors",0,"QuarterHourXTUCHECErrors",0)e("QuarterHourErroredSecsDs",0,"QuarterHourErroredSecsUs",0)e("QuarterHourSeverelyErroredSecsDs",0,"QuarterHourSeverelyErroredSecsUs",0)e("QuarterHourUnavailableSecsDs",0,"QuarterHourUnavailableSecsUs",0)e("QuarterHourLossOfSignalSecsDs",0,"QuarterHourLossOfSignalSecsUs",0)e("QuarterHourLossOfFramingSecsDs",0,"QuarterHourLossOfFramingSecsUs",0)e("QuarterHourLossOfMarginSecsDs",0,"QuarterHourLossOfMarginSecsUs",0)e("QuarterHourRetrainCount","0")e("QuarterHourTime",0)e("QuarterHourStart",0)e("PreviousQuarterHourXTURFECErrors",0,"PreviousQuarterHourXTUCFECErrors",0)e("PreviousQuarterHourXTURCRCErrors",0,"PreviousQuarterHourXTUCCRCErrors",0)e("PreviousQuarterHourXTURHECErrors",0,"PreviousQuarterHourXTUCHECErrors",0)e("PreviousQuarterHourErroredSecsDs",0,"PreviousQuarterHourErroredSecsUs",0)e("PreviousQuarterHourSeverelyErroredSecsDs",0,"PreviousQuarterHourSeverelyErroredSecsUs",0)e("PreviousQuarterHourUnavailableSecsDs",0,"PreviousQuarterHourUnavailableSecsUs",0)e("PreviousQuarterHourLossOfSignalSecsDs",0,"PreviousQuarterHourLossOfSignalSecsUs",0)e("PreviousQuarterHourLossOfFramingSecsDs",0,"PreviousQuarterHourLossOfFramingSecsUs",0)e("PreviousQuarterHourLossOfMarginSecsDs",0,"PreviousQuarterHourLossOfMarginSecsUs",0)e("PreviousQuarterHourRetrainCount","0")e("PreviousQuarterHourTime",0)e("CurrentDayXTURFECErrors",0,"CurrentDayXTUCFECErrors",0)e("CurrentDayXTURCRCErrors",0,"CurrentDayXTUCCRCErrors",0)e("CurrentDayXTURHECErrors",0,"CurrentDayXTUCHECErrors",0)e("CurrentDayErroredSecsDs",0,"CurrentDayErroredSecsUs",0)e("CurrentDaySeverelyErroredSecsDs",0,"CurrentDaySeverelyErroredSecsUs",0)e("CurrentDayUnavailableSecsDs",0,"CurrentDayUnavailableSecsUs",0)e("CurrentDayLossOfSignalSecsDs",0,"CurrentDayLossOfSignalSecsUs",0)e("CurrentDayLossOfFramingSecsDs",0,"CurrentDayLossOfFramingSecsUs",0)e("CurrentDayLossOfMarginSecsDs",0,"CurrentDayLossOfMarginSecsUs",0)e("CurrentDayRetrainCount","0")e("CurrentDayTime",0)e("CurrentDayStart",0)e("PreviousDayXTURFECErrors",0,"PreviousDayXTUCFECErrors",0)e("PreviousDayXTURCRCErrors",0,"PreviousDayXTUCCRCErrors",0)e("PreviousDayXTURHECErrors",0,"PreviousDayXTUCHECErrors",0)e("PreviousDayErroredSecsDs",0,"PreviousDayErroredSecsUs",0)e("PreviousDaySeverelyErroredSecsDs",0,"PreviousDaySeverelyErroredSecsUs",0)e("PreviousDayUnavailableSecsDs",0,"PreviousDayUnavailableSecsUs",0)e("PreviousDayLossOfSignalSecsDs",0,"PreviousDayLossOfSignalSecsUs",0)e("PreviousDayLossOfFramingSecsDs",0,"PreviousDayLossOfFramingSecsUs",0)e("PreviousDayLossOfMarginSecsDs",0,"PreviousDayLossOfMarginSecsUs",0)e("PreviousDayRetrainCount","0")e("PreviousDayTime",0)e("ShowtimeXTURFECErrors",0,"ShowtimeXTUCFECErrors",0)e("ShowtimeXTURCRCErrors",0,"ShowtimeXTUCCRCErrors",0)e("ShowtimeXTURHECErrors",0,"ShowtimeXTUCHECErrors",0)e("ShowtimeErroredSecsDs",0,"ShowtimeErroredSecsUs",0)e("LastShowtimeUnavailableSecsDs",0,"LastShowtimeUnavailableSecsUs",0)e("LastShowtimeLossOfSignalSecsDs",0,"LastShowtimeLossOfSignalSecsUs",0)e("LastShowtimeLossOfFramingSecsDs",0,"LastShowtimeLossOfFramingSecsUs",0)e("LastShowtimeLossOfMarginSecsDs",0,"LastShowtimeLossOfMarginSecsUs",0)e("LastShowtimeRetrainCount","0")e("ShowtimeSeverelyErroredSecsDs",0,"ShowtimeSeverelyErroredSecsUs",0)e("ShowtimeUnavailableSecsDs",0,"ShowtimeUnavailableSecsUs",0)e("ShowtimeLossOfSignalSecsDs",0,"ShowtimeLossOfSignalSecsUs",0)e("ShowtimeLossOfFramingSecsDs",0,"ShowtimeLossOfFramingSecsUs",0)e("ShowtimeLossOfMarginSecsDs",0,"ShowtimeLossOfMarginSecsUs",0)e("ShowtimeRetrainCount","0")e("ShowtimeTime",0)e("ShowtimeStart",0)e("LastShowtimeXTURFECErrors",0,"LastShowtimeXTUCFECErrors",0)e("LastShowtimeXTURCRCErrors",0,"LastShowtimeXTUCCRCErrors",0)e("LastShowtimeXTURHECErrors",0,"LastShowtimeXTURHECErrors",0)e("LastShowtimeErroredSecsDs",0,"LastShowtimeErroredSecsUs",0)e("LastShowtimeSeverelyErroredSecsDs",0,"LastShowtimeSeverelyErroredSecsUs",0)e("LastShowtimeTime",0)e("LastShowtimeStart",0)e("BitLoading","0")e("Qds",0)e("Qus",0)e("Vds",0)e("Vus",0)e("RxQueueds",0)e("RxQueueus",0)e("TxQueueds",0)e("TxQueueus",0)e("RTxModeds",0)e("RTxModeus",0)e("LookBackds",0)e("LookBackus",0)e("RRCBitsds",0)e("RRCBitsus",0)e("RTxTxds",0)e("RTxTxus",0)e("RTxCds",0)e("RTxCus",0)e("RTxUCds",0)e("RTxUCus",0)e("LEFTRSds",0)e("LEFTRSus",0)e("MinEFTRds",0)e("MinEFTRus",0)e("ErrFreeBitsds",0)e("ErrFreeBitsus",0)e("GINPStatus",0)e("DirectionMode",0)e("RxBitSwapMode",0)e("DisableVNMode",0)e("VceAddress","")e("CntESPktSend",0)e("CntESPktDrop",0)e("CntESStatSend",0)e("CntESStatDrop",0)e("FirmwareVersion"," ")e("ACTINP",0)e("ACTSNRMODEds",0)e("ACTSNRMODEus",0)e("ACTUALCE",0)e("ActualInterleavingDelay",0)e("AllowedProfiles"," ")e("HLOGGds",0,"HLOGGus",0)e("HLOGMTds",0,"HLOGMTus",0)e("HLOGpsds"," ","HLOGpsus"," ")e("INMCCds",0)e("INMIATOds",0)e("INMIATSds",0)e("INMINPEQMODEds",0)e("INPREPORT",0)e("INTLVBLOCK",0)e("INTLVDEPTH",0)e("LATNds"," ")e("LATNus"," ")e("LIMITMASK",0)e("LPATH",0)e("LSYMB",0)e("LastStateTransmittedDownstream",0)e("LastStateTransmittedUpstream",0)e("LineEncoding"," ")e("LinkEncapsulationSupported"," ")e("LinkEncapsulationRequested"," ")e("LinkEncapsulationUsed"," ")e("LinkStatus"," ")e("MREFPSDds"," ","MREFPSDus"," ")e("NFEC",0)e("RFEC",0)e("QLNMTds",0,"QLNMTus",0)e("QLNpsds"," ","QLNpsus"," ")e("SATNds"," ","SATNus"," ")e("SNRGds",0,"SNRGus",0)e("SNRMTds",0,"SNRMTus",0)e("SNRMpbds"," ","SNRMpbus"," ")e("SNRpsds"," ","SNRpsus"," ")e("StandardUsed"," ")e("StandardsSupported"," ")e("SuccessFailureCause",0)e("UPBOKLE",0)e("UPBOKLER",0)e("US0MASK",0)e("VirtualNoisePSDds"," ","VirtualNoisePSDus"," ")e("XTUCANSIRev",0)e("XTUCANSIStd",0)e("XTUCCountry"," ")e("XTUCVendor"," ")e("XTURANSIRev",0)e("XTURANSIStd",0)e("XTURCountry"," ")e("XTURVendor"," ")e("ACTATPds",0,"ACTATPus",0)e("ACTPSDds",0,"ACTPSDus",0)e("BITSpsds"," ","BITSpsus"," ")e("HLINpsds"," ","HLINpsus"," ")e("TotalBSWStartedDs",0)e("TotalBSWStartedUs",0)e("TotalBSWCompletedDs",0)e("TotalBSWCompletedUs",0)e("TotalSRAStartedDs",0)e("TotalSRAStartedUs",0)e("TotalSRACompletedDs",0)e("TotalSRACompletedUs",0)e("TotalFRAStartedDs",0)e("TotalFRAStartedUs",0)e("TotalFRACompletedDs",0)e("TotalFRACompletedUs",0)e("TotalRPAStartedDs",0)e("TotalRPAStartedUs",0)e("TotalRPACompletedDs",0)e("TotalRPACompletedUs",0)e("TotalTIGAStartedDs",0)e("TotalTIGAStartedUs",0)e("TotalTIGACompletedDs",0)e("TotalTIGACompletedUs",0)e("TotalRTXUC",0)e("TotalRTXTX",0)e("ShowtimeBSWStartedDs",0)e("ShowtimeBSWStartedUs",0)e("ShowtimeBSWCompletedDs",0)e("ShowtimeBSWCompletedUs",0)e("ShowtimeSRAStartedDs",0)e("ShowtimeSRAStartedUs",0)e("ShowtimeSRACompletedDs",0)e("ShowtimeSRACompletedUs",0)e("ShowtimeFRAStartedDs",0)e("ShowtimeFRAStartedUs",0)e("ShowtimeFRACompletedDs",0)e("ShowtimeFRACompletedUs",0)e("ShowtimeRPAStartedDs",0)e("ShowtimeRPAStartedUs",0)e("ShowtimeRPACompletedDs",0)e("ShowtimeRPACompletedUs",0)e("ShowtimeTIGAStartedDs",0)e("ShowtimeTIGAStartedUs",0)e("ShowtimeTIGACompletedDs",0)e("ShowtimeTIGACompletedUs",0)e("ShowtimeRTXUC",0)e("ShowtimeRTXTX",0)e("LastShowtimeBSWStartedDs",0)e("LastShowtimeBSWStartedUs",0)e("LastShowtimeBSWCompletedDs",0)e("LastShowtimeBSWCompletedUs",0)e("LastShowtimeSRAStartedDs",0)e("LastShowtimeSRAStartedUs",0)e("LastShowtimeSRACompletedDs",0)e("LastShowtimeSRACOmpletedUs",0)e("LastShowtimeFRAStartedDs",0)e("LastShowtimeFRAStartedUs",0)e("LastShowtimeFRACompletedDs",0)e("LastShowtimeFRACompletedUs",0)e("LastShowtimeRPAStartedDs",0)e("LastShowtimeRPAStartedUs",0)e("LastShowtimeRPACompletedDs",0)e("LastShowtimeRPACompletedUs",0)e("LastShowtimeTIGAStartedDs",0)e("LastShowtimeTIGAStartedUs",0)e("LastShowtimeTIGACompletedDs",0)e("LastShowtimeTIGACompletedUs",0)e("LastShowtimeRTXUC",0)e("LastShowtimeRTXTX",0)e("CurrentDayBSWStartedDs",0)e("CurrentDayBSWStartedUs",0)e("CurrentDayBSWCompletedDs",0)e("CurrentDayBSWCompletedUs",0)e("CurrentDaySRAStartedDs",0)e("CurrentDaySRAStartedUs",0)e("CurrentDaySRACompletedDs",0)e("CurrentDaySRACompletedUs",0)e("CurrentDayFRAStartedDs",0)e("CurrentDayFRAStartedUs",0)e("CurrentDayFRACompletedDs",0)e("CurrentDayFRACompletedUs",0)e("CurrentDayRPAStartedDs",0)e("CurrentDayRPAStartedUs",0)e("CurrentDayRPACompletedDs",0)e("CurrentDayRPACompletedUs",0)e("CurrentDayTIGAStartedDs",0)e("CurrentDayTIGAStartedUs",0)e("CurrentDayTIGACompletedDs",0)e("CurrentDayTIGACompletedUs",0)e("CurrentDayRTXUC",0)e("CurrentDayRTXTX",0)e("QuarterHourBSWStartedDs",0)e("QuarterHourBSWStartedUs",0)e("QuarterHourBSWCompletedDs",0)e("QuarterHourBSWCompletedUs",0)e("QuarterHourSRAStartedDs",0)e("QuarterHourSRAStartedUs",0)e("QuarterHourSRACompletedDs",0)e("QuarterHourSRACompletedUs",0)e("QuarterHourFRAStartedDs",0)e("QuarterHourFRAStartedUs",0)e("QuarterHourFRACompletedDs",0)e("QuarterHourFRACompletedUs",0)e("QuarterHourRPAStartedDs",0)e("QuarterHourRPAStartedUs",0)e("QuarterHourRPACompletedDs",0)e("QuarterHourRPACompletedUs",0)e("QuarterHourTIGAStartedDs",0)e("QuarterHourTIGAStartedUs",0)e("QuarterHourTIGACompletedDs",0)e("QuarterHourTIGACompletedUs",0)e("QuarterHourRTXUC",0)e("QuarterHourRTXTX",0)e("EOCBytesSent",0)e("EOCBytesReceived",0)e("EOCPacketsSent",0)e("EOCPacketsReceived",0)e("EOCMessagesSent",0)e("EOCMessagesReceived",0)e("LastTransmittedDownstreamSignal",0)e("LastTransmittedUpstreamSignal",0)e("SNRMRMCds",0)e("SNRMRMCus",0)e("BITSRMCpsds"," ")e("BITSRMCpsus"," ")e("FEXTCANCELds",0)e("FEXTCANCELus",0)e("ETRds",0)e("ETRus",0)e("ATTETRds",0)e("ATTETRus",0)e("MINEFTR",0)e("UPBOKLEPb"," ")e("UPBOKLERPb"," ")end
local function i(r,e)return r and r(e)or o(e or"")end
local function e(s,r,e,a,o,t)if o then
r[e]={}r[e]["ds"]=i(t,s[a])r[e]["us"]=i(t,s[o])else
r[e]=i(t,s[a])end
end
local function S(e)return e=="line1"and 1 or 0
end
local function i(e)local e=S(e)local t=C.time()-c[e]if t>5 or t<0 then
s=n.getAdslMib(e)c[e]=C.time()if o(s)=="-1"then
T()else
r=s
end
m[e]=r
else
r=m[e]end
end
local function m(e)local e=S(e)s=n.getMinimalDSLStatistics and n.getMinimalDSLStatistics(e)or n.getAdslMib(e)if o(s)=="-1"then
T()else
r=s
end
end
local l={["mode"]={"Mode"},["lrtr"]={"LastRetrainReason"},["lips"]={"LastInitializationProcedureStatus"},["maxrate"]={"DownstreamMaxBitRate","UpstreamMaxBitRate"},["currentrate"]={"DownstreamCurrRate","UpstreamCurrRate"},["linkpowerstate"]={"PowerManagementState"},["vdsl2profile"]={"CurrentProfile"},["tpstc"]={"TpsTcBcm"},["linestatus"]={"LineStatus"},["trainingstatus"]={"TrainingStatus"},["trellis"]={"TRELLISds","TRELLISus"},["snr"]={"DownstreamSNR","UpstreamSNR",l},["attn"]={"DownstreamAttenuation","UpstreamAttenuation",l},["pwr"]={"DownstreamPower","UpstreamPower",l},["framing_msgc"]={"DownstreamFramingMSGc","UpstreamFramingMSGc"},["framing_b"]={"DownstreamFramingB","UpstreamFramingB"},["framing_m"]={"DownstreamFramingM","UpstreamFramingM"},["framing_t"]={"DownstreamFramingT","UpstreamFramingT"},["framing_r"]={"DownstreamFramingR","UpstreamFramingR"},["framing_s"]={"DownstreamFramingS","UpstreamFramingS"},["framing_l"]={"DownstreamFramingL","UpstreamFramingL"},["framing_d"]={"DownstreamInterleaveDepth","UpstreamInterleaveDepth"},["framing_i"]={"DownstreamFramingI","UpstreamFramingI"},["framing_n"]={"DownstreamFramingN","UpstreamFramingN"},["framing_q"]={"DownstreamFramingQ","UpstreamFramingQ"},["framing_V"]={"DownstreamFramingV","UpstreamFramingV"},["framing_K"]={"DownstreamFramingK","UpstreamFramingK"},["counters_ohf"]={"OHFDs","OHFUs"},["counters_ohferr"]={"OHFErrDs","OHFErrUs"},["counters_sf"]={"SFDs","SFUs"},["counters_sferr"]={"SFErrDs","SFErrUs"},["counters_rs"]={"RSDs","RSUs"},["counters_rscorr"]={"RSCorrDs","RSCorrUs"},["counters_rsuncorr"]={"RSUnCorrDs","RSUnCorrUs"},["counters_hec"]={"ShowtimeXTURHECErrors","ShowtimeXTUCHECErrors"},["counters_ocd"]={"OCDDs","OCDUs"},["counters_lcd"]={"LCDDs","LCDUs"},["counters_totalcells"]={"BytesReceived","BytesSent"},["counters_datacells"]={"PacketsReceived","PacketsSent"},["counters_dropcells"]={"DiscardPacketsReceived","DiscardPacketsSent"},["counters_biterr"]={"ErrorsReceived","ErrorsSent"},["counters_es"]={"ShowtimeErroredSecsDs","ShowtimeErroredSecsUs"},["counters_ses"]={"ShowtimeSeverelyErroredSecsDs","ShowtimeSeverelyErroredSecsUs"},["counters_uas"]={"ShowtimeUnavailableSecsDs","ShowtimeUnavailableSecsUs"},["counters_as"]={"ShowtimeAvailableSecs"},["counters_inp"]={"INPDs","INPUs"},["counters_inprein"]={"INPReinDs","INPReinUs"},["counters_delay"]={"DownstreamDelay","UpstreamDelay"},["counters_per"]={"PERDs","PERUs"},["counters_or"]={"ORDs","ORUs"},["counters_agr"]={"AGRDs","AGRUs"},["counters_bitsw"]={"BitswapDs","BitswapUs"},["counters_noisemargin"]={"DownstreamNoiseMargin","UpstreamNoiseMargin"},["ginp_q"]={"Qds","Qus"},["ginp_v"]={"Vds","Vus"},["ginp_rxqueue"]={"RxQueueds","RxQueueus"},["ginp_txqueue"]={"TxQueueds","TxQueueus"},["ginp_rtxmode"]={"RTxModeds","RTxModeus"},["ginp_lookback"]={"LookBackds","LookBackus"},["ginp_rrcbits"]={"RRCBitsds","RRCBitsus"},["ginp_rtxtx"]={"RTxTxds","RTxTxus"},["ginp_rtxc"]={"RTxCds","RTxCus"},["ginp_rtxuc"]={"RTxUCds","RTxUCus"},["ginp_leftrs"]={"LEFTRSds","LEFTRSus"},["ginp_mineftr"]={"MinEFTRds","MinEFTRus"},["ginp_errfreebits"]={"ErrFreeBitsds","ErrFreeBitsus"},["ginp_status"]={"GINPStatus"},["vectoring_directionmode"]={"VectoringDirectionMode"},["vectoring_rxbitswapmode"]={"VectoringRxBitSwapMode"},["vectoring_disablevnmode"]={"VectoringDisableVNMode"},["vectoring_vceaddress"]={"VectoringVceAddress"},["vectoring_cntespktsend"]={"VectoringCntEsPktSend"},["vectoring_cntespktdrop"]={"VectoringCntEsPktDrop"},["vectoring_cntesstatsend"]={"VectoringCntEsStatSend"},["vectoring_cntesstatdrop"]={"VectoringCntEsStatDrop"},["firmware_version"]={"FirmwareVersion"},["ACTINP"]={"ACTINP"},["ACTSNRMODE"]={"ACTSNRMODEds","ACTSNRMODEus"},["ACTUALCE"]={"ACTUALCE"},["ActualInterleavingDelay"]={"ActualInterleavingDelay"},["AllowedProfiles"]={"AllowedProfiles"},["HLOGG"]={"HLOGGds","HLOGGus"},["HLOGMT"]={"HLOGMTds","HLOGMTus"},["HLOGps"]={"HLOGpsds","HLOGpsus"},["INMCCds"]={"INMCCds"},["INMIATOds"]={"INMIATOds"},["INMIATSds"]={"INMIATSds"},["INMINPEQMODEds"]={"INMINPEQMODEds"},["INPREPORT"]={"INPREPORT"},["INTLVBLOCK"]={"INTLVBLOCK"},["INTLVDEPTH"]={"INTLVDEPTH"},["LATN"]={"LATNds","LATNus"},["LIMITMASK"]={"LIMITMASK"},["LPATH"]={"LPATH"},["LSYMB"]={"LSYMB"},["LastStateTransmitted"]={"LastStateTransmittedDownstream","LastStateTransmittedUpstream"},["LineEncoding"]={"LineEncoding"},["LinkEncapsulationSupported"]={"LinkEncapsulationSupported"},["LinkEncapsulationRequested"]={"LinkEncapsulationRequested"},["LinkEncapsulationUsed"]={"LinkEncapsulationUsed"},["LinkStatus"]={"LinkStatus"},["MREFPSD"]={"MREFPSDds","MREFPSDus"},["NFEC"]={"NFEC"},["RFEC"]={"RFEC"},["QLNMT"]={"QLNMTds","QLNMTus"},["QLNps"]={"QLNpsds","QLNpsus"},["SATN"]={"SATNds","SATNus"},["SNRG"]={"SNRGds","SNRGus"},["SNRMT"]={"SNRMTds","SNRMTus"},["SNRMpb"]={"SNRMpbds","SNRMpbus"},["SNRps"]={"SNRpsds","SNRpsus"},["StandardUsed"]={"StandardUsed"},["StandardsSupported"]={"StandardsSupported"},["SuccessFailureCause"]={"SuccessFailureCause"},["UPBOKLE"]={"UPBOKLE"},["UPBOKLER"]={"UPBOKLER"},["US0MASK"]={"US0MASK"},["VirtualNoisePSD"]={"VirtualNoisePSDds","VirtualNoisePSDus"},["XTUCANSIRev"]={"XTUCANSIRev"},["XTUCANSIStd"]={"XTUCANSIStd"},["XTUCCountry"]={"XTUCCountry"},["XTUCVendor"]={"XTUCVendor"},["XTURANSIRev"]={"XTURANSIRev"},["XTURANSIStd"]={"XTURANSIStd"},["XTURCountry"]={"XTURCountry"},["XTURVendor"]={"XTURVendor"},["ACTATP"]={"ACTATPds","ACTATPus"},["ACTPSD"]={"ACTPSDds","ACTPSDus"},["BITSps"]={"BITSpsds","BITSpsus"},["HLINps"]={"HLINpsds","HLINpsus"},["EOCBytesSent"]={"EOCBytesSent"},["EOCBytesReceived"]={"EOCBytesReceived"},["EOCPacketsSent"]={"EOCPacketsSent"},["EOCPacketsReceived"]={"EOCPacketsReceived"},["EOCMessagesSent"]={"EOCMessagesSent"},["EOCMessagesReceived"]={"EOCMessagesReceived"},["LastTransmittedDownstreamSignal"]={"LastTransmittedDownstreamSignal"},["LastTransmittedUpstreamSignal"]={"LastTransmittedUpstreamSignal"},["SNRMRMC"]={"SNRMRMCds","SNRMRMCus"},["BITSRMCps"]={"BITSRMCpsds","BITSRMCpsus"},["FEXTCANCEL"]={"FEXTCANCELds","FEXTCANCELus"},["ETR"]={"ETRds","ETRus"},["ATTETR"]={"ATTETRds","ATTETRus"},["MINEFTR"]={"MINEFTR"},["UPBOKLEPb"]={"UPBOKLEPb"},["UPBOKLERPb"]={"UPBOKLERPb"}}local function c(t)local s={}i(t)s.status=d(u[t],"status")s.linit=d(u[t],"linit")for a,t in pairs(l)do
e(r,s,a,t[1],t[2],t[3])end
s.currentrate.channel="0"return s
end
local function C(t,s,o)local a={}if s=="status"or s=="linit"then
return d(u[t],s)end
if s=="maxrate"or s=="currentrate"then
m(t)else
i(t)end
local t=l[s]or{}e(r,a,s,t[1],t[2],t[3])if o and o~=""then
return a[s][o]end
return a[s]end
local function u(t)local s={}i(t)s["total"]={}s["currentquarter"]={}s["previousquarter"]={}s["currentday"]={}s["previousday"]={}s["sincesync"]={}s["lastshowtime"]={}e(r,s["total"],"fec","TotalXTURFECErrors","TotalXTUCFECErrors")e(r,s["total"],"crc","TotalXTURCRCErrors","TotalXTUCCRCErrors")e(r,s["total"],"hec","TotalXTURHECErrors","TotalXTUCHECErrors")e(r,s["total"],"es","TotalErroredSecsDs","TotalErroredSecsUs")e(r,s["total"],"ses","TotalSeverelyErroredSecsDs","TotalSeverelyErroredSecsUs")e(r,s["total"],"uas","TotalUnavailableSecsDs","TotalUnavailableSecsUs")e(r,s["total"],"los","TotalLossOfSignalSecsDs","TotalLossOfSignalSecsUs")e(r,s["total"],"lof","TotalLossOfFramingSecsDs","TotalLossOfFramingSecsUs")e(r,s["total"],"lom","TotalLossOfMarginSecsDs","TotalLossOfMarginSecsUs")e(r,s["total"],"retr","TotalRetrainCount")e(r,s["total"],"time","TotalTime")e(r,s["total"],"start","TotalStart")e(r,s["currentquarter"],"fec","QuarterHourXTURFECErrors","QuarterHourXTUCFECErrors")e(r,s["currentquarter"],"crc","QuarterHourXTURCRCErrors","QuarterHourXTUCCRCErrors")e(r,s["currentquarter"],"hec","QuarterHourXTURHECErrors","QuarterHourXTUCHECErrors")e(r,s["currentquarter"],"es","QuarterHourErroredSecsDs","QuarterHourErroredSecsUs")e(r,s["currentquarter"],"ses","QuarterHourSeverelyErroredSecsDs","QuarterHourSeverelyErroredSecsUs")e(r,s["currentquarter"],"uas","QuarterHourUnavailableSecsDs","QuarterHourUnavailableSecsUs")e(r,s["currentquarter"],"los","QuarterHourLossOfSignalSecsDs","QuarterHourLossOfSignalSecsUs")e(r,s["currentquarter"],"lof","QuarterHourLossOfFramingSecsDs","QuarterHourLossOfFramingSecsUs")e(r,s["currentquarter"],"lom","QuarterHourLossOfMarginSecsDs","QuarterHourLossOfMarginSecsUs")e(r,s["currentquarter"],"retr","QuarterHourRetrainCount")e(r,s["currentquarter"],"time","QuarterHourTime")e(r,s["currentquarter"],"start","QuarterHourStart")e(r,s["previousquarter"],"fec","PreviousQuarterHourXTURFECErrors","PreviousQuarterHourXTUCFECErrors")e(r,s["previousquarter"],"crc","PreviousQuarterHourXTURCRCErrors","PreviousQuarterHourXTUCCRCErrors")e(r,s["previousquarter"],"hec","PreviousQuarterHourXTURHECErrors","PreviousQuarterHourXTUCHECErrors")e(r,s["previousquarter"],"es","PreviousQuarterHourErroredSecsDs","PreviousQuarterHourErroredSecsUs")e(r,s["previousquarter"],"ses","PreviousQuarterHourSeverelyErroredSecsDs","PreviousQuarterHourSeverelyErroredSecsUs")e(r,s["previousquarter"],"uas","PreviousQuarterHourUnavailableSecsDs","PreviousQuarterHourUnavailableSecsUs")e(r,s["previousquarter"],"los","PreviousQuarterHourLossOfSignalSecsDs","PreviousQuarterHourLossOfSignalSecsUs")e(r,s["previousquarter"],"lof","PreviousQuarterHourLossOfFramingSecsDs","PreviousQuarterHourLossOfFramingSecsUs")e(r,s["previousquarter"],"lom","PreviousQuarterHourLossOfMarginSecsDs","PreviousQuarterHourLossOfMarginSecsUs")e(r,s["previousquarter"],"retr","PreviousQuarterHourRetrainCount")e(r,s["previousquarter"],"time","PreviousQuarterHourTime")e(r,s["currentday"],"fec","CurrentDayXTURFECErrors","CurrentDayXTUCFECErrors")e(r,s["currentday"],"crc","CurrentDayXTURCRCErrors","CurrentDayXTUCCRCErrors")e(r,s["currentday"],"hec","CurrentDayXTURHECErrors","CurrentDayXTUCHECErrors")e(r,s["currentday"],"es","CurrentDayErroredSecsDs","CurrentDayErroredSecsUs")e(r,s["currentday"],"ses","CurrentDaySeverelyErroredSecsDs","CurrentDaySeverelyErroredSecsUs")e(r,s["currentday"],"uas","CurrentDayUnavailableSecsDs","CurrentDayUnavailableSecsUs")e(r,s["currentday"],"los","CurrentDayLossOfSignalSecsDs","CurrentDayLossOfSignalSecsUs")e(r,s["currentday"],"lof","CurrentDayLossOfFramingSecsDs","CurrentDayLossOfFramingSecsUs")e(r,s["currentday"],"lom","CurrentDayLossOfMarginSecsDs","CurrentDayLossOfMarginSecsUs")e(r,s["currentday"],"retr","CurrentDayRetrainCount")e(r,s["currentday"],"time","CurrentDayTime")e(r,s["currentday"],"start","CurrentDayStart")e(r,s["lastshowtime"],"fec","LastShowtimeXTURFECErrors","LastShowtimeXTUCFECErrors")e(r,s["lastshowtime"],"crc","LastShowtimeXTURCRCErrors","LastShowtimeXTUCCRCErrors")e(r,s["lastshowtime"],"hec","LastShowtimeXTURHECErrors","LastShowtimeXTUCHECErrors")e(r,s["lastshowtime"],"es","LastShowtimeErroredSecsDs","LastShowtimeErroredSecsUs")e(r,s["lastshowtime"],"ses","LastShowtimeSeverelyErroredSecsDs","LastShowtimeSeverelyErroredSecsUs")e(r,s["lastshowtime"],"uas","LastShowtimeUnavailableSecsDs","LastShowtimeUnavailableSecsUs")e(r,s["lastshowtime"],"los","LastShowtimeLossOfSignalSecsDs","LastShowtimeLossOfSignalSecsUs")e(r,s["lastshowtime"],"lof","LastShowtimeLossOfFramingSecsDs","LastShowtimeLossOfFramingSecsUs")e(r,s["lastshowtime"],"lom","LastShowtimeLossOfMarginSecsDs","LastShowtimeLossOfMarginSecsUs")e(r,s["lastshowtime"],"retr","LastShowtimeRetrainCount")e(r,s["lastshowtime"],"time","LastShowtimeTime")e(r,s["lastshowtime"],"start","LastShowtimeStart")e(r,s["previousday"],"fec","PreviousDayXTURFECErrors","PreviousDayXTUCFECErrors")e(r,s["previousday"],"crc","PreviousDayXTURCRCErrors","PreviousDayXTUCCRCErrors")e(r,s["previousday"],"hec","PreviousDayXTURHECErrors","PreviousDayXTUCHECErrors")e(r,s["previousday"],"es","PreviousDayErroredSecsDs","PreviousDayErroredSecsUs")e(r,s["previousday"],"ses","PreviousDaySeverelyErroredSecsDs","PreviousDaySeverelyErroredSecsUs")e(r,s["previousday"],"uas","PreviousDayUnavailableSecsDs","PreviousDayUnavailableSecsUs")e(r,s["previousday"],"los","PreviousDayLossOfSignalSecsDs","PreviousDayLossOfSignalSecsUs")e(r,s["previousday"],"lof","PreviousDayLossOfFramingSecsDs","PreviousDayLossOfFramingSecsUs")e(r,s["previousday"],"lom","PreviousDayLossOfMarginSecsDs","PreviousDayLossOfMarginSecsUs")e(r,s["previousday"],"retr","PreviousDayRetrainCount")e(r,s["previousday"],"time","PreviousDayTime")e(r,s["sincesync"],"fec","ShowtimeXTURFECErrors","ShowtimeXTUCFECErrors")e(r,s["sincesync"],"crc","ShowtimeXTURCRCErrors","ShowtimeXTUCCRCErrors")e(r,s["sincesync"],"hec","ShowtimeXTURHECErrors","ShowtimeXTUCHECErrors")e(r,s["sincesync"],"es","ShowtimeErroredSecsDs","ShowtimeErroredSecsUs")e(r,s["sincesync"],"ses","ShowtimeSeverelyErroredSecsDs","ShowtimeSeverelyErroredSecsUs")e(r,s["sincesync"],"uas","ShowtimeUnavailableSecsDs","ShowtimeUnavailableSecsUs")e(r,s["sincesync"],"los","ShowtimeLossOfSignalSecsDs","ShowtimeLossOfSignalSecsUs")e(r,s["sincesync"],"lof","ShowtimeLossOfFramingSecsDs","ShowtimeLossOfFramingSecsUs")e(r,s["sincesync"],"lom","ShowtimeLossOfMarginSecsDs","ShowtimeLossOfMarginSecsUs")e(r,s["sincesync"],"retr","ShowtimeRetrainCount")e(r,s["sincesync"],"time","ShowtimeTime")e(r,s["sincesync"],"start","ShowtimeStart")e(r,s["total"],"bswStarted","TotalBSWStartedDs","TotalBSWStartedUs")e(r,s["total"],"bswCompleted","TotalBSWCompletedDs","TotalBSWCompletedUs")e(r,s["total"],"sraStarted","TotalSRAStartedDs","TotalSRAStartedUs")e(r,s["total"],"sraCompleted","TotalSRACompletedDs","TotalSRACompletedUs")e(r,s["total"],"fraStarted","TotalFRAStartedDs","TotalFRAStartedUs")e(r,s["total"],"fraCompleted","TotalFRACompletedDs","TotalFRACompletedUs")e(r,s["total"],"rpaStarted","TotalRPAStartedDs","TotalRPAStartedUs")e(r,s["total"],"rpaCompleted","TotalRPACompletedDs","TotalRPACompletedUs")e(r,s["total"],"tigaStarted","TotalTIGAStartedDs","TotalTIGAStartedUs")e(r,s["total"],"tigaCompleted","TotalTIGACompletedDs","TotalTIGACompletedUs")e(r,s["total"],"rtx","TotalRTXUC","TotalRTXTX")e(r,s["sincesync"],"bswStarted","ShowtimeBSWStartedDs","ShowtimeBSWStartedUs")e(r,s["sincesync"],"bswCompleted","ShowtimeBSWCompletedDs","ShowtimeBSWCompletedUs")e(r,s["sincesync"],"sraStarted","ShowtimeSRAStartedDs","ShowtimeSRAStartedUs")e(r,s["sincesync"],"sraCompleted","ShowtimeSRACompletedDs","ShowtimeSRACOmpletedUs")e(r,s["sincesync"],"fraStarted","ShowtimeFRAStartedDs","ShowtimeFRAStartedUs")e(r,s["sincesync"],"fraCompleted","ShowtimeFRACompletedDs","ShowtimeFRACompletedUs")e(r,s["sincesync"],"rpaStarted","ShowtimeRPAStartedDs","ShowtimeRPAStartedUs")e(r,s["sincesync"],"rpaCompleted","ShowtimeRPACompletedDs","ShowtimeRPACompletedUs")e(r,s["sincesync"],"tigaStarted","ShowtimeTIGAStartedDs","ShowtimeTIGAStartedUs")e(r,s["sincesync"],"tigaCompleted","ShowtimeTIGACompletedDs","ShowtimeTIGACompletedUs")e(r,s["sincesync"],"rtx","ShowtimeRTXUC","ShowtimeRTXTX")e(r,s["currentday"],"bswStarted","CurrentDayBSWStartedDs","CurrentDayBSWStartedUs")e(r,s["currentday"],"bswCompleted","CurrentDayBSWCompletedDs","CurrentDayBSWCompletedUs")e(r,s["currentday"],"sraStarted","CurrentDaySRAStartedDs","CurrentDaySRAStartedUs")e(r,s["currentday"],"sraCompleted","CurrentDaySRACompletedDs","CurrentDaySRACompletedUs")e(r,s["currentday"],"fraStarted","CurrentDayFRAStartedDs","CurrentDayFRAStartedUs")e(r,s["currentday"],"fraCompleted","CurrentDayFRACompletedDs","CurrentDayFRACompletedUs")e(r,s["currentday"],"rpaStarted","CurrentDayRPAStartedDs","CurrentDayRPAStartedUs")e(r,s["currentday"],"rpaCompleted","CurrentDayRPACompletedDs","CurrentDayRPACompletedUs")e(r,s["currentday"],"tigaStarted","CurrentDayTIGAStartedDs","CurrentDayTIGAStartedUs")e(r,s["currentday"],"tigaCompleted","CurrentDayTIGACompletedDs","CurrentDayTIGACompletedUs")e(r,s["currentday"],"rtx","CurrentDayRTXUC","CurrentDayRTXTX")e(r,s["lastshowtime"],"bswStarted","LastShowtimeBSWStartedDs","LastShowtimeBSWStartedUs")e(r,s["lastshowtime"],"bswCompleted","LastShowtimeBSWCompletedDs","LastShowtimeBSWCompletedUs")e(r,s["lastshowtime"],"sraStarted","LastShowtimeSRAStartedDs","LastShowtimeSRAStartedUs")e(r,s["lastshowtime"],"sraCompleted","LastShowtimeSRACompletedDs","LastShowtimeSRACOmpletedUs")e(r,s["lastshowtime"],"fraStarted","LastShowtimeFRAStartedDs","LastShowtimeFRAStartedUs")e(r,s["lastshowtime"],"fraCompleted","LastShowtimeFRACompletedDs","LastShowtimeFRACompletedUs")e(r,s["lastshowtime"],"rpaStarted","LastShowtimeRPAStartedDs","LastShowtimeRPAStartedUs")e(r,s["lastshowtime"],"rpaCompleted","LastShowtimeRPACompletedDs","LastShowtimeRPACompletedUs")e(r,s["lastshowtime"],"tigaStarted","LastShowtimeTIGAStartedDs","LastShowtimeTIGAStartedUs")e(r,s["lastshowtime"],"tigaCompleted","LastShowtimeTIGACompletedDs","LastShowtimeTIGACompletedUs")e(r,s["lastshowtime"],"rtx","LastShowtimeRTXUC","LastShowtimeRTXTX")e(r,s["currentquarter"],"bswStarted","QuarterHourBSWStartedDs","QuarterHourBSWStartedUs")e(r,s["currentquarter"],"bswCompleted","QuarterHourBSWCompletedDs","QuarterHourBSWCompletedUs")e(r,s["currentquarter"],"sraStarted","QuarterHourSRAStartedDs","QuarterHourSRAStartedUs")e(r,s["currentquarter"],"sraCompleted","QuarterHourSRACompletedDs","QuarterHourSRACompletedUs")e(r,s["currentquarter"],"fraStarted","QuarterHourFRAStartedDs","QuarterHourFRAStartedUs")e(r,s["currentquarter"],"fraCompleted","QuarterHourFRACompletedDs","QuarterHourFRACompletedUs")e(r,s["currentquarter"],"rpaStarted","QuarterHourRPAStartedDs","QuarterHourRPAStartedUs")e(r,s["currentquarter"],"rpaCompleted","QuarterHourRPACompletedDs","QuarterHourRPACompletedUs")e(r,s["currentquarter"],"tigaStarted","QuarterHourTIGAStartedDs","QuarterHourTIGAStartedUs")e(r,s["currentquarter"],"tigaCompleted","QuarterHourTIGACompletedDs","QuarterHourTIGACompletedUs")e(r,s["currentquarter"],"rtx","QuarterHourRTXUC","QuarterHourRTXTX")return s
end
local function l(a)local s={}i(a)e(r,s,"mod_g.dmt","GDMT",nil,t)e(r,s,"mod_g.lite","GLITE",nil,t)e(r,s,"mod_t1.413","T1413",nil,t)e(r,s,"mod_adsl2","ADSL2",nil,t)e(r,s,"mod_annexl","ANNEXL",nil,t)e(r,s,"mod_adsl2plus","ADSL2P",nil,t)e(r,s,"mod_annexm","ANNEXM",nil,t)e(r,s,"mod_vdsl2","VDSL2",nil,t)e(r,s,"mod_gfast","GFAST",nil,t)e(r,s,"phonelinepair","LinePair")e(r,s,"cap_bitswap","Bitswap",nil,t)e(r,s,"cap_sra","SRA",nil,t)e(r,s,"cap_trellis","Trellis",nil,t)e(r,s,"cap_sesdrop","SESDrop",nil,t)e(r,s,"cap_cominmgn","CoMinMgn",nil,t)e(r,s,"cap_24k","24k",nil,t)e(r,s,"cap_phyrexmtus","PhyReXmtUs",nil,t)e(r,s,"cap_phyrexmtds","PhyReXmtDs",nil,t)e(r,s,"cap_tpstc","TpsTc",nil,t)e(r,s,"cap_monitortone","MonitorTone",nil,t)e(r,s,"cap_dynamicd","DynamicD",nil,t)e(r,s,"cap_dynamicf","DynamicF",nil,t)e(r,s,"cap_v43","V43",nil,t)e(r,s,"cap_sos","SOS",nil,t)e(r,s,"cap_trainingmargin","TrainingMargin",nil,t)e(r,s,"cap_ginpus","GINPUs",nil,t)e(r,s,"cap_ginpds","GINPDs",nil,t)e(r,s,"cap_ikns","IKNS",nil,t)return s
end
local function m(t)local s={}i(t)e(r,s,"attn","LineAttenuationPBDownstream","LineAttenuationPBUpstream")return s
end
local function s(e)local e=S(e)local e=n.getNLNM(e)local r={}r["NonLinearityFlag"]=e["NonLinearityFlag"]and o(e["NonLinearityFlag"])or"0"r["NumberOfAffectedBins"]=e["NumberOfAffectedBins"]and o(e["NumberOfAffectedBins"])or"0"r["ThresholdNumberOfBins"]=e["ThresholdNumberOfBins"]and o(e["ThresholdNumberOfBins"])or"0"r["ENR"]=e["ENR"]and o(e["ENR"])or"0"r["ThresholdValue"]=e["ThresholdValue"]and o(e["ThresholdValue"])or"0"return r
end
local function d(e,r)local e=S(e)n.setNLNM(e,D(r))end
local function t(e)local e=S(e)local e=n.getBTDetection(e)local r={}r["BridgeTapDetected"]=e["BridgeTapDetected"]and o(e["BridgeTapDetected"])or"0"r["LocalMinimumTone"]=e["LocalMinimumTone"]and o(e["LocalMinimumTone"])or"0"r["BridgeTapDistance"]=e["BridgeTapDistance"]and o(e["BridgeTapDistance"])or"0"r["BitrateLoss"]=e["BitrateLoss"]and o(e["BitrateLoss"])or"0"return r
end
function a.infoValue(r,s,t,e)return C(e,r,s)end
function a.infoValueList(r,e)return c(e)end
function a.profileValue(r,s,t,e)local e=l(e)return s and e[r][s]or e[r]end
function a.profileValueList(r,e)return l(e)end
function a.statsIntervalValueList(r,e)return u(e)end
function a.stats(s,r,e,t)local t=u(t)if e and e~=""then
return t[s][r][e]end
return t[s][r]end
function a.allstats(e)return u(e)end
function a.infoPbParamsValue(s,e,t,r)local r=m(r)return e and r[s][e]or r[s]end
function a.getNLNM(e)return s(e)end
function a.getNLNMValue(r,t,a,e)local e=s(e)return t and e[r][t]or e[r]end
function a.setNLNMThreshold(e,r)d(r,e)end
function a.getBridgeTapInfo(e)return t(e)end
function a.getBridgeTapInfoValue(e,r,a,s)local s=t(s)return r and s[e][r]or s[e]end
function a.getBitLoading(e)i(e)return r["BitLoading"]end
function a.isBondingSupported()local e=U.get_from_uci({config="xdsl",sectionname="dsl0",option="bondingsupport",default="0"})if e=="1"then
return true
end
return false
end
return a