mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added IEC utilities
This commit is contained in:
parent
3728f783e7
commit
4e35b04b20
2 changed files with 87 additions and 87 deletions
|
|
@ -4047,6 +4047,93 @@ function builMapHREF(ip_address, vlan_id, map, default_page)
|
|||
end
|
||||
|
||||
|
||||
-- #####################
|
||||
|
||||
local iec104_typeids = {
|
||||
M_SP_NA_1=0x01,
|
||||
M_SP_TA_1=0x02,
|
||||
M_DP_NA_1=0x03,
|
||||
M_DP_TA_1=0x04,
|
||||
M_ST_NA_1=0x05,
|
||||
M_ST_TA_1=0x06,
|
||||
M_BO_NA_1=0x07,
|
||||
M_BO_TA_1=0x08,
|
||||
M_ME_NA_1=0x09,
|
||||
M_ME_TA_1=0x0A,
|
||||
M_ME_NB_1=0x0B,
|
||||
M_ME_TB_1=0x0C,
|
||||
M_ME_NC_1=0x0D,
|
||||
M_ME_TC_1=0x0E,
|
||||
M_IT_NA_1=0x0F,
|
||||
M_IT_TA_1=0x10,
|
||||
M_EP_TA_1=0x11,
|
||||
M_EP_TB_1=0x12,
|
||||
M_EP_TC_1=0x13,
|
||||
M_PS_NA_1=0x14,
|
||||
M_ME_ND_1=0x15,
|
||||
M_SP_TB_1=30,
|
||||
M_DP_TB_1=31,
|
||||
M_ST_TB_1=32,
|
||||
M_BO_TB_1=33,
|
||||
M_ME_TD_1=34,
|
||||
M_ME_TE_1=35,
|
||||
M_ME_TF_1=36,
|
||||
M_IT_TB_1=37,
|
||||
M_EP_TD_1=38,
|
||||
M_EP_TE_1=39,
|
||||
M_EP_TF_1=40,
|
||||
ASDU_TYPE_41=41,
|
||||
ASDU_TYPE_42=42,
|
||||
ASDU_TYPE_43=43,
|
||||
ASDU_TYPE_44=44,
|
||||
C_SC_NA_1=45,
|
||||
C_DC_NA_1=46,
|
||||
C_RC_NA_1=47,
|
||||
C_SE_NA_1=48,
|
||||
C_SE_NB_1=49,
|
||||
C_SE_NC_1=50,
|
||||
C_BO_NA_1=51,
|
||||
C_SC_TA_1=58,
|
||||
C_DC_TA_1=59,
|
||||
C_RC_TA_1=60,
|
||||
C_SE_TA_1=61,
|
||||
C_SE_TB_1=62,
|
||||
C_SE_TC_1=63,
|
||||
C_BO_TA_1=64,
|
||||
M_EI_NA_1=70,
|
||||
C_IC_NA_1=100,
|
||||
C_CI_NA_1=101,
|
||||
C_RD_NA_1=102,
|
||||
C_CS_NA_1=103,
|
||||
C_TS_NA_1=104,
|
||||
C_RP_NA_1=105,
|
||||
C_CD_NA_1=106,
|
||||
C_TS_TA_1=107,
|
||||
P_ME_NA_1=110,
|
||||
P_ME_NB_1=111,
|
||||
P_ME_NC_1=112,
|
||||
P_AC_NA_1=113,
|
||||
F_FR_NA_1=120,
|
||||
F_SR_NA_1=121,
|
||||
F_SC_NA_1=122,
|
||||
F_LS_NA_1=123,
|
||||
F_FA_NA_1=124,
|
||||
F_SG_NA_1=125,
|
||||
F_DR_TA_1=126,
|
||||
}
|
||||
|
||||
function iec104_typeids2str(c)
|
||||
if(c == nil) then return end
|
||||
|
||||
for s,v in pairs(iec104_typeids) do
|
||||
if(v == c) then
|
||||
return(s.." (".. v ..")")
|
||||
end
|
||||
end
|
||||
|
||||
return(c)
|
||||
end
|
||||
|
||||
--
|
||||
-- IMPORTANT
|
||||
-- Leave it at the end so it can use the functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue