This file is part of experix.
Copyright (C) 2004-2014 William Bayard McConnaughey
experix 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; either version 3 of the Licence, or (at your option)
any later version.
experix 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 Licence for more
details.
You should have received a copy of the GNU General Public Licence along
with experix. If not, see <http://www.gnu.org/licenses/>.
Author:
William Bayard McConnaughey
Washington University Biochemistry Department
660 S. Euclid Av., Box 8231
St. Louis MO 63110
telephone 314-362-3345 mcconnau@biochem.wustl.edu
The phrase "Copyright (C) 2004-2015" as used in this file and in all files
that are part of experix has exactly the same meaning as "Copyright (C)
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015"
This file discusses:
experix_release_r14 10 NOV 2014 and experix_release_r14.1 26 NOV 2014
and update_r14.1x 5 FEB 2015
(note: experix_release_r14 was erroneously dated 30 NOV before)
---------------------------- In this file ----------------------------
Major additions/changes relative to experix_r13
Introduction what is experix?
Quick installation just to get started
General stuff auxiliary programs and experix setup
System setup stuff some things needed for experix to work well
Trying the program how to get started
Author contact
Dist tree of this distribution
Changelog relative to experix_release_r13
and updates applied to that, if any
--------------------- Major additions and changes ---------------------
experix has been re-worked in order to build it on the 'Raspberry PI' (an
ARM processor; see www.raspberrypi.org). In order to do that, all x86
assembly code was removed or #ifdef'd out. Most of the assembly code was in
math functions (many of which were not available in the GNU math library at
the time those were written), and we now use library calls for them. Some of
it was misguided attempts to do things more efficiently than the compiler
knows how to, and that has been translated into C. Very little performance
degredation has been noted, and in a few places these changes improved
execution times. The ARM processor does not provide the long double (80-bit)
floating-point data type, so the experix strategy using long double as an
intermediate type in stack manipulations needed to be re-worked. Now we use
long double on the PC and double on the ARM. On the ARM, reading the cycle
count register (CCNT, approximately equivalent to the PC's TSC register) is
privileged. In experix this was used for profiling purposes in a few places,
and removing it in compilation on ARM has no significant impact.
experix now performs correctly on PC's with various Linux distributions and
on Raspberry Pi in all of the tests we have tried, which includes most of
the examples in the help files and the book chapters. There are just a few
API changes, noted in the update log below. There are no differences in the
build process, so it should now be possible to build experix on many
processors that can run GNU-Linux. Problems are expected on big-endian
architectures and on those that need to use 64-bit pointers.
changes in experix_release_r14.1 relative to experix_release_r14
The 'xcd' stuff, for running data acquisition devices with kernel drivers,
has been made optional. In this release it is in a separate archive, and it
will not be included in future releases until it is updated.
The error reporting system has been revised, and all codes have been changed.
changes in r14.1x relative to r14.1
update_r14.1x.tgz2 contains files to replace corresponding ones in
experix_release_r14.1, plus a few new files. It adds the gpioRPi command for
performing GPIO operations on the Raspberry Pi and controlling a gertbot or
other hardware with a similar protocol.
There is a gertbot demo with performance remarks, showing data acquisition
and control by simultaneous operation of DAC and ADC, and PWM and ADC.
---------------------------- Introduction ----------------------------
The experix interface grew out of my command interpreter, written in C for
extended DOS on x86, which we are still using to run one experiment in the
Department of Biochemistry and Molecular Biophysics at Washington
University, and one at the Plant Biology Research Institute at the
University of Montreal. We need to move those to experix, but there is too
much higher priority stuff to do. Meanwhile, experix is running the "cell
poker" (like a primitive atomic force microscope), and has been used on
other experiments including controlling a laser modulator and collecting
photon counts for two-color fluorescence measurements; analyzing
fluorescence intensity distributions in Zeiss Confocor data; and doing
miscellaneous other tasks that arise.
The experix program is written in C for GNU/Linux. The archive (about 1.5
MB) contains source files and documentation for experix and its graphics
server and a few auxiliary programs, and help files for the commands and
operators. There is also a book started (about a megabyte total now) and a
computational application (FIDA, about 50K, not included in the distribution
but will be provided on request).
The user interface presents a command prompt and accepts a command string of
arbitrary length. The command string contains commands and operators which
are executed sequentially except when branch operators are encountered.
Commands and operators use objects in a stack which includes numbers,
arrays, strings, and various control blocks. The stack provides a mechanism
for commands and operators to obtain arguments and pass results on to the
the next command or operator.
Data objects held by experix stacks and in command variables are of many
types: integer, floating-point, complex and polar numbers and arrays with
multiple dimensions; strings used as commands, filenames, filepaths, command
names and messages; and file control objects, device control objects and
thread control objects. Operators and command functions are coded in C and
overloaded to the extent that makes sense, so that they work on different
kinds of numerical or string data. They do calculations in binary data
types, which gives a speed advantage relative to systems that use string
numerical represention. Support at the user command level for numerous
binary numerical data types facilitates the interface to data acquisition
hardware.
Command input is obtained in a thread separate from the execution loop, so
that commands activated by timers, signals and devices can be put into the
queues asynchronously with respect to user command execution. In graphic
mode, stdout is directed to a thread that packages characters into graphic
display commands, and these are written to a fifo which is consumed by the
graphics server process.
Help is available by typing a command name or an operator preceeded by '?'.
This displays the relevant section of the help file for that item, and
subsequent sections of the file can then be viewed at any time by typing
<space><enter>. With '??' preceeding the name or operator, the help system
execs an editor in a separate console with the relevant file loaded and
opened to the place of interest (this is not working on Raspberru PI; I will
try to resolfe it). The help files make use of the "embedded highlighting"
feature in xnano, the extended version of the GNU nano text editor (see
nano-wbm.tgz2 in the experix_r12 directory on SourceForge).
In case of error, execution of the command string stops and an error message
is given, with a display showing the execution point in the command that
caused the error and the execution points in all suspended commands. User
input, stack displays and diagnostic messages are recorded in a log file.
Together with recall and editing of previous input, this gives experix a
significant advantage over mouse-and-icon-based command input, because the
user is encouraged to think things through and is provided a record of the
session.
The main objective of this is experiment control and data collection. This
is handled by device drivers (loadable kernel modules) that conform to a
model in which the data is shared by the mmap method, and the read method is
used more like an ioctl. A set of common driver commands is defined, such as
start, stop, configure the data page, define the signal delivery time, and
others. A command and supporting parameters is prepared as a short array
that is passed to the driver in a read call. The driver writes results back
to the array. The driver signal handler scans the registered drivers to find
out which ones need service, and for those drivers it queues the command
strings that have been assigned to them. These commands would typically
perform device operation and data acquisition, display and storage. They run
atomically between tokens of a user command, and so do not wait on whatever
the user is doing. All device data and actions are accessible by the experix
command line, so an expert user is able to do things that the programmer may
not have considered.
USB operations and command threading enable experix to utilize the
tremendous variety of USB-connected devices that have made their appearance
in recent years. These are operated through the 'usb' command, which
executes arbitrarily constructed control transfers and bulk transfers.
It is also possible to make user-space device drivers which are linked by
fifo's to experix and accessed via the 'file' command. When this technique
can get the job done, it saves the very considerable difficulties associated
with kernel device driver construction.
Data can be transferred between files and stack objects in either binary or
formatted form. This uses the 'file' command together with a stack object
which contains the file descriptor, file path and status information. This
can be used to create complicated data archiving and retrieval commands
taylored to each experimental situation.
------------------------- Quick installation -------------------------
This discussion is for a system that does not yet have experix. The
procedure sets up the experix directory, downloads and unpacks the
distribution files, and builds experix and svgaserv. Then experix will work
in text mode. Getting it to work in graphics mode should not be any more
complicated, but for some screen geometries you might want to tinker with
the fonts and vdr sizes. See book/install, help/in.experix/hlp and contact
the author. This all assumes you are using a not-too-old Linux system.
See the program building instructions in help/in.experix.hlp. That is to be
considered the authority in program building and it also includes the
single-process option in which the graphics server is built into experix.
# Construct the experix directory tree.
cd <the directory that is to contain the experix tree>
mkdir experix
cd experix
# download the following from Sourceforge:
# experix_r14.1_dist.tgz2 experix_r9_helpers.tgz2 experix_r14.1_book.tgz2
# update_r14.1x.tgz2
tar -xjf experix_r14.1_dist.tgz2
tar -xjf experix_r14.1_book.tgz2
tar -xjf experix_r9_helpers.tgz2
tar -xjf update_r14.1x.tgz2
mkdir bin
cd bin
# Build experixXG. This is the variant that uses an external graphics
# server (svgaserv). But first, see the more detailed instructions in
# help/in.experix.hlp, which also discusses some compilation options.
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/zdhist.c
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/stretcher.c
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/webcam.c
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/gpioRPi.c
gcc -c -g -O -pthread -Wall ../dist/source/svgalib/exp_svga.c
gcc -c -g -O -pthread -Wall ../dist/source/*.c &> errs; cat errs
# Inspect the errs file to ensure there are no compilation errors.
# There will be warnings. See help/compile_warn, and contact the author
# about problems that are not discussed there.
# Link the program:
gcc -o experixXG *.o -lpthread -lm -lreadline -lcurses -lrt -lusb -lv4l2
# Give it capabilities that it needs:
sudo setcap cap_sys_resource,cap_sys_rawio,cap_dac_override=p experixXG
# Build the graphics server svgaserv.
gcc -g -O -Wall -o svgaserv \
../dist/source/svgalib/svgaserv.c ../dist/source/svgalib/svgafunc.c \
../dist/source/svgalib/svgafont.c ../dist/source/svgalib/frbflib.c -lm
# After building experixXG, build experixIG. This is the variant in which
# the graphics server functionality is integrated into experix, rather
# than being a separate process. (in.experix.hlp also shows how to build
# this without first building experixXG)
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/graphx.c
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/threads.c
rm -f exp_svga.o
gcc -c -g -O -pthread -Wall ../dist/source/svgalib/exp_svga_G_IN_X.c
gcc -c -g -O -pthread -Wall ../dist/source/svgalib/svgaserv_G_IN_X.c
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/svgalib/svgafunc.c
gcc -c -g -O -pthread -Wall ../dist/source/svgalib/svgafont.c
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/svgalib/frbflib.c
gcc -o experixIG *.o -lpthread -lm -lreadline -lcurses -lrt -lusb -lv4l2
sudo setcap cap_sys_resource,cap_sys_rawio,cap_dac_override=p experixIG
Help files (in the experix/dist/help directory and a few in other places)
use ANSI color escape sequences. View these by using 'cat filename' or 'less
-R filename'. For editing them you will want the extended nano editor. This
is based on nano-1.2.5, and if that is no longer available from the nano
project, contact the experix maintainer for a copy. The changed files for
nano, and details about it, are in experix_r12/nano-wbm.tgz2 (this has not
changed since release r12, so it is not duplicated in this directory).
---------------------------- General stuff ----------------------------
My main building/testing platform is a ThinkPad X60 running Trisquel
"toutatis" (kernel 3.2.0-38-generic-pae). I am also using a Toshiba
Satellite with a Fedora Core 16 (kernel 3.1.0-7.fc16.i686.PAE), a Dell
Latitude with a Fedora Core 6 (kernel 2.6.18), a Compaq Presario with a
Fedora Core 17 (kernel 3.3.4), a Raspberry Pi (Linux raspberrypi 3.6.11+
#538 PREEMPT) and other systems from time to time. For details and
installation help, contact me.
My preferred editor is GNU nano with my "embedded highlighting" extension,
and I have used that in the help system. Other editors can be used, but the
help files will be difficult to read if the highlighting escape sequences
are printed out rather than interpreted. The source files for the extended
nano are available from the same archive website that hosts experix.
If the source files seem to lack comments, especially discussion of
functions and variables, look in help/keywords.index and the other keywords
files that it lists. Also see source/structs.h.
Installation is not automated by a makefile. As long as only one OS is
supported, the extra burden of maintaining a makefile does not seem to be
justified. More notes on installation are found in the file 'install' in the
book section of the archive. The authoritative up-to-date source on program
building is near the end of help/in.experix.hlp.
-------------------------- System setup stuff --------------------------
See hardware/tpad_setup for a detailed setup method applicable to the
Thinkpad X60 with Trisquel, but adapt it to your system. This also works
(mostly) for the Raspberri Pi setup. On both of them I needed to install
several libraries.
The present version of svgaserv assumes that a single line of print is
being used for the command prompt and input, so readline should be in
scrolling mode, i.e. the statements
set horizontal-scroll-mode on
print-completions-horizontally ON
should be in the file that is indicated by the environment variable
INPUTRC, or the file ~/.inputrc if there is no such environment variable.
Also, due to the partial implementation of console codes in svgaserv, and
unresolved problems with readline, there may be confusing results when
scrolling a long input line and especially when using <CTRL-R> to recall a
previous command (but a recent bug fix has probably corrected this). The
readline "redraw-current-line" command can be used in this situation.
Readline docs don't mention a key binding for that, so it is useful to put
one in inputrc, for example this to use control-F:
\C-F: redraw-current-line
The double-? help requests attempt to exec xnano in another virtual terminal.
(Note: this is not yet working on Raspberry Pi). This requires permission on
the /dev/tty files that are involved. This is described better in
book/install, but the main point is that root must do a series of commands
like
chmod a+rw /dev/tty7
-------------------------- Trying the program --------------------------
Build experix and svgaserv as described above, then cd to the experix/bin
directory and use one of these commands to start the program (see the help
file dist/help/gh.experix.hlp for details on program starting arguments;
access this from experix by typing ?? ) Here, "experix" means either
"experixXG" or "experixIG". (People who worry about wear and tear on the SD
card of the Raspberry Pi might add the -q option to suppress the log files.)
./experix -g- (text mode, without running svgaserv)
./experix (text mode)
./experix -g# where # is a digit, starts in graphics mode with
screen setup as defined by the file screen#
(at this point, # could be 0, 1 or 2, and screen0
is a link to screen1 or screen2) **NOTE** This will
not work in an xterm. Use a text terminal, not an
X graphics screen.
./experix -h (show a help message and exit)
(Graphics and text modes can also be changed while the program is running.
See the svlg command.)
There are notes in book/install on use of svgalib, but we are not really
supporting that any more. We use a framebuffer-based svgalib partial
imitation, source/svgalib/frbflib.c.
Debugging experix requires giving these commands to gdb:
break breakfunc
handle SIGTTIN SIGTTOU SIGWINCH SIGCHLD SIGUSR1 SIGUSR2 nostop noprint pass
handle SIGALRM SIGINT SIGQUIT SIGTERM SIGIO SIGABRT nostop noprint pass
handle SIGUNUSED nostop noprint pass
This is most conveniently done by placing these commands in experix/bin/gdbc
and then using
gdb experix -x gdbc
to start.
A running experixXG session in graphics mode can be intercepted by using
gdb experixXG <pid> -x gdbc
in another terminal, where <pid> is the
experixXG process ID. The breakpoint at "breakfunc" is reached by using the
experix command "debug".
This method does not work well with experixIG because stopping experix also
stops the graphics server (because it is just a function in the experixIG
process), and then the terminal switching signals do not work. You can do
this:
gdb experixIG -x gdbcIG
where gdbcIG has the additional line
handle SIGSYS SIGPROF nostop noprint pass
then set the startup arguments and run it. Unfortunately, every time you
hit a breakpoint, the graphics screen gets overwritten by the underlying
text. But the big frustration is that while experix is stopped you cannot
switch to other terminals to edit files and so on.
----------------------- Author/Maintainer contact ---------------------
William McConnaughey 314-362-3345
Biochemistry Dept., Campus Box 8231
Washington University
660 So. Euclid Av.
St. Louis MO 63110
mcconnau@biochem.wustl.edu
------------------------ the experix/dist tree -----------------------
If upgrading an existing experix installation:
remove these files so that the build procedure will not make FPUmath.o:
dist/source/FPUmath.h dist/source/FPUmath.c
remove FPUmath.o from experix/bin
The experix/dist tree:
|-- checkfile*
|-- COPYING
|-- experix_icon.gif
|-- experix_icon.ppm.gz
|-- experix_icon.xpx*
|-- experix_logo.gif
|-- experix_logo.ppm.gz
|-- maintainance.xpx
|-- mm_dump_decode.c
|-- readme_r14
|-- hardware/
| |-- hardware/iron_setup
| |-- hardware/tpad_setup
| `-- hardware/XO
|-- into_bin/
| |-- into_bin/gdbc
| |-- into_bin/gdbcIG
| `-- into_bin/readme
|-- maybe_u_need/
| |-- maybe_u_need/bitops.h
| `-- maybe_u_need/config.h
|-- obsolete/
| |-- obsolete/mapper.c
| |-- obsolete/readme
| `-- obsolete/xpxdtest.c
|-- help/
| |-- help/abin.hlp
| |-- help/amoeba.hlp
| |-- help/capabilities new in r14.1x
| |-- help/compile_warn
| |-- help/COPYING -> COPYING
| |-- help/def.hlp
| |-- help/demolist
| |-- help/errors new in r14.1
| |-- help/exec.hlp
| |-- help/file.hlp
| |-- help/fourier.hlp
| |-- help/gh.experix.hlp
| |-- help/globalints.hlp
| |-- help/graph_ae.hlp
| |-- help/graph.hlp
| |-- help/gsmin.hlp
| |-- help/histogram.hlp
| |-- help/in.experix.hlp
| |-- help/interp.hlp
| |-- help/issues
| |-- help/keywords.ac
| |-- help/keywords.dh
| |-- help/keywords.index
| |-- help/keywords.ir
| |-- help/keywords.ss
| |-- help/keywords.tz
| |-- help/mandel.hlp
| |-- help/miscellaneous.hlp
| |-- help/mod_nano.hlp
| |-- help/nocolor.c
| |-- help/Pfit.hlp
| |-- help/print.hlp
| |-- help/segfunc.hlp
| |-- help/sign_on.message
| |-- help/sock.hlp
| |-- help/sort.hlp
| |-- help/ss.arblocks.hlp
| |-- help/ss.arelemnt.hlp
| |-- help/ss.binaryop.hlp
| |-- help/ss.cmndtail.hlp
| |-- help/ss.comfiles.hlp
| |-- help/ss.comjumps.hlp
| |-- help/ss.comquote.hlp
| |-- help/ss.constant.hlp
| |-- help/ss.defercom.hlp
| |-- help/ss.localvar.hlp
| |-- help/ss.logicops.hlp
| |-- help/ss.misclops.hlp
| |-- help/ss.nouseyet.hlp
| |-- help/ss.numerals.hlp
| |-- help/ss.stackman.hlp
| |-- help/ss.statsops.hlp
| |-- help/ss.threads.hlp
| |-- help/ss.tilde.hlp
| |-- help/ss.unaryops.hlp
| |-- help/ss.valuecmp.hlp
| |-- help/structs.doc
| |-- help/svgaplot.hlp
| |-- help/thread.hlp
| |-- help/time.hlp
| |-- help/tthread_mon.hlp
| |-- help/tu.experix.hlp
| |-- help/usb.hlp
| |-- help/xcd.hlp removed from r14.1
| |-- help/xnanorc
| |-- help/xpxdif new in r14.1
| '-- help/app/
| |-- help/app/poker_card.hlp
| `-- help/app/poker_usb.hlp
|-- source/
| |-- source/amoeba.c
| |-- source/amoeba.h
| |-- source/array2.c
| |-- source/array.c
| |-- source/command1.c
| |-- source/command.c
| |-- source/defines.h
| |-- source/display.c
| |-- source/errors.c
| |-- source/errors.h
| |-- source/files.c
| |-- source/functions.h
| |-- source/globals.c
| |-- source/graph.c
| |-- source/graphx.c
| |-- source/help.c
| |-- source/math.c
| |-- source/math.cx
| |-- source/mm.c
| |-- source/numbers.c
| |-- source/opclist.h
| |-- source/sockets.c
| |-- source/stack.c
| |-- source/structs.h
| |-- source/threads.c
| |-- source/try1.c
| |-- source/updown.c
| |-- source/usb.c
| |-- source/vars.c
| |-- source/xpxdif.c removed from r14.1
| |-- source/xpxdif.h removed from r14.1
| |-- source/xpx_local.h
| |-- source/svgalib/
| | |-- source/svgalib/altcolortest
| | |-- source/svgalib/altcolorwrite
| | |-- source/svgalib/colors.00
| | |-- source/svgalib/colors.xpx
| | |-- source/svgalib/exp_svga.c
| | |-- source/svgalib/exp_svga_G_IN_X.c
| | |-- source/svgalib/filter0.c
| | |-- source/svgalib/font11.1
| | |-- source/svgalib/font11.1bak
| | |-- source/svgalib/font16.0
| | |-- source/svgalib/font16.0bak
| | |-- source/svgalib/font16c8
| | |-- source/svgalib/font16c8bak
| | |-- source/svgalib/font18.1
| | |-- source/svgalib/font18.1bak
| | |-- source/svgalib/font18.2
| | |-- source/svgalib/font18.2bak
| | |-- source/svgalib/font24.0
| | |-- source/svgalib/font24.0bak
| | |-- source/svgalib/font24.1
| | |-- source/svgalib/font24.1bak
| | |-- source/svgalib/font24.2
| | |-- source/svgalib/font24.2bak
| | |-- source/svgalib/font24c12
| | |-- source/svgalib/font24c12bak
| | |-- source/svgalib/font7.1
| | |-- source/svgalib/font7.1bak
| | |-- source/svgalib/frbfdemo.c
| | |-- source/svgalib/frbf.h
| | |-- source/svgalib/frbflib.c
| | |-- source/svgalib/notes
| | |-- source/svgalib/read_stdopipe.c
| | |-- source/svgalib/rltest.c
| | |-- source/svgalib/screen0 -> screen1
| | |-- source/svgalib/screen1
| | |-- source/svgalib/screen1.1280x1024
| | |-- source/svgalib/screen2
| | |-- source/svgalib/screen2.1280x1024
| | |-- source/svgalib/screen.hlp
| | |-- source/svgalib/spectra.xpx
| | |-- source/svgalib/ssfgen.c
| | |-- source/svgalib/stdcolortest
| | |-- source/svgalib/stdcolorwrite
| | |-- source/svgalib/svgadefs.h
| | |-- source/svgalib/svgafont.c
| | |-- source/svgalib/svgafunc.c
| | |-- source/svgalib/svgaserv.c
| | |-- source/svgalib/svgaserv_G_IN_X.c
| | |-- source/svgalib/svgaserv_valid_modes
| | `-- source/svgalib/vgatest.c
| `-- source/xpx_local/
| |-- source/xpx_local/fpr.c
| |-- source/xpx_local/fprs.hlp
| |-- source/xpx_local/fpr.xpx
| |-- source/xpx_local/gpioRPi.c new in r14.1x
| |-- source/xpx_local/gpioRPi.hlp new in r14.1x
| |-- source/xpx_local/ppm.hlp
| |-- source/xpx_local/sockets_old.c }
| |-- source/xpx_local/sockets_tcp.c } junk, removed from r14.1x
| |-- source/xpx_local/sockets_udp1.c }
| |-- source/xpx_local/sockets_udp.c }
| |-- source/xpx_local/sock.hlp moved to help/ in r14.1x
| |-- source/xpx_local/stretcher.c
| |-- source/xpx_local/stretcher.hlp
| |-- source/xpx_local/vgrab.c
| |-- source/xpx_local/webcam.c
| |-- source/xpx_local/webcam.hlp
| |-- source/xpx_local/zdhist.c
| |-- source/xpx_local/zdhist.xpx
| '-- ./source/xpx_local/gpioRPi_demos/ new in r14.1x
| |-- ./source/xpx_local/gpioRPi_demos/blink12.xpx new in r14.1x
| `-- ./source/xpx_local/gpioRPi_demos/gertbot.xpx new in r14.1x
|-- xpx/
| |-- xpx/arraytrix.xpx
| |-- xpx/bm_ts.xpx
| |-- xpx/bm.xpx
| |-- xpx/calculus.xpx*
| |-- xpx/colorsets.xpx
| |-- xpx/daq.xpx
| |-- xpx/example1.xpx*
| |-- xpx/example2.xpx*
| |-- xpx/funcshell.xpx
| |-- xpx/graftrix.xpx*
| |-- xpx/gtest.xpx
| |-- xpx/ideas.xpx
| |-- xpx/math1.xpx
| |-- xpx/mathtrix.xpx
| `-- xpx/threadwait.xpx
`-- drivers/
|-- drivers/card/
| |-- drivers/card/das16/ }
| | |-- drivers/card/das16/das160x.h }
| | |-- drivers/card/das16/experix__das1602.c }
| | |-- drivers/card/das16/Makefile }
| | |-- drivers/card/das16/poker_iorec.xpx }
| | `-- drivers/card/das16/start_poker.xpx }
| |-- drivers/card/pcdas16/ }
| | |-- drivers/card/pcdas16/experix__pcdas16_2.6.29.c }
| | |-- drivers/card/pcdas16/experix__pcdas16_3.c }
| | |-- drivers/card/pcdas16/experix__pcdas16.c }
| | |-- drivers/card/pcdas16/experix__pcdas16_DELL.c }
| | |-- drivers/card/pcdas16/Makefile }
| | |-- drivers/card/pcdas16/pcdas16.h }
| | |-- drivers/card/pcdas16/poker_iorec.xpx }
| | |-- drivers/card/pcdas16/start_poker.xpx }
| | `-- drivers/card/pcdas16/start_stretcher.xpx }
| |-- drivers/card/pcm308/ }
| | |-- drivers/card/pcm308/experix__pcm308_2.6.29.c }
| | |-- drivers/card/pcm308/experix__pcm308.c }
| | |-- drivers/card/pcm308/Makefile }
| | |-- drivers/card/pcm308/pcm308.h } removed
| | |-- drivers/card/pcm308/poker_connect } from
| | |-- drivers/card/pcm308/poker_iorec.xpx } r14.1
| | |-- drivers/card/pcm308/start_poker1.xpx* }
| | `-- drivers/card/pcm308/start_poker2.xpx }
| |-- drivers/card/pokerdemo1 }
| `-- drivers/card/poker.xpx* }
|-- drivers/misc/ }
| |-- drivers/misc/burst.txt }
| |-- drivers/misc/hello/ }
| | |-- drivers/misc/hello/hello.c }
| | |-- drivers/misc/hello/Makefile }
| | `-- drivers/misc/hello/xhello.c }
| |-- drivers/misc/missing.c }
| |-- drivers/misc/pport/ }
| | |-- drivers/misc/pport/experix__pport.c }
| | |-- drivers/misc/pport/Makefile }
| | |-- drivers/misc/pport/notes }
| | |-- drivers/misc/pport/pport.h }
| | |-- drivers/misc/pport/pport.xpx* }
| | `-- drivers/misc/pport/pptype.c }
| |-- drivers/misc/prometh/ }
| | |-- drivers/misc/prometh/Makefile }
| | |-- drivers/misc/prometh/prometh1.c }
| | |-- drivers/misc/prometh/prometh1.xpx }
| | |-- drivers/misc/prometh/prometh.h }
| | `-- drivers/misc/prometh/README }
| |-- drivers/misc/stepper.xpx }
| `-- drivers/misc/step.xpx }
|-- drivers/README
|-- drivers/usb/
| |-- drivers/usb/get_usb_dev_file.c
| `-- drivers/usb/poker.xpx*
`-- drivers/userspace/
|-- drivers/userspace/fifo1.c
|-- drivers/userspace/fifo2.c
`-- drivers/userspace/statfiles.c
The book directory:
|-- book/amoeba
|-- book/arrays
|-- book/booktodo
|-- book/cellpokercartoon.odg
|-- book/circuit_DAS16.pscan
|-- book/circuit_PCM308.gz
|-- book/circuit_PCM308.pscan
|-- book/circuit_poke.gz
|-- book/command
|-- book/compare
|-- book/da_demo.xpx
|-- book/debugging
|-- book/errno.list
|-- book/exec
|-- book/experix.manual
|-- book/files
|-- book/graphs
|-- book/help
|-- book/install
|-- book/LICENSE
|-- book/makedata.c
|-- book/mandel
|-- book/mathops
|-- book/miscellaneous
|-- book/numbers
|-- book/performance
|-- book/pictures
|-- book/poker
|-- book/poker.pscan
|-- book/ptune
|-- book/simul1.pscan
|-- book/specialfunctions
|-- book/stack
|-- book/starting
|-- book/strings
|-- book/svgalibnotes
|-- book/time
|-- book/userspace_daq
|-- book/variables
`-- book/writing_code
------------------------------------------------------------------------
summary of changes since experix_r13 30 AUG 2014:
------------------------------------------------------------------------
(note that some of this was written before the error codes were re-named,
and the old names have not been changed here.)
This is a major revision to remove all inline assembly code (except for the
rdtsc instructions in x86 which are #ifdef'd out), so that experix can run
on other processors besides x86. In order to run on the 'raspberry pi'
(ARM), #ifdefs based on the <math.h> macro __NO_LONG_DOUBLE_MATH were put
around code that deals with the long double type. Math functions that had
been coded in assembly to use the x86 instructions for them are now done by
ordinary library calls.
There are likely to be bugs associated with these changes, but nearly all
scripts and code examples are running properly. Only minor changes in
execution speed have been noted.
changes: experix_r14 -> experix_r14.1
The xpxdif stuff (xpxdif.c, xpxdif.h, the xcd command) has been moved to
experix_xpxdif.tgz2 and will not be included in releases until (and if) it
is updated. This includes the drivers/card and drivers/misc directories,
which are useless without xpxdif and are mostly obsolete.
The help system now has an operator to select the VT's that it will use, but
more work is needed to make this useful.
The error reporting system has been revised and reorganized.
A few bugs have been fixed.
changes: experix_r14.1 -> update_r14.1x
The gpioRPi command (new) performs GPIO access on the Raspberry Pi.
A capabilities interface is used to get fine-grained permissions.
A log file is made to capture errors that might arise before the regular
session log file is available.
An invocation option suppresses creation of log files, and a color info file
is no longer made by the graphics section on startup.
The time/p function compensates for overhead to give more accurate pauses.
These files are replaced or new in update_r14.1x:
`-- dist/
|-- hardware/
| `-- tpad_setup
|-- help/
| |-- amoeba.hlp
| |-- capabilities
| |-- def.hlp
| |-- errors
| |-- file.hlp
| |-- in.experix.hlp
| |-- sign_on.message
| |-- thread.hlp
| `-- time.hlp
|-- readme_r14
`-- source/
|-- command.c
|-- defines.h
|-- errors.c
|-- errors.h
|-- functions.h
|-- globals.c
|-- graph.c
|-- mm.c
|-- numbers.c
|-- sockets.c
|-- stack.c
|-- svgalib/
| |-- svgaserv.c
| `-- svgaserv_G_IN_X.c
|-- try1.c
|-- updown.c
|-- xpx_local/
| |-- gpioRPi.c
| |-- gpioRPi_demos
| | |-- blink12.xpx
| | `-- gertbot.xpx
| `-- gpioRPi.hlp
`-- xpx_local.h
------------------------------------------------------------------------
detailed changes since experix_r13 30 AUG 2014:
------------------------------------------------------------------------
------------------------ experix policy changes ------------------------
changes: experix_r14 -> experix_r14.1
The 'xcd' stuff, for running data acquisition devices with kernel drivers,
has been made optional as follows:
These files and directories under experix/dist are removed from experix
releases, until we update them. (This includes some stuff in the drivers
directory not related to the xcd system, that became obsolete.)
source/xpxdif.c
source/xpxdif.h
help/xcd.hlp
drivers/card/
drivers/misc/
Files changed by putting #ifdef WITH_XPXDIF around the relevant parts:
defines.h, structs.h, functions.h, errors.h, errors.c, usb.c, updown.c,
threads.c
To remove xcd:
Move xpxdif.c and xpxdif.h out of the source directory and xcd.hlp out
of the help directory (recommendation: make directory experix/xpxdif/
and put them there); you might also want to do this with the files
under experix/dist/drivers that are listed above
Remove xpxdif.o from experix/bin/
Comment the line for WITH_XPXDIF in defines.h
Build experix
To keep xcd:
Copy xpxdif.c and xpxdif.h to experix/dist/source/
and xcd.hlp to experix/dist/help
(if you don't have these files you can download experix_r14_dist.tgz2
and get them from it)
Put back sources for the drivers that you will be using (get them from
experix_r14_dist.tgz2) and build them
Uncomment the line for WITH_XPXDIF in defines.h
Build experix
changes: experix_r14.1 -> experix_r14.1x
experix uses libcap functions to limit the context in which special
capabilities are used. See help/capabilities for details. This requires
-lcap in the link, and it requires the administrator to set the needed
capabilities (by setcap or equivalent).
(source/try1.c help/capabilities help/in.experix.hlp)
A simple mechanism has been installed to capture initialization messages
which are issued before the log file has been opened, and would likely not
be noticed because the screen gets erased. They are recorded in a file
named /tmp/experix000000startup where the 0's are replaced by the pid.
(try1.c)
The new -q startup option disables creation of the startup logfile (called
/tmp/experix<pid>startup) and running logfile (called /tmp/experixlog<pid>)
to avoid log file overhead and/or creation of files when this might be a
problem and the lack of log files would not be a problem.
(defines.h try1.c mm.c updown.c svgaserv.c svgaserv_G_IN_X.c in.experix.hlp)
-------------------------- experix api changes -------------------------
Some of the math operators such as .ln which were restricted to real data
can now work on complex types, since the math library can now do that. Some
operators that previously worked on polar data have been restricted to real
or complex only.
Help files and other documentation needs a review and updating to account
for all this. There may be more changes of this sort.
(for ARM cpu) The CCNT register (counts cpu clock cycles) is privileged, so
time/c and time/C give a -ARCH_NOT error; and the (poorly designed) facility
for putting time marks the graphics server pipe to avoid over-filling it
(the \? and \?c operators and any \$ operator ending with '$') is not
available.
Some -NF_DZ (divide by zero) error returns on math operators have been
changed to -NF_RE (range error).
The -CE_UXEP (unexpected execution point) error return has been given a
'stage' number in every instance, globally unique throughout experix, so
that these can be easily identified.
FPUts and fpu_etrack commands are gone because they depended on assembly
code, and their raison d'etre had to do with the somewhat questionable
assembly code in the math functions. The FPU error summary at experix
shutdown is removed.
These math operators used FPU operation codes that provided algorithms for
result accuracy when the argument is near 0 or 1 or something. Such libarary
functions are not available, so they are now do not give extra accuracy:
.coshm .acoshp
Array operators that receive indexing values on the stack convert these to
integer FLOOR values (effectively; they use statements assigning a floating-
point value to integer). Thus index values given as 5.1 and 5.9 both yield
5. Previously, rounding was used and the latter case would have been 6 (the
help file had it wrong).
Note that the local variable store operation ,s performs rounding (as it did
previously). When floating-point numbers are stored in local variables for
later use in array indexing, the .F operator should be applied first.
changes: experix_r14 -> experix_r14.1
The ????BN help system operator (where B and N are decimal digits) sets
the first terminal and number of terminals that ?? help requests can use.
Unfortunately there are still issues about being unable to deallocate vt.
(defines.h help.c gh.experix.hlp)
The error reporting system has been revised. All symbolic error codes begin
with XE_ so that they can be located easily in sources, and namespace
conflict hazard is practically nil. Some groups of old error codes are
consolidated into a single new one, and all numeric codes are different from
before. This required considerable work updating the xpx files and book
chapters and help files that use or mention error codes, either symbolic or
numeric. The distinction between 'error' and 'warning' is removed, along
with all mention of suspending a command string in order to get a user
decision. The gp_AWML list is removed.
The 'route codes' for error message display are determined a default for
each list (as before), but each message may begin with a 3-character code
that determines the route.
changes: experix_r14.1 -> update_r14.1x
new error code: XE_ACTSEL_BAD invalid command action selector
new error code: XE_HAN_EXIST handle is already defined
(errors.h errors.c help/errors graph.c sockets.c stack.c)
new command, when XPX_LOCAL_RPi is #defined in xpx_local.h:
gpioRPi performs GPIO operations on the Raspberry Pi.
(source/xpx_local/gpioRPi.c source/xpx_local.h source/try1.c
source/xpx_local/gpioRPi.hlp help/in.experix.hlp)
time/p compensates for overhead in the time command and for system overhead
in the nanosleep function. See details in time.hlp. globalints[1] is used.
(updown.c defines.h globals.c functions.h time.hlp)
------------------------- created file changes ------------------------
changes: experix_r14.1 -> update_r14.1x
The startup log file and running log file are optional (see the -q option
under 'policy').
The svgaserv BI command does not make the palette info file
/tmp/xpx<pid>color (this can be made by using the svgaserv X command).
(svgaserv.c, svgaserv_G_IN_X.c)
----------------- changes to driver interface (xcd stuff) --------------
This has not been tested at all for this release, and I do not have the
means to test it on ARM. In fact it is on the verge of being removed,
because the PCMCIA cards that I use are no longer available and maintainance
of the kernel modules and associated experix code is very difficult.
------------------------------ bug fixes -------------------------------
changes: experix_r14 -> experix_r14.1
source/numbers.c:unop .>p operator was doing nothing
source/command.c: at "mcs ;": ;??>x ops were not working
source/array.c: in getindexA, incorrect code to check 64-bit index values
---------------------- bug detection code changes ----------------------
changes: experix_r14 -> experix_r14.1
Errors that are regarded as experix bugs, should they happen, have messages
that start with "BUG: ", and they have stage numbers which are unique across
all of the source files.
---------------------------- non-api changes ---------------------------
(for ARM cpu) The CCNT register (counts cpu clock cycles) is privileged, so
the items listed here do not exist or are not used:
Thread and signal performance monitoring, compiled in by #defin'ing
TTHREAD_MON and STHREAD_MON
Timestamps in the CT_handle->start and CT_handle->quit fields of a thread
control struct
changes: experix_r14 -> experix_r14.1
The error reporting function is revised according to the changes listed
under 'experix api changes'. The error list for XE_ codes is a list of
null-terminated strings, rather than an array of strings.
The "LO_..." route codes in errors.h have been revised in line with the
error system changes; LOq_dec is removed and LO_fatal is changed to LO_bug.
------------------------------ xpx changes -----------------------------
drivers/usb/poker.xpx has a fix in the the fpcorner command: operator .F
applied to the fit segment length
changes: experix_r14 -> experix_r14.1
Error codes (symbolic and numeric) have been updated according to the
changes in the error reporting system.
------------------------- documentation changes ------------------------
keywords files are updated for the removal of assembly-language math
functions and revised use of long double type
changes: experix_r14 -> experix_r14.1
help/ss.unaryops.hlp: updated for new behavior of reciprocal operations
help/ss.arelemnt.hlp: clarified use of index values
source/numbers.c: comment about the !a! issue
help/ss.binaryop.hlp: clarifications on ^I and %B ops
help/ss.numerals.hlp: clarifications on complex/polar conversions
Error codes (symbolic and numeric) have been updated according to the
changes in the error reporting system.
dist/help/errors lists the recommended correspondences for updating xpx
files and documentation.
changes: experix_r14.1 -> update_r14.1x
amoeba.hlp, def.hlp, file.hlp, thread.hlp: updated a few error codes
hardware/tpad_setup: noted that libcap may be needed
help/capabilities: new file, describing the capability policy
source/xpx_local/gpioRPi.hlp: new file, describing the gpioRPi command
and the functions in gpioRPi.c
help/in.experix.hlp: updated program build instructions to take the RPi
into account
----------------------------- demo changes -----------------------------
changes: experix_r14.1 -> update_r14.1x
New demo for Raspberry Pi: source/xpx_local/gpioRPi_demos/blink12.xpx
follows Gordon Henderson's blink12.c demo.
New demo for Raspberry Pi with gertbot:
source/xpx_local/gpioRPi_demos/gertbot.xpx presents ADC, DAC and PWM
operations and array data acquisition, with remarks on performance
----------------------------- minor issues -----------------------------
The ?? help operator (exec'ing an editor in a new terminal) does not work
on Raspberry Pi. I will fix that when I have time to figure it out.