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() -> 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() -> 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]) -> 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() = "pretty" | "compact" | "ber" | "per" | "erlang"</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 "pretty compact per" \
-s erlang halt
</PRE>
</DIV>
<P><A NAME="t/2"><STRONG><CODE>t(FromCodec, ToCodecs) -> 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) -> 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) -> 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 © 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>
|