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

📄 megaco_ber_media_gateway_control_prev3b.erl

📁 OTP是开放电信平台的简称
💻 ERL
📖 第 1 页 / 共 5 页
字号:
decode_disp('NotifyReply',Data) -> 'dec_NotifyReply'(Data,mandatory);decode_disp('NotifyRequest',Data) -> 'dec_NotifyRequest'(Data,mandatory);decode_disp('IndAudPackagesDescriptor',Data) -> 'dec_IndAudPackagesDescriptor'(Data,mandatory);decode_disp('IndAudStatisticsDescriptor',Data) -> 'dec_IndAudStatisticsDescriptor'(Data,mandatory);decode_disp('IndAudDigitMapDescriptor',Data) -> 'dec_IndAudDigitMapDescriptor'(Data,mandatory);decode_disp('IndAudSignal',Data) -> 'dec_IndAudSignal'(Data,mandatory);decode_disp('IndAudSeqSigList',Data) -> 'dec_IndAudSeqSigList'(Data,mandatory);decode_disp('IndAudSignalsDescriptor',Data) -> 'dec_IndAudSignalsDescriptor'(Data,mandatory);decode_disp('IndAudEventBufferDescriptor',Data) -> 'dec_IndAudEventBufferDescriptor'(Data,mandatory);decode_disp('IndAudEventsDescriptor',Data) -> 'dec_IndAudEventsDescriptor'(Data,mandatory);decode_disp('IndAudTerminationStateDescriptor',Data) -> 'dec_IndAudTerminationStateDescriptor'(Data,mandatory);decode_disp('IndAudPropertyGroup',Data) -> 'dec_IndAudPropertyGroup'(Data,mandatory);decode_disp('IndAudLocalRemoteDescriptor',Data) -> 'dec_IndAudLocalRemoteDescriptor'(Data,mandatory);decode_disp('IndAudPropertyParm',Data) -> 'dec_IndAudPropertyParm'(Data,mandatory);decode_disp('IndAudLocalControlDescriptor',Data) -> 'dec_IndAudLocalControlDescriptor'(Data,mandatory);decode_disp('IndAudStreamParms',Data) -> 'dec_IndAudStreamParms'(Data,mandatory);decode_disp('IndAudStreamDescriptor',Data) -> 'dec_IndAudStreamDescriptor'(Data,mandatory);decode_disp('IndAudMediaDescriptor',Data) -> 'dec_IndAudMediaDescriptor'(Data,mandatory);decode_disp('IndAuditParameter',Data) -> 'dec_IndAuditParameter'(Data,mandatory);decode_disp('AuditDescriptor',Data) -> 'dec_AuditDescriptor'(Data,mandatory);decode_disp('AuditReturnParameter',Data) -> 'dec_AuditReturnParameter'(Data,mandatory);decode_disp('TerminationAudit',Data) -> 'dec_TerminationAudit'(Data,mandatory);decode_disp('AuditResult',Data) -> 'dec_AuditResult'(Data,mandatory);decode_disp('AuditReply',Data) -> 'dec_AuditReply'(Data,mandatory);decode_disp('AuditRequest',Data) -> 'dec_AuditRequest'(Data,mandatory);decode_disp('SubtractRequest',Data) -> 'dec_SubtractRequest'(Data,mandatory);decode_disp('AmmsReply',Data) -> 'dec_AmmsReply'(Data,mandatory);decode_disp('AmmDescriptor',Data) -> 'dec_AmmDescriptor'(Data,mandatory);decode_disp('AmmRequest',Data) -> 'dec_AmmRequest'(Data,mandatory);decode_disp('TopologyRequest',Data) -> 'dec_TopologyRequest'(Data,mandatory);decode_disp('CommandReply',Data) -> 'dec_CommandReply'(Data,mandatory);decode_disp('Command',Data) -> 'dec_Command'(Data,mandatory);decode_disp('CommandRequest',Data) -> 'dec_CommandRequest'(Data,mandatory);decode_disp('ContextAttrAuditRequest',Data) -> 'dec_ContextAttrAuditRequest'(Data,mandatory);decode_disp('ContextRequest',Data) -> 'dec_ContextRequest'(Data,mandatory);decode_disp('ActionReply',Data) -> 'dec_ActionReply'(Data,mandatory);decode_disp('ActionRequest',Data) -> 'dec_ActionRequest'(Data,mandatory);decode_disp('ContextID',Data) -> 'dec_ContextID'(Data,mandatory);decode_disp('ErrorText',Data) -> 'dec_ErrorText'(Data,mandatory);decode_disp('ErrorCode',Data) -> 'dec_ErrorCode'(Data,mandatory);decode_disp('ErrorDescriptor',Data) -> 'dec_ErrorDescriptor'(Data,mandatory);decode_disp('TransactionAck',Data) -> 'dec_TransactionAck'(Data,mandatory);decode_disp('TransactionResponseAck',Data) -> 'dec_TransactionResponseAck'(Data,mandatory);decode_disp('TransactionReply',Data) -> 'dec_TransactionReply'(Data,mandatory);decode_disp('TransactionPending',Data) -> 'dec_TransactionPending'(Data,mandatory);decode_disp('TransactionRequest',Data) -> 'dec_TransactionRequest'(Data,mandatory);decode_disp('TransactionId',Data) -> 'dec_TransactionId'(Data,mandatory);decode_disp('Transaction',Data) -> 'dec_Transaction'(Data,mandatory);decode_disp('PathName',Data) -> 'dec_PathName'(Data,mandatory);decode_disp('IP6Address',Data) -> 'dec_IP6Address'(Data,mandatory);decode_disp('IP4Address',Data) -> 'dec_IP4Address'(Data,mandatory);decode_disp('DomainName',Data) -> 'dec_DomainName'(Data,mandatory);decode_disp('MId',Data) -> 'dec_MId'(Data,mandatory);decode_disp('Message',Data) -> 'dec_Message'(Data,mandatory);decode_disp('AuthData',Data) -> 'dec_AuthData'(Data,mandatory);decode_disp('SequenceNum',Data) -> 'dec_SequenceNum'(Data,mandatory);decode_disp('SecurityParmIndex',Data) -> 'dec_SecurityParmIndex'(Data,mandatory);decode_disp('AuthenticationHeader',Data) -> 'dec_AuthenticationHeader'(Data,mandatory);decode_disp('MegacoMessage',Data) -> 'dec_MegacoMessage'(Data,mandatory);decode_disp(Type,_Data) -> exit({error,{asn1,{undefined_type,Type}}}).wrap_encode(Bytes) when list(Bytes) ->   binary_to_list(list_to_binary(Bytes));wrap_encode(Bytes) when binary(Bytes) ->   binary_to_list(Bytes);wrap_encode(Bytes) -> Bytes.wrap_decode(Bytes) when list(Bytes) ->   list_to_binary(Bytes);wrap_decode(Bytes) -> Bytes.info() ->   case ?MODULE:module_info() of      MI when is_list(MI) ->         case lists:keysearch(attributes,1,MI) of            {value,{_,Attributes}} when is_list(Attributes) ->               case lists:keysearch(asn1_info,1,Attributes) of                  {value,{_,Info}} when is_list(Info) ->                     Info;                  _ ->                     []               end;            _ ->               []         end   end.%%================================%%  Value%%================================'enc_Value'({'Value',Val}, TagIn) ->   'enc_Value'(Val, TagIn);'enc_Value'(Val, TagIn) ->   {EncBytes,EncLen} = 'enc_Value_components'(Val,[],0),   ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], EncBytes, EncLen).'enc_Value_components'([], AccBytes, AccLen) ->    {lists:reverse(AccBytes),AccLen};'enc_Value_components'([H|T],AccBytes, AccLen) ->   {EncBytes,EncLen} = ?RT_BER:encode_octet_string([], H, []),   'enc_Value_components'(T,[EncBytes|AccBytes], AccLen + EncLen).'dec_Value'(Bytes, OptOrMand) ->   'dec_Value'(Bytes, OptOrMand, []).'dec_Value'(Bytes, OptOrMand, TagIn) ->   %%-------------------------------------------------   %% decode tag and length    %%-------------------------------------------------   {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand),    ?RT_BER:decode_components(Rb1, Len, Bytes1, fun(FBytes,_,_)->?RT_BER:decode_octet_string(FBytes,[],[], no_length, mandatory)end, [], []).%%================================%%  TimeNotation%%================================'enc_TimeNotation'(Val, TagIn) ->%%-------------------------------------------------%% attribute number 1 with type IA5String%%-------------------------------------------------   {EncBytes1,EncLen1} = ?RT_BER:encode_restricted_string([], ?RT_BER:cindex(2,Val,date), 22, [{tag,128,0,'IMPLICIT',0}]),%%-------------------------------------------------%% attribute number 2 with type IA5String%%-------------------------------------------------   {EncBytes2,EncLen2} = ?RT_BER:encode_restricted_string([], ?RT_BER:cindex(3,Val,time), 22, [{tag,128,1,'IMPLICIT',0}]),   BytesSoFar = [EncBytes1, EncBytes2],  LenSoFar = EncLen1 + EncLen2,  ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], BytesSoFar, LenSoFar).'dec_TimeNotation'(Bytes, OptOrMand) ->   'dec_TimeNotation'(Bytes, OptOrMand, []).'dec_TimeNotation'(Bytes, OptOrMand, TagIn) ->   %%-------------------------------------------------   %% decode tag and length    %%-------------------------------------------------   {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand), {Bytes2,RemBytes} = ?RT_BER:split_list(Bytes1,Len),%%-------------------------------------------------%% attribute number 1 with type IA5String%%-------------------------------------------------   {Term1,Bytes3,Rb2} = ?RT_BER:decode_restricted_string(Bytes2,8,22,[{tag,128,0,'IMPLICIT',0}], no_length, mandatory),%%-------------------------------------------------%% attribute number 2 with type IA5String%%-------------------------------------------------   {Term2,Bytes4,Rb3} = ?RT_BER:decode_restricted_string(Bytes3,8,22,[{tag,128,1,'IMPLICIT',0}], no_length, mandatory),   {Bytes5,Rb4} = ?RT_BER:restbytes2(RemBytes, Bytes4,noext),   {{'TimeNotation', Term1, Term2}, Bytes5, Rb1+Rb2+Rb3+Rb4}.%%================================%%  H221NonStandard%%================================'enc_H221NonStandard'(Val, TagIn) ->%%-------------------------------------------------%% attribute number 1 with type INTEGER%%-------------------------------------------------   {EncBytes1,EncLen1} = ?RT_BER:encode_integer([], ?RT_BER:cindex(2,Val,t35CountryCode1), [{tag,128,0,'IMPLICIT',0}]),%%-------------------------------------------------%% attribute number 2 with type INTEGER%%-------------------------------------------------   {EncBytes2,EncLen2} = ?RT_BER:encode_integer([], ?RT_BER:cindex(3,Val,t35CountryCode2), [{tag,128,1,'IMPLICIT',0}]),%%-------------------------------------------------%% attribute number 3 with type INTEGER%%-------------------------------------------------   {EncBytes3,EncLen3} = ?RT_BER:encode_integer([], ?RT_BER:cindex(4,Val,t35Extension), [{tag,128,2,'IMPLICIT',0}]),%%-------------------------------------------------%% attribute number 4 with type INTEGER%%-------------------------------------------------   {EncBytes4,EncLen4} = ?RT_BER:encode_integer([], ?RT_BER:cindex(5,Val,manufacturerCode), [{tag,128,3,'IMPLICIT',0}]),   BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],  LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,  ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], BytesSoFar, LenSoFar).'dec_H221NonStandard'(Bytes, OptOrMand) ->   'dec_H221NonStandard'(Bytes, OptOrMand, []).'dec_H221NonStandard'(Bytes, OptOrMand, TagIn) ->   %%-------------------------------------------------   %% decode tag and length    %%-------------------------------------------------   {{_,Len},Bytes1,Rb1} = ?RT_BER:check_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], Bytes, OptOrMand), {Bytes2,RemBytes} = ?RT_BER:split_list(Bytes1,Len),%%-------------------------------------------------%% attribute number 1 with type INTEGER%%-------------------------------------------------   {Term1,Bytes3,Rb2} = ?RT_BER:decode_integer(Bytes2,{0,255},[{tag,128,0,'IMPLICIT',0}], mandatory),%%-------------------------------------------------%% attribute number 2 with type INTEGER%%-------------------------------------------------   {Term2,Bytes4,Rb3} = ?RT_BER:decode_integer(Bytes3,{0,255},[{tag,128,1,'IMPLICIT',0}], mandatory),%%-------------------------------------------------%% attribute number 3 with type INTEGER%%-------------------------------------------------   {Term3,Bytes5,Rb4} = ?RT_BER:decode_integer(Bytes4,{0,255},[{tag,128,2,'IMPLICIT',0}], mandatory),%%-------------------------------------------------%% attribute number 4 with type INTEGER%%-------------------------------------------------   {Term4,Bytes6,Rb5} = ?RT_BER:decode_integer(Bytes5,{0,65535},[{tag,128,3,'IMPLICIT',0}], mandatory),   {Bytes7,Rb6} = ?RT_BER:restbytes2(RemBytes, Bytes6,ext),   {{'H221NonStandard', Term1, Term2, Term3, Term4}, Bytes7, Rb1+Rb2+Rb3+Rb4+Rb5+Rb6}.%%================================%%  NonStandardIdentifier%%================================'enc_NonStandardIdentifier'({'NonStandardIdentifier',Val}, TagIn) ->   'enc_NonStandardIdentifier'(Val, TagIn);'enc_NonStandardIdentifier'(Val, TagIn) ->   {EncBytes,EncLen} = case element(1,Val) of      object ->         ?RT_BER:encode_object_identifier(element(2,Val), [{tag,128,0,'IMPLICIT',0}]);      h221NonStandard ->         'enc_H221NonStandard'(element(2,Val), [{tag,128,1,'IMPLICIT',0}]);      experimental ->         ?RT_BER:encode_restricted_string([], element(2,Val), 22, [{tag,128,2,'IMPLICIT',0}]);      Else ->          exit({error,{asn1,{invalid_choice_type,Else}}})   end,?RT_BER:encode_tags(TagIn ++[], EncBytes, EncLen).'dec_NonStandardIdentifier'(Bytes, OptOrMand) ->   'dec_NonStandardIdentifier'(Bytes, OptOrMand, []).'dec_NonStandardIdentifier'(Bytes, OptOrMand, TagIn) ->   {{_,Len},Bytes1, RbExp} = ?RT_BER:check_tags(TagIn++[], Bytes, OptOrMand),   IndefEndBytes = fun(indefinite,<<0,0,R/binary>>)-> R; (_,B)-> B end,   IndefEndRb = fun(indefinite,<<0,0,_R/binary>>)-> 2; (_,_)-> 0 end,   case Bytes1 of%% 'object'      <<2:2,_:1,0:5,_/binary>> ->         {Dec, Rest, RbCho} = ?RT_BER:decode_object_identifier(Bytes1,[{tag,128,0,'IMPLICIT',0}], mandatory),         {{object, Dec}, IndefEndBytes(Len,Rest), RbExp + RbCho + IndefEndRb(Len,Rest)};%% 'h221NonStandard'      <<2:2,_:1,1:5,_/binary>> ->         {Dec, Rest, RbCho} = 'dec_H221NonStandard'(Bytes1, mandatory, [{tag,128,1,'IMPLICIT',0}]),         {{h221NonStandard, Dec}, IndefEndBytes(Len,Rest), RbExp + RbCho + IndefEndRb(Len,Rest)};%% 'experimental'      <<2:2,_:1,2:5,_/binary>> ->         {Dec, Rest, RbCho} = ?RT_BER:decode_restricted_string(Bytes1,8,22,[{tag,128,2,'IMPLICIT',0}], no_length, mandatory),         {{experimental, Dec}, IndefEndBytes(Len,Rest), RbExp + RbCho + IndefEndRb(Len,Rest)};      _ ->          {{asn1_ExtAlt,Bytes1},<<>>, RbExp}   end.%%================================%%  NonStandardData%%================================'enc_NonStandardData'(Val, TagIn) ->%%-------------------------------------------------%% attribute number 1   External megaco_ber_media_gateway_control_prev3b:NonStandardIdentifier%%-------------------------------------------------   {EncBytes1,EncLen1} = 'enc_NonStandardIdentifier'(?RT_BER:cindex(2,Val,nonStandardIdentifier), [{tag,128,0,'EXPLICIT',32}]),%%-------------------------------------------------%% attribute number 2 with type OCTET STRING%%-------------------------------------------------   {EncBytes2,EncLen2} = ?RT_BER:encode_octet_string([], ?RT_BER:cindex(3,Val,data), [{tag,128,1,'IMPLICIT',0}]),   BytesSoFar = [EncBytes1, EncBytes2],  LenSoFar = EncLen1 + EncLen2,  ?RT_BER:encode_tags(TagIn ++ [{tag,0,16,'IMPLICIT',32}], BytesSoFar, LenSoFar).

⌨️ 快捷键说明

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