~ubuntu-branches/ubuntu/oneiric/smokeping/oneiric-updates

« back to all changes in this revision

Viewing changes to doc/matchers/base.pm.txt

  • Committer: Bazaar Package Importer
  • Author(s): Niko Tyni
  • Date: 2006-10-26 21:45:56 UTC
  • mfrom: (1.2.2 upstream) (2.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20061026214556-5jnpiesx4vdijmu6
* debian/patches/15_clean_makefile.dpatch:
  + remove unneeded and potentially unsecure include paths.
* debian/patches: selected patches from the upstream SVN repository
  + 40_password.dpatch: skip reading the password file when running as a CGI.
  + 50_ldap.dpatch: Make the 'scope' option in the LDAP probe actually work.
  + 60_fping.dpatch:
    * Support the '-S' (set source address, see #198486) fping option.
    * Don't try to execute fping when running as a CGI.
  + 70_syslog.dpatch: Don't die silently if syslogd is unavailable.
    (Closes: #395056)
* Remove all the autogenerated documentation at clean time, to properly
  undo the effects of the 'build' target.
* Install example configuration files for documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
matchers::base(3)           SmokePing           matchers::base(3)
2
 
 
3
 
 
4
 
 
5
 
NNAAMMEE
6
 
       matchers::base - Base Class for implementing SmokePing
7
 
       Matchers
8
 
 
9
 
OOVVEERRVVIIEEWW
10
 
       This is the base class for writing SmokePing matchers.
11
 
       Every matcher must inherit from the base class and provide
12
 
       it's own methods for the 'buisness' logic.
13
 
 
14
 
DDEESSCCRRIIPPTTIIOONN
15
 
       Every matcher must provide the following methods:
16
 
 
17
 
       nneeww
18
 
 
19
 
       The new method expects hash elements as an argument eg
20
 
       new({x=>'\d+',y=>'\d+'},x=>1,y=>2). The first part is a
21
 
       syntax rule for the arguments it should expect and the
22
 
       second part are the arguments itself. The first part will
23
 
       be supplied by the child class as it calls the partent
24
 
       method.
25
 
 
26
 
       LLeennggtthh
27
 
 
28
 
       The Length method returns the number of values the matcher
29
 
       will expect from SmokePing. This method must be overridden
30
 
       by the children of the base class.
31
 
 
32
 
       DDeesscc
33
 
 
34
 
       Simply return the description of the function. This method
35
 
       must be overwritten by a children of the base class.
36
 
 
37
 
       TTeesstt
38
 
 
39
 
       Run the matcher and return true or false. The Test method
40
 
       is called with a hash of two arrays giving it access to
41
 
       both rtt and loss values
42
 
 
43
 
         my $data=shift;
44
 
         my @rtt = @{$data->{rtt}};
45
 
         my @loss = @{$data->{loss}};
46
 
 
47
 
       The arrays are ordered from old to new.
48
 
 
49
 
         @rdd[old..new]
50
 
 
51
 
       There may be more than the expected number of elements in
52
 
       this array. Address them with $x[-1] to $x[-max].
53
 
 
54
 
CCOOPPYYRRIIGGHHTT
55
 
       Copyright (c) 2004 by OETIKER+PARTNER AG. All rights
56
 
       reserved.
57
 
 
58
 
LLIICCEENNSSEE
59
 
       This program is free software; you can redistribute it
60
 
       and/or modify it under the terms of the GNU General Public
61
 
       License as published by the Free Software Foundation;
62
 
       either version 2 of the License, or (at your option) any
63
 
       later version.
64
 
 
65
 
       This program is distributed in the hope that it will be
66
 
       useful, but WITHOUT ANY WARRANTY; without even the implied
67
 
       warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
68
 
       PURPOSE.  See the GNU General Public License for more
69
 
       details.
70
 
 
71
 
       You should have received a copy of the GNU General Public
72
 
       License along with this program; if not, write to the Free
73
 
       Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
74
 
       02139, USA.
75
 
 
76
 
AAUUTTHHOORR
77
 
       Tobias Oetiker <tobi@oetiker.ch>
78
 
 
79
 
 
80
 
 
81
 
1.34                        2004-11-29          matchers::base(3)