~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%%-------------------------------------------------------------------
 
2
%%% File    : extensionAdditionGroup.erl
 
3
%%% Author  : Kenneth Lundin
 
4
%%% Description :
 
5
%%%
 
6
%%% Created : 18 May 2010 by kenneth
 
7
%%
 
8
%% %CopyrightBegin%
 
9
%%
 
10
%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
 
11
%%
 
12
%% The contents of this file are subject to the Erlang Public License,
 
13
%% Version 1.1, (the "License"); you may not use this file except in
 
14
%% compliance with the License. You should have received a copy of the
 
15
%% Erlang Public License along with this software. If not, it can be
 
16
%% retrieved online at http://www.erlang.org/.
 
17
%%
 
18
%% Software distributed under the License is distributed on an "AS IS"
 
19
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
%% the License for the specific language governing rights and limitations
 
21
%% under the License.
 
22
%%
 
23
%% %CopyrightEnd%
 
24
 
 
25
%%%-------------------------------------------------------------------
 
26
-module(extensionAdditionGroup).
 
27
-include("Extension-Addition-Group.hrl").
 
28
 
 
29
 
 
30
-compile(export_all).
 
31
 
 
32
run(Erule) ->
 
33
    Val = #'Ax'{a=253, b = true, c= {e,true}, g="123", h = true},
 
34
    io:format("~p:~p~n",[Erule,Val]),
 
35
    {ok,List}= asn1rt:encode('Extension-Addition-Group','Ax',Val),
 
36
    Enc = iolist_to_binary(List),
 
37
    io:format("~p~n",[Enc]),
 
38
    {ok,Val2} = asn1rt:decode('Extension-Addition-Group','Ax',Enc),
 
39
    io:format("~p~n",[Val2]),
 
40
    case Val2 of
 
41
        Val -> ok;
 
42
        _ -> exit({expected,Val, got, Val2})
 
43
    end.
 
44
 
 
45
run2(Erule) ->
 
46
    Val = #'Ax3'{a=253, b = true, s = #'Ax3_s'{sa = 11, sb = true, sextaddgroup = 17}},
 
47
    io:format("~p:~p~n",[Erule,Val]),
 
48
    {ok,List}= asn1rt:encode('Extension-Addition-Group','Ax3',Val),
 
49
    Enc = iolist_to_binary(List),
 
50
    io:format("~p~n",[Enc]),
 
51
    {ok,Val2} = asn1rt:decode('Extension-Addition-Group','Ax3',Enc),
 
52
    io:format("~p~n",[Val2]),
 
53
    case Val2 of
 
54
        Val -> ok;
 
55
        _ -> exit({expected,Val, got, Val2})
 
56
    end.
 
57
 
 
58
run3(Erule) ->
 
59
    Val = 
 
60
{'RRC-DL-DCCH-Message',
 
61
 {c1,
 
62
  {rrcConnectionReconfiguration,
 
63
   {'RRC-RRCConnectionReconfiguration',0,
 
64
    {c1,
 
65
     {'rrcConnectionReconfiguration-r8',
 
66
      {'RRC-RRCConnectionReconfiguration-r8-IEs',
 
67
       {'RRC-MeasConfig',asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
 
68
        asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
 
69
        asn1_NOVALUE,asn1_NOVALUE},
 
70
       asn1_NOVALUE,
 
71
       [[80,66,0,5,10,0,5,0,24,11,7,84,54,33,0,1,1,0,0,0,1,39,5,66,127,0,0,1],
 
72
        []],
 
73
       {'RRC-RadioResourceConfigDedicated',
 
74
        [{'RRC-SRB-ToAddMod',1,
 
75
          {explicitValue,
 
76
           {am,
 
77
            {'RRC-RLC-Config_am',
 
78
             {'RRC-UL-AM-RLC',ms45,pInfinity,kBinfinity,t4},
 
79
             {'RRC-DL-AM-RLC',ms35,ms0}}}},
 
80
          {explicitValue,
 
81
           {'RRC-LogicalChannelConfig',
 
82
            {'RRC-LogicalChannelConfig_ul-SpecificParameters',3,infinity,
 
83
             ms50,0},
 
84
            asn1_NOVALUE}}}],
 
85
        [{'RRC-DRB-ToAddMod',3,3,
 
86
          {'RRC-PDCP-Config',infinity,
 
87
           {'RRC-PDCP-Config_rlc-AM',false},
 
88
           asn1_NOVALUE,
 
89
           {notUsed,'NULL'}},
 
90
          {am,
 
91
           {'RRC-RLC-Config_am',
 
92
            {'RRC-UL-AM-RLC',ms70,p256,kBinfinity,t4},
 
93
            {'RRC-DL-AM-RLC',ms35,ms40}}},
 
94
          3,
 
95
          {'RRC-LogicalChannelConfig',
 
96
           {'RRC-LogicalChannelConfig_ul-SpecificParameters',5,infinity,ms50,
 
97
            1},
 
98
           asn1_NOVALUE}},
 
99
         {'RRC-DRB-ToAddMod',4,4,
 
100
          {'RRC-PDCP-Config',infinity,
 
101
           {'RRC-PDCP-Config_rlc-AM',false},
 
102
           asn1_NOVALUE,
 
103
           {notUsed,'NULL'}},
 
104
          {am,
 
105
           {'RRC-RLC-Config_am',
 
106
            {'RRC-UL-AM-RLC',ms70,p256,kBinfinity,t4},
 
107
            {'RRC-DL-AM-RLC',ms35,ms40}}},
 
108
          4,
 
109
          {'RRC-LogicalChannelConfig',
 
110
           {'RRC-LogicalChannelConfig_ul-SpecificParameters',5,infinity,ms50,
 
111
            1},
 
112
           asn1_NOVALUE}}],
 
113
        asn1_NOVALUE,
 
114
        {explicitValue,
 
115
         {'RRC-MAC-MainConfig',
 
116
          {'RRC-MAC-MainConfig_ul-SCH-Config',n4,sf10,sf10240,false},
 
117
          asn1_NOVALUE,sf500,
 
118
          {setup,{'RRC-MAC-MainConfig_phr-Config_setup',sf200,sf200,dB3}},
 
119
          asn1_NOVALUE}},
 
120
        asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
 
121
       asn1_NOVALUE,asn1_NOVALUE}}}}}}},
 
122
        io:format("~p:~p~n",[Erule,Val]),
 
123
    {ok,List}= asn1rt:encode('EUTRA-RRC-Definitions','DL-DCCH-Message',Val),
 
124
    Enc = iolist_to_binary(List),
 
125
    io:format("Result from encode:~n~p~n",[Enc]),
 
126
    {ok,Val2} = asn1rt:decode('EUTRA-RRC-Definitions','DL-DCCH-Message',Enc),
 
127
    io:format("Result from decode:~n~p~n",[Val2]),
 
128
    case Val2 of
 
129
        Val -> ok;
 
130
        _ -> exit({expected,Val, got, Val2})
 
131
    end.
 
132