File: megaco_codec_transform.html

package info (click to toggle)
erlang-doc-html 1%3A11.b.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 23,284 kB
  • ctags: 10,724
  • sloc: erlang: 505; ansic: 323; makefile: 62; perl: 61; sh: 45
file content (163 lines) | stat: -rw-r--r-- 4,543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>megaco_codec_transform</TITLE>
  <SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
  <STYLE TYPE="text/css">
<!--
    .REFBODY     { margin-left: 13mm }
    .REFTYPES    { margin-left: 8mm }
-->
  </STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
      ALINK="#FF0000">
<!-- refpage -->
<CENTER>
<A HREF="http://www.erlang.se">
  <IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif">
</A>
<H1>megaco_codec_transform</H1>
</CENTER>

<H3>MODULE</H3>
<DIV CLASS=REFBODY>
megaco_codec_transform
</DIV>

<H3>MODULE SUMMARY</H3>
<DIV CLASS=REFBODY>
 Megaco message transformation utility.

</DIV>

<H3>DESCRIPTION</H3>
<DIV CLASS=REFBODY>

<P>This module implements a simple megaco message transformation utility.
<P><STRONG>Note</STRONG> that this module is <STRONG>not</STRONG> included in the runtime part of 
the application.
</DIV>

<H3>EXPORTS</H3>

<P><A NAME="tt/0"><STRONG><CODE>tt() -&#62; void()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY>

<P>Transform messages using pretty text as base. Transform messages from pretty 
         text encoding to compact, ber, per and erlang encoding.
<P>This call is equivalent to the call: 
         <CODE>t(pretty, [compact, ber, per, erlang])</CODE>
</DIV>

<P><A NAME="tb/0"><STRONG><CODE>tb() -&#62; void()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY>

<P>Transform messages using ber binary as base. Transform messages from ber 
         binary encoding to pretty, compact, ber, per and erlang encoding.
<P>This call is equivalent to the call: 
         <CODE>t(ber, [pretty, compact, per, erlang])</CODE>
</DIV>

<P><A NAME="t/2"><STRONG><CODE>t([FromCodec, ToCodecs]) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>FromCodec = codec_string()</CODE></STRONG><BR>
<STRONG><CODE>ToCodecs = [codec_string()]</CODE></STRONG><BR>
<STRONG><CODE>codec_string() = &#34;pretty&#34; | &#34;compact&#34; | &#34;ber&#34; | &#34;per&#34; | &#34;erlang&#34;</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Called from the command line (shell) to transform all messages in a given 
         codec dir to a given list of codec dirs. The dirs will <STRONG>not</STRONG> be created.
        
<P>Example: Converts from codec ber to codecs pretty, compact and per
<PRE>
          erl -noshell -sname megaco ../ebin \
              -run megaco_codec_transform t ber &#34;pretty compact per&#34; \
              -s erlang halt
        
</PRE>

</DIV>

<P><A NAME="t/2"><STRONG><CODE>t(FromCodec, ToCodecs) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>FromCodec = codec()</CODE></STRONG><BR>
<STRONG><CODE>ToCodecs = [codec()]</CODE></STRONG><BR>
<STRONG><CODE>codec() = pretty | compact | ber | per | erlang</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Transforms all messages in a given codec dir to a given list of codec dirs. 
         The dirs will <STRONG>not</STRONG> be created.
        
</DIV>

<P><A NAME="tmf/3"><STRONG><CODE>tmf(FromFile, FromCodec, ToCodec) -&#62; ok | {error, Reason}</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>FromFile = string()</CODE></STRONG><BR>
<STRONG><CODE>FromCodec = codec()</CODE></STRONG><BR>
<STRONG><CODE>ToCodec = codec()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Transform a message in a file encoded with the given codec to another codec. 
         The resulting message is written to file, in the <CODE>ToCodec</CODE> dir.
        
</DIV>

<P><A NAME="tm/3"><STRONG><CODE>tm(FromMsg, FromCodec, ToCodec) -&#62; binary()</CODE></STRONG></A><BR>

<DIV CLASS=REFBODY><P>Types:
  <DIV CLASS=REFTYPES>
<P>
<STRONG><CODE>FromMsg = binary()</CODE></STRONG><BR>
<STRONG><CODE>FromCodec = codec()</CODE></STRONG><BR>
<STRONG><CODE>ToCodec = codec()</CODE></STRONG><BR>

  </DIV>
</DIV>

<DIV CLASS=REFBODY>

<P>Tranforms a message binary encoded with the given codec to another codec. 
         The resulting message is returned (as a binary).
        
</DIV>

<H3>AUTHORS</H3>
<DIV CLASS=REFBODY>
Micael Karlberg - support@erlang.ericsson.se<BR>

</DIV>
<CENTER>
<HR>
<SMALL>megaco 3.5<BR>
Copyright &copy; 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>