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

« back to all changes in this revision

Viewing changes to lib/megaco/doc/src/megaco_codec_transform.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-06-11 12:18:07 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090611121807-ks7eb4xrt7dsysgx
Tags: 1:13.b.1-dfsg-1
* New upstream release.
* Removed unnecessary dependency of erlang-os-mon on erlang-observer and
  erlang-tools and added missing dependency of erlang-nox on erlang-os-mon
  (closes: #529512).
* Removed a patch to eunit application because the bug was fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  </header>
34
34
  <module>megaco_codec_transform</module>
35
35
  <modulesummary>Megaco message transformation utility.</modulesummary>
 
36
 
36
37
  <description>
37
38
    <p>This module implements a simple megaco message transformation utility.</p>
38
39
    <p><em>Note</em> that this module is <em>not</em> included in the runtime part of 
39
40
      the application.</p>
 
41
 
 
42
    <marker id="export_messages"></marker>
40
43
  </description>
 
44
 
41
45
  <funcs>
42
46
    <func>
43
 
      <name>tt() -> void()</name>
44
 
      <fsummary></fsummary>
45
 
      <desc>
46
 
        <p>Transform messages using pretty text as base. Transform messages from pretty 
47
 
          text encoding to compact, ber, per and erlang encoding.</p>
48
 
        <p>This call is equivalent to the call: 
49
 
          <c><![CDATA[t(pretty, [compact, ber, per, erlang])]]></c></p>
50
 
      </desc>
51
 
    </func>
52
 
    <func>
53
 
      <name>tb() -> void()</name>
54
 
      <fsummary></fsummary>
55
 
      <desc>
56
 
        <p>Transform messages using ber binary as base. Transform messages from ber 
57
 
          binary encoding to pretty, compact, ber, per and erlang encoding.</p>
58
 
        <p>This call is equivalent to the call: 
59
 
          <c><![CDATA[t(ber, [pretty, compact, per, erlang])]]></c></p>
60
 
      </desc>
61
 
    </func>
62
 
    <func>
63
 
      <name>t([FromCodec, ToCodecs]) -> ok | {error, Reason}</name>
 
47
      <name>export_messages() -> void()</name>
 
48
      <name>export_messages(MessagePackage) -> void()</name>
64
49
      <fsummary></fsummary>
65
50
      <type>
66
 
        <v>FromCodec = codec_string()</v>
67
 
        <v>ToCodecs = [codec_string()]</v>
68
 
        <v>codec_string() = "pretty" | "compact" | "ber" | "per" | "erlang"</v>
 
51
        <v>MessagePackage = atom()</v>
69
52
      </type>
70
53
      <desc>
71
 
        <p>Called from the command line (shell) to transform all messages in a given 
72
 
          codec dir to a given list of codec dirs. The dirs will <em>not</em> be created.</p>
73
 
        <p>Example: Converts from codec ber to codecs pretty, compact and per</p>
 
54
        <p>Export the messages in the <c>MessagePackage</c> (default is <c>time_test</c>). </p>
 
55
        <p>The out produced by this function is a directory structure with the
 
56
          following structure: </p>
74
57
        <code type="none"><![CDATA[
75
 
\011  erl -noshell -sname megaco ../ebin \\
76
 
\011      -run megaco_codec_transform t ber "pretty compact per" \\
77
 
              -s erlang halt
 
58
\011  <message package>/pretty/<message-files>
 
59
\011                    compact/<message-files>
 
60
\011                    per/<message-files>
 
61
\011                    ber/<message-files>
 
62
\011                    erlang/<message-files>
78
63
        ]]></code>
79
64
      </desc>
80
65
    </func>
81
 
    <func>
82
 
      <name>t(FromCodec, ToCodecs) -> ok | {error, Reason}</name>
83
 
      <fsummary></fsummary>
84
 
      <type>
85
 
        <v>FromCodec = codec()</v>
86
 
        <v>ToCodecs = [codec()]</v>
87
 
        <v>codec() = pretty | compact | ber | per | erlang</v>
88
 
      </type>
89
 
      <desc>
90
 
        <p>Transforms all messages in a given codec dir to a given list of codec dirs. 
91
 
          The dirs will <em>not</em> be created.</p>
92
 
      </desc>
93
 
    </func>
94
 
    <func>
95
 
      <name>tmf(FromFile, FromCodec, ToCodec) -> ok | {error, Reason}</name>
96
 
      <fsummary></fsummary>
97
 
      <type>
98
 
        <v>FromFile = string()</v>
99
 
        <v>FromCodec = codec()</v>
100
 
        <v>ToCodec = codec()</v>
101
 
      </type>
102
 
      <desc>
103
 
        <p>Transform a message in a file encoded with the given codec to another codec. 
104
 
          The resulting message is written to file, in the <c><![CDATA[ToCodec]]></c> dir.</p>
105
 
      </desc>
106
 
    </func>
107
 
    <func>
108
 
      <name>tm(FromMsg, FromCodec, ToCodec) -> binary()</name>
109
 
      <fsummary></fsummary>
110
 
      <type>
111
 
        <v>FromMsg = binary()</v>
112
 
        <v>FromCodec = codec()</v>
113
 
        <v>ToCodec = codec()</v>
114
 
      </type>
115
 
      <desc>
116
 
        <p>Tranforms a message binary encoded with the given codec to another codec. 
117
 
          The resulting message is returned (as a binary).</p>
118
 
      </desc>
119
 
    </func>
 
66
 
120
67
  </funcs>
121
68
 
122
69
</erlref>