k22orb - transfer data from a Kinemetrics Altus digitizer to an orb
k22orb [-pf pfname] [-db calibdb] [-dlclock dlname] [-v]
[-state statefile] [-start starttime]
targetname dataorbname [cmdorbname]
k22orb is a program for interacting with one or more Kinemetrics Altus digitizers,
through a bank of direct serial connections, telephone modems or ip devices,
such as terminal servers, routers or device servers.
Data packets along with log messages, status messages
and event summary messages are written to an output orb. Optionally,
the raw Kinemetrics .EVT files may also be written to disk. k22orb is capable
of supporting all block mode data transfers including continuous
streaming mode and both the dialout and dialin event triggered modes of
the Kinemetrics Altus digitizers. Remote command and control of the dataloggers
is accomplished through orb-based command/response packet communications
using k2cmd(1). k22orb supports the entire Kinemetrics Altus product line,
including the 18-channel Mount Whitneys.
-
-pf pfname
Name of program parameter file. This argument is optional and
if not specified defaults to k22orb.
The actual parameter file name is pfname.pf.
-
-db calibdb
Name of a database that contains the calib, calper and
segtype information. These are filled into the raw data
packets before they are written to the output ORB. The
tables needed are sensor, instrument and
calibration.
-
-dlclock dlname
This can be used to specify by datalogger name, dlname, of the
Altus datalogger that should be used to retrieve time for the purpose of driving
a local ntpd to set the local system time.
-
-v
verbose output flag.
-
-state statefile
Name of a file to house state information. The only state information
used is the time of the last sample of waveform data that was
successfully transferred from a digitizer to the output orb. This time
for each digitizer is read from the stat file at start-up and is used
to determine which events need to be transferred. This file is automatically
updated whenever an event has been successfully transferred.
-
-start starttime
A time used to determine which events need to be transferred from
the digitizers. If this argument is specified, then it supersedes
the information from the -state argument. Only events with waveform
data after starttime are transferred.
-
targetname
This is used to uniquely identify this particular instance of
k22orb and is placed in the command, status and log ORB source
names.
This argument is required.
-
dataorbname
The output orb that will contain all of the digitizer waveform data,
log messages, status messages and event summary messages.
This argument is required.
-
cmdorbname
Name of an orb for relaying commands and/or queries to k22orb and
the digitizers. All k22orb command and/or query functions are
initiated with parameter file objects passed through this orb.
The command orb can be the same as the data orb. Responses to
commands and/or queries are written back as separate parameter
file objects by k22orb to the command orb.
If this argument is not specified, then the command orb will be the
same as the data orb.
k22orb writes out waveform data in a "generic" compressed packet
format. The time lengths of the output data packets are controlled
through the k22orb input parameter file, as defined below, for event data,
and packet time lengths are preserved for streaming data (hardwired in
the Altus dataloggers to 1 second).
k22orb also writes out a set of log messages (as <digitizer_name>/log and <targetname>/log
packets). These messages are simple ASCII strings.
k22orb keeps a set of status information for each attached digitizer.
All of this status information is written as a parameter file
packet (with name <target_name>/pf/st) to the output orb
whenever a state change occurs, for each digitizer, or based upon
the request_status_interval parameter during streaming mode.
>LP
Whenever a new connection is established to a digitizer and new
events are being requested, k22orb puts out event summary information
as parameter file packets (with name /pf/<targetname>_k22orb_evtinfo). These
event summary packets are transferred to the output orb immediately
upon connection to the digitizer and are independent of the actual
waveform transfers.
The k22orb parameter file contains all of the information
necessary for connecting to various modems (or terminal servers)
and from there to the digitizers.
Following is an example k22orb parameter file.
#
# k22orb.pf describes the modem comm links and the dataloggers
#
status_interval 20.0 # status reporting interval in seconds
datarate_interval 20.0 # datarate calculation interval in seconds
evt_file_dir /b2/test/altus/evt # root directory for .evt files
connect_listen_string ATDT
connect_response_string CONNECT<r><n><sl=1>CONNECT<r><n><sl=1>CONNECT<r><n>
modem_defaults &Arr{ # default parameters for modems
baud 38400 # baud rate for serial
dialin yes # listen for dailin connections?
dialin_cmd getevents # command to execute whenever a dialin connection is made
dialout yes # allow dialout connections?
listen_string ATE1N1W1&C1S0=1<r> # listen modem control string
nolisten_string ATE1N1W1&C1S0=0<r> # no listen modem control string
dialout_string AT&C1S0=0&D2DT<pn><r> # call (dialout) modem control string
hangup_string ATH0<r> # hangup telephone modem control string
attention_string +++<sl=3>AT<r> # string that will get the attention of the modem
ring_rec_string <r><n>RING<r><n> # recognition string for telephone ringing
busy_rec_string <r><n>BUSY<r><n> # recognition string for telephone busy
connect_rec_string <r><n>CONNECT~<r><n> # recognition string for carrier detect
offhook_rec_string <r><n>NO CARRIER<r><n> # recognition string for carrier dropped
attention_rec_string <r><n>OK<r><n> # string that indicates modem is in command mode
timeout 10.0 # read timeout value in seconds
timeout_connect 30.0 # connect timeout value in seconds
maxtries 3 # maximum number of tries to read data
}
modems &Arr{ # modem bank array
modem1 &Arr{ # telephone modem
com_mode serial # 'serial' or 'tcpclient'
modem_control local # 'local', 'remote', or 'none'
dev /dev/ttyb # UNIX device name for serial port to modem
}
serial1 &Arr{ # direct serial connection (no modem)
com_mode serial # 'serial' or 'tcpclient'
modem_control none # indicates direct serial connection (no modem)
dev /dev/ttya # UNIX device name for serial
dialin no # do not listen for dialin connections
timeout_connect 10.0 # connect timeout value in seconds
}
cobox1 &Arr{ # cobox device server
com_mode tcpclient # 'serial' or 'tcpclient'
modem_control none # indicates direct serial connection (no modem)
ipaddr cobox # ip-address for destination server
port 9000 # port no. for destination server
dialin no # do not listen for dailin connections
timeout_connect 10.0 # connect timeout value in seconds
}
cobox2 &Arr{ # cobox device server
com_mode tcpclient # 'serial' or 'tcpclient'
modem_control none # indicates direct serial connection (no modem)
ipaddr cobox # ip-address for destination server
port 9001 # port no. for destination server
dialin no # do not listen for dailin connections
timeout_connect 10.0 # connect timeout value in seconds
}
}
datalogger_defaults &Arr{ # default parameters for dataloggers
model K2 # datalogger model
dialin yes # listen for dailin connections?
dialout yes # allow dialout connections?
dialout_if_getevents_incomplete yes # dialout if getevents incomplete
auto_delete yes # causes deletion of event files
# at K2 after reception
auto_stream yes # causes datalogger to dialout for a
# streaming connection whenever idle
auto_getevents yes # causes automatic acquisitions of events
# whenever an alarm is detected
save_evt_files no # save K2 .evt files?
callmode_on_close yes # set K2 to CALLMODE on close?
max_strbuf 1800 # maximum size of streaming packets buffer
max_retran 30 # maximum pending retransmissions
max_status_size 100 # maximum size of status list
order_output_data yes # time order stream output data
output_packet_twin 1.0 # time window in seconds of output ORB
# packets (for event data)
tmpfile_maxwaittime 600.0 # maximum wait time in seconds for a
# K2 tmp events file to be completed
request_params_interval 60.0 # time interval for automatically requequesting
# datalogger parameters block in streming
# mode only
samprate 100 # requested streaming sample rate
stream_timeout 200 # this is the ALtus streaming-modem communication
# timeout in packets - setting this to 0 will
# enable "mode 1" streaming communication
}
dataloggers &Arr{ # dataloggers array
E1176 &Arr{ # target name for first datalogger
serial 1176 # serial number for this datalogger
model Etna # datalogger model
dialin no # do not listen for dailin connections
dialout_modem serial1 # use 'serial1' serial line for dialout
callmode_on_close no # do not set Etna to CALLMODE on close
auto_getevents no # causes automatic acquisitions of events
# whenever an alarm is detected
output_channels &Tbl{ # net_sta_chan codes (or net_sta_chan_loc
# codes) for each Etna channel output
# pchan net_sta_chan(_loc) when calib calper segtype [str_netstachanloc]
0 BR_E1176_HGE both data -1.0 A
1 BR_E1176_HGN both data -1.0 A
2 BR_E1176_HGZ both data -1.0 A
}
max_strbuf 360 # maximum size of streaming packets buffer
}
K157 &Arr{ # target name for second datalogger
serial 157 # serial number for this datalogger
model K2 # datalogger model
dialout_modem modem. # use 'modem*' modems for dialout
phone_number 3039380934 # telephone number for dialout
auto_stream no # causes datalogger to dialout for a
# streaming connection whenever idle
auto_getevents no # causes automatic acquisitions of events
# whenever an alarm is detected
output_channels &Tbl{ # net_sta_chan codes (or net_sta_chan_loc
# codes) for each K2 channel output
# pchan net_sta_chan(_loc) when calib calper segtype [str_netstachanloc]
0 BR_K157_HGE both db
1 BR_K157_HGN both db
2 BR_K157_HGZ both db
}
max_strbuf 540 # maximum size of streaming packets buffer
}
K110 &Arr{ # target name for first datalogger
serial 110 # serial number for this datalogger
model K2 # datalogger model
dialin no # do not listen for dailin connections
dialout_modem cobox2 # use 'cobox2' device server for dialout
callmode_on_close no # do not set K2 to CALLMODE on close
output_channels &Tbl{ # net_sta_chan codes (or net_sta_chan_loc
# codes) for each K2 channel output
# pchan net_sta_chan(_loc) when calib calper segtype [str_netstachanloc]
0 BR_K110_HGE_EV both data -1.0 A BR_K110_HGE
1 BR_K110_HGN_EV both data -1.0 A BR_K110_HGN
2 BR_K110_HGZ_EV both data -1.0 A BR_K110_HGZ
}
max_retran 12 # maximum pending retransmissions
}
M206 &Arr{ # target name for first datalogger
serial 206 # serial number for this datalogger
model MtWhitney # datalogger model
dialin no # do not listen for dailin connections
dialout_modem cobox1 # use 'cobox1' device server for dialout
auto_getevents no # causes automatic acquisitions of events
# whenever an alarm is detected
callmode_on_close no # do not set Mt Whitney to CALLMODE on close
output_channels &Tbl{ # net_sta_chan codes (or net_sta_chan_loc
# codes) for each Mt Whitney channel output
# pchan net_sta_chan(_loc) when calib calper segtype [str_netstachanloc]
0 BR_M206_HGZ_00 both data -1.0 A BR_M206_HGZ_S0
1 BR_M206_HGZ_01 both data -1.0 A BR_M206_HGZ_S1
2 BR_M206_HGZ_02 both data -1.0 A BR_M206_HGZ_S2
3 BR_M206_HGZ_03 event data -1.0 A
4 BR_M206_HGZ_04 event data -1.0 A
5 BR_M206_HGZ_05 event data -1.0 A
6 BR_M206_HGZ_06 stream data -1.0 A
7 BR_M206_HGZ_07 stream data -1.0 A
8 BR_M206_HGZ_08 stream data -1.0 A
9 BR_M206_HGZ_09 event data -1.0 A
10 BR_M206_HGZ_10 event data -1.0 A
11 BR_M206_HGZ_11 event data -1.0 A
12 BR_M206_HGZ_12 event data -1.0 A
13 BR_M206_HGZ_13 event data -1.0 A
14 BR_M206_HGZ_14 event data -1.0 A
15 BR_M206_HGZ_15 event data -1.0 A
16 BR_M206_HGZ_16 event data -1.0 A
17 BR_M206_HGZ_17 event data -1.0 A
}
max_strbuf 2700 # maximum size of streaming packets buffer
max_retran 12 # maximum pending retransmissions
password secret # for password protected dataloggers
}
}
There are many parameters that are used either as command strings
for telephone modems, or as recognition strings that the host
computer uses to identify a modem response. Strings of this type from
the k22orb parameter file are processed through a special parser
that will recognize tokens for non-printing characters, such as RETURN and
NEWLINE characters, as well as tokens to indicate time sleeps
and substitute tokens for substituting telephone numbers. These
special tokens are defined as follows:
-
<r>
This is replaced with a \r RETURN character.
-
<n>
This is replaced with a \n NEWLINE character.
-
<sl=n>
This causes a n second sleep to take place when a
string is being sent to the modem.
-
<pn>
This causes a telephone number to be inserted (defined
in the datalogger parameters)
-
~
This is used as a wildcard character in recognition strings to indicate any number of
any characters.
At the beginning of the parameter file there are a set of global parameters as follows:
-
status_interval
This is the status reporting interval in seconds.
-
datarate_interval
This is the interval in seconds used to calculate data rate values.
-
evt_file_dir
This is the root directory path name for storing any
Kinemetrics .EVT files. Kinemetrics .EVT files are only
stored for a particular datalogger when its save_evt_files
parameter is set to "yes".
-
connect_listen_string
This is an ASCII string that is used to identify when a datalogger
is trying to initiate a dial connection. This is only used when a
datalogger is connected to the host computer through a direct serial
connection without using a telephone modem. Altus dataloggers normally
will issue something like a Hayes ATDT command followed by a telephone
number to initiate a dial connection.
-
connect_response_string
This is an ASCII string that is sent back to the datalogger from
the host computer after the datalogger
has tried to initiate a dial connection. This is only used when a
datalogger is connected to the host computer through a direct serial
connection without using a telephone modem. Altus dataloggers normally
will issue something like a Hayes ATDT command followed by a telephone
number to initiate a dial connection. The datalogger will then wait for
a normal modem response string, like CONNECT..., before it starts sending
its event info.
After the global parameters there must be four array parameters; modem_defaults,
modems, datalogger_defaults and dataloggers. k22orb manages communications
links through the "modems" array entries and dataloggers through the "dataloggers"
array entries. Generally, the relationship between "modems" and "dataloggers" is
dynamic, i.e. in typical event-oriented mode a datalogger may dial into any
available modem and a datalogger command, either internally generated or
from k2cmd(1), can initiate a dialout from any available modem to any particular
datalogger. However, for hardwired serial connections, either wire-based or
ip-based, that do not directly involve telephone modems, a fixed point-to-point
connection between a particular communication link and a particular datalogger can be
defined in the parameter file.
Communications links are defined in the "modems" array. Each entry in the array
defines a single communications link and is itself another array with name
set to the "modem" target name and values set to the parameters for that
link. The parameters for a single communications link are as follows:
-
com_mode
This is the basic communications mode and must be set to one of "serial" or "tcpclient".
For "serial" com_mode, the communications take place through a serial port on the
host computer. For "tcpclient" com_mode, the communications take place through a client TCP/IP
connection on the host computer to a remote TCP/IP server (such as a terminal server or
a device server). For "tcpclient" com_mode it is assumed that the remote TCP/IP server
will eventually open a serial connection to the remote datalogger.
-
modem_control
This defines how, or if, k22orb will issue modem control strings and must be set
to one of "local", "remote", or "none". If modem_control is "none", then it is assumed
that there is no telephone modem in the communications link and that k22orb
is talking to the remote datalogger through a serial connection, either directly through
a host computer serial port, or indirectly through a TCP/IP connection and a terminal
server or device server. In this case no modem control strings are sent. If modem_control
is "none" and the remote datalogger is configured to automatically initiate a dial
connection to the host computer upon an event, then k22orb will mimic the remote
telephone modem that the datalogger is expecting by listening for the ATDT control
string from the datalogger, as defined by the global parameter connect_listen_string,
and responding with the CONNECT string, as defined by the global parameter
connect_response_string, so that the remote datalogger will start transmission of
the event information. If modem_control is "local" or "remote", then k22orb
assumes that a telephone modem needs to be controlled (the modem can be attached either
to a host computer serial port or through a terminal server). In these cases the set of
modem control strings defined below must be specified. If modem_control is "remote",
then loss of carrier is determined solely by looking for the offhook_rec_string, as
defined below, in the incoming byte stream from the modem. If modem_control is "local",
then loss of carrier is determined either from reception of the offhook_rec_string or
directly through the out-of-band CD (Carrier Detect) signal on the serial port.
-
dev
UNIX device name for "serial" com_mode.
-
baud
baud rate for "serial" com_mode.
-
ipaddr
Remote TCP/IP server ip-address for "tcpclient" com_mode.
-
port
Remote TCP/IP server port number for "tcpclient" com_mode.
-
dialin
Should k22orb listen for connections initiated
by remote dataloggers on this com link?
-
dialout
Should k22orb allow for connections to
remote dataloggers initiated
by k22orb using this com link?
-
listen_string
This is the modem control string that is used
to set the modem into "answer" mode, i.e. the
modem will answer incoming telephone calls. This is
only used when the modem_control parameter is
set to "local" or "remote".
-
nolisten_string
This is the modem control string that is used
to set the modem into "no answer" mode, i.e. the
modem will ignore incoming telephone calls. This is
only used when the modem_control parameter is
set to "local" or "remote".
-
dialout_string
This is the modem control string that is used
to make a telephone call that is initiated by
k22orb. The <pn> token must be specified
in this string, which is substituted with the datalogger
telephone number.
This is only used when the modem_control parameter is
set to "local" or "remote".
-
hangup_string
This is the modem control string that is used
to cause the modem to hang up the telephone line.
This is only used when the modem_control parameter is
set to "local" or "remote".
-
attention_string
This is the string that is used
to get the attention of the modem, i.e. to put
the modem into a mode where it recognizes incoming
characters as modem control strings.
This is only used when the modem_control parameter is
set to "local" or "remote".
-
ring_rec_string
This is a string that the modem
issues whenever the number it is dialing is "ringing".
k22orb will search the incoming byte stream
from the modem for this string to recognize that
the telephone is "ringing".
This is only used when the modem_control parameter is
set to "local" or "remote".
-
busy_rec_string
This is a string that the modem
issues whenever the number it is dialing is "busy".
k22orb will search the incoming byte stream
from the modem for this string to recognize that
the telephone is "busy".
This is only used when the modem_control parameter is
set to "local" or "remote".
-
connect_rec_string
This is a string that the modem
issues whenever the number it is dialing is "connected".
k22orb will search the incoming byte stream
from the modem for this string to recognize that
the telephone is "connected".
This is only used when the modem_control parameter is
set to "local" or "remote".
-
offhook_rec_string
This is a string that the modem
issues whenever the telephone connection is lost
(loss of carrier on the line).
k22orb will search the incoming byte stream
from the modem for this string to recognize that
the telephone is "offhook" and the connection is lost.
This is only used when the modem_control parameter is
set to "local" or "remote".
-
attention_rec_string
This is a string that the modem
issues in response to a modem control string (such as AT)
to indicate that it is in modem control mode and will
recognize incoming characters as modem control
strings.
This is only used when the modem_control parameter is
set to "local" or "remote".
-
timeout
This is a timeout value in seconds that is applied to
normal reads of the com link by k22orb. This
is used whenever k22orb is expecting a response
to a command already sent. If this timeout expires,
then a read timeout error is generated which will cause
k22orb to either retry the command or drop the
connection, depending on the maxtries parameter below.
-
timeout_connect
This is a timeout value in seconds that is applied to
reads of the com link by k22orb during the com
link connection establishment. This
is used while k22orb is in the process of making
a new connection. Telephone modems can take a considerable
amount of time before a connection is made. This timeout_connect
allows the user to accomodate this by overiding the normal read timeout with
a larger value.
-
maxtries
This is the number of times that k22orb will retry
a command when a read timeout error, or a read checksum or
crc error has occured, before k22orb will give up and
drop the connection. This
is used whenever k22orb is expecting a response
to a command already sent.
All of the communication link parameters, except for com_mode,
modem_control, dev, ipaddr and port parameters, must be
specified in the modem_defaults array which defines a set of default
values for all of the individual modems array entries. Any of
the default values can be overidden within each modems array
entry as shown in the example parameter file.
Remote dataloggers are defined in the "dataloggers" array. Each entry in the array
defines a single remote datalogger and is itself another array with name
set to the "datalogger" target name and values set to the parameters for that
datalogger. The parameters for a single remote datalogger are as follows:
-
serial
This is the datalogger serial number. Whenever a connection is established
(either dialin or dialout) k22orb first queries the datalogger for its
serial number and model name. It then matches these against the entries in
the dataloggers array parameters to determine which particular datalogger
is connected. If the remote datalogger initiated the connection through
a telephone modem, then the "modem" to "datalogger" link is determined
dynamically when the connection is made. This allows a bank of telephone
modems to be used with no particular dedicated assigment of telephone
modem to datalogger. However, even if the "modem" to "datalogger" link
is hardwired as a fixed point-to-point link, either by the nature of
the communication link, for incoming connections, or through the
dialout_modem parameter, for outgoing connections, k22orb will
still query the datalogger for serial number and model name, and
k22orb will still try to match those against the entries in the particular
datalogger parameters. If these parameters do not match, then k22orb
will issue error messages and the user will have to fix the k22orb
parameter file and restart k22orb.
-
model
This is the datalogger model name and must be one of "K2",
"Etna", "MtWhitney", "Everest" or "Makalu" (these model names must be one of
these strings exactly). Altus series serial numbers are not
unique across models, so the model name must be specified.
-
dialin
Should k22orb accept connections initiated by this
datalogger?
-
dialin_cmd
This should be one of "getevents" or "strstart" and is the
command that is executed by k22orb whenever a dialin
connection is made. The "getevents" command will cause k22orb
to query and retrieve the datalogger .EVT files and "strstart"
will cause k22orb to go into streaming data mode.
-
dialout
Should k22orb initiate connections to this
datalogger?
-
dialout_modem
If the dialout parameter is set to "yes", then this is the
target name of the communication link (i.e. the name
within the modems array) for k22orb initiated
connections to this datalogger. This can be a string that exactly
matches a single entry in the modems array, in which case a fixed
point-to-point connection will be used, or it can be a regular
UNIX expression that is matched against the names of the modems
array, in which case the first available (not busy) communication link that
matches the expression will be used. Note that whenever a command is
targetted to a particular datalogger, k22orb will always check
to see if a connection to that datalogger is already open, regardless
of how the connection was established. If there is an existing open
connection, then k22orb will insert the commands into the
existing link and intercept the reponses. New connections are
only made when there are no existing connections.
-
phone_number
This is the telephone number of the remote datalogger for making k22orb
initiated connections to a datalogger. This string must conform to the modem
control string syntax (e.g. for a Hayes syntax you could insert ',' characters
to cause the dialing to pause briefly) and this string replaces the appropriate
<pn> token in the dialout_string. This parameter does not need to be specified
for direct serial connections that do not involve telephone modems.
-
output_channels
This is a table that defines the physical datalogger channels that should
be setup for event and/or streaming data acquisition and the mapping of
physical channel numbers to SEED net_sta_chan_loc codes for output to
an output orb. Also defined in this table are how the calib,
calper and segtype parameters are determined for each output
data packet. Each line in this table corresponds to a single channel of
data and must contain fields for the datalogger physical channel number
(starting at 0), the net_sta_chan_loc codes assigned to this channel for
packets generated by event data, a code that specifies what types of
data are acquired and output (one of "event", for only event data,
"stream", for only streaming data, or "both" for both event and streaming data),
a calib value, a calper value, a segtype value and, optionally, the net_sta_chan_loc
codes assigned to this channel for packets generated by streaming data.
Note that any of the net_sta_chan_loc codes may be specified as net_sta_chan,
indicating NULL loc codes. Also the net_sta_chan_loc codes for the streaming
data may be omitted, indicating that the streaming net_sta_chan_loc codes
will be the same as the event net_sta_chan_loc codes. The calib field may be
specified as a floating number, or the string "data", or the string "db".
If the calib field is specified as "data", then the calib value is determined
from datalogger parameters that are sent with each event file or whenever the
datalogger parameters are acquired by k22orb (this happens for instance whenever
k22orb initiates streaming mode). In this case, the calib and
segtype fields must be specified correctly according to the calper and
segtype field definitions in the wfdisc table using the css3.0 schema.
If the calib field is specified as "db", then the calib, calper and segtype values are determined
from the input database, as specified in the -db command line argument, using the
calibration, sensor and instrument tables (calib and calper
come from the calibration table and segtype comes from the instrument
rsptype field).
If the calib field is specified as "db", then the calper and segtype fields
in the output_channels table entry should be left blank.
-
auto_stream
If this is specified as "yes", then k22orb will always try to make
a connection to this datalogger, put it into streaming mode, continuously
acquire streaming data and write the data to the output orb. If a connection
goes down for some reason (e.g. the carrier is lost or other communication
link fatal error), then k22orb will repeatedly attempt to reconnect
and restart the streaming acquisition. While in streaming acquisition mode,
k22orb will continue to respond to other commands that may be sent
to the datalogger (e.g. from k2cmd(1)) by interleaving these commands into
the data stream without the need to stop and/or reset the streaming acquisition.
-
auto_delete
If this is specified as "yes", then k22orb will automatically delete .EVT files
on the remote datalogger after they have been successfully acquired.
-
save_evt_files
If this is specified as "yes", then k22orb will automatically copy .EVT files
to a directory on the host computer disk. The files are copied verbatim and are
suitable for processing with any programs that recognize the Kinemetrics .EVT
file format.
-
callmode_on_close
If this is specified as "yes", then k22orb will issue a datalogger monitor
mode "callmode" command whenever a connection is closed. This will put the remote
datalogger into its auto-call mode so that it will send the proper modem control
strings to its telephone modem (at the remote end) and initiate calls to the host
computer whenever an event is detected. Note that this only needs to be done for
modems and dataloggers whose dialin parameters are set to "yes" or in situations
where a remote datalogger will be making calls to other receivers.
-
auto_getevents
If this is specified as "yes", then k22orb will automatically try to process
a "getevents" command to that datalogger every 10 minutes and/or whenever a datalogger
event is detected. If a connection to that datalogger is already established,
then the "getevents" command will be inserted into
the existing data stream, otherwise a new connection will be established. A "getevents"
command causes k22orb to enter into a complex interaction with a
target datalogger that is intended to query the datalogger for the existance of
new events (as .EVT files), wait for events in progress, quickly acquire event
summary information and write to the output orb, acquire the new event waveforms
as .EVT file images, packetize and reformat the event waveforms into orb packets, write
the orb packets to the output orb, optionally write the verbatim .EVT files to local
disk and optionally delete the .EVT files on the remote datalogger.
-
dialout_if_getevents_incomplete
If this is specified as "yes", then k22orb will automatically try to re-establish
a connection to the datalogger whenever a previous "getevents" command was not successfully
completed. Upon any connection to a datalogger that was initiated by the datalogger
(a dialin connection), k22orb will always automatically execute a "getevents"
command. If the command is not successfully completed, e.g. the carrier is lost or there
are other egregious communication link errors, then this parameter can be used to
force k22orb to repeatedly try to reconnect and finish up processing whatever .EVT
files were not processed in the original connection.
-
max_strbuf
This is the maximum size of the internal streaming packets buffer in data packets
for this datalogger. This must accomodate any attempts at retransmission of streaming
data packets that were not received properly and should optimally be set to correspond
approximately to the size of the streaming buffer within the remote datalogger.
-
max_retran
This is the maximum number of retransmition requests at any instant of time
in packets for this datalogger. The Altus dataloggers can queue up retransmission
requests which can be useful in cases where there is a long round-trip delay
between requests and responses. This controls how many retransmition requests
should ever be in the queue.
-
max_status_size
This is the maximum number of historical datalogger status snapshots that are
stored for this datalogger.
-
order_output_data
If this is specified as "yes", then k22orb will output streaming waveform
packet data in increasing time order to the output orb by holding packets in
the internal streaming data buffer (see max_strbuf) until either the buffer is
full or there are no time gaps prior to a particular packet. If this is set to "no",
then streaming data packets will be written to the output orb in whatever order
they are received.
-
output_packet_twin
This is the time window in seconds of waveform data packets that are
derived from the .EVT file images.
-
tmpfile_maxwaittime
This is the maximum time in seconds that k22orb will wait for
an apparent "pending" datalogger .EVT file to move from its A:\TMP
directory to its *:\EVT directory. k22orb determines that an
event is in progress by looking for .EVT files in the datalogger's A:\TMP
directory. Under normal circumstances, the datalogger will move the .EVT
file to its *:\EVT directory when the event is finished. However, there
are times when a datalogger will never move a .EVT file from its
A:\TMP directory and tmpfile_maxwaittime acts as a timeout for this
situation. Whenever the tmpfile_maxwaittime expires for a particular
A:\TMP .EVT file, k22orb marks that file and does not attempt in
the future to wait for that file to move.
-
request_params_interval
This is the interval in seconds for automatically requesting
all datalogger parameters and status during streaming mode only.
These values are used to populate the status monitoring packets.
-
samprate
This is the requested output streaming sample rate in samples
per second. Note that Altus dataloggers/firmware will only
support a certain limited set of sample rates depending on the
datalogger model and firmware. It is up to the user to make
sure that the requested sample rate is one that is supported.
-
stream_timeout
This controls the mode for serial data streams, as explained in
the "Altus Block Mode Communications" manual from Kinemetrics.
Currently only Modes 1 and 2 are implemented. This parameter
determines how many packets will be transmitted by the datalogger
before a "continue" command must be sent back from k22orb.
If this is set to 0, then Mode 1 communications is enabled and
the datalogger will always send data packets regardless of whether
or not continue commands are sent from the receiving host. If this
is set to a value greater than 0, then the datalogger will send
that number of packets and pause its transmission until it sees
a continue command sent back from the receiving host. Mode 3,
set with a timeout value of -1, is not currently implemented.
-
password
This is the password for Altus dataloggers that are password protected.
Note that this parameter should not be specified for dataloggers which
have no password protection set.
All of the remote datalogger parameters, except for serial, dialout_modem,
phone_number and output_channels, must be
specified in the datalogger_defaults array which defines a set of default
values for all of the individual dataloggers array entries. Any of
the default values can be overidden within each dataloggers array
entry as shown in the example parameter file.
This version of k22orb is not compatible with the k2mon(1) and k2mon2(1)
status display programs. Instead, the new dlmon(1) program should be used.
dlmon(1)
Danny Harvey
Boulder Real Time Technologies, Inc.
Table of Contents
Antelope Release 4.6 Linux 2.4.19-4GB 2004-10-19
Boulder Real Time Technologies, Inc
For more information, contact support@brtt.com