changed help for filters freq->on
[spider.git] / html / adminmanual-6.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5  <TITLE>The DXSpider Installation and Administration Manual : Filtering (New Style v1.45 and later)</TITLE>
6  <LINK HREF="adminmanual-7.html" REL=next>
7  <LINK HREF="adminmanual-5.html" REL=previous>
8  <LINK HREF="adminmanual.html#toc6" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="adminmanual-7.html">Next</A>
12 <A HREF="adminmanual-5.html">Previous</A>
13 <A HREF="adminmanual.html#toc6">Contents</A>
14 <HR>
15 <H2><A NAME="s6">6. Filtering (New Style v1.45 and later)</A></H2>
16
17 <P>Upto v1.44 it was not possible for the user to set their own filters.  From v1.45 though that has 
18 all changed.  It is now possible to set filters for just about anything you wish.  If you have just
19 updated from an older version of DXSpider you will need to update your new filters.  You do not
20 need to do anything with your old filters, they will be renamed as you update.
21 <P>
22 <P>There are 3 basic commands involved in setting and manipulating filters.  These are <EM>accept</EM>, 
23 <EM>reject</EM> and <EM>clear</EM>.  First we will look generally at filtering. There are a number
24 of things you can filter in the DXSpider system. They all use the same general mechanism.
25 <P>
26 <P>In general terms you can create a 'reject' or an 'accept' filter which can have up to 10 lines in 
27 it. You do this using, for example ... 
28 <P>
29 <BLOCKQUOTE><CODE>
30 <PRE>
31  
32 accept/spots .....
33 reject/spots .....
34 </PRE>
35 </CODE></BLOCKQUOTE>
36 <P>where ..... are the specific commands for that type of filter. There are filters for spots, wwv, 
37 announce, wcy and (for sysops) connects. See each different accept or reject command reference
38 for more details.
39 <P>There is also a command to clear out one or more lines in a filter. They are ...
40 <P>
41 <BLOCKQUOTE><CODE>
42 <PRE>
43 clear/spots 1
44 clear/spots all
45 </PRE>
46 </CODE></BLOCKQUOTE>
47 <P>There is clear/xxxx command for each type of filter.
48 <P>
49 <P>and you can check that your filters have worked by the command ... 
50 <P>
51 <BLOCKQUOTE><CODE>
52 <PRE>
53   
54 show/filter
55 </PRE>
56 </CODE></BLOCKQUOTE>
57 <P>
58 <P>For now we are going to use spots for the examples, but you can apply the same principles 
59 to all types of filter.
60 <P>
61 <P>There are two main types of filter, <EM>accept</EM> or <EM>reject</EM>.  You can use either
62 to achieve the result you want dependent on your own preference and which is more simple to
63 do.  It is pointless writing 8 lines of reject filters when 1 accept filter would do the
64 same thing!  Each filter has 10 lines (of any length) which are tried in order.  If a line 
65 matches then the action you have specified is taken (ie reject means ignore it and accept 
66 means take it)
67 <P>
68 <P>If you specify reject filters, then any lines that arrive that match the filter will be
69 dumped but all else will be accepted.  If you use an accept filter, then ONLY the lines
70 in the filter will be accepted and all else will be dumped.
71 For example if you have a single line <EM>accept</EM> filter ...
72 <P>
73 <BLOCKQUOTE><CODE>
74 <PRE>
75 accept/spots freq vhf and (by_zone 14,15,16 or call_zone 14,15,16)
76 </PRE>
77 </CODE></BLOCKQUOTE>
78 <P>then you will <EM>ONLY</EM> get VHF spots <EM>from</EM> or <EM>to</EM> CQ zones 14, 15 and 16.
79 <P>
80 <P>If you set a reject filter like this ...
81 <P>
82 <BLOCKQUOTE><CODE>
83 <PRE>
84 reject/spots freq hf/cw
85 </PRE>
86 </CODE></BLOCKQUOTE>
87 <P>Then you will get everything <EM>EXCEPT</EM> HF CW spots.  You could make this single filter
88 even more flexible.  For example, if you are interested in IOTA and will work it even on CW 
89 even though normally you are not interested in CW, then you could say ...
90 <P>
91 <BLOCKQUOTE><CODE>
92 <PRE>
93 reject/spots freq hf/cw and not info iota
94 </PRE>
95 </CODE></BLOCKQUOTE>
96 <P>But in that case you might only be interested in iota and say:-
97 <P>
98 <BLOCKQUOTE><CODE>
99 <PRE>
100 accept/spots not freq hf/cw or info iota
101 </PRE>
102 </CODE></BLOCKQUOTE>
103 <P>which achieves exactly the same thing. You should choose one or the other until you are 
104 comfortable with the way it works. You can mix them if you wish (actually you can have an accept
105 AND a reject on the same line) but don't attempt this until you are sure you know what you
106 are doing!
107 <P>
108 <P>You can arrange your filter lines into logical units, either for your own understanding or simply 
109 convenience. Here is an example ...
110 <P>
111 <BLOCKQUOTE><CODE>
112 <PRE>
113 reject/spots 1 freq/cw
114 reject/spots 2 freq 50000/1400000 not (by_zone 14,15,16 or call_zone 14,15,16)  
115 </PRE>
116 </CODE></BLOCKQUOTE>
117 <P>What this does is to ignore all HF CW spots and also rejects any spots on VHF which don't
118 either originate or spot someone in Europe. 
119 <P>
120 <P>This is an example where you would use a line number (1 and 2 in this case), if you leave the 
121 digit out, the system assumes '1'. Digits '0'-'9' are available.  This make it easier to see
122 just what filters you have set.  It also makes it more simple to remove individual filters, 
123 during a contest for example.
124 <P>
125 <P>You will notice in the above example that the second line has brackets.  Look at the line
126 logically.  You can see there are 2 separate sections to it.  We are saying reject spots that
127 are VHF or above <EM>APART</EM> from those in zones 14, 15 and 16 (either spotted there or
128 originated there).  If you did not have the brackets to separate the 2 sections, then Spider
129 would read it logically from the front and see a different expression entirely ...
130 <P>
131 <BLOCKQUOTE><CODE>
132 <PRE>
133 (freq 50000/1400000 and by_zone 14,15,16) or call_zone 14,15,16 
134 </PRE>
135 </CODE></BLOCKQUOTE>
136 <P>The simple way to remember this is, if you use OR - use brackets. Whilst we are here CASE is not 
137 important. 'And BY_Zone' is just the same as 'and by_zone'.
138 <P>As mentioned earlier, setting several filters can be more flexible than simply setting one complex
139 one.  Doing it in this way means that if you want to alter your filter you can just redefine or 
140 remove one or more lines of it or one line. For example ...
141 <P>
142 <BLOCKQUOTE><CODE>
143 <PRE>
144 reject/spots 1 freq/ssb
145 </PRE>
146 </CODE></BLOCKQUOTE>
147 <P>would redefine our earlier example, or 
148 <P>
149 <BLOCKQUOTE><CODE>
150 <PRE>
151 clear/spots 1
152 </PRE>
153 </CODE></BLOCKQUOTE>
154 <P>To remove all the filter lines in the spot filter ...
155 <P>
156 <BLOCKQUOTE><CODE>
157 <PRE>
158 clear/spots all
159 </PRE>
160 </CODE></BLOCKQUOTE>
161 <P>
162 <H2><A NAME="ss6.1">6.1 Advanced filtering</A>
163 </H2>
164
165 <P>Once you are happy with the results you get, you may like to experiment. 
166 <P>
167 <P>The previous example that filters hf/cw spots and accepts vhf/uhf spots from EU 
168 can be written with a mixed filter, for example ... 
169 <P>
170 <BLOCKQUOTE><CODE>
171 <PRE>
172 rej/spot freq hf/cw
173 acc/spot freq 0/30000
174 acc/spot 2 freq 50000/1400000 and (by_zone 14,15,16 or call_zone 14,15,16)
175 </PRE>
176 </CODE></BLOCKQUOTE>
177 <P>Note that the first filter has not been specified with a number.  This will 
178 automatically be assumed to be number 1.  In this case, we have said "reject all
179 HF spots in the CW section of the bands but accept all others at HF.  Also
180 accept anything in VHF and above spotted in or by operators in the zones
181 14, 15 and 16".  Each filter slot actually has a 'reject' slot and 
182 an 'accept' slot. The reject slot is executed BEFORE the accept slot.
183 <P>
184 <P>It was mentioned earlier that after a reject test that doesn't match, the default 
185 for following tests is 'accept', the reverse is true for 'accept'. In the example 
186 what happens is that the reject is executed first, any non hf/cw spot is passed 
187 to the accept line, which lets through everything else on HF.  The next filter line 
188 lets through just VHF/UHF spots from EU.
189 <P>
190 <P>
191 <HR>
192 <A HREF="adminmanual-7.html">Next</A>
193 <A HREF="adminmanual-5.html">Previous</A>
194 <A HREF="adminmanual.html#toc6">Contents</A>
195 </BODY>
196 </HTML>