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
|
<HTML>
<HEAD>
<TITLE>PySNMP: SNMP message: ASN.1: NULL: Objects</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff" TEXT="#000000"
LINK="#0000bb" VLINK="#551a8b" ALINK="#ff0000">
<H3>
Objects of the <STRONG>asn1.NULL</STRONG> class.
</H3>
<P>
Instances of the <STRONG>asn1.NULL</STRONG> class have the following
methods:
</P>
<DL>
<DT><STRONG>encode</STRONG>([<STRONG>value</STRONG>])</DT>
<P>
The <STRONG>encode</STRONG> method converts the content of the class
instance into BER octet-stream (string). The <STRONG>value</STRONG> parameter,
whenever given, must be a false value.
</P>
<DT><STRONG>decode</STRONG>(<STRONG>data</STRONG>)</DT>
<P>
The <STRONG>decode</STRONG> method attempts to convert the
<STRONG>data</STRONG> octet-stream (string) into an null value, and
returns a tuple of (<STRONG>null_class_instance</STRONG>,
<STRONG>rest</STRONG>).
</P>
<P>
Any unprocessed part of <STRONG>data</STRONG> octet-stream is returned
in the <STRONG>rest</STRONG> string.
</P>
<P>
The <STRONG>data</STRONG> octet-stream must carry an ASN.1 NULL value
or an <A HREF=errors.html">exception</A> would be thrown.
</P>
<DT><STRONG>update</STRONG>(<STRONG>value</STRONG>)</DT>
<P>
The <STRONG>update</STRONG> method assigns the <STRONG>value</STRONG>
to class instance payload. The <STRONG>value</STRONG> must be false.
</P>
<DT><STRONG>__call__</STRONG>()</DT>
<P>
Class instance invocation would return currently stored payload.
</P>
<DT><STRONG>__cmp__</STRONG>(<STRONG>other</STRONG>)</DT>
<P>
Class instances may be compared against each <STRONG>other</STRONG>. The
comparation would return negative if <STRONG>other</STRONG> is greater, zero
on equivalence, positive if <STRONG>other</STRONG> is less.
</P>
<DT><STRONG>__repr__</STRONG>()</DT>
<P>
Returns the canonical string representation of the class instance.
</P>
<DT><STRONG>__str__</STRONG>()</DT>
<P>
Returns a nice string representation of the class instance.
</P>
</DL>
<HR>
<ADDRESS>
ilya@glas.net
</ADDRESS>
</BODY>
</HTML>
|