corner01 corner02
flares_red SOFTWARE > DOWNLOADS > HOME >

POD documentation for perl/reader.plx

Outline

  1. N
  2. S
  3. D
  4. O
  5. A
  6. S
  7. S
  8. K
  9. A
  10. C
  11. S

N

reader.plx - Executes commands and logs the results in .cdf format

S

reader.plx [--interval "seconds"] [--write "minutes"] [--filename "string"] [--directory "string"] [-v|-vb|--verbose] [-gmt|-GMT] [--make "file"] [--read "file"] [arg1 arg2 arg3...]
reader.plx -m filename.txt Makes a helpful file.
reader.plx -r filename.txt Reads arguments in from a file.
reader.plx -f "_run01" -d ~/data/ -r filename.txt Reads arguments in from a file, and outputs to ~/data/YYYYMMDD_run01.cdf (where YYYY is the year, MM is the month, and DD is the date from the system), as opposed to the default YYYYMMDDdevice.cdf in the current working working directory
reader.plx -i 30 -w 60 -r filename.txt Changes the sleep between getting data from 1 second to 30 seconds and the wait between writing out from 1 minute to 60.
reader.plx "thermocouple.plx" Temperature "^{o}F" "Trial 1" "Omega DPi8" 1 Runs the command "thermocouple.plx", and outputs the data to a .cdf variable "Temperature" with units of ^{o}F, x-axis label of "Omega DPi8" priority 1 and info "Trial 1". For more help, use the -v option, or look at the perldoc. Program uses Getopt::Long, so short versions of options are accepted. Supports standerd meta-options --help, --usage, --man, --version as well.

D

This program is given a series of commands and information and it runs the commands and logs the results in .cdf format. It runs through the list of commands every second (-interval option controls this). It then writes the device to a file every minute (-write option controls this). By default it writes to a file like 20060713device.cdf. The year, month, and dayfields are set by the system clock, however the filename field can be changed by the -filename option. Close the program by sending an interrupt signal to it. This will cause the program to save the active cdf file then exit. Note: when running correctly, nothing will be printed to the screen.

O

A

Arguments must be given to the program in the order "command" "device" "unit" "info" "label" "priority". Single arguments can be skipped by typing "skip" in, resulting in the defaults (works, but isn't pretty). You can also skip to the next command by typing "next" (as ugly as skip!).

S

This program has long main loop where the program flows somewhat like a waterfall (just down the page, with some spinning at the bottom), and seven subroutines.

S

This is based upon the thermocouple_reader_daemon.plx which is slightly less complex. Modules used for this are Pod::Usage, Time::HiRes,and Getopt::Long. Other useful documentation can be found at perlpod|perlpod and perlpodspec, also recomended is perlref and perlsub, as this program employes use of the ideas detailed in both of these documents. Also useful, may be perlre and perlop for understanding the various regexes. The heart of this uses the CDF module that can be found at the webpage http://cdf.gsfc.nasa.gov.

K

If you give it the wrong arguments, there is insufficient error checking. If there is a pre-existing file with the same name as the one assigned by this program there is no error checking to ensure that the files open up the proper variables.

A

MegaSIMS group, UCLA, <megasims@ess.ucla.edu>. Written by Miles McCammon, <miles86@ucla.edu>.

C

reader.plx - reads any number of devices and saves data in .cdf Copyright © 2006 MegaSIMS, University of California Regents This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To receive a copy of the GNU General Public License, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Source Code

Source code for this version (10/24/08, 11:38) can be downloaded here.
bottomleftshadow Last Modified: October 24, 2008, 11:38 am | megasims [at] ess.ucla.edu bottomrightshadow