NAME

q3302orb - acquire data from a Quanterra/Kinemetrics Q330 datalogger to an ORB

SYNOPSIS

q3302orb [-pf pfname] [-calib_db dbname] [-S statefile]
         [{-ipresolv|-noipresolv}] [-poc_vampire] [-v]
         targetname orbtag1 orbname1 [orbtag2 orbname2 [...]]

DESCRIPTION

q3302orb is a program for interacting with one or more Quanterra/Kinemetrics Q330 dataloggers. Data packets along with log messages, status messages, command responses and debug messages are written to a set of output ORBs. A large set of status channels can be generated as regular ORB waveform packets and, ultimately, archived as miniSEED files in the same manner as the seismic waveform data. Remote command and control of the dataloggers is accomplished through ORB-based command/response packet communications.

Understanding how to configure q3302orb involves some understanding of the Quanterra Q330 datalogger. We do not attempt in this document to describe in detail the operational characteristics of the Q330 family of dataloggers; that is beyond the scope of this man page. In order to understand the various Q330 data, configuration, control and status structures, we direct the user to the Quanterra document Q330 Communications Protocol, which is available from Quanterra.

OPTIONS

ORB OUTPUT AND INPUT PACKETS

q3302orb writes out waveform data in either GENC (generic compressed) or MGENC (multiplexed generic compressed) packet formats, as specified by the parameter file. (Note that these are the only output formats that are supported at this time.) For each datalogger, individual SEED channels may be either preserved as individual ORB packets, or they may be multiplexed together in an arbitrary fashion. Although the dataloggers always put out one-second data packets, q3302orb can be configured to package waveform data into ORB packets of arbitrary time duration. q3302orb allows for specification of a subcode in the source name for each packet type (see join_srcname(3)) so that multiplexed packets with different collections of channels from the same datalogger can be uniquely identified through their ORB source names.

In addition to the seismic waveform data, q3302orb can also be configured to generate regularly sampled channels of status and state-of-health trace data that are either obtained directly from the dataloggers or are generated internally by q3302orb as it acquires data. These status waveform channels can be written out as regular ORB waveform packets and can be multiplexed arbitrarily with arbitrary time durations just like the real seismic waveforms.

q3302orb writes out a set of log messages as <targetname>/log packets, for log messages relating to the q3302orb instance and as <dlname>/log packets, for log messages relating to Q330 dataloggers. These messages are simple ASCII strings. These log messages can be displayed by the program dlmon(1) and can be archived with orb2logs(1).

q3302orb keeps a set of status information for each attached datalogger. All of this status information is written as a parameter file packet (with ORB packet source name <targetname>/pf/st) to the output orb at regular intervals. These status packets can be displayed by the program dlmon(1).

Commands to q3302orb and to the attached dataloggers are all read by q3302orb from the command ORB. The ORB packet naming conventions for commands and command responses are discussed in the section COMMANDS.

PARAMETER FILE

The q3302orb parameter file contains all of the information necessary for connecting to and acquiring data from the Q330 dataloggers. Following is the default q3302orb parameter file.


#
#  This q3302orb parameter file is used to specify all of the settings needed to
#  communicate with a set of q330 dataloggers.
#

#  Following are global parameters:

pfstatusreport_interval 20       # This is the time interval in seconds for output
                                 #    status report packets
pfstatusreport_verbosity 0       # Output status report verbosity
                                 #    0 - Complete every pfstatusreport_interval
                                 #    1 - Plus just connection mode for dataloggers
                                 #         when connection mode changes.
                                 #    2 - Plus all parameters for dataloggers
                                 #         when connection mode changes.
local_port_base         27500    # base port no. for local auto_fixed port assignments
cmd_orbtag              dataorb  # command line orb tag for command packets
log_orbtag              dataorb  # command line orb tag for log packets
status_orbtag           dataorb  # command line orb tag for status packets
config_orbtag           dataorb  # command line orb tag for configuration packets

shutdown_wait_time      20.0     # amount of time to wait for dataloggers to be de-registered
                                 #    during a shutdown of q3302orb

packet_defs &Arr{                # ORB data packet definitions
    s1 &Arr{                         # Standard one pchan-rate-second per packet
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         1                   # no. of q330 one-second frames per data packet
        multiplexed  no                  # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode                          # subcode fields in ORB srcname
    }
    s10 &Arr{                        # 10 second single channel data packet
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         10                  # no. of q330 one-second frames per data packet
        multiplexed  no                  # Is this packet channel-wise multiplexed?
        suffix       GENC                # data type
        subcode                          # subcode fields in ORB srcname
    }
    mst &Arr{                        # full status multiplexing at 300 seconds
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         300                 # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      MST                 # subcode fields in ORB srcname
    }
    mstc &Arr{                       # full client status multiplexing at 300 seconds
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         300                 # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      MSTC                # subcode fields in ORB srcname
    }
    mf &Arr{                         # full one-second multiplexing
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         1                   # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      MF                  # subcode fields in ORB srcname
    }
    m1 &Arr{                         # one sample-per-second pchan multiplexing in a 10 second packet
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         10                  # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      M1                  # subcode fields in ORB srcname
    }
    m40 &Arr{                        # 40 sample-per-second pchan multiplexing
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         1                   # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      M40                 # subcode fields in ORB srcname
    }
    m100 &Arr{                       # 100 sample-per-second pchan multiplexing
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         1                   # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      M100                # subcode fields in ORB srcname
    }
    m200 &Arr{                       # 200 sample-per-second pchan multiplexing
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         1                   # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      M200                # subcode fields in ORB srcname
    }
    mbb &Arr{                        # broadband channel multiplexing
        data_orbtag  dataorb             # command line orb tag for data packets
        twin         1                   # no. of q330 one-second frames per data packet
        multiplexed  yes                 # Is this packet channel-wise multiplexed?
        suffix       MGENC               # data type
        subcode      MBB                 # subcode fields in ORB srcname
    }
}

#  Following are global default datalogger parameters:

statusrequest_interval    20         # This is the time interval in seconds for requesting
                                     #    datalogger status
statusreport_interval     20         # This is the time interval in seconds for reporting
                                     #    client status information as waveforms
datarate_interval         60.0       # This is the averaging duration in seconds for computing
                                     #    data rate averages
commeff_interval          l20.0      # This is the averaging duration in seconds for computing
                                     #    communication efficiency
thruput_interval          120.0      # This is the averaging duration in seconds for computing
                                     #    thruput averages
local_port_control        auto_fixed # local port no. for control sockets
                                     #       "auto_fixed"    = automatically assign local port numbers
                                     #       an integer      = use integer as port number
local_port_data           auto_fixed # local port no. for data sockets
#local_ipaddr                        # local ip-address used in binds (for more than one ip host interface)
timeout_control           20         # UDP read timeout in secs for control socket
timeout_data              60         # read timeout in secs for data
timeout_datathread_hang   3600       # Apparent datathread hang timeout to shutdown program.
maxretries_control        3          # max no. of re-reads before re-connect for control socket
maxretries_register       5          # max no. of registration retries before going into hibernation
register_retry_sleep      300        # sleep interval between registration retries
control_inactivity_timeout 300       # maximum amount of time between successful control port status
                                     #       responses before an automatic re-registration
q330_port_base            5330       # base port no. for q330 logical port assignments
q330_authentication_code &Tbl{       # q330 authentication codes
     0000000000000000
     DEADBEEFDEADBEEF
     1234567890ABCDEF
}
throttle                  56000      # q330 communications throttle in bits-per-second
shutdown_timeout          3600.0     # acquisition timeout to force an automatic re-registration
shutdown_buffer_thresh    0.1        # stop POC-initiated acquisition when Q330 buffer is <= threshold
shutdown_buffer_wait      20.0       # wait time before deregistration when Q330 buffer threshold is reached
flush_buffer_thresh       0          # flush Q330 data buffer if the buffer gets larger than this
                                     #       percentage full - 0 to disable
flush_buffer_age          0          # data packets with ages greater than this value in seconds
                                     #       are flushed - 0 means flush entire buffer
trim_link_overlaps        yes        # should data at the beginning of new link cycles be trimmed to
                                     #       avoid overlaps with previous link cycles?
inactivity_timeout        1800.0     # causes datalogger threads to try registration using the
                                     #       last good ip-address after this amount of inactivity
                                     #       - used to force listen threads to initiate link
user_message_level        1          # auto-generate Q330 user message level
output_time_packet        no         # output an ORB packet with a time tag from the Q330?

massrecenter_duration     5.0        # default time for pulsing sensor control lines
                                     #       for mass recenters
massrecenter_sensors      AB         # default mass recenter sensors
masslockunlock_duration   5.0        # default time for pulsing sensor control lines
                                     #       for locking/unlocking masses
masslockunlock_sensors    AB         # default mass lock/unlock sensors

calibration_capacitive    no         # default calibration capacitive setting
calibration_waveform      step       # default calibration waveform type
calibration_amplitude     2          # default calibration amplitude
calibration_duration      100        # default calibration duration
calibration_settling_time 30         # default calibration settling time
calibration_sensors       AB         # default calibration sensors
calibration_trailer_time  100        # default calibration trailer time
calibration_monitor_channels 0x0     # default calibration monitor channels bitmap
calibration_period        1          # default calibration period

pchan_map &Arr{ # These map q330 physical channels to SEED net-sta-chan-loc codes
#       pchan   net_sta_chan[_loc]      calib   calper  rsptype
        0       $DLNET_$DLSTA_HGZ_00    2338.08 -1.0    A
        1       $DLNET_$DLSTA_HGN_01    2338.08 -1.0    A
        2       $DLNET_$DLSTA_HGE_02    2338.08 -1.0    A
        3       $DLNET_$DLSTA_HHZ_03    $DB
        4       $DLNET_$DLSTA_HHN_04    $DB
        5       $DLNET_$DLSTA_HHE_05    $DB
}

rate_mask &Arr{ # These are mask values that modify the pchan_map SEED
#       stream  chanm   (locm)
        0       L..     0.     #       1 sps
        1       B..     1.     #       10 sps
        2       B..     2.     #       20 sps
        3       B..     3.     #       40 sps
        4       B..     4.     #       50 sps
        5       H..     5.     #       100 sps
        6       H..     6.     #       200 sps
        7       H..     7.     #       currently disabled
}

acq_matrix &Tbl{ # acquisition matrix
#       str0 str1 str2 str3 str4 str5 str6 str7
#       1    10   20   40   50   100  200
        s1   s1   0    0    s1   0    s1   0  # pchan 0
        s1   s1   0    0    s1   0    s1   0  # pchan 1
        s1   s1   0    0    s1   0    s1   0  # pchan 2
        s1   s1   0    0    s1   0    s1   0  # pchan 3
        s1   s1   0    0    s1   0    s1   0  # pchan 4
        s1   s1   0    0    s1   0    s1   0  # pchan 5
}

status_map &Arr{
#   parameter_name       pfst_nm wf_nscl
    data_gps             gpss                   # GPS status (reported as needed)
    data_gps_cs          gpsc                   # reason for GPS cold-start (reported as needed)
    data_cnp_err_port    cnpp                   # CNP error port number (reported as needed)
    data_cnp_err_code    cnpc                   # CNP error code number (reported as needed)
    data_slavep_err_code slpc                   # slave processor error code number (reported as needed)
    data_dig_phase       dig                    # digitizer phase change (reported as needed)
    data_dig_phase_why   digw                   # reason for digitizer phase change (reported as needed)
    data_backup          bu                     # saving daily configuration backup flag (reported as needed)
    data_record          rec                    # recording window change (reported as needed)
    data_leap            leap                   # leap second detected flag (reported as needed)
    data_pow_phase       powp                   # power supply phase change (reported as needed)
    data_anl_fault       anlf                   # analog fault (reported as needed)
    data_cal_error       cale                   # calibration error (reported as needed)
    data_pll_drift       plld                   # PLL drift over last 10 minutes (reported as needed)
    data_por_drift       drf                    # time offset for phase out of range, Q330 will re-sync (reported as needed)
    data_sys_volt        dv   $DLNET_$DLSTA_VEP # main system voltage (reported every 10 seconds)
    data_sys_temp        dt   $DLNET_$DLSTA_VKI # main system temperature (reported every 10 seconds)
    data_sys_curr        da   $DLNET_$DLSTA_VEC # main system current (reported every 10 seconds)
    data_ant_curr        aa   $DLNET_$DLSTA_VEA # antenna current (reported every 10 seconds)
    data_spare_anl       sp   $DLNET_$DLSTA_VSP # main system spare analog input (reported every 10 seconds)
    data_status_port     stp  $DLNET_$DLSTA_VPT # main system status port value (configurable reporting interval)
    data_opto_input      opt  $DLNET_$DLSTA_VOP # main system opto inputs (reported every 10 seconds)
    data_vco             vco  $DLNET_$DLSTA_VCO # voltage controlled oscillator value (reported every 10 seconds)
    data_pkt_buf         pb   $DLNET_$DLSTA_VPB # percentage packet buffer full (reported every 10 seconds)
    data_serial_chan0    sc0  $DLNET_$DLSTA_SC0 # data from serial interface 0 (configurable report interval)
    data_serial_chan1    sc1  $DLNET_$DLSTA_SC1 # data from serial interface 1 (configurable report interval)
    data_serial_chan2    sc2  $DLNET_$DLSTA_SC2 # data from serial interface 2 (configurable report interval)
    data_serial_chan3    sc3  $DLNET_$DLSTA_SC3 # data from serial interface 3 (configurable report interval)
    data_clk_qual        gps  $DLNET_$DLSTA_LCC # clock (GPS) quality (reported every 1 second)
    data_clk_pll         clq  $DLNET_$DLSTA_LPL # clock phase lock loop status (reported every 1 second)
    data_clk_ltc         clt  $DLNET_$DLSTA_LCL # time since GPS lock was lost (reported every 1 second)
    data_clk_drift       cld  $DLNET_$DLSTA_LCE # clock drift (reported every 1 second)
    data_clk_lcq         lcq  $DLNET_$DLSTA_LCQ # clock quality percentage (reported every 1 second)
    data_m0              m0   $DLNET_$DLSTA_VM0 # mass position for channel 0 (reported every 10 seconds)
    data_m1              m1   $DLNET_$DLSTA_VM1 # mass position for channel 1 (reported every 10 seconds)
    data_m2              m2   $DLNET_$DLSTA_VM2 # mass position for channel 2 (reported every 10 seconds)
    data_m3              m3   $DLNET_$DLSTA_VM3 # mass position for channel 3 (reported every 10 seconds)
    data_m4              m4   $DLNET_$DLSTA_VM4 # mass position for channel 4 (reported every 10 seconds)
    data_m5              m5   $DLNET_$DLSTA_VM5 # mass position for channel 5 (reported every 10 seconds)
    data_seis0_temp      s0t  $DLNET_$DLSTA_UKA # temperature for seismometer 0 (reported every 10 seconds)
    data_seis1_temp      s1t  $DLNET_$DLSTA_UKB # temperature for seismometer 1 (reported every 10 seconds)
    data_cal_abort       cala                   # calibration abort occurred flag (reported as needed)
    data_cal_status      cals                   # calibration status (reported as needed)
    data_suppl_pos       spv  $DLNET_$DLSTA_VEH # analog unregulated positive supply voltage (reported every 10 seconds)
    data_suppl_neg       spn  $DLNET_$DLSTA_VEL # analog unregulated negative supply voltage (currently not implemented)
    data_batt_temp       bt   $DLNET_$DLSTA_VBT # battery temperature (configurable reporting interval)
    data_batt_cap        bc   $DLNET_$DLSTA_VBC # battery capacity (configurable reporting interval)
    data_batt_dd         bd   $DLNET_$DLSTA_VBD # battery depth of discharge (configurable reporting interval)
    data_batt_chg        bg   $DLNET_$DLSTA_VBG # battery charging phase change (configurable reporting interval)
    data_batt_volt       bv   $DLNET_$DLSTA_VBV # battery voltage (configurable reporting interval)
    data_bati_volt       iv   $DLNET_$DLSTA_VIV # battery input voltage (configurable reporting interval)
    data_batt_curr       ba   $DLNET_$DLSTA_VBI # battery current (configurable reporting interval)
    data_aux_chan0       ax0  $DLNET_$DLSTA_AX0	# auxiliary channel 0 (first conversion)
    data_aux_chan1       ax1  $DLNET_$DLSTA_AX1	# auxiliary channel 1 (second conversion)
    data_aux_chan2       ax2  $DLNET_$DLSTA_AX2	# auxiliary channel 2 (third conversion)
    data_aux_chan3       ax3  $DLNET_$DLSTA_AX3	# auxiliary channel 3 (fourth conversion)
    data_aux_chan4       ax4  $DLNET_$DLSTA_AX4	# auxiliary channel 4 (fifth conversion)
    data_aux_chan5       ax5  $DLNET_$DLSTA_AX5	# auxiliary channel 5 (sixth conversion)
    data_aux_chan6       ax6  $DLNET_$DLSTA_AX6	# auxiliary channel 6 (seventh conversion)
    data_aux_chan7       ax7  $DLNET_$DLSTA_AX7	# auxiliary channel 7 (eighth conversion)

    q330_drate_tot       dr   $DLNET_$DLSTA_QDR # current total input+output data rate - bits per second
    q330_throttle        thr  $DLNET_$DLSTA_QTH # current throttle setting - bits per second
    q330_comm_eff        ce   $DLNET_$DLSTA_QEF # overall communications efficiency - percent
    q330_data_gaps       dg   $DLNET_$DLSTA_QDG # data gaps - second
    q330_run_time        rtm  $DLNET_$DLSTA_QRT # current run time - second
    q330_data_ltc        dlt  $DLNET_$DLSTA_QDL # current data latency - second
    q330_pkts_proc       pkp  $DLNET_$DLSTA_QPK # total number of packets processed
    q330_pkts_badsz      pkse $DLNET_$DLSTA_QPS # total number of packets with wrong sizes
    q330_pkts_chksm      pkce $DLNET_$DLSTA_QPC # total number of packets with checksum errors
    q330_byts_rd24       br24 $DLNET_$DLSTA_QRD # total number of bytes read in last 24 hours
    q330_byts_wr24       bw24 $DLNET_$DLSTA_QWD # total number of bytes written in last 24 hours
    q330_data_gp24       gp24 $DLNET_$DLSTA_QGD # total number of data gaps in last 24 hours
    q330_data_gp1        gp1  $DLNET_$DLSTA_QG1 # total number of data gaps in last 1 hour
    q330_data_nl24       nl24 $DLNET_$DLSTA_QLD # total number of comm link cycles in last 24 hours
    q330_data_nr24       nr24 $DLNET_$DLSTA_QBD # total number of Q330 reboots in last 24 hours
    q330_data_np24       np24 $DLNET_$DLSTA_QPD # total number of POCs received in last 24 hours
    q330_data_ni24       ni24 $DLNET_$DLSTA_QID # total number of datalogger ip-address changes in last 24 hours
    q330_data_tput       tput $DLNET_$DLSTA_QTP # ration of seconds read to real-time clock
    q330_data_bufr       pbr  $DLNET_$DLSTA_QBP # logical port buffer percent full from real-time status
}

status_disposition &Arr{
#   parameter_name          in_log? in_pf?  wf_pktdef
    data_gps                yes     yes     0
    data_gps_cs             yes     no      0
    data_cnp_err_port       yes     no      0
    data_cnp_err_code       yes     no      0
    data_slavep_err_code    yes     no      0
    data_dig_phase          yes     no      0
    data_dig_phase_why      yes     no      0
    data_backup             yes     no      0
    data_record             yes     no      0
    data_leap               yes     no      0
    data_pow_phase          yes     no      0
    data_anl_fault          yes     no      0
    data_cal_error          yes     no      0
    data_pll_drift          yes     no      0
    data_por_drift          yes     no      0
    data_sys_volt           no      yes     mst
    data_sys_temp           no      yes     mst
    data_sys_curr           no      yes     mst
    data_ant_curr           no      yes     mst
    data_spare_anl          no      no      0
    data_status_port        no      no      0
    data_opto_input         no      no      0
    data_vco                no      yes     mst
    data_pkt_buf            no      yes     mst
    data_serial_chan0       no      yes     mst
    data_serial_chan1       no      yes     mst
    data_serial_chan2       no      yes     mst
    data_serial_chan3       no      yes     mst
    data_clk_qual           yes     yes     mst
    data_clk_pll            yes     yes     mst
    data_clk_ltc            no      yes     mst
    data_clk_drift          no      yes     mst
    data_clk_lcq            no      yes     mst
    data_m0                 no      yes     mst
    data_m1                 no      yes     mst
    data_m2                 no      yes     mst
    data_m3                 no      yes     mst
    data_m4                 no      yes     mst
    data_m5                 no      yes     mst
    data_seis0_temp         no      no      0
    data_seis1_temp         no      no      0
    data_cal_abort          yes     no      0
    data_cal_status         yes     no      0
    data_suppl_pos          no      no      0
    data_suppl_neg          no      no      0
    data_batt_temp          no      no      0
    data_batt_cap           yes     no      0
    data_batt_dd            yes     no      0
    data_batt_chg           yes     no      0
    data_batt_volt          no      no      0
    data_bati_volt          no      no      0
    data_batt_curr          no      no      0
    data_aux_chan0          no      no      mst
    data_aux_chan1          no      no      mst
    data_aux_chan2          no      no      mst
    data_aux_chan3          no      no      mst
    data_aux_chan4          no      no      mst
    data_aux_chan5          no      no      mst
    data_aux_chan6          no      no      mst
    data_aux_chan7          no      no      mst

    q330_drate_tot          no      yes     mstc
    q330_throttle           no      yes     mstc
    q330_comm_eff           no      yes     mstc
    q330_data_gaps          no      yes     mstc
    q330_run_time           no      yes     mstc
    q330_data_ltc           no      yes     mstc
    q330_pkts_proc          no      yes     0
    q330_pkts_badsz         yes     yes     0
    q330_pkts_chksm         yes     yes     0
    q330_byts_rd24          no      yes     mstc
    q330_byts_wr24          no      yes     mstc
    q330_data_gp24          no      yes     mstc
    q330_data_gp1           no      yes     mstc
    q330_data_nl24          no      yes     mstc
    q330_data_nr24          no      yes     mstc
    q330_data_np24          no      yes     mstc
    q330_data_ni24          no      yes     mstc
    q330_data_tput          no      yes     mstc
    q330_data_bufr          no      yes     mstc
}

dptokens_port_4         qtpb14  # report DP tokens for data port 4
                                #    as Quanterra PB-14 tokens

verbose_log             1       # general log message verbosity
debug_data              0       # Put out data debugging log messages?
debug_ack               0       # Put out data aknowledge debugging log messages?
debug_control           0       # Put out control debugging log messages?
debug_udp               0       # Put out udp read/write log messages?

ack_print_bit_flag      yes     # Print acknowledgments in debug log as a bitmap

#  Following are datalogger parameter templates:

datalogger_templates &Arr{
    br6c &Arr{      # template for 6-channel units at BRTT
                    #       nothing specified means to use global parameters
        acq_matrix &Tbl{ # acquisition matrix
        #   str0 str1 str2 str3 str4 str5 str6 str7
        #   1    10   20   40   50   100  200
            0    0    0    0    0    0    m200 0  # pchan 0
            0    0    0    0    0    0    m200 0  # pchan 1
            0    0    0    0    0    0    m200 0  # pchan 2
            s1   0    0    mbb  0    mbb  0    0  # pchan 3
            s1   0    0    mbb  0    mbb  0    0  # pchan 4
            s1   0    0    mbb  0    mbb  0    0  # pchan 5
        }
    }
    usarray &Arr{   # template for USArray stations using VSAT links
        throttle        25600           # q330 communications throttle in bits-per-second
        timeout_control 20              # Timeout for reading control packets
        timeout_data    40              # Timeout for reading data packets
        log_minimum_resend_timeout 1.0  # Q330 link minimum resend timeout
        log_maximum_resend_timeout 16.0 # Q330 link maximum resend timeout
        log_group_timeout       18.0    # Q330 link group timeout
        log_group_count         32      # Q330 link group window size
        log_window_size         64      # Q330 link window size
        log_mtu                 576     # Q330 link MTU size
        log_acknowledge_timeout 4.0     # Q330 link acknowledge timeout
        log_acknowledge_count   25      # Q330 link acknowledge window size
        pchan_map &Arr{ # These map q330 physical channels to SEED net-sta-chan-loc codes
        #   pchan   net_sta_chan[_loc]      calib   calper  rsptype
            0       $DLNET_$DLSTA_HHZ         $DB
            1       $DLNET_$DLSTA_HHN         $DB
            2       $DLNET_$DLSTA_HHE         $DB
            3       $DLNET_$DLSTA_HGZ         $DB
            4       $DLNET_$DLSTA_HGN         $DB
            5       $DLNET_$DLSTA_HGE         $DB
        }
        acq_matrix &Tbl{ # acquisition matrix
        #   str0 str1 str2 str3 str4 str5 str6 str7
        #   1    10   20   40   50   100  200
            m1   0    0    m40  0    0    0    0  # pchan 0
            m1   0    0    m40  0    0    0    0  # pchan 1
            m1   0    0    m40  0    0    0    0  # pchan 2
            0    0    0    0    0    0    0    0  # pchan 3
            0    0    0    0    0    0    0    0  # pchan 4
            0    0    0    0    0    0    0    0  # pchan 5
        }
    }
    az3c &Arr{  # template for 3-channel units at UCSD
        pchan_map &Arr{ # These map q330 physical channels to SEED net-sta-chan-loc codes
        #   pchan   net_sta_chan[_loc]      calib   calper  rsptype
            0       $DLNET_$DLSTA_HHZ_00    $DB
            1       $DLNET_$DLSTA_HHN_01    $DB
            2       $DLNET_$DLSTA_HHE_02    $DB
        }
        acq_matrix &Tbl{ # acquisition matrix
        #   str0 str1 str2 str3 str4 str5 str6 str7
        #   1    10   20   40   50   100  200
            m1   0    0    m40  0    m100 0    0  # pchan 0
            m1   0    0    m40  0    m100 0    0  # pchan 1
            m1   0    0    m40  0    m100 0    0  # pchan 2
            0    0    0    0    0    0    0    0  # pchan 3
            0    0    0    0    0    0    0    0  # pchan 4
            0    0    0    0    0    0    0    0  # pchan 5
        }
    }
}

#  Following is a list of dataloggers:

dataloggers &Tbl{
# dlname  dlnet dlsta q330_serial_number q330_ipaddress  qport templ   disposition
  BR_Q113 BR    Q113  010000069A40064D   q330.brtt.com   2     br6c    startacq
  QT_0505 QT    0505  01000008E9118E8A   -               1     usarray listen
  AZ_FLV2 AZ    FLV2  010000069A596EA0   198.202.124.196 4     az3c    startacq
}

# Note: disposition is as follows:
#  "startacq" = Start thread and acquisition for this datalogger
#  "listen"   = Start thread and listen for POC initiated connection

# Following is a list if Point-Of-Contact Daemons

pocds &Tbl{
#       port_number_or_orb
  2254                      # simple UDP port number
  dataorb ruperpocd/pf/poc  # orbtag and select key
}

#   Following are individual datalogger overrides:

BR_Q113 &Arr{           # associative array with dlname as key
  local_port_control  27498   # local port no. for control sockets
  local_port_data     27499   # local port no. for data sockets
  throttle            512000  # q330 communications throttle in bits-per-second
}


The first part of the parameter file consists of a set of default values that will be used by all dataloggers and also a set of datalogger packet format and template definitions that are used to define which channels are acquired and how the individual SEED channels are written to the output ORB packets. The second part of the parameter file consists of a single dataloggers table that defines each of the individual Q330s for acquisition. The third part of the parameter file lists individual datalogger parameters that override the parameters specified in the previous two sections. Users must modify at least the second section, the dataloggers table, to allow connections to the user's particular dataloggers.

Parameters from the default section of the parameter file are as follows:

The following parameters relate to sensor mass recentering, locking and unlocking. These are default values for sensor mass recenters, locks and unlocks done through the command interface (see section COMMAND).

The following parameters relate to sensor calibrations. These are default values for sensor calibrations done through the command interface (see section COMMAND).

The following parameters relate to Baler tokens.

The following parameters relate to debug log messages.

The following parameters relate to specifying Q330 communications link parameters (those in the C1_LOG structure, see Q330 Communications Protocol document). Recall that if these values are specified in the global section of the parameter file, then they will be applied by default to all dataloggers. Individual parameters for specific dataloggers can be specified in the datalogger_templates array and in the last section of the parameter file (the individual datalogger overrides section). Also, as with the throttle parameter, setting these parameters properly for a particular datalogger is important to ensure efficient communications. However, it is beyond the scope of this document to describe how to go about determining the proper values for these parameters. We refer the user to the Q330 manufacturer's documentation for more detail on this subject.

The following parameters relate to mapping SEED names to the physical Q330 channels and sample rate streams. This is where the user specifies exactly which channels and sample rates to acquire and how to assign the various SEED codes for network, station, channel and location. Therefore, the pchan_map, rate_mask and acq_matrix parameters are likely to be locally modified in the datalogger_templates section to satisfy the user's particular network configuration.

The following parameters relate to specifying exactly which physical channels and streams are to be acquired and how these channels will be output into ORB packets.

The following parameters determine how the various status channels produced by the Q330 are mapped into SEED codes and status pf names (shown in dlmon(1)) and also under what forms these status channels are produced as output.

These default parameters define an acquisition "template" which we assign the token default. The default template can be used for any and all of the dataloggers if desired. Other acquisition templates can be defined through the datalogger_templates associative array (see below). This provides a convenient mechanism for defining a set of "default" configurations. For example, this becomes useful in situations where both three-channel and six-channel Q330 units are being acquired from the same instance of q3302orb.

Once all of the default parameters and the datalogger templates have been defined, it is relatively easy to set up acquisition from a particular set of Q330 dataloggers. This is done in the dataloggers table which is defined below:

Finally, any of the parameters can be overridden for particular dataloggers. This is done by specifying associative arrays whose names are set to the dlname fields in the dataloggers array. The contents of these associative arrays can contain any of the global default parameters which causes the values for those parameters to be overridden only for the specific datalogger.

COMMANDS

Command and response packets

q3302orb takes on the role of a command and control proxy both for itself and for all of the Q330 dataloggers that it is communicating with. q3302orb continuously looks for special command ORB packets on the ORB specified by the cmd_orbtag parameter. ORB packets that are read by q3302orb as commands are in a special parameter file format and must have the ORB srcname <targetname>/pf/dlcm. Packets of this type are produced by the program dlcmd(1). Packets with this ORB srcname are read by q3302orb and their commands are executed. A single command can be directed to the q3302orb instance itself or to any of the Q330 dataloggers that it is servicing. A typical command packet looks like this.


#68211 'ruperq3/pf/dlcm':  2/20/2006 (051) 22:18:42.729 : 259 bytes
    parameter file data packet
cmdtime       1140473922.7
command       stop
delayhangup   1.00
dlnames       BR_Q113
dsig          d47cff6003eab56acce6135e54280edf
hostname      ruper.brtt.com
ip            207.174.76.133
reply         dlcmd/pf/dlcmr
sequence      BR_Q113_ruper.brtt.com_21375_0
targets       ruperq3
types         q330
username      danny

The response to the command, if any, is specified by the reply parameter as an ORB srcname. In this case the response would be placed back on the command ORB with srcname dlcmd/pf/dlcmr. In this case the command, specified by the command parameter, is stop, which causes current links with one or more dataloggers to be stopped (closed and de-registered) and for the associated data threads to go into a hibernation, or standby state until they are started again (with a start command or by an incoming POC or by restarting q3302orb). The target dataloggers are specified in the dlnames parameter which is matched as a UNIX regular expression against all of the datalogger names managed by the instance of q3302orb. In this case only one datalogger will be stopped. This particular command generated the following response.



#68212 'dlcmd/pf/dlcmr':  2/20/2006 (051) 22:18:42.730 : 288 bytes
    parameter file data packet
command         stop
disposition     done
dlcom           udp:207.174.76.145:5334:L2
dlname          BR_Q113
dlserial        010000069A40064D
sequence        BR_Q113_ruper.brtt.com_21375_0
sequence_target ruper.brtt.com_21216_4
target          ruperq3
thostname       ruper.brtt.com
tip             207.174.76.133
tpid            21216
tusername       danny
type            q330

The disposition value of done indicates that the stop command was received by the target q3302orb, it was acted upon and the action resulted in no errors. dlcmd(1) waits on this response and prints it out for you.

The command parameter is exactly what you type into the command line arguments cmd [cmdarg1 [...]] in the program dlcmd(1) and can contain a typical full command line syntax. Following is the list of commands. Note that some commands are really directed to the q3302orb programs themselves whereas other commands are directed to the Q330 dataloggers.

Commands directed to q3302orb

Commands directed to dataloggers - basic

This set of commands are directed to the dataloggers in an attempt to interact with any sensors that may be attached.



Following is an example of a mass recenter command:


dlcmd ruper.brtt.com:brtt2 ruperq3 q330 BR_Q113 massrecenter -duration 8 -sensors A




Following is an example of a calibration command:


dlcmd ruper.brtt.com:brtt2 ruperq3 q330 BR_Q113 calibrate -waveform white -sensors AB -duration 600


Commands directed to dataloggers - high level

The commands listed below should be used with care as they have the potential to disurpt communications with your datalogger and the recording of data.

SEE ALSO

dlcmd(1)
dlmon(1)
q330pocd(1)
q330util(1)

AUTHOR

Danny Harvey
Boulder Real Time Technologies, Inc.

Table of Contents
Antelope Release 4.11 Linux 2.6.22.5-31-bigsmp 2009-07-30
Boulder Real Time Technologies, Inc For more information, contact support@brtt.com