nmxptool_cmd.html 28.3 KB
Newer Older
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Earthworm Modules: nmxptool commands</title>
</head>
<body alink="#ff0000" vlink="#551a8b" link="#0000ee"
 style="color: rgb(0, 0, 0); background-color: rgb(250, 223, 175);">
<center>
<h1>Earthworm Modules: <br>
nmxptool configuration file </h1>
11
<i>(last revised 31 March, 2008)</i></center>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
12 13 14 15 16
Page Index:<br>
1. <a href="#function">Functional command listing</a><br>
2. <a href="#alphabet">Alphabetic command listing &amp; description</a><br>
3. <a href="#advanced_description">Advanced Description</a><br>
4. <a href="#sample_config">Sample Configuration File</a><br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
17 18 19

<p><!-- ADD HERE: Paragraph "On startup, xxxx reads the..." -->
On startup, nmxptool reads the configuration file named on the command
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
20
line. Commands in this file set all the parameters used for configuring
Matteo Quintiliani's avatar
Matteo Quintiliani committed
21 22
the Earthworm Nanometrics client module nmxptool
(<a href="http://www.nanometrics.ca/">Nanometrics</a>).
Matteo Quintiliani's avatar
Matteo Quintiliani committed
23
In the control file, lines may begin with a valid nmxptool command (listed below) or
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
24 25 26 27 28 29 30 31
with one of 2 special characters: </p>
<blockquote>
  <pre>#  marks the line as a comment (example: # This is a comment).<br>   <br>@  allows control files to be nested; one control file can be <br>   accessed from another with the command "@" followed by <br>   a string representing the path name of the next control file <br>   (example: @model.d).<br></pre>
</blockquote>
Command names must be typed in the control file exactly as shown in
this document (commands are case sensative).&nbsp; Blank lines are also
permitted in the control file.<br>
<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
32

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
33 34 35 36
<h2><a name="function">1. FUNCTIONAL COMMAND LISTING</a></h2>
<p><!-- ADD HERE: Paragraph "Below are the commands recognized..." -->
Below are the commands recognized by nmxptool, grouped by the function
they influence. Most of the commands are required; they may be
Matteo Quintiliani's avatar
Matteo Quintiliani committed
37 38 39
specified in any order in the control file.
<!-- ADD HERE: The pre-formatted functional command listing      --><!-- To make an anchor for each command, surround it with these: -->
<br>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
40
</p>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
41 42 43 44 45 46
<pre>        Earthworm system setup:<br>
<a href="#MyModuleId">MyModuleId</a>              required<br>
<a href="#RingName">RingName</a>                required<br>
<a href="#HeartBeatInterval">HeartBeatInterval</a>       required<br>
<a href="#Verbosity">Verbosity</a>		optional<br><br>

Matteo Quintiliani's avatar
Matteo Quintiliani committed
47 48 49 50
Nanometrics server and connection parameters:<br>
<a href="#NmxpHost">NmxpHost</a>                required<br>
<a href="#NmxpPortPDS">NmxpPortPDS</a>		optional<br>
<a href="#NmxpPortDAP">NmxpPortDAP</a>		optional<br>
51 52
<a href="#UserDAP">UserDAP</a>			optional<br>
<a href="#PassDAP">PassDAP</a>			optional<br>
53
<a href="#ForceTraceBuf1">ForceTraceBuf1</a>		optional<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
54
<a href="#MaxTolerableLatency">MaxTolerableLatency</a>	optional<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
55
<a href="#MaxDataToRetrieve">MaxDataToRetrieve</a>	optional<br>
56
<a href="#TimeoutRecv">TimeoutRecv</a>		optional<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
57
<a href="#mschan">mschan</a>			optional<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
58
<a href="#DefaultNetworkCode">DefaultNetworkCode</a>	optional<br>
59 60
<a href="#ChannelFile">ChannelFile</a>		required	Xor Channel<br>
<a href="#Channel">Channel</a>			required	Xor ChannelFile<br>
61
<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
62 63

Output control:<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
64 65 66 67
<a href="#LogFile">LogFile</a>			required<br>
</pre>


Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
68 69 70 71 72 73 74 75 76 77 78
<h2><a name="alphabet">2. ALPHABETIC COMMAND LISTING &amp; DESCRIPTION</a></h2>
<p> In the following section, all configuration file commands are
listed
in alphabetical order. Listed along with the command (bold-type) are
its arguments (in red), the name of the subroutine that processes the
command, and the function within the module that the command
influences.
A detailed description of the command and is also given. Default values
and example commands are listed after each command description. </p>

<pre><b><br>command <font color="red">arg </font>                                 processed by            in function</b></pre>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
79

80 81 82 83
<hr><!-- ADD HERE: all commands; below is a sample command blank: --><!-- command name as anchor inside quotes -->
<pre><a name="Channel"><b>Channel <font color="red">streamkey</font>                 ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies one stream
of data to be requested from the NmxpHost.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
84
The <font color="red">streamkey</font> is not in SCNL format. It is composed of a network, station and channel code
85
separated by period. network is optional and it is used only for output.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
86
Station code can be &quot;&#42;&quot; that stands for all stations.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
87
Within channel code can appear character &quot;&#63;&quot; that stands for any characters. Location value is always set to &quot;--&quot;.
88
DO NOT USE WITH <a href="#ChannelFile">ChannelFile</a>!
89 90 91 92 93 94 95 96 97 98
  <pre>
Default:  none
Example:  Channel  ES.BOB.HH?
	  Channel  MN.TIR.HH?
	  Channel  SALO.HH?
	  Channel  *.HHZ

N.B. Network code will be assigned from the first pattern that includes station and channel.
     Unless HH channels of BOB and TIR, all other stations will have default network code from <a href="#DefaultNetworkCode">DefaultNetworkCode</a>.
</pre>
99 100
</blockquote>

101 102 103 104 105
<hr><!-- ADD HERE: all commands; below is a sample command blank: --><!-- command name as anchor inside quotes -->
<pre><a name="ChannelFile"><b>ChannelFile <font color="red">channel_state_file</font>                 ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies one or more streams
of data to be requested from the NmxpHost.
The <font color="red">streamkey</font> is the same for the <a href="#Channel">Channel</a>.
106 107 108
Allow data continuity when short disconnections to NaqsServer occur
requesting data buffered by NaqsServer (read <a href="#advanced_description">Advanced Description</a> for setting DataBufferLength) and, optionally,
retrieving data from DataServer within seconds defined by <a href="#MaxDataToRetrieve">MaxDataToRetrieve</a>.
109
This file is created by the user, nmxptool will update date and time of last sample received for each channel into the file &quot;<font color="red">channel_state_file</font>.nmxpstate&quot;. DO NOT USE WITH <a href="#Channel">Channel</a>!
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
  <pre>
Default:  none
Example:  ChannelFile  /home/ew/list_channels_naqs1.txt

Example of file created by the user:
ES.BOB.HH?
MN.TIR.HH?
SALO.HH?
*.HH?

N.B. Network code will be assigned from the first pattern that includes station and channel.
     Unless HH channels of BOB and TIR, all other stations will have default network code from <a href="#DefaultNetworkCode">DefaultNetworkCode</a>.

Example of file updated by nmxptool:
1228603650 ES.BOB.HHE 2008.063,07:48:15.5799 2008.063,07:50:12.9000
1228603649 ES.BOB.HHN 2008.063,07:48:16.0000 2008.063,07:50:13.6400
1228603648 ES.BOB.HHZ 2008.063,07:48:16.0000 2008.063,07:50:12.4900
1225851138 MN.TIR.HHE 2008.063,07:48:07.2200 2008.063,07:50:07.7999
1225851137 MN.TIR.HHN 2008.063,07:48:16.0000 2008.063,07:50:07.9000
1225851136 MN.TIR.HHZ 2008.063,07:48:05.7999 2008.063,07:50:08.2000
1253900546 IV.SALO.HHE 2008.063,07:48:00.3199 2008.063,07:50:15.4800
1253900545 IV.SALO.HHN 2008.063,07:48:16.0000 2008.063,07:50:15.7500
1253900544 IV.SALO.HHZ 2008.063,07:48:16.0000 2008.063,07:50:16.3299
1244987650 IV.AMUR.HHE 2008.063,07:48:09.0599 2008.063,07:50:13.3599
1244987649 IV.AMUR.HHN 2008.063,07:48:10.9600 2008.063,07:50:11.8000
1244987648 IV.AMUR.HHZ 2008.063,07:48:02.4600 2008.063,07:50:12.2799
1237188866 IV.ARCI.HHE 2008.063,07:48:10.0099 2008.063,07:50:13.0100
1237188865 IV.ARCI.HHN 2008.063,07:48:10.3399 2008.063,07:50:12.6200
1237188864 IV.ARCI.HHZ 2008.063,07:48:16.0000 2008.063,07:50:11.6700
...
140 141 142
</pre>
</blockquote>

143 144 145 146 147 148
<hr><!-- ADD HERE: all commands; below is a sample command blank: --><!-- command name as anchor inside quotes -->
<pre><a name="DefaultNetworkCode"><b>DefaultNetworkCode <font color="red">network_code</font>                 ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies default <font color="red">network code</font>
    for channels where is omitted.
  <pre><br>Default:  none<br>Example:  DefaultNetworkCode  IV</pre>
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
149

150
<hr><!-- ADD HERE: all commands; below is a sample command blank: --><!-- command name as anchor inside quotes -->
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
151
<pre><a name="ForceTraceBuf1"><b>ForceTraceBuf1 <font color="red">switch</font>                        ReadConfig              Earthworm setup<br></b><!-- command args ... -->           <br></a></pre>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
152

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
153 154 155 156 157 158 159 160
<blockquote><!-- command description goes here --> Sets the on-off <font
 color="red">switch</font> to force the creation of TRACEBUF messages on
systems that support TRACEBUF2 messages.  By default, the module will 
create TRACEBUF2 messages on systems that support them otherwise it will
create the older TRACEBUF messages.  This switch has no effect on systems
that do no support TRACEBUF2 messages.  This switch could be useful in 
environments where a transition is occuring between TRACEBUF and
TRACEBUF2 messages, otherwise most people will never use this.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
161 162

<pre><!-- Default and example go here   --><br>Default:  0 (disabled)<br>Example:  ForceTraceBuf1 1<br></pre>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
163
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
164

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
165 166 167 168 169 170 171
<hr><!-- command name as anchor inside quotes -->
<pre><a name="HeartBeatInterval"><b>HeartBeatInterval <font color="red">interval</font>                   ReadConfig              Earthworm setup<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Defines the <font
 color="red">interval</font> in seconds at which the module will issue
TYPE_HEARTBEAT messages.
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  HeartBeatInterval 30<br></pre>
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
172

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
173 174 175 176 177
<hr><!-- command name as anchor inside quotes -->
<pre><a name="LogFile"><b>LogFile <font color="red">switch</font>                               ReadConfig              Earthworm setup<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here -->Sets the on-off
switch for writing a log file to disk. If <font color="red">switch</font>
is 0, no log file will be written. If <font color="red">switch</font>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
178 179
is 1, nmxptool will write a daily log file(s) called
nmxptool.log_yymmdd where xx is nmxptool's module id (set with <a
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
180 181 182 183 184 185 186
 href="#MyModuleId">MyModuleId</a> command) and yymmdd is the current
UTC date (ex: 960123) on the system clock. The file(s) will be written
in the EW_LOG directory (environment variable).&nbsp; If <font
 color="red">switch</font> is 2 the log file is written but output to
stdout and stderr is suppressed.
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  LogFile   1<br>  </pre>
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
187

188 189
<hr><!-- command name as anchor inside quotes -->
<pre><a name="MaxDataToRetrieve"><b>MaxDataToRetrieve <font color="red">seconds</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
190
<blockquote><!-- command description goes here --> Max amount of data of the past to retrieve from the DataServer when program restarts.  0 to disable connection to DataServer.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
191
    If this parameter is zero and <a href="#ChannelFile">ChannelFile</a> is used, only data buffered by NaqsServer will be retrieved.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
192 193
    Rather than using <a href="#MaxDataToRetrieve">MaxDataToRetrieve</a>,
    it is preferable, inside the section Datastream of
194
    the file <i>Naqs.ini</i>, setting DataBufferLength to a high value (read <a href="#advanced_description">Advanced Description</a>).
Matteo Quintiliani's avatar
Matteo Quintiliani committed
195
    <a href="#MaxDataToRetrieve">MaxDataToRetrieve</a> allows to retrieve
Matteo Quintiliani's avatar
Matteo Quintiliani committed
196
    much more data of the past when the program restarts but
Matteo Quintiliani's avatar
Matteo Quintiliani committed
197
    it considerably slows down the execution.
198 199 200
    It is extremely harmful when you have many channels,
    in this case you might consider to subdivide the
    channels into different nmxptool instances.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
201 202
    Range is [0..86400].
  <pre><!-- Default and example go here   --><br>Default:  0<br>Example:  MaxDataToRetrieve  3600</pre>
203 204
</blockquote>

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
205
<hr><!-- command name as anchor inside quotes -->
206
<pre><a name="MaxTolerableLatency"><b>MaxTolerableLatency <font color="red">seconds</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
207 208 209
<blockquote><!-- command description goes here --> Specifies the max tolerable latency for raw stream connection. For enabling NaqsServer to send out retransmission requests for missed packets set RetxRequest (read <a href="#advanced_description">Advanced Description</a>).
If RetxRequest is not enabled then <a href="#MaxTolerableLatency">MaxTolerableLatency</a> is ineffective.\n\
    Range is [60..600].
210
  <pre><!-- Default and example go here   --><br>Default:  600<br>Example:  MaxTolerableLatency  200</pre>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
211
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
212

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
213 214 215 216 217 218
<hr><!-- command name as anchor inside quotes -->
<pre><a name="MyModuleId"><b>MyModuleId <font color="red">mod_id</font>                            ReadConfig              Earthworm setup<br></b><br></a></pre>
<blockquote><!-- command description goes here --> Sets the module id
for labeling all outgoing trigger, heartbeat, and error messages. <font
 color="red">mod_id</font> is a character string (valid strings are
listed in earthworm.d) that relates to a unique single-byte number.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
219
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  MyModuleId MOD_NMXPTOOL<br></pre>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
220
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
221

222 223 224 225 226 227
<hr><!-- command name as anchor inside quotes -->
<pre><a name="mschan"><b>mschan <font color="red">mSECs/nC</font>                               ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here -->
    <font color="red">mSECs</font> are milliseconds to wait before the next request,
    <font color="red">nC</font> is the number of channels to request at a time.
    Delaying and requesting few channels at a time make data buffering on NaqsServer side more efficient.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
228 229
    Determined empiric values are default 280/9. 0/0 for disabling.
    Condition: TotalNumberOfChannels * (mSECs/nC) &lt; 15 sec.
230 231 232
<pre><!-- Default and example go here   --><br>Default:  280/9<br>Example:  mschan      350/12<br></pre>
</blockquote>

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
233
<hr><!-- command name as anchor inside quotes -->
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
<pre><a name="NmxpHost"><b>NmxpHost <font color="red">address</font>                               ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specify the <font
 color="red">address</font> of the Nanometrics server. This can be either
on IP address (four period-separated numbers) or the domain name of the
server.
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  NmxpHost      naqs1a.int.ingv.it<br></pre>
</blockquote>

<hr><!-- command name as anchor inside quotes -->
<pre><a name="NmxpPortDAP"><b>NmxpPortDAP <font color="red">port</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies the IP <font
	color="red">port</font> number for the DataServer (<a href="#NmxpHost">NmxpHost</a>). This is
commonly 28002.
  <pre><!-- Default and example go here   --><br>Default:  28002<br>Example:  NmxpPortDAP  28002</pre>
</blockquote>

<hr><!-- command name as anchor inside quotes -->
<pre><a name="NmxpPortPDS"><b>NmxpPortPDS <font color="red">port</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies the IP <font
	color="red">port</font> number for the NaqsServer (<a href="#NmxpHost">NmxpHost</a>). This is
commonly 28000.
  <pre><!-- Default and example go here   --><br>Default:  28000<br>Example:  NmxpPortPDS  28000</pre>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
256
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
257

258 259 260 261 262 263 264
<hr><!-- command name as anchor inside quotes -->
<pre><a name="PassDAP"><b>PassDAP <font color="red">password</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies the <font
	color="red">password</font> for the DataServer (<a href="#NmxpHost">NmxpHost</a>). Leave commented if password in DataServer.ini is set to &quot;none&quot;.
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  PassDAP  mypass</pre>
</blockquote>

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
265 266 267 268 269 270 271 272 273 274
<hr><!-- command name as anchor inside quotes -->
<pre><a name="RingName"><b>RingName <font color="red">ring</font>                                ReadConfig              Earthworm setup<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Indicates which
shared memory region to use for waveform output.&nbsp; <font
 color="red">ring</font>
is a character string (valid strings are listed in earthworm.d) that
relates (in earthworm.d) to a unique number for the key to the shared
memory region.
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  RingName WAVE_RING<br></pre>
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
275

276 277
<hr><!-- command name as anchor inside quotes -->
<pre><a name="TimeoutRecv"><b>TimeoutRecv <font color="red">seconds</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
278
<blockquote><!-- command description goes here --> Specifies time-out for flushing buffered packets for each channel. Useful for Data On Demand (i.e. channel HN? or HL?). It sets <a href="#mschan">mschan</a> to 0/0.   Range is [10..300].
279 280 281
  <pre><!-- Default and example go here   --><br>Default:  0  (No Time-out)<br>Example:  TimeoutRecv  15</pre>
</blockquote>

282 283 284 285 286 287 288
<hr><!-- command name as anchor inside quotes -->
<pre><a name="UserDAP"><b>UserDAP <font color="red">username</font>                                  ReadConfig              nmxptool parameters<br></b><!-- command args ... -->           <br></a></pre>
<blockquote><!-- command description goes here --> Specifies the <font
	color="red">username</font> for the DataServer (<a href="#NmxpHost">NmxpHost</a>). Leave commented if username in DataServer.ini is set to &quot;none&quot;.
  <pre><!-- Default and example go here   --><br>Default:  none<br>Example:  UserDAP  mtheo</pre>
</blockquote>

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
289
<hr><!-- command name as anchor inside quotes -->
290 291 292 293
<pre><a name="Verbosity"><b>Verbosity  </b></a><b><font color="red">level</font></b><b>                             ReadConfig              Earthworm setup <br></b><!-- command args ... -->           <br></pre>
<blockquote><!-- command description goes here --> Specifies the <b><font
	    color="red">level</font></b> of logging verbosity.
    Verbosity is a bitmap:<br>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
294
    1 Channel State, 2 Channel, 4 Raw Stream, 8 CRC32, 16 Connection flow, 32 Packet Management, 64 Extra, 128 Date, 256 Gap, 512 DOD, 1023 All messages.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
295
  <pre><!-- Default and example go here   --><br>Default:  0<br>Example:  Verbosity 80		# 16 Connection flow + 64 Extra</pre>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
296
</blockquote>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
297 298 299 300 301





Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
302
<hr>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
303 304
<h2><a name="advanced_description"></a>3. Advanced Description</h2>
<p>
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
<h3>Data continuity when short disconnections to NaqsServer occur</h3>
Inside the section Datastream of the file <i>Naqs.ini</i> set <u>DataBufferLength</u> to a high value.

<pre>
    [ Datastream ] 
    Port = 28000              // TCP port for control/data connections to Naqs 
    Password = none           // access password (not used in version 1.3) 
    MaxConnections = 10       // maximum number of simultaneous connections 
    SocketType = Direct       // connection type (Direct or Callback) 
    <font color="blue">DataBufferLength = 100</font>    // Buffer length for data channels (# packets)
</pre>

</p>

<p>
<h3>Packet retransmission</h3>
Inside the section NetworkInterface of the file <i>Naqs.ini</i> enable <u>RetxRequest</u>.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
322
If RetxRequest is not enabled then <a href="#MaxTolerableLatency">MaxTolerableLatency</a> is ineffective.
323 324 325 326 327 328 329 330 331

<pre>
    [ NetworkInterface ] 
    Port = 32000           // UDP port for incoming NMX data (usually 32000) 
    SendDelay = 250        // milliseconds to delay after each send 
    <font color="blue">RetxRequest = Enabled</font>
    MulticastGroup = 224.1.1.1 
</pre>

Matteo Quintiliani's avatar
Matteo Quintiliani committed
332 333
</p>

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
334
<h2><a name="sample_config"></a>4. Sample Configuration File </h2>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
335 336 337 338 339 340 341


<pre>
#
#                     Configuration File for nmxptool
#
MyModuleId           MOD_NMXPTOOL
Matteo Quintiliani's avatar
Matteo Quintiliani committed
342 343
RingName             WAVE_RING           # Transport ring to write data to.

Matteo Quintiliani's avatar
Matteo Quintiliani committed
344
HeartBeatInterval    10                  # Heartbeat interval, in seconds.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
LogFile              1                   # 1 -> Keep log, 0 -> no log file
                                         # 2 -> write to module log but not stderr/stdout

#ForceTraceBuf1      0                   # On systems that support TRACEBUF2
                                         # messages this flag will force the module
                                         # to create TRACEBUF messages instead.
                                         # Most people will never need this.

Verbosity            16                  # Set level of verbosity. Verbosity is a bitmap:
                                         # 1 Channel State, 2 Channel, 4 Raw Stream,
                                         # 8 CRC32, 16 Connection flow,
                                         # 32 Packet Management, 64 Extra, 128 Date,
                                         # 256 Gap, 512 DOD, 1023 All messages.
                                         # It is equivalent to the option -v.

Matteo Quintiliani's avatar
Matteo Quintiliani committed
360
NmxpHost             naqs1a.int.ingv.it  # NaqsServer/DataServer hostname or IP address.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
361 362 363 364 365 366 367
                                         # It is equivalent to the option -H.

NmxpPortPDS          28000               # Port number of NaqsServer (Default 28000)
                                         # It is equivalent to the option -P.

NmxpPortDAP          28002               # Port number of DataServer(Default 28002)
                                         # It is equivalent to the option -D.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
368
#UserDAP              mtheo              # DataServer user name. Commented if 'none'.
369
                                         # It is equivalent to the option -u.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
370
#PassDAP              mypass             # DataServer password. Commented if 'none'.
371
                                         # It is equivalent to the option -p.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
372

373 374 375 376 377 378
MaxTolerableLatency  120                 # Max tolerable latency for each channel.
                                         # (Default 600 sec.) [60..600].
                                         # Enable NaqsServer to send out retransmission requests
                                         # for missed packets. Inside the section NetworkInterface
                                         # of the file Naqs.ini set RetxRequest to Enabled.
                                         # If RetxRequest is not enabled then MaxTolerableLatency is ineffective.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
379 380 381
                                         # In general, DO NOT use with parameter TimeoutRecv.
                                         # It is equivalent to the option -M.

Matteo Quintiliani's avatar
Matteo Quintiliani committed
382
#TimeoutRecv          30                 # Time-out in seconds for flushing queued data of each channel.
383
                                         # It sets mschan to 0/0 ((Default 0. No time-out) [10..300].
Matteo Quintiliani's avatar
Matteo Quintiliani committed
384
                                         # Useful for retrieving Data On Demand with minimum delay.
385
                                         # 'tsec' in nmxptool.desc should be greater than 'TimeoutRecv'.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
386 387 388 389 390 391 392 393 394 395
                                         # It is equivalent to the option -T.

DefaultNetworkCode   IV                  # Default network code where in 'ChannelFile' or 'Channel' is not declared.
                                         # It is equivalent to the option -N.

                                         # N.B. nmxptool channel definition IS NOT equal to SCNL
                                         # It is NSC, that is NET.STA.CHAN
                                         # NET  is optional and used only for output.
                                         # STA  can be '*', stands for all stations.
                                         # CHAN can contain '?', stands for any character.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
396
                                         # Localtion value is always equal to "--".
Matteo Quintiliani's avatar
Matteo Quintiliani committed
397 398 399 400 401 402 403 404
                                         # Related to the parameters 'ChannelFile' and 'Channel'.
                                         # Network code will be assigned from the first
                                         # pattern that includes station and channel.
                                         # Example: N1.AAA.HH?,N2.*.HH?,MMM.BH?
                                         # Second pattern includes the first. Unless AAA, all
                                         # stations with HH channels will have network to N2.
                                         # Station MMM will have default network defined by 'DefaultNetworkCode'.

Matteo Quintiliani's avatar
Matteo Quintiliani committed
405
#MaxDataToRetrieve    3600               # Max amount of data of the past to retrieve from the
Matteo Quintiliani's avatar
Matteo Quintiliani committed
406 407 408 409 410
                                         # DataServer when program restarts (default 0) [0..86400].
                                         # 0 to disable connection to DataServer.
                                         # It is equivalent to the option -A. Related to 'ChannelFile'.
                                         # If 'MaxDataToRetrieve' is zero and 'ChannelFile' is used,
                                         # only data buffered by NaqsServer will be retrieved.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
411 412 413 414 415
                                         # Rather than using 'MaxDataToRetrieve', it is preferable,
                                         # inside the section Datastream of the file Naqs.ini,
                                         # setting DataBufferLength to a high value.
                                         # 'MaxDataToRetrieve' allows to retrieve much more data of the past
                                         # when the program restarts but it considerably slows down the execution.
416 417 418
                                         # It is extremely harmful when you have many channels,
                                         # in this case you might consider to subdivide the
                                         # channels into different nmxptool instances.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
419

Matteo Quintiliani's avatar
Matteo Quintiliani committed
420 421 422 423 424 425 426 427 428
#mschan        280/9                     # mSECs/nC
                                         # mSECs are milliseconds to wait before the next request,
                                         # nC is the number of channels to request at a time.
                                         # Delaying and requesting few channels at a time make
                                         # data buffering on NaqsServer side more efficient.
                                         # Determined empiric values are default 280/9.
                                         # Condition: TotalNumberOfChannels * (mSECs/nC) < 15 sec. 
                                         # Related to -F and -b. 0/0 for disabling.

Matteo Quintiliani's avatar
Matteo Quintiliani committed
429 430 431 432 433 434 435 436
ChannelFile   /home/ew/naqs1a.list.txt   # List of channel patterns, as in 'Channel'. One for each line.
                                         # This file will not be modified by nmxptool.
                                         # Load/Save time of last sample of each channel in a file
                                         # with the same name, same directory, appending suffix ".nmxpstate"
                                         # Allow data continuity between program restarts.
                                         # Related to 'MaxDataToRetrieve', it enables request of recent packets.
                                         # It is equivalent to the option -F. Related to 'MaxDataToRetrieve'.

Matteo Quintiliani's avatar
Matteo Quintiliani committed
437
    # DO NOT USE parameters 'Channel' and 'ChannelFile' together.
Matteo Quintiliani's avatar
Matteo Quintiliani committed
438 439
    # 'ChannelFile' is preferable. At restart you can retrieve data of the past
    # from the NaqsServer and optionally from the DataServer, see 'MaxDataToRetrieve'.
440

Matteo Quintiliani's avatar
Matteo Quintiliani committed
441
# Example of nmxptool channel definition
442 443 444 445 446 447
# Channel              ES.BOB.HH?
# Channel              MN.TIR.HH?
# Channel              MDI.HH?
# Channel              DOI.HH?
# Channel              SALO.HH?
# Channel              MONC.HH?
Matteo Quintiliani's avatar
Matteo Quintiliani committed
448
# Channel              *.BHZ               # Channel selection
449

Matteo Quintiliani's avatar
Matteo Quintiliani committed
450 451
# Please, for other details about parameters, refer to the command line "nmxptool -h"

Matteo Quintiliani's avatar
Matteo Quintiliani committed
452

Matteo Quintiliani's avatar
Matteo Quintiliani committed
453 454
</pre>

Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
455 456 457 458 459
<hr>
<center> <a href="../modules.html">Module Index</a> | <a
 href="../ovr/nmxptool_ovr.html">nmxptool Overview</a> </center>
<!-- USGS-required stuff at the end -->
<hr>
Matteo Quintiliani's avatar
Matteo Quintiliani committed
460 461
<address>
</b>Contact: <b>quintiliani at ingv.it</b> - Website: <a href="http://mednet.rm.ingv.it/nmxptool.php">http://mednet.rm.ingv.it/nmxptool.php</a>
Matteo Quintiliani's avatar
start  
Matteo Quintiliani committed
462 463 464
</address>
</body>
</html>