q3302ew Configuration File Commands

(last revised 17 July 2003)
Page Index:
1. Example configuration file
2. Functional command listing
3. Alphabetic command listing & description

On startup, q3302ew reads the configuration file specified on the command line.

Lines starting with a '#' are treated as comments, and blank lines are ignored.

# This is an example comment
The items in the configuration file are case sensitive, and must be entered exactly as demonstrated here.

1. Example Configuration File



#
# q330ew configuration file
#
#

 ModuleId       MOD_Q3302EW        # module id for this import,
 RingName       WAVE_RING       # transport ring to use for input/output,

 HeartbeatInt   10              # Heartbeat interval in seconds

 LogFile        2               # If 0, don't write logfile;; if 1, do
                                # if 2, log to module log but not stderr/stdout

## The following config items are from the Q330 side
## of Mountainair.  Their names have been preserved for
## consistancy

udpaddr		192.168.1.165	# The IP address of the Q330
ipport		6000		# A port on the local machine.  This port
				# and this port+1 must be unused.
baseport	5330		# The base port of the Q330 (5330 is default)
dataport	2		# Which dataport on the Q330 to connect to
serialnumber	0x010000069A37E501	# The serial number of the Q330
authcode	0x0		# The authentication code for the Q330
verbosity	0		# global verbosity level
				# 0 : silent
				# 1 : major items
				# 2 : major and minor items
				# 3 : everything

# Values for "diagnostic" (for debugging purposes only) can be found
# in the qmaserv/include/QmaDiag.h file.
diagnostic	0		# Particular diagnostic messages that should
				# always be displayed

startmsg	"Q3302EW Starting"	# Sent to the Q330 via user message
					# when q3302ew starts

statusinterval  5		# time in seconds between status checks.
				# this defines both state of health checking,
				# as well as status output

# State Of Health Thresholds

# Minimum acceptable clock quality.  Set to zero to never warn
# about this.
MinClockQuality 80		# If the clock quality falls below this value,
				# an error is generated.

## These two are measured in mv
MinInputPower   10000		# An error is generated if input power falls
				# below this value
MaxInputPower   14000		# An error is generated if input power goes
				# higher than this value

# There is a seperate MassPosition range defined for each channel.  These
# values are MinMass1Position through MinMass6Position, and MaxMass1Position
# through MaxMass6Position.  An error is inserted into the ring for each
# mass position that is outside of it's acceptable range.

MaxMass1Position 30		
MinMass1Position -10

MaxMass2Position 30
MinMass2Position -10

MaxMass3Position 30
MinMass3Position -10

MaxMass4Position 30
MinMass4Position -10

MaxMass5Position 30
MinMass5Position -10

MaxMass6Position 30
MinMass6Position -10


2. FUNCTIONAL COMMAND LISTING

Below are the configure commands recognized by q3302ew, grouped by the function they influence.

         Earthworm system setup:
 		MyModuleId	   	required
		RingName	   	required
		HeartbeatInt	   	required
	
	Output Control:
		LogFile		   	required

	Mountainair specific:
		udpaddr			required
		ipport			required
		baseport		required
		dataport		required
		serialnumber		required
		authcode		required
		verbosity		required
		diagnostic		required
		startmsg		required
		statusinterval		required

	State of health items:
		
		MinClockQuality		required
		MinInputPower		required
		MaxInputPower		required

		MinMass1Position	required
		MaxMass1Position	required
		MinMass2Position	required
		MaxMass2Position	required
		MinMass3Position	required
		MaxMass3Position	required
		MinMass4Position	required
		MaxMass4Position	required
		MinMass5Position	required
		MaxMass5Position	required
		MinMass6Position	required
		MaxMass6Position	required

3. ALPHABETIC COMMAND LISTING & DESCRIPTION

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), 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.


Command arg Influenced functionality

authcode q330_auth Q330 Connectivity

This is the authentication code for the Q330. Similar to a numeric password. This must be represented in hexidecimal form.
Default:  0x0
Example:  authcode 0x0

baseport portno Q330 connectivity
This is the Q330 base UDP port. Also documented in the Q330 documentation as the "Configuration port".
Default:  5330
Example:  baseport 5330

dataport dp_number Q330 connectivity
This defines the Q330 data port that q3302ew should retreive data from. Valid values are 1, 2, 3, 4.
Default:  None
Example:  dataport 2

diagnostic diagnostic_level Debugging
This setting allows the user to view debug information for a particular section of the code. All of the possible values for this can be found in qmaserv/includes/QmaDiag.h in the source tree.
Default:  0
Example:  diagnostic 0

HeartbeatInt secs Earthworm Config
How many seconds between heartbeat messages.
Default:  10
Example:  HeartbeatInt

ipport portno Q330 connectivity
Mountainair uses 2 ports for it's internal communications. The port specified in this option, and that port + 1 must both be available, and not otherwize used by the system.
Default:  6000
Example:  ipport 6000

LogFile log_level Earthworm Config
Describes the logging behavor of q3302ew. Valid values are:

0 : Write to stdout/stderr, not the logfile
1 : Write to both stdout/stderr and the logfile
2 : Only write to the logfile

Default:  2
Example:  LogFile 2

MaxInputPower mv State of Health
This is the maximum acceptable input power to the Q330. If the Q330's input power is above this value, an error is generated. This value is measured in millivolts.
Default:  None
Example:  MaxInputPower 18000

MaxMass[?]Position val State of Health
There is a seperate MaxMass[?]Position for each channel on the Q330. These are named MaxMass1Position through MaxMass6Position. This defines the maximum acceptable mass position for the particular channel. If the mass position for a channel is above this value, an error is generated.
Default:  None
Example:  MaxMass5Position 1000

MinClockQuality clock_qual State of Health
The minimum acceptable clock quality for teh Q330. If the Q330's clock quality is below this value, an error is generated
Default:  None
Example:  MinClockQuality 80

MinInputPower mv State of Health
This is the minimum acceptable input power to the Q330. If the Q330's input power is below this value, an error is generated. This value is measured in millivolts.
Default:  None
Example:  MinInputPower 10000

MinMass[?]Position val State of Health
There is a seperate MinMass[?]Position for each channel on the Q330. These are named MinMass1Position through MinMass6Position. This defines the minimum acceptable mass position for the particular channel. If the mass position for a channel is below this value, an error is generated.
Default:  None
Example:  MinMass3Position -1000

MyModuleId module_id Earthworm Config
Sets the module id for labeling all outgoing messages. mod_id is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique single-byte number.
Default:  MOD_Q3302EW				
Example:  ModuleId MOD_Q3302EW

RingName ring_name Earthworm Config
This tells q3302ew which ring it should be putting it's messages on. Valid ring names can be found in earthworm.d
Default:  WAVE_RING
Example:  RingName WAVE_RING

serialnumber q330_sn Q330 connectivity
This is the serial number of your Q330. This is required for communication with the Q330. This must be represented in hexidecimal form.
Default:  None
Example:  serialnumber 0x010000069A37E501

startmsg msg Q330 connectivity
A message sent to the Q330 (via the user message mechanism) when q3302ew first starts
Default:  "Q3302EW starting"
Example:  diagnostic "Q3302EW starting"

statusinterval secs Q330 Connectivity and State of Health
The number of seconds between status polls. At each status poll, some milestone information, as well as some status information, is logged. Also occuring at each poll, is a check of the state of health of the Q330. Any items that fall out of acceptable range will be flagged, and an error generated at this point.
Default:  None
Example:  statusinterval 10

udpaddr ip address Q330 connectivity
Tells q3302ew the IP address of the Q330 that it's supposed to talk to.
Default:  None
Example:  udpaddr 192.168.0.1

verbosity verbosity_level Debugging
This sets the global verbosity of q3302ew. Valid values are:
0 : silent
1 : major items
2 : major and minor items
3 : everything
 
Default:  0
Example:  verbosity 0