?? events-1.html.svn-base
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
<TITLE>JNS Event Type Documentation: Introduction</TITLE>
<LINK HREF="Events-2.html" REL=next>
<LINK HREF="Events.html#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="Events-2.html">Next</A>
Previous
<A HREF="Events.html#toc1">Contents</A>
<HR>
<H2><A NAME="s1">1. Introduction</A></H2>
<P>This document introduces you to the different kinds of Events that JNS will
create in response to things occurring in the network. You are strongly
advised to read this document and keep it for references if:
<UL>
<LI>You are writing a new Trace class for JNS, for example a class that
will receive events and count the inter-arrival times of packets.</LI>
<LI>You are trying to build in support for new protocols and want to send
events when significant state changes in your protocol take place. (You
would of course have to write a Trace class that can receive those events.)</LI>
</UL>
<P>
<P>The class <CODE>Event</CODE> is a very primitive class. An event in JNS is only
parameterised by
<UL>
<LI>a name (String)</LI>
<LI>a time-stamp (double, in seconds)</LI>
<LI>and a list of parameters</LI>
</UL>
<P>
<P>The <I>name</I> characterises the type of the event. Events are typically
called names like "HopEvent" or "ReceiveEvent". The <I>time-stamp</I> is
necessary because it shows when the event occurred, without it the whole
tracing idea would be pointless.
<P>
<P>The list of parameters contains the meat of the event. It is <I>different
from event to event</I> and its contents are completely defined by the name
of the event. A list of parameters, well.., is made up by
<CODE>EventParameter</CODE> objects. Every event parameter contains
<UL>
<LI>a name (String)</LI>
<LI>a value (Object)</LI>
</UL>
<P>
<P>The <I>name</I> of the parameter describes of what type the <I>value</I> is.
The reason <I>value</I> is an object is because it differs from parameter to
parameter. A parameter like "Source Address" might have an IPAddr object as
a value, another parameter just an Integer object. Note that the <I>name</I>
parameter of any EventParameter <B>must be case insensitive</B>. Keep that
in mind when writing a Trace class that processes events.
<P>
<HR>
<A HREF="Events-2.html">Next</A>
Previous
<A HREF="Events.html#toc1">Contents</A>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -