File: snmp_impl_example_manager.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 (117 lines) | stat: -rw-r--r-- 2,152 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>Manager Implementation Example</TITLE>
  <SCRIPT type="text/javascript" src="../../../../doc/erlresolvelinks.js">
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
      ALINK="#FF0000">
<CENTER>
<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif"></A>
</CENTER>
<A NAME="9"><!-- Empty --></A>
<H2>9 Manager Implementation Example</H2>

<P>This <STRONG>Implementation Example</STRONG> section describes 
how a simple manager can be implemented with the 
SNMP Development Toolkit. 
<P>The example shown, <STRONG>ex2</STRONG>, can be found in the toolkit 
distribution. 
<P>This example has two functions: 
<P>
<UL>

<LI>
 A simple example of how to use the manager component of 
the SNMP Development Toolkit.<BR>


</LI>


<LI>
 A simple example of how to write agent test cases, using the new
manager.<BR>


</LI>


</UL>
<A NAME="9.1"><!-- Empty --></A>
<H3>9.1 The example manager</H3>

<P>The example manager, <CODE>snmp_ex2_manager</CODE>, is a simple example of 
how to implement an snmp manager using the manager component of the
SNMP Development Toolkit.
<P>The module exports the following functions:
<P>
<UL>

<LI>
start_link/0, start_link/1<BR>

</LI>


<LI>
stop/0<BR>

</LI>


<LI>
agent/2, agent/3<BR>

</LI>


<LI>
sync_get/2, sync_get/3<BR>

</LI>


<LI>
sync_get_next/2, sync_get_next/3<BR>

</LI>


<LI>
sync_get_bulk/4, sync_get_bulk/5<BR>

</LI>


<LI>
sync_set/2, sync_set/3<BR>

</LI>


<LI>
oid_to_name/1<BR>

</LI>


</UL>

<P>This module is also used by the test module described in the 
next section.<A NAME="9.2"><!-- Empty --></A>
<H3>9.2 A simple standard test</H3>

<P>This simple standard test, <CODE>snmp_ex2_simple_standard_test</CODE>,
a module which, using the <CODE>snmp_ex2_manager</CODE> described in the
previous section, implements a simple agent test utility. <CENTER>
<HR>
<SMALL>
Copyright &copy; 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>