Sophie

Sophie

distrib > Fedora > 17 > i386 > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 217

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- asn1rt</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/asn1-1.8.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>ASN.1</strong><br><strong>Reference Manual</strong><br><small>Version 1.8</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li id="no" title="asn1ct " expanded="false">asn1ct<ul>
<li><a href="asn1ct.html">
                  Top of manual page
                </a></li>
<li title="compile-1"><a href="asn1ct.html#compile-1">compile/1</a></li>
<li title="compile-2"><a href="asn1ct.html#compile-2">compile/2</a></li>
<li title="encode-3"><a href="asn1ct.html#encode-3">encode/3</a></li>
<li title="decode-3"><a href="asn1ct.html#decode-3">decode/3</a></li>
<li title="value-2"><a href="asn1ct.html#value-2">value/2</a></li>
<li title="test-1"><a href="asn1ct.html#test-1">test/1</a></li>
<li title="test-2"><a href="asn1ct.html#test-2">test/2</a></li>
<li title="test-3"><a href="asn1ct.html#test-3">test/3</a></li>
</ul>
</li>
<li id="loadscrollpos" title="asn1rt " expanded="true">asn1rt<ul>
<li><a href="asn1rt.html">
                  Top of manual page
                </a></li>
<li title="decode-3"><a href="asn1rt.html#decode-3">decode/3</a></li>
<li title="encode-3"><a href="asn1rt.html#encode-3">encode/3</a></li>
<li title="info-1"><a href="asn1rt.html#info-1">info/1</a></li>
<li title="load_driver-0"><a href="asn1rt.html#load_driver-0">load_driver/0</a></li>
<li title="unload_driver-0"><a href="asn1rt.html#unload_driver-0">unload_driver/0</a></li>
<li title="utf8_binary_to_list-1"><a href="asn1rt.html#utf8_binary_to_list-1">utf8_binary_to_list/1</a></li>
<li title="utf8_list_to_binary-1"><a href="asn1rt.html#utf8_list_to_binary-1">utf8_list_to_binary/1</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>asn1rt</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">asn1rt</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">ASN.1 runtime support functions</div>
  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
    <p>This module is the interface module for the ASN.1 runtime support functions.
      To encode and decode ASN.1 types in runtime the functions in this module
      should be used.</p>
  </p></div>

  <h3>EXPORTS</h3>

    <p><a name="decode-3"><span class="bold_code">decode(Module,Type,Bytes) -&gt; {ok,Value}|{error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Module = Type = atom()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Value = Reason = term()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Bytes = binary | [Int] when integer(Int), Int &gt;= 0, Int =&lt; 255 | binary</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Decodes <span class="code">Type</span> from <span class="code">Module</span> from the list of bytes or
          binary <span class="code">Bytes</span>. If the module is compiled with <span class="code">ber_bin</span>
          or <span class="code">per_bin</span> option <span class="code">Bytes</span> must be a binary. 
          Returns <span class="code">{ok,Value}</span> if successful.</p>
      </p></div>

    <p><a name="encode-3"><span class="bold_code">encode(Module,Type,Value)-&gt; {ok,BinOrList} | {error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Module = Type = atom()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Value = term()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">BinOrList = Bytes | binary()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Bytes = [Int|binary|Bytes] when integer(Int), Int &gt;= 0, Int =&lt; 255</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Encodes <span class="code">Value</span> of <span class="code">Type</span> defined in the ASN.1 module 
          <span class="code">Module</span>. Returns a possibly nested list of bytes and or binaries 
          if successful. If <span class="code">Module</span> was compiled with the options <span class="code">per_bin</span> and <span class="code">optimize</span> the result is a binary. To get as 
          fast execution as possible the 
          encode function only performs rudimentary tests that the input 
          <span class="code">Value</span>
          is a correct instance of <span class="code">Type</span>. The length of strings is for example
          not always checked. </p>
      </p></div>

    <p><a name="info-1"><span class="bold_code">info(Module) -&gt;  {ok,Info} | {error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Module = atom()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Info = list()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p><span class="code">info/1</span> returns the version of the asn1 compiler that was
          used to compile the module. It also returns the compiler options
          that was used.</p>
      </p></div>

    <p><a name="load_driver-0"><span class="bold_code">load_driver() -&gt;  ok | {error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>This function is obsolete and will be removed in R16A</p>
      </p></div>

    <p><a name="unload_driver-0"><span class="bold_code">unload_driver() -&gt;  ok | {error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>This function is obsolete and will be removed in R16A</p>
      </p></div>

    <p><a name="utf8_binary_to_list-1"><span class="bold_code">utf8_binary_to_list(UTF8Binary) -&gt;  {ok,UnicodeList} | {error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">UTF8Binary = binary()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">UnicodeList = [integer()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p><span class="code">utf8_binary_to_list/1</span> Transforms a UTF8 encoded binary
          to a list of integers, where each integer represents one
          character as its unicode value. The function fails if the binary
          is not a properly encoded UTF8 string.</p>
      </p></div>

    <p><a name="utf8_list_to_binary-1"><span class="bold_code">utf8_list_to_binary(UnicodeList) -&gt;  {ok,UTF8Binary} | {error,Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">UnicodeList = [integer()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">UTF8Binary = binary()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p><span class="code">utf8_list_to_binary/1</span> Transforms a list of integers,
          where each integer represents one character as its unicode
          value, to a UTF8 encoded binary.</p>
      </p></div>

  

</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>