⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 megaco_per_bin_drv_media_gateway_control_prev3b.erl

📁 OTP是开放电信平台的简称
💻 ERL
📖 第 1 页 / 共 5 页
字号:
end,%% attribute number 5 with type Externaltypereference888megaco_per_bin_drv_media_gateway_control_prev3bValue'enc_Value'(element(6,Val1)),case element(7,Val1) ofasn1_NOVALUE -> [];Tmpval5 ->%% attribute number 6 with type INTEGER  %%INTEGER with effective constraint: [{'ValueRange',{0,4294967295}}]  ?RT_PER:encode_integer([{'ValueRange',{0,4294967295}}],Tmpval5)end,case element(8,Val1) ofasn1_NOVALUE -> [];Tmpval6 ->%% attribute number 7 with type Externaltypereference901megaco_per_bin_drv_media_gateway_control_prev3bMId'enc_MId'(Tmpval6)end,case element(9,Val1) ofasn1_NOVALUE -> [];Tmpval7 ->%% attribute number 8 with type Externaltypereference902megaco_per_bin_drv_media_gateway_control_prev3bTimeNotation'enc_TimeNotation'(Tmpval7)end,case element(10,Val1) ofasn1_NOVALUE -> [];Tmpval8 ->%% attribute number 9 with type Externaltypereference903megaco_per_bin_drv_media_gateway_control_prev3bNonStandardData'enc_NonStandardData'(Tmpval8)end,Extensions,case element(11,Val1) ofasn1_NOVALUE -> [];Tmpval9 ->%% attribute number 10 with type Externaltypereference905megaco_per_bin_drv_media_gateway_control_prev3bAuditDescriptor?RT_PER:encode_open_type(dummy,?RT_PER:complete('enc_AuditDescriptor'(Tmpval9)))end,case element(12,Val1) ofasn1_NOVALUE -> [];Tmpval10 ->%% attribute number 11 with type NULL?RT_PER:encode_open_type(dummy,?RT_PER:complete(?RT_PER:encode_null(Tmpval10)))end].'dec_ServiceChangeParm'(Bytes,_) ->{Ext,Bytes1} = ?RT_PER:getext(Bytes),{Opt,Bytes2} = ?RT_PER:getoptionals2(Bytes1,7), %% attribute number 1 with type ENUMERATED{Term1,Bytes3} = ?RT_PER:decode_enumerated(Bytes2,[{'ValueRange',{0,5}}],{{failover,forced,graceful,restart,disconnected,handOff},{}}),%%  attribute number 2 with type ServiceChangeAddress{Term2,Bytes4} = case Opt band (1 bsl 6) of_Opt1 when _Opt1 > 0 ->'dec_ServiceChangeAddress'(Bytes3,telltype);0 ->{asn1_NOVALUE,Bytes3}end,%% attribute number 3 with type INTEGER{Term3,Bytes5} = case Opt band (1 bsl 5) of_Opt2 when _Opt2 > 0 ->  begin    {Tmpterm1,Tmpremain1}=?RT_PER:getbits(Bytes4,7),    {Tmpterm1+0,Tmpremain1}  end;0 ->{asn1_NOVALUE,Bytes4}end,%%  attribute number 4 with type ServiceChangeProfile{Term4,Bytes6} = case Opt band (1 bsl 4) of_Opt3 when _Opt3 > 0 ->'dec_ServiceChangeProfile'(Bytes5,telltype);0 ->{asn1_NOVALUE,Bytes5}end,%%  attribute number 5 with type Value{Term5,Bytes7} = 'dec_Value'(Bytes6,telltype),%% attribute number 6 with type INTEGER{Term6,Bytes8} = case Opt band (1 bsl 3) of_Opt4 when _Opt4 > 0 ->?RT_PER:decode_constrained_number(Bytes7,{0,4294967295},4294967296);0 ->{asn1_NOVALUE,Bytes7}end,%%  attribute number 7 with type MId{Term7,Bytes9} = case Opt band (1 bsl 2) of_Opt5 when _Opt5 > 0 ->'dec_MId'(Bytes8,telltype);0 ->{asn1_NOVALUE,Bytes8}end,%%  attribute number 8 with type TimeNotation{Term8,Bytes10} = case Opt band (1 bsl 1) of_Opt6 when _Opt6 > 0 ->'dec_TimeNotation'(Bytes9,telltype);0 ->{asn1_NOVALUE,Bytes9}end,%%  attribute number 9 with type NonStandardData{Term9,Bytes11} = case Opt band (1 bsl 0) of_Opt7 when _Opt7 > 0 ->'dec_NonStandardData'(Bytes10,telltype);0 ->{asn1_NOVALUE,Bytes10}end,{Extensions,Bytes12} = ?RT_PER:getextension(Ext,Bytes11),%%  attribute number 10 with type AuditDescriptor{Term10,Bytes13} = case Extensions of_ when size(Extensions) >= 1,element(1,Extensions) == 1 ->begin{TmpVal10,Trem10}=?RT_PER:decode_open_type(Bytes12,[]),{TmpValx10,_}='dec_AuditDescriptor'(TmpVal10,telltype), {TmpValx10,Trem10}end;_  ->{asn1_NOVALUE,Bytes12}end,%% attribute number 11 with type NULL{Term11,Bytes14} = case Extensions of_ when size(Extensions) >= 2,element(2,Extensions) == 1 ->begin{TmpVal11,Trem11}=?RT_PER:decode_open_type(Bytes13,[]),{TmpValx11,_}=?RT_PER:decode_null(TmpVal11), {TmpValx11,Trem11}end;_  ->{asn1_NOVALUE,Bytes13}end,Bytes15= ?RT_PER:skipextensions(Bytes14,3,Extensions),{{'ServiceChangeParm',Term1,Term2,Term3,Term4,Term5,Term6,Term7,Term8,Term9,Term10,Term11},Bytes15}.'enc_DigitMapValue'(Val) ->{Val1,Opt} = ?RT_PER:fixoptionals([2,3,4],3,Val),Extensions = ?RT_PER:fixextensions({ext,5,1}, Val1),[?RT_PER:setext(Extensions =/= []), Opt,case element(2,Val1) ofasn1_NOVALUE -> [];Tmpval1 ->%% attribute number 1 with type INTEGER  %%INTEGER with effective constraint: [{'ValueRange',{0,99},100,{bits,7}}]  begin  case Tmpval1 of    Tmpval2 when Tmpval2=<99,Tmpval2>=0 ->      [10,7,Tmpval2- 0];    Tmpval2 ->      exit({error,{value_out_of_bounds,Tmpval2}})  end  endend,case element(3,Val1) ofasn1_NOVALUE -> [];Tmpval3 ->%% attribute number 2 with type INTEGER  %%INTEGER with effective constraint: [{'ValueRange',{0,99},100,{bits,7}}]  begin  case Tmpval3 of    Tmpval4 when Tmpval4=<99,Tmpval4>=0 ->      [10,7,Tmpval4- 0];    Tmpval4 ->      exit({error,{value_out_of_bounds,Tmpval4}})  end  endend,case element(4,Val1) ofasn1_NOVALUE -> [];Tmpval5 ->%% attribute number 3 with type INTEGER  %%INTEGER with effective constraint: [{'ValueRange',{0,99},100,{bits,7}}]  begin  case Tmpval5 of    Tmpval6 when Tmpval6=<99,Tmpval6>=0 ->      [10,7,Tmpval6- 0];    Tmpval6 ->      exit({error,{value_out_of_bounds,Tmpval6}})  end  endend,%% attribute number 4 with type IA5String?RT_PER:encode_known_multiplier_string('IA5String',no,8,{0,127,notab},element(5,Val1)),Extensions,case element(6,Val1) ofasn1_NOVALUE -> [];Tmpval7 ->%% attribute number 5 with type INTEGER?RT_PER:encode_open_type(dummy,?RT_PER:complete(  %%INTEGER with effective constraint: [{'ValueRange',{0,99},100,{bits,7}}]  begin  case Tmpval7 of    Tmpval8 when Tmpval8=<99,Tmpval8>=0 ->      [10,7,Tmpval8- 0];    Tmpval8 ->      exit({error,{value_out_of_bounds,Tmpval8}})  end  end))end].'dec_DigitMapValue'(Bytes,_) ->{Ext,Bytes1} = ?RT_PER:getext(Bytes),{Opt,Bytes2} = ?RT_PER:getoptionals2(Bytes1,3), %% attribute number 1 with type INTEGER{Term1,Bytes3} = case Opt band (1 bsl 2) of_Opt1 when _Opt1 > 0 ->  begin    {Tmpterm1,Tmpremain1}=?RT_PER:getbits(Bytes2,7),    {Tmpterm1+0,Tmpremain1}  end;0 ->{asn1_NOVALUE,Bytes2}end,%% attribute number 2 with type INTEGER{Term2,Bytes4} = case Opt band (1 bsl 1) of_Opt2 when _Opt2 > 0 ->  begin    {Tmpterm2,Tmpremain2}=?RT_PER:getbits(Bytes3,7),    {Tmpterm2+0,Tmpremain2}  end;0 ->{asn1_NOVALUE,Bytes3}end,%% attribute number 3 with type INTEGER{Term3,Bytes5} = case Opt band (1 bsl 0) of_Opt3 when _Opt3 > 0 ->  begin    {Tmpterm3,Tmpremain3}=?RT_PER:getbits(Bytes4,7),    {Tmpterm3+0,Tmpremain3}  end;0 ->{asn1_NOVALUE,Bytes4}end,%% attribute number 4 with type IA5String{Term4,Bytes6} = ?RT_PER:decode_known_multiplier_string('IA5String',no,8,{0,127,notab},Bytes5),{Extensions,Bytes7} = ?RT_PER:getextension(Ext,Bytes6),%% attribute number 5 with type INTEGER{Term5,Bytes8} = case Extensions of_ when size(Extensions) >= 1,element(1,Extensions) == 1 ->begin{TmpVal5,Trem5}=?RT_PER:decode_open_type(Bytes7,[]),{TmpValx5,_}=  begin    {Tmpterm4,Tmpremain4}=?RT_PER:getbits(TmpVal5,7),    {Tmpterm4+0,Tmpremain4}  end, {TmpValx5,Trem5}end;_  ->{asn1_NOVALUE,Bytes7}end,Bytes9= ?RT_PER:skipextensions(Bytes8,2,Extensions),{{'DigitMapValue',Term1,Term2,Term3,Term4,Term5},Bytes9}.'enc_DigitMapName'({'DigitMapName',Val}) ->'enc_DigitMapName'(Val);'enc_DigitMapName'(Val) ->  begin    [Tmpval1,Tmpval2] = Val,    [[10,8,Tmpval1],[10,8,Tmpval2]]  end.'dec_DigitMapName'(Bytes,_) ->  ?RT_PER:decode_octet_string(Bytes,2,false).'enc_DigitMapDescriptor'(Val) ->{Val1,Opt} = ?RT_PER:fixoptionals([2,3],2,Val),[Opt,case element(2,Val1) ofasn1_NOVALUE -> [];Tmpval1 ->%% attribute number 1 with type OCTET STRING  begin    [Tmpval2,Tmpval3] = Tmpval1,    [[10,8,Tmpval2],[10,8,Tmpval3]]  endend,case element(3,Val1) ofasn1_NOVALUE -> [];Tmpval4 ->%% attribute number 2 with type Externaltypereference862megaco_per_bin_drv_media_gateway_control_prev3bDigitMapValue'enc_DigitMapValue'(Tmpval4)end].'dec_DigitMapDescriptor'(Bytes,_) ->{Opt,Bytes1} = ?RT_PER:getoptionals2(Bytes,2), %% attribute number 1 with type OCTET STRING{Term1,Bytes2} = case Opt band (1 bsl 1) of_Opt1 when _Opt1 > 0 ->  ?RT_PER:decode_octet_string(Bytes1,2,false);0 ->{asn1_NOVALUE,Bytes1}end,%%  attribute number 2 with type DigitMapValue{Term2,Bytes3} = case Opt band (1 bsl 0) of_Opt2 when _Opt2 > 0 ->'dec_DigitMapValue'(Bytes2,telltype);0 ->{asn1_NOVALUE,Bytes2}end,{{'DigitMapDescriptor',Term1,Term2},Bytes3}.'enc_ModemType'({'ModemType',Val}) ->'enc_ModemType'(Val);'enc_ModemType'(Val) ->case (case Val of {_,_}->element(2,Val);_->Val end) of'v18' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 0)];'v22' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 1)];'v22bis' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 2)];'v32' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 3)];'v32bis' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 4)];'v34' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 5)];'v90' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 6)];'v91' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 7)];'synchISDN' -> [0,?RT_PER:encode_integer([{'ValueRange',{0,8}}], 8)];{asn1_enum,EnumV} when integer(EnumV), EnumV > 8 -> [1,?RT_PER:encode_small_number(EnumV)];EnumVal -> exit({error,{asn1, {enumerated_not_in_range, EnumVal}}})end.'dec_ModemType'(Bytes,_) ->?RT_PER:decode_enumerated(Bytes,[{'ValueRange',{0,8}}],{{v18,v22,v22bis,v32,v32bis,v34,v90,v91,synchISDN},{}}).'enc_ModemDescriptor'(Val) ->{Val1,Opt} = ?RT_PER:fixoptionals([4],1,Val),[Opt,%% attribute number 1 with type SEQUENCE OF'enc_ModemDescriptor_mtl'(element(2,Val1)),%% attribute number 2 with type SEQUENCE OF'enc_ModemDescriptor_mpl'(element(3,Val1)),case element(4,Val1) ofasn1_NOVALUE -> [];Tmpval1 ->%% attribute number 3 with type Externaltypereference842megaco_per_bin_drv_media_gateway_control_prev3bNonStandardData'enc_NonStandardData'(Tmpval1)end].'enc_ModemDescriptor_mtl'({'ModemDescriptor_mtl',Val}) ->'enc_ModemDescriptor_mtl'(Val);'enc_ModemDescriptor_mtl'(Val) ->[

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -