
# Change history for xFOCE gateway code repository

TODO[ref 2014-10-06]: configure build to make changes to autotools more transparent; is ac_prereq needed (or could we use 2.63)?

2015-05-25 [version 1.00] kent headley <headley@mbari.org>
- configure.ac: revision [1.00]

2015-05-25 [properties logging, power policy functions] kent headley <headley@mbari.org>
- configure.ac: revision [0.99]
- [xf-xhash-service, xf-xhash-platform]: eliminted string methods (use xvalue_tostring)
- [xf-power, xf-driver]: moved methods for parsing power policy to power from driver
- [xf-gateway]: generate record with device properties on init; also added more driver properties to metadata packet.
- [xf-properties]: added props_xv2str: produces string from properties key:xvalue_t pairs
- [xf-xhash-properties, xf-xhash-service]: removed redundant method s_xhash_service_string (use xvalue_tostring)
- added/changed some system data types:
    SERVICE_METADATA    0
    // device service properties (common)
    // dname,dtype,did,inst,plat,src,str,fn,loc,per,sdel,ret,tout,ppol,pdel
    SERVICE_PROPERTIES  1
    // device-specific service properties
    // <key>:<value>[,...]
    DEVICE_PROPERTIES   2
    // metadata reported by device
    // format varies
    DEVICE_METADATA     3

    To enable logging/publishing of these data types,
    use this in the streams section of the config file
    {"dtype":"DEVICE","instance":-1,"stream_id":0,"flags":"LOG|PUB",
    "post_topic":"-",             "pub_topic":"/smeta"},
    {"dtype":"DEVICE","instance":-1,"stream_id":1,"flags":"LOG|PUB",
    "post_topic":"-",             "pub_topic":"/sprops"},
    {"dtype":"DEVICE","instance":-1,"stream_id":2,"flags":"LOG|PUB",
    "post_topic":"-",             "pub_topic":"/dprops"},
    {"dtype":"DEVICE","instance":-1,"stream_id":3,"flags":"LOG|PUB",
    "post_topic":"-",             "pub_topic":"/dmeta"}

2015-05-23 [gq, json marshal, sbe52mp updates, bug fixes] kent headley <headley@mbari.org>
- configure.ac: revision [0.99]
- [gw-query]: added loc field to svstat output
- [xf-json]: renamed functions json_ for consistency. Also, added json_marshal()
    to load json (return root cJSON node) from file
- [sbe52mp]: added external pump power policy property and actuation support
- added [src/scripts/skimm]: skim wrapper for specifying multiple IDs
- partial updates to quarc for swFOCE deployment (not debugged)
- bug fix [syssn]: output formatting missing commas after power vector
- bug fix [gw-xpres]:seg fault when specifiying output format w/o time format (created default time format)

2015-05-21 [properties bug fixes, task counter, power_on_delay, service start delay] kent headley <headley@mbari.org>
- configure.ac: revision [0.97]
- driver properties (e.g. timeout, retries, power policy) were being looked up by partial keys.
    Since these didn't work, defaults were always used. Use of these properties was found to be
    limited to timeout and retries in all of the services, so not really noticeable.
- power_on_delay was not implemented
- added driver property sdel (start delay) that will wait before driver runs (and before power is applied) as a diagnostic
- added method to set xftask counter (xftask_set_counter).
- set xftask counter to zero (forcing it to run) when
    - the service is started
    - the sample period is set (worker_period_msec.<service>.0.GETD.0)
    this will cause the services to run immediately at startup instead of waiting a full period
- [xf-xkey]: removed unused key ids and re-ordered lookup tables so keys and entries align exactly
    added XKP_SERVICE_OP - not sure if that's OK
- [xf-driver]: fixed a bug in driver memory in not released in driver_setp
    added driver_prop_key to return correct driver property lookup keys (user must free key)
- [xfoce-init-digi, xfdigi.service]: now set host and id on command line of xfoce-init-digi, making it
    useful as a stand-alone command line util. When used by the systemd init service, the
    arguments are configured in /etc/sysconfig/xfdigi
- [xfoce-init-gpio, xfoce-init-digi]: added help messages, standard -h, -V options, description
- [eswv]:fixed bug: in actuate(), fixed token increment (+=2->++); leftover from actuation semantics update
- [bash-script.sh]: made verbose option -V (was -v)
- [gwstart]: updated for new semantics (H instead of 1 in gwdio call)
- [qsee]: fixed bug/warning when start date is null/undefined in qs_clear_logs()
- [xfenv]: added cycle directory to xfoce path
- [sbe52mp]: use service property pump speed to initialize pump

2015-05-15 [Script and CLI utility interface change] kent headley <headley@mbari.org>
- configure.ac: revision [0.95]
- unified semantics and conventions for arguments to scripts and CLI utils
  * to make them more consistent
  * eliminate awkward/redundant elements
  * provide shorter/multiple alternatives for some common values
  * update/improve help/examples
  * key changes:
    - -h for help
    - -V for verbose output
    - -D <diwefs> for debug
    - -T <dev>[,<term>] for terminal
    - -S <i>,[<dev>[,<term>]] for sensor node
    - -p <i>,[,<term>] for sensor node port

    where <term> is <speed>[,<par>[,[<dbits>[,<sbits>]]]]

    - -s for set
    - -r for read
    - [Hh1]: high/on [Ll0]: low off
    - k:v[/k:v...] and k:v[,k:v...] for multiple key:value pair arguments

- [xf-io-term]: checks for error/eof and clears before fread
- bug-fix: [loopback]: sensor node error check code broke random char test and
    sometimes segfaulted in testdrv loopback test; now checks for ioport type
    and skips error checks if not a sensor node.

2015-05-12 [bug fixes, misc updates] kent headley <headley@mbari.org>
- configure.ac: revision [0.93]
- configure.ac: revision [0.91]
- configure.ac: revision [0.89]
- [syssn]: removed blinky debug code (set blinky on/off during sampling)
- [gw-vaco]:
    - replaced some config values with header symbolic constants
    - added NULL checks in set position functions
- [xf-aio-bbaio]: structured for flow
- [xf-aio]: added dump method
- [xf-gateway]: added s_configure_aio function to transfer config settings to working data structures
- [sysgw]: disabled ground fault code for deployment (pending algorithm development and testing)
- [syssn]: removed sensor node blinky assertion (debug) code
- [socat-cn*]: updated with deployment configuration defaults
- [gwstart]: updated with deployment configuration defaults

- bug fix: [xf-config]: wrong constand used in s_gwcfg_import_aio DIO_IN->AIO_IN, etc.
- bug fix: [bbone-aio]: counts function always returns 0 (== should have been !=)
- bug fix: [xf-cfg-service]: gateway crashes with invalid argument syssn actuation command.
    - added NULL check
- bug fix: [eswv]: actuation doesn't work
    - updated channel config to match final hardware
    - fixed incorrect data type assigments in props2cfg

2015-05-07 [fix broken build] kent headley <headley@mbari.org>
- configure.ac: revision [0.87]
- [xf-json]:json_str definition mismatch

2015-05-07 [new startup utils/services, service updates, bug fixes] kent headley <headley@mbari.org>
- configure.ac: revision [0.87]
- fixed incorrect month on (2) previous change log entries
- [xf-gateway]: added basic metadata packet generation on service init
- [gw-vaco, bb232-dev, eswv]: bug fixes (set position counts had wrong byte order),
    simplified cals, and added new cal parameters; now 3 linear cals (output, position, command).
    Cals reflect valve controller hardware update
- [gw-mvc]: added support for fan power controls
- [xf-json]: added json_str function to render a json node as a (pretty) string
- [xf-io-snlib]: io_snlib_readto updates (mostly fprintf->debug), minor restructuring for flow
- [xf-power]: changed printf to fprintf
- [xf-xvalue]: bug fix: uint validation used <0, should use <= (failed to parse service properties)
- [sbe-common]: sbe52mp* sbe18s*]: various optimizations to perform better with sensor node
- [satpar]: simplified init (just need to exit streaming mode), plus asserts exit streaming mode on each
    sample cycle to ensure success
- [sysmeh, proxr-dev]: bug fix: relay initialization (changed to string mask, added proxr_parse_mask)
- [various service modules]: gave unique names s_<module>_parse_... to disambiguate parser function debug messages
- [gwsetup]:added cfgLimits to enable core dumps, also installs xfdigi systemd service

- renamed src/gateway/rootfs/etc/socatd-mv0 src/gateway/rootfs/etc/socat-cn
- added src/gateway/rootfs/etc/systemd/system/xfdigi.service
= added src/gateway/rootfs/etc/sysconfig/xfdigi
- added src/gateway/rootfs/etc/init.d/socat-cnt
- added src/scripts/gwstart: combines a number of gateway startup actions into one script
- added src/scripts/xfoce-init-digi: called by /etc/init.d/ service to initialize digi ports at boot time

2015-04-28 [mvc driver/tests, snlib/mvlib updates, other updates and bug fixes] kent headley <headley@mbari.org>
- configure.ac: revision [0.83]
- [sbe18s]: fixed compiler warning: printf format for off_t->%zu
- [sbe-common]: added sbe_send_nreceive
- [gw-mvc]: MV converter command line app, first feature-complete release
- [mvLib, snLib]: packages updated
- [xf-adc-utils]: support for cubic cals
- [xf-dio-bbdio]: default pulse width from 15 to 100ms
- [xf-io-snlib]: added (commented out) alternative version of readn impl to
  read more efficiently in blocks instead of char by char.
  Re-organized readn code for better flow.
- [mvc-dev]: dump formatting,
    added mvc_gfctrl(), mvc_cfg_gfctrl()
    set return values for rtime,btime
- [sysmeh]: added init device prop (bit vector for relays to init on)
    restruct sample code
- [sysmvc]: followed updates to mvLib
- [test-driver]: added new sysmvc test code, added debug to sbe18s test
- [gwsetup]: added ops to systemd-journal group (allows journalctl access)
- [socat-MV0]: new variable for init functions, fixed typo/bug
- [dot.profile]: added line for enabling core dump

2015-04-23 [snLib/mvLib updates, added gw-mvc, updated sysmvc, misc bug fixes/features] kent headley <headley@mbari.org>
- configure.ac: revision [0.79]
- added [gw-mvc.c]: in src/gateway/apps. A command line MV converter utility.
- [mvc-dev]:
    updates to use mvc-dev wrappers,
    added mvc_power_vector method to read all power states as bit field
    added read_serial, read_status, read_version functions

- [sysmvc.c]:
    renamed/added gf_raw, gf_scaled, adc_raw, adc_scaled to mvc_stat_t.
    uses power vector instead of array

- [sbe52mp]:
    added external pump power resource support (RT_POW[1])
    fixed bug: exited on NULL fstream; now checks handle too, prints debug, but doesn't quit.'

- [sbe18s]:
    return error packet if unsuccessful
    retry on initialization steps, return status (bitvector, 1=failed step, 0=OK)
- [gw-meh]: simplified -d option processing
- [snLib, mvLib]:
    upgraded to latest versions
    added snTest, snTerm, mvTest to the distribution. App binaries built in src/gateway/apps
    removing mbariConst.h, mbariTypes.h (deprecated)

- [xfsync]:
    changed validation of src,dest,key args in xfs_validate()
    added transfer time logging

2015-04-17.1 [release 0.78] kent headley <headley@mbari.org>
- configure.ac: revision [0.78]

2015-04-17 [deployment directory, arbitrary log,arch path, gwsetup update] kent headley <headley@mbari.org>
- configure.ac: revision [0.77]
- [xsvc, xrun,xf-config,xf-gateway, xf-sysfile]: option to put log and archive in arbitrary directory.
- [gwsetup]: refactored
    - takes deployment arg to create directory and links for deployment conf/arch/logs
    - removed options for selecting complicated subsets of operations - just do it all
    - organized operations into functions
    - moved distro build to end of script
    - seems to have fixed bug where distro config failed first time through

- [mvLib]: updated to latest version, patched headers (again) to prevent conflicts with snLib headers
- [xf-adc-utils]: added null check after malloc in adc_config_new
- [xf-utils]: made set_dstring a function (was macro); takes char ** instead of char * for arg; affects all set_dstring callers.
- [hih6163-dev.h, xf-spi.h]: added doxygen comments
- removed absolete header (rser-io.h)
- [repotar]: excludes xfconf

2015-04-10 [bug fix] kent headley <headley@mbari.org>
-bug fix: [xf-gateway]: [ref 2015-03-27]: bug: gq -s debug_level=SYSGW.DEBUG (i.e. wrong invocation of debug level) crashes gateway
Cause was unitialized byte pointer (dest) in s_gw_getp_platform that segfaults when free is called; initialize pointer to NULL.
looked for other potential occurrences in same source

2015-04-10 [qc script updates] kent headley <headley@mbari.org>
- configure.ac: revision [0.75]
- [qsee]: fixed environment (was overriding QP_OPATH and QS_OPATH); changed vout() to accept "TRUE" or "Y"
- [bash-script.sh]: changed vout() to accept "TRUE" or "Y"

2015-04-09 [qc plot updates, deprecated scripts] kent headley <headley@mbari.org>
- configure.ac: revision [0.75]
- created src/scripts/dep for deprecated/less-used scripts and moved some there:
    mklinks.sh
    quickset
    rsync-pub
    socat.cl
    valgrind.cl
    vg.supp
    xdigi
    xflog
    xtrim
    xtrsh
- updated [xfsync, qsee], added mkxpconf to enable easier configuration of the qc
util chain through environment files. this makes it possible to switch between
test and deployment configurations with minimal changes.
- added connman-tests to oebb xfoce-prod-image.bb (used to change IP config, e.g. static IP)

2015-04-07 [support for snode hi power relay, plot script updates, socat sys-v init] kent headley <headley@mbari.org>
- configure.ac: revision [0.75]
- [.hgignore]: added rule to ignore mvLib archives
- added support for snode high power port.
includes changes to
src/gateway/apps/gw-snode.c
 src/gateway/core/xf-pow-snlib.c
 src/gateway/core/xf-power.c
 src/gateway/core/xf-ral.c
 src/gateway/snode/snlib-io.c
 src/gateway/test/test-driver.c
 src/include/snode/snlib-io.h
 src/include/xf-id.h
 src/include/xf-ral.h
- [qsee]: added log file directory option (-G), clear logs function, renamed
log file to include PID
- [qplot]: added PID to output gp.tmp, so that multiple processes can run
concurrently and/or in the same directory

- added [src/scripts/xfsync]: does rsync for one or more archives; part of
replacement for rsync-pub for better separation of concerns. A cron script will
call xfsync and one or more processing scripts (e.g. qsee) separately, and possibly
in parallel for more scalable and efficient data post processing.
- added [src/gateway/rootfs/etc/init.d/socatd-mv0]: system V service init script
to start/stop socat virtual serial port service for /dev/ttyMV0, connected to the
MV converter Matchport terminal server. This version has a placeholder digi device
instead of the deployment matchport device.

2015-04-01 [mvConv update, qsee updates ] kent headley <headley@mbari.org>
- configure.ac: revision [0.75]
- updated [mvConv]: API changes: simplified GF and fan control interfaces
Also affects sysmvc,mvc-dev,test-driver.

- [eps2jit.awk]: updated for msec resolution w. jitter plots, output reformatted
w/ separate header to facilitate automated plotting of jitter stats parameters
- [qsee]: now uses alias for output file in addDelayDataTask
- added [snltest2]: like snltest, but works with multiple sensor nodes; still a little brittle, but working and checked in so tracked.'

2015-03-27 [config file updates, bug fixes] kent headley <headley@mbari.org>
- configure.ac: revision [0.73]
# this version addresses bugs found during benchmark3_4 (system load test w/ all snode ports in loopback)
# there were several bugs introduced by other recent changes, plus a few lingering problems with
# BB IO enumeration. Also, some config file updates were made to fix bugs
- fixed bug [bbone-aio]: unchecked file pointer (and in wrong level of indentation) crashed GW due to NULL file pointer.
- fixed bug [bbone-gpio]: set_act and set_val returning -1 instead of retval
(due to previous structure change). Also restructured get_val to provide better NULL checks and code flow.
- fixed bug [xf-dio-bbgio]: fixed several enumeration problems,
restructured function(s) to provide better NULL checks and code flow.
- fixed bug [xf-dio]: fixed enumeration (missing DIO22).
- fixed bug [xf-power]: fixed enumeration (changes to DIO enumeration hadn't been updated in power).
restructured function(s) to provide better NULL checks and code flow.
- fixed bug [sysgw]: cut and paste error, pow_sn2 reference pow_sn3
- [xf-driver]: reorganized driver callback table
- [xf-pow-aio]: restructured function(s) to provide better NULL checks and code flow.
- [satpar]: added parsing
- [test-snloop]: finally fixed the signal handling, now exits cleanly in all cases (no valgrind errors)
- added [snTerm]: src/gateway/contrib/snLib/test/snTerm.c: snport terminal util.

2015-03-25 [refactor drivers, data stream ID change] kent headley <headley@mbari.org>
- configure.ac: revision [0.73]
- split driver sources into services (sampling API) and drivers (device API).
  Now drivers have <foo>-drv.c,h for device API.
- added snltest: runs snloop, with options
- changed service data stream ids to start at 100 (adjusted config files)
- [qsee]: added alias so that output files may be aliased, so that device/stream id
  need to be specified in only one place.
- [test-snloop]: adjusted return values to be between 0-255 (bitfield indicating which port failed); eliminated segfault on SIGINT, but still have non-critical issue with termination (valgrind reports errors on SIGINT)

2015-03-20.3  [added gw-meh util] kent headley <headley@mbari.org>
- configure.ac: revision [0.73]
- added: gw-meh.c,h: CLI meh utility - switches relays, reads ADC
- [moco,vaco]: fixed file names in doxygen

2015-03-20.2  [updated config files, refactor proxr ] kent headley <headley@mbari.org>
- configure.ac: revision [0.73]
- added: sysmeh.c,h

2015-03-20.1  [updated config files, refactor proxr ] kent headley <headley@mbari.org>
- configure.ac: revision [0.73]
- updated conf files for consistency: dio resource assigments, removed unused driver props (wlen,rlen,dcon_capacity,mode)
- [proxr]: separated into proxr.c (device API) and sysmeh.c (service).
also affects: xf-debug, test-driver, xf-driver, various header files.

2015-03-20  [snLib debug, syssn parsing, svector util] kent headley <headley@mbari.org>
- configure.ac: revision [0.71]
# This version has a series of mods mostly related to debugging an issue in snLib.
- [gw-query-mdp]: renamed to gw-query.c; added svstat output sorting
- [xf-utils]: added svector_t API; routines for manipulating string vectors that enable sorting by column (e.g. for tabular display)
- [snLib.c]: modified/added debug to read/write (use stderr)
- [xf-io]: added defaults to io_parse_snp_cfg()
- [loopback]: added wrdel (delay between w and r), xdel (start skew) properties; removed retries and unused code
- [syssn]:added parser implementation to extract 4-20mA current

2015-03-12  [gwsetup, dio init, snLib update] kent headley <headley@mbari.org>
- configure.ac: revision [0.71]
removed lines to try to set build env; now source src/scripts/buildenv instead
- added [src/scripts/buildenv]: source before configure to set environment
- [bbone-gpio]: bug fix: uncaught NULL in various places; restructured for single return point
- [snLib]: updated contrib (now supports serial IO error checking)
- [xf-dio-bbdio]: bug fix: checks for NULL
- [xf-io]: added io_parse_term (helper to parse only term params from string, e.g. from util command line)
- [loopback]: added snlib error to string function; changed retry delay (75->25 ms); added error reporting
- [gwsetup]:
    added do firmware option (-F): builds dtc, installs and compiles DT overlay sources (.dts files)
    reinstated build distribution (-B)
    copies .profile from xfoce distro instead of writing
    updated xfenv written
    added: udev rule install
    automatically make xfoce ln, simplified message if exists
- [xfenv]: removed message about symlink

2015-03-09  [script renaming] kent headley <headley@mbari.org>
- configure.ac: revision [0.69]
- [bb-show-serial.sh] renamed to bbsn, use bash instead of sh, fixed permission check and terminal formatting
- [cat-gpio]: renamed to catgpio
- [uEnv*txt]: renamed, now uEnv-3_2.txt, uEnv-3_8.txt

2015-03-09  [new utils, service updates, added gpio1_16 support] kent headley <headley@mbari.org>
- configure.ac: revision [0.69]
also added options (commented out) for compatibility with new versions of autotools
- added [gw-snode.c]: CLI util (gwsn) to manage sensor nodes
- [gwdio]: re indexed nodes from 0
- [gw-gpio]: added init for gpio 1_16 (changes system resource indexing)
also affects:xf-dio, xf-dio-bbdio, xf-ral, xf-id
- [gw-query-mdp]: added comments
- [bbone-aio]: re-structured, added comments/debug
- [xf-aio]: in test function, moved set_() code before read tests
- [xf-io-snlib]: re-arranged code (for easier understanding of flow and return values)
  cleaned up debug
- [loopback]: made a number of changes to help debug sensor node return problem;
mostly checking return values in loopback and snLib wrappers. Added input and output
clearing before test. Still in flux.
- [syssn]: removed port power set operation, added syssn_actuate and helper functions
- [uEnv.xfoce-3.8.txt]: renamed part numbers to ensure that they load from /lib/firmware
(if the part name matches DT overlay in the kernel, it is loaded from the kernel)
- [xfoce-init-gpio]: removed 3.2 kernel options, added debug output and gwdio init
- added [gg-show-serial.sh]: read I2C EEPROM and display bbone serial number
- added [gw-rspi]: read and display SPI sensors
- added [gw-snode]: read/set sensor node port power, read sensor node info
- added [catsys]: read some status info and send to console (top, df, dmesg, gq, ls)


2015-02-28  [new loopback service, IO init refactor, misc bug fixes] kent headley <headley@mbari.org>
- configure.ac: revision [0.67]
- added [loopback.c]: loopback service driver
- refactored IO initialization and option parsing in gw-moco, gw-vaco, test-ioport, test-driver.
    Combined duplicate utility and parsing methods into io.c, now used by above.
- [gwsig]: renamed to gwdio; improved parsing, added all option.
- cleaned up some debug/trace noise in various files
- [snLib]: enabled MUTEX macro, added debug
- [xf-io-snlib]:added boolean arg to io_snlib_init_lib to enable snlib debug. also,
  changed return type of fwrite to size_t
- [io.c] added functions (see notes on IO init, above):
    int io_cfg_term(io_port_t *dest, char *device, io_terminal_properties *cfg_terminal) [configure io_port terminal properties]
    int io_cfg_port(sys_resource_id srid, char *device, io_terminal_properties *term_cfg) [configure and initialze io_port]
- [snlib-io]: check node for NULL before trying to close (suppress warning, avert crash)
- [xf-utils]: added function:
    void xtok_release(char **array, int n) [releases xtokenize array memory]
- [test-aio]: eliminated init_snlib, s_init_snode
- [gwcard]: increased root partition size from 1500 to 2500 (MB, may not need)
- fixed bug: conditionals using if(md_level) had wrong variable names (MD_vs MDI_), so didn't work properly
- fixed bug: xf-debug had duplicate entries in map


2015-02-18  [sysgw service configuration/debug, misc bug fixes and updates to config, power logic] kent headley <headley@mbari.org>
- configure.ac: revision [0.67]
- Debug sysgw service, node power actuation and configuration
- fixed date of previous release (2014->2015)
- [bbone-gpio]: initialize char buffer
- [xf-config]: swapped order of configuration (io first); no effect but probably best.
  Added appropriate service resource finders for DIO, AIO
- [xf-gateway]: added AIO,DIO initialization
- [xf-ral]: added missing (new) DIO entries in parse map (string<->srid)
- [xf-wattdog]: now handles according to power policy (was always turning on/off) when service runs
- [sysgw]: added debug/comments, intialize node in loop, fixed bug:actuation loop always operated on node 0; now uses loop index.
- added [conf/sysgw.conf]: gateway config file to test/debug sysgw and provide config example

2015-02-18  [development release 0.67: 3.8 kernel update (w. device trees), new drivers/updates] kent headley <headley@mbari.org>
- configure.ac: revision [0.67]

- a number of updates related to 3.8 kernel, which uses device tree overlays
    to configure pin mux and other peripheral firmware
- added driver [sysmvc]: medium voltage converter, and hardware abstraction wrapper mvcio. uses new parse_specifier_t parsing abstraction, simplifying parsing.
- added driver [mvcio]: medium voltage converter hardware abstraction wrapper.
- renamed: syspow to sysgw
- added driver [syssn]: sensor node status service
- added [xf-adc-utils]: generalized adc property utilities (used in proxr, syssn)
- added [gwsig]: util to read/set snode power, alarm bits
- added [rootfs/lib/firmware]: device tree overlays for xFOCE
- added [oebb/meta-ti/recipes-misc/images/xfoce-prod-image]: production rootfs image 3.2 kernel
- added [scripts/wuntil]: delay script
- added [scripts/cycle/qcycle]: wait until specified time/date, then start cycle
- added [scripts/cycle/qprofile]: run speficied profile (once)

- [bb232io]: renamed (was bb232spda)
- [proxr]: replaced adc property code with xf-adc-utils routines
- [eswv]: pass in dev reference in eswv_props2dev
- [max31855]: changed to stand-alone hardware API; driver is gwtvic or sysgw.
    Replaced uint32 with byte* to pass raw data throughout API.
- [test-driver]: added support for gwrht, gwtvic, sysgw,sysmvc,syssn,max31855,hih6130
    added default macros, static s_cfg_term function, remapped some GPIO for
    3.8 kernel, fixed up snlib initializatino
- [xf-utils]: added TIMEVAL2MSEC2
- [gw-gpio]: added verbose flag, re-mapped IO pinmux for 3.8 kernel and updated
    GPIO initialization
- [bbone-gpio]: added gpio_xprint method that takes verbose flag
    (or not for terse output)
- [bbone-aio, bbone-gpio]: updated sysfs paths for 3.8 kernel, cleaned up (single retval pattern)
  structure of a couple of functions.
- [snLib/sensorNode.h]: added some #ifdef gaurds to prevent double definitions for
  MBool, Errno and BlinkyState
- [xf-aio-bbaio]: comments, replace printf w/ MDEBUG calls
- [xf-aio-snlib]:check device name, don't bother if name or empty name to avoid
    "device string is empty" warning from libmodbus
- [xf-dio-bbdio, xf-dio]: added new GPIO, updated initialization, re-mapped for 3.8 kernel,
    replace printf w/ MDEBUG calls
- [xf-io-rser, xf-io-snlib, xf-io-stub, xf-pow-aio, xf-pow-dio,xf-pow-rser,
xf-pow-snlib, xf-pow-stub]: replace printf w/ MDEBUG calls
- [xf-power]: remapped resources for 3.8 kernel
- [xf-io]: removed obsolete declarations, added functions to get speed, parity,
    and device (path)

- [debug]:added support for several IO modules
- [driver, debug, test-driver, etc.]: support for mvcio/sysmvc,
    gwrht/gwtvic, sysgw, syssn
- [qsee, rsync-pub]: changed plot window (-l) semantics: now takes nH or nM to indicate minutes or hours (uses hours if unspecified)
- [gwcard]: added config for Angstrom 3.8 (v2014-06) build, add TAR cfg options (xz, bz2, e.g.)
- [gwsetup]: fixed date check
- [xf-init-gpio]: updated for 3.8 kernel (DT or NDT mode options for w/ w/o device trees)
- [uEnv-xfoce-3.8.txt]:updated for 3.8 kernel device tree overlays

2014-12-10.9  [dev release 0.65] kent headley <headley@mbari.org>
- configure.ac: revision [0.65]

2014-12-10.8  [stable release 0.64] kent headley <headley@mbari.org>
- configure.ac: revision [0.64]
- stable release
    - xfhome script renamed xfenv
    - XF_HOME renamed to XFHOME (for easier keyboarding, especially mobile platforms)
    - swfoce-web foce website, including quarc archive query web interface
    - config file option for gw-run takes arbitrary path (no longer constrained to XFHOME/conf)
    - configuration moved to separate repo (xfoce-conf)
    - updated plot scripts support PNG,PDF output
    - several new/updated drivers [proxr, analog, eswv/bb232io, satpar]
    - new valve control util (vaco)
    - build cleanup, file cleanup
    - updated README

2014-12-10.7  [fixing build] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- forget obsolete conf and remove from Makefile

2014-12-10.6  [fixing build] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- add boostrap script

2014-12-10.5  [fixing build] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- removed src/tmp from Makefile.am (top level)

2014-12-10.4  [fixing build] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- remove src/tmp
- add src/www/Makefile.am

2014-12-10.3  [forget obsolete files] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
! conf/qfoce/record.json
! conf/qftest/cron-qfoce
! conf/qftest/cron-qftest
! conf/qftest/crontab-fangtooth

2014-12-10.2  [forget obsolete files] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- forget obsolete:
R conf/anonymous.cfg
R conf/gateway.json.orig
R conf/lftest.conf
R conf/xpres_example.conf

2014-12-10.1  [rename XF_HOME XFHOME] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- renamed XF_HOME to XFHOME

2014-12-10  [arbitrary config path, restored proxr code] kent headley <headley@mbari.org>
- configure.ac: revision [0.63]
- [xf-config]: no longer uses XF_HOME conf for all config files; user must specify full relative/absolute path
- [proxr]: restored code that had been commented out for test/debug
- [xf-utils.h]: added FILE_RSEP const "." for relative path separator

2014-12-09  [analog driver update, new plotting features, valve control util, remove config] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- [xf-gw-vaco]: updated DAC config, added separate (linear) calibration for
  tranceiver board scaling.
- [analog]: bug fixes and updates after initial hardware integration test
- [bb232io]: bb232_dac_cmd() uses BB232_RANGE_LOW throughout, instead of
  adjusting based on voltage argument. Also, noted that ch 0 vref is internally
  fixed to 5V
- [proxr]: relay board driver,
    - fixed several bugs: AD command macros, 8/10 bit ADC scaling, etc
    - added actuation method
    - renamed type px_state_t proxr_state_t
- [analog]: misc implementation updates
- [test-driver]: fixed bug in syspow test (AIO resources mis-indexed)
    - added test for analog driver
    - added new s_generate_driver method w/ device properties arg (wrapped by old s_gen_driver)
    - updated/debugged proxr relay board test (macro tests, driver API test)

- [eswv]: added separate (linear) calibration for tranceiver board scaling.
  Renamed cmdc2pos->cmdctocmdv, and which now passes in vref_dac and returns
  command voltage feedback.
  Callers must apply appropriate calibration
- [snlib-io]: changed SNAIO_VREF from 1.8V to 3.0V; SNAIO_BITS from 12 to 16
- [qplot, qsee]: added support for PNG output to improve processing time and web performance
- [swfoce-web]: added options:
    - tgz or .zip output
    - custom data file suffix names
    - keep/not individual data files

    shortened individual file names (now not unique)

- [sensorNode.h in snLib]: added include for int types, added A/D channel info
- Makefile.am updates: distro includes
- adding several conf files for single instrument testing/operation
- misc debug edits
- removing deployment config from main repo
- added src/www/swfoce-web
- created separate repo (https://klheadley@bitbucket.org/klheadley/xfoce-conf) for configuration version control
    - removed (hg forget) deployment config from xfoce repo

2014-11-26-1  [snpow script] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- added snpow script
- added misc scripts: src/gateway/contrib/mksnliba (manual build snlib), src/scripts/quickset(shortcut for building qfoce data sets)

2014-11-26  [snlib update, new swfoce-web, bug fixes to valve control and xpres] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- [xf-driver]: added BB232 to driver impl map
- [xf-io-snlib]: removed cruft, replaced w/ comments
- bug fix: responses from devices through snode are truncated. Due to inconsistency between flush/drain semantics in app and snLib.
  Changing io_ api and underlying implementations to use a clearer convention:
  - iclear, oclear: discards characters pending in stream
  - idrain, odrain: waits for input/output to complete
  - fflush: force immediate output
  - installed updated snLib
  - affects most drivers
- [gw-vaco]: bug fixes (fixed snport init), added -P option to cycle snport power before startup, added s_init_sensor_node
- [gw-xpres]: bug fix: broken comment processing.
  - added foundation for -H (define header) option, increased line buffer length
- new: added swfoce-web
- new: added conf/record.json: doesn't do anything yet, but may be used as part of parsing/header generation

2014-11-12-3  [rename xfhome script to xfenv] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- [xfhome]: rename xfenv (missed files)

2014-11-12-2  [rename xfhome script to xfenv] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- [xfhome]: rename xfenv

2014-11-12-1  [cycle script renaming] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- [cycle scripts]: name changes (no mixed case, shorter)
	src/scripts/cycle/readProfile -> src/scripts/cycle/rprofile
	src/scripts/cycle/xcycle -> src/scripts/cycle/xcycle-start
	src/scripts/cycle/stop-cycle src/scripts/cycle/xcycle-stop
	src/scripts/cycle/runProfile.xc -> src/scripts/cycle/xprofile

2014-11-12 [snlib-io updates/bug fixes, qsee/qplot update, xcycle update] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.63]
- bug fix [devicecraft]: DCY parsed as uint16, changed to int16
- added: src/scripts/cycle/stop-xcycle (ends xcycle script and/or stops motors
- [xf-io-snlib]: io_drain calls snlib_iflush (empties input buffer) instead of snlib_drain (empties output buffer)
   fixed bugs in io_snlib_readto; changed return value/NULL checking style.

- [test-driver]: added s_init_sensor_node, added/fixed sensor node initialization, added post-test io shutdown block
  added snp_index to config
- [test-snode]: added debug flags cmdline option, MDEBUG style debug, refactored/improved power testing

- [snlib-io]:changed snlib_get/set_pown to snlib_nget/nset_pow; added snlib_iflush (calls snSerIFlush) 
- [satpar]: various bug fixes and refinements (still in development)
- [dpi16]: added range/type check in dpi16_input_str, changed reset value and changed constant to macro
- [devicecraft]: scanf format, debug   
- [xf-io-term]: added ferror/feof handling, debug to io_readto
- [xf-io-rser]: added debug to io_readto
- [xf-debug]: added MDEBUG support for various xf IO modules
- [xf-aio]: changed printf debug to fprintf
- [xf-aio-snlib]: changed printf debug to MDEBUG
- [snLib]: added debug code to snLib (proto)
- [qplot]: support for whitespace datafile separator, renamed DEBUG to QP_DEBUG; changed default
  gnuplot (newer version 4.6+ installs in /usr/local/bin instead of /usr/bin). gnuplot 4.6+ needed
  to support msec time format. 
- [qsee]: updated qsee configuration input scheme. Instead of redirecting stdin from config file,
  now name config file using -f option. qsee reads and stores command line options, then sources
  config file using env option to pick up environment overrides, then processes config file, then
  processes command line (so that command line options override config file)
  added generic capability to add/order tasks, include arbitrary tasks (e.g. intermediate processing scripts)
  Now creates a task stack and then executes it; added test mode to print tasks instead of executing them
  
- adding/updating/fixed plot config files and qftest conf directory to support new qsee and qplot updates. 
- [profile-qfoce.csv]: added new motor test profiles
- [runProfile.xc]: added start delay option;


2014-10-08 [added satpar driver] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.61]
- [satpar.c,h]: Satlantic PARSER driver initial checkin; loopback tests OK, not tested w/ instrument.
  Support added in usual files: xf-driver, xf-debug, xf-id.h, xf-types.h, xf-names.h, test-driver
- [xf-types.h]: renamed char constant SP to SPC

2014-10-06 [xpres time formats, gwsetup, oebb for 3.8 kernel] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.62][skipping 0.61; see notes]
- [xf-driver]: driver_resource used index<0 instead of >= 0 (amazing that worked at all)
  Also, added SPI resource to switch statement in driver_resource_entry().
- [gw-xpres]: now using time formats ftu and ftl to indicate formatted timestamps using utc and local time. utm is still supported.
   If no format string is provided, the default format is used.
- [configure.ac]: added configuration for 3.8 kernel on bbone; updated location of modbus header (be aware of this if the build breaks)
- [ral.h]: started enum RT_IO=0 expicitly (was implicit)
- [xf-types.h]: defined some control character constants (CTRL_R, CTRL_C, CTRL_A, CTRL_S)
- [syspow]: added debug code
- [eswv]: comment change
- [src/scripts/Makefile.am]: added eps2jit.awk to distribution
- [gwsetup]: added -b option to skip build step (still unpacks distro and configures environment)
- [qplot]: changed point size default, moved key location, added set key options to color key text to match plot color
- [xfoce-init-gpio]: added some options (commented out) for 3.8 kernel, added error code output that accumulates errors and returns a bitfieldß
- added open-embedded recipes and uEnv.txt for 3.8 kernel oe (yocto compatible) build 
- NOTES: 
* autoconf version changed on development system, causing the build to break on deployment systems. 
Have upgraded autoconf 2.63->2.68, new dists should build cleanly.
If not, may need to clean up as follows (in xfoce dist build directory):
 libtoolize -f
 aclocal
 autoconf
 autoreconf
 automake --add-missing
 
* Starting w/ this release 0.62, development releases will be odd, releases will be even. We'll check in this as 0.62, then bump the revision to 0.63 in configure.ac

2014-09-23 [driver name/function lookups] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.60]
- [xf-driver]: removed old scheme to manage device-specific ops
- [xf-driver]: combined type:name mapping and callback lookup data into driver_iinfo_t table. This eliminates the name
  lookup map_entry_table, and the switch statements in the callback lookup functions. It also makes a single place
  to register names and callbacks for all driver types.
- [xf-properties]: renamed set_devprop_callback_fn prop_validate_func
- [hrph]: updated function signature for devprop parse function (takes props_t)

2014-09-22.1 [bug fixes(eswv,analog,driver)] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.59]
- bug fix [xf-driver]: removed duplicate topic processing (created memory leak when svc properties requested)
- bug fix [eswv, analog]: devprop processing macro used while(0){...} instead of do{...}while(0) (never runs, properties not processed, not returned by gq)
- bug fix [eswv, analog]: some property names used '.' (e.g. "ch0.fmt"), which interferes w/ property parsing; replaced w/ '_'
- [bb232io.h]: removed duplicate defines

2014-09-22 [analog driver, valve control app] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.59]
- added application vaco [gw-vaco.c]: stand-alone valve control application.
- added driver analog [analog.c]: driver for (up to 8) A/D channels. May use multiple instances to group related A/D channels as a single device.
- [xf-io-term]: io_term_release was not returning a value.
- [xf-io]: implemented retries on device open.
- [xf-utils]: implemented popcount functions to count set bits in a bitfield.
- [gw-moco]: minor cleanup, comments
- [bb232io]: added functions to set analog voltage as counts, moved some macros to header file.
- [eswv]   : added set_valve_counts, NULL checks on release of token resources
- [syspow] : simplified actuation logic, implemented (missing) return value from actuate, renamed action/property constants

2014-09-17 [pin mux updates, eswv driver] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.58]

- [xfgpio service (rootfs)]: now calls xfoce-init-gpio (see above) instead of gwgpio
  moved systemd service xfgpio.service action to new script (xfoce-init-gpio) to init pinmux for uart4,5 post-boot; the mux configs for these
  were being clobbered after being set via uEnv.txt

-added script: cat-gpio Dumps beaglebone gpio configs to stdout

- [gwgpio.c, bbone-gpio.c]: made numerous initialization changes, bugfixes, and
  added configuration to enable an initial pulse (e.g. to put latching relatys in a known state).

- updated pinmux xlsm binary

- [xf-io-*]: added io_readn that reads a number of characters from a specified port. Useful for implementing
  binary protocols.

- [xf-xvalue, all drivers]: xval_release was same as xval_destroy; implemented as wrapper.

- [xf-properties]: changed signature of <module>_set_devprop to include props_t reference. This is to enable a driver to add 
  per-instance properties to the to the driver device properties that are not exposed in the user configuration space.
  E.g., eswv has a device configuration object stored as an xvalue XVT_BINARY property, which reflects a set
  of properties that may be set by the user. The driver must create the object if it doesn't exist, and validate/update the
  object whenever set_device_property is called.

- added script: xfoce-init-gpio: initializes pinmux values at (post-)boot time that can't be set pre-boot. Also initializes
  GPIO direction/level/value using gwgpio.

- added driver: esvw.c controls (2) enriched seawater (ESW) valves through a BB 232SPDA IO module. The driver for the 232SPDA
  is defined in bb232io.c,h. Support included in xf-debug.h, xf-types.h, xf-names.h, xf-id.h, driver.c

- added pinmux configs (in scripts): uEnv.xfoce.txt, uEnv.barebb.txt (xfoce gateway H/W, bare bbone H/W)

2014-08-27 [gwcard, gwsetup, gwgpio] kent headley <headley@mbari.org>
- [gw-gpio.c]: fixed indexing bug (chip 0 pins not initialized). Changed initialization to match hardware rev
- [gwcard, gwsetup]: fixed a few minor bugs, added some initialization to gwcard (previously done by gwsetup).
   Added uEnv.txt support to gwcard (uses version in rootfs/u-boot/MLO path).
   Reduced options on gwsetup. 
- added src/scripts/uEnv.txt: overrides pinmux in u-boot by passing kernel arguments. The pinmux settings may be seen
  in /sys/kernel/debug/omap_mux; the value passed to the kernel is in /proc/cmdline (parameter is omap_mux).
- added doc/gateway/pinmux-config.xlsm: documents pinmux configuration and generates omap_mux parameter string used in uEnv.txt.

2014-08-19 [gpio util bug fixes, dpi16 (omega temp) driver] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.57]
- fixed missing header (dpi16.h) in makefile
- [gw-gpio.c]: remapped gpio pins to reflect hardware changes:
	2.07 -> 1.14 NODE_1_OFF
	2.06 -> 1.15 NODE_1_ON
	2.09 -> 1.12 NODE_2_OFF
	2.08 -> 1.13 NODE_2_ON
	2.11 -> 1.13 NODE_3_OFF
	2.10 -> 1.12 NODE_3_ON
	2.13 -> 1.07 NODE_4_OFF
	2.12 -> 1.06 NODE_4_ON
	- removed pin 1.3 from initialization
	
- bug fix [bbone-gpio.c]: active levels shown in gpio_print incorrect due to logical inversion of active_level sense.
  Also, noted that the value obtained from sysfs depends on active_level; so, added a physical state output
  that reflects the actual physical state of the pin, regardless of active_level.
- [xf-driver.c, test-driver.c]: added dpi16 support
- [dpi16.c,h]: functionally complete driver w/ minimal parser to enable distribution of temp value. Added methods for making configuration
   human readable.
- added one.conf, a single-instrument configuration for testing new instrument drivers.

2014-08-18 [fix repo clone, check in dpi16 driver skeleton] kent headley <headley@mbari.org>
- [xf-log, xf-sysfile]: made more consistent idump functions, changed dump functions to wrap idump.
- fixed file name case difference that breaks repo build
- added type and debug support for omega dpi16 temperature sensor
- added driver skeleton for omega dpi16 temperature sensor

2014-08-17.1 [update driver header file doxygen comments] kent headley <headley@mbari.org>
- [xf-log, xf-sysfile]: made more consistent idump functions, changed dump functions to wrap idump.
- brought driver header file doxygen style to match style used in core headers
- updated _device_op signature and param list to reflect current use
- removed old standard cruft and added terms of use

2014-08-17 [archive lib, log API] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.56]
- added xf-archlib.c,h: archive indexer/reader API
- added test-arch.c: runs unit test for xf-archlib
- added undup: script to remove duplicate CSV records from a file (used for OSDT collaboration)
- [xf-logutils.c]: changed log_open and log_close signature and behavior. Takes FILE ** instead of FILE *.
  NULLs log file pointer on close, returns existing file pointer if exists on open. 
  added log_mkname().
  added log_suffix().
- [xf-sysfile.c]: updated per changes to xf-logutils. 
- [xf-log.c]: updated per changes to xf-logutils. 
  Changed several dump methods to idump (indented dump format), using stderr instead of stdout.
  Made more consistent use of default return value (retval)/arg checking.
- [gw-gist, gw-xpres]: updated per changes to xf-logutils. 
- [test-driver.c]: added list option to list drivers supported.
- [bash-script.sh]: added description template to print w/ help

2014-07-28-1 [v0.55: dist fix] kent headley <headley@mbari.org>
- removed (redundant) bashScript.sh from doc/examples

2014-07-28 [v0.55: sampling interval bug fix, plotting updates] kent headley <headley@mbari.org>
NOTE: actual date of v0.54 2014-07-08
- configure.ac: increment revision [0.55]
- bug fix [task]: sample interval stable, but different from nominal. Sample worker 
  task timer counter was not being updated while sampling, causing the time interval 
  to extend by the actual sampling time. Now updates task timer during sampling (holds at zero).
  If the time is up following a sample, the task should run again immediately.
- [xpres]:implemented new output element (epf) to aid in plotting data. epf returns the fractional portion
  (i.e. 3-digit msec) of the timestamp. Gnuplot supports fractional seconds for the %S specifier, so using
  the timefmt %Y-%m-%d %H:%M:%.3S makes it possible to plot timestamps more precisely (and enables
  sample jitter plots with msec precision).
  Also added sequence number filtering  
- added eps2jit.awk: much faster than using bash for floating point jitter calculations, which requires
  very s-l-o-w and clumsy calls that invoke many shells.
- update qplot [maintained separately]
- update qsee: added support for multiple jitter plot specs and combination plot specs
- [xf-types.h] added XF_MIN_SEQUENCE and XF_MAX_SEQUENCE defs 
- minor changes to bash-script template (removed arg example, changed verbose option to lower case)

2014-06-11-1 [v0.54: bug fixes, gq svstat, deployment config locations] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.54]
- bug fix [xpres]: -t option didn't provide expected filtering action. Added filter list.
- feature [gq]: added source ID to gq svprop output
- added/modified several quick plot configurations (for qFOCE)
- added eps2jit (converts a list of timestamps to CSV timestamp,delta)
- rename qf-lshow.conf qf-xpres.conf
- moved deployment-specific configs (qfoce, qsee) to directory under conf

2014-06-11-1 [v0.53:fixed dist] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.53]
- fixed: qplot not in distribution

2014-06-11 [v0.53:script updates, io error message changes, removed fake data generators] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.53]
- [xfhome]: fix path to include qsee
- [skim]: add stream id to skim
- update qplot (help message) 
- replaced fake data generators with error messages (except ersatz); all would generate fake streams when no port was available.
  For now, these will be downgraded to DEBUG messages, so they don't fill the (stdout) logs when no instrument/port is connected.  
- moved rbuf creation/destruction in several older drivers (creating when used) to reduce number of places to release memory.
- bug-fix[sbe19]: found potential memory leak (see rbuf change)

2014-06-10 [v0.52:linfo, llast renamed (gist, skim)] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.52]
- renamed lshow to gist (gw-gist.c)
- renamed motor-control.c to gw-moco.c
- renamed llast to skim
- bug fix [llast/skim] - help message typo, -d (arch) option broken

2014-07-2014 [v0.51: qsee, qplot updated parsing] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.51]
- improved command line parsing for qplot, qsee (and bashscript.sh).
  Now better handles config files, and uses command line args to 
  override config file options.

2014-06-06 [xcycle, qplot, xpres (log-show rename and bug fix)] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.50]
- implemented skip_interval in xpres.
- renamed log-show.c xf-xpres.c
- introducing beta versions of 
  qplot (plot generator, maintained separately)
  qsee (batch plot generator, maintained separately) 
  xcycle (script looper, maintained separately)
- bug fix [xpres]: specifying -t option causes specified formatting to be ignored
  

2014-06-03-1820 [version rev, qf.conf] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.49]
- updated qfoce.conf

2014-06-03-1800 [sbe18s zero pH on no TREF] kent headley <headley@mbari.org>
- xrun: now logs to specified log directory instead of tmp
- sbe18s : now returns pH and tref =0.0 if no tref is available

2014-06-03 [sdclient, gq/service bug fixes, qplot, xcycle] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.48]
- [sdclient]: downgraded error message to debug when clone returns NULL.
  NULL is a valid response, and messages fill up log.
- renamed lshow to xpres (express/present xfoce logs)
- gw-query-mdp: added sort ascending/descending for simple formatter. Also,
  reconfigured some output to use MDEBUG, etc.

- bug-fix[gw-query-mdp]: duplicate/missing entries when getting properties.
  problem was that the max_key_len was setting the key list next pointer,
  causing it to wrap. Set zlist_first() just before iterating and all is good.

- added qplot to scripts [qplot is separately maintained]
- added xcycle and related files to scripts/cycle [xcycle is separately maintained]

- bug-fix[xf-svc-config]: added NULL checks to prevent crashes on invalid queries


2014-05-30 [gw crash,set sample period, and other bug fixes, llast script] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.47]
- dreactor.c  : removed debug output (dcon dump in gw stdout log)
- log-show.c  : removed debug output (diagnostic message in lshow output)
- xf-log.c    : removed debug output (header dump in lshow output)
- new script  : llast dumps most recent data from a device data log.
- bug-fix[dcraft.c]: gateway crashes when NULL value causes segfault in strstr
- bug-fix [gateway, driver,config]: could not get/set worker properties (name, period).
  These were not completely updated to reflect multiple workers after earlier 
  version changes. Now properties support multiple workers.
- bug-fix[ersatz]: monotonicity errors showed up in log b/c of a duplicate stream ID
  i.e.it was logging type 402 as 401 AND logging another 401 packet at the same time.
- bug-fix [gq]: simple formatter output duplicate keys. Turns out that zlist may wrap at
  after the last key; added counter and check vs zlist_size() in simple_formatter
  to ensure we don't wrap.
- TODO list items from this file moved to Jira

2014-05-27 [multiple driver tasks, syspow driver, digicfg] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.46]
- new feature: now may configure multiple driver tasks (with different periods).
  This is useful, for example, if you need to turn on a pump that keeps getting turned
  off by the instrument firmware :o), or if there is a need to do a calibration sample.
  For now, actuation tasks are limited to one per task, but this may change.
  Updated config files to use new worker task syntax.
- changed name of actuate command from SETA to ACT  
- new script: digicfg (more fully featured version of xdigi). Exposes more driver operations.
- new driver syspow.c,h
- restored ersatz parser (using new style introduced in v0.43
- bug-fix: restored sbe18s tref via sdclient (had been commented out while sdata was being deprecated).
  now uses dcon
- bug-fix: fixed dcraft parser - broken in several ways (endless init loop, mem leak...)

2014-05-15 [SPI support, new max31855 driver, parsing, power config] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.45]
- [xf-dreactor.c, xf-driver.c, xf-config.c]: dreactor now calls (new) device_parse() function,
  instead of using a handler callback in the sprule (stream processing rule).
  Reorganized functions in source file(s).
  
- added max31855 SPI thermocouple driver, added test to test-driver
- [config, gateway, power]: implemented power port configuration via config file
- added/debugged SPI resource support in config file and in drivers
- [error.c] : added dump function
- xf-spi, xf-spi-bbspi: used xf-debug instead of printf for many debug messages

- bug-fix[test-drv.c]: dtype and io type swapped in config initializer (main())

2014-05-13 [serialization update, bug fixes] kent headley <headley@mbari.org>
- configure.ac: increment revision [0.44]
- configure.ac: set default environment for configure 
- serialization and structures formats (xvalue, xhash, data_container) changed, using explicitly sized types
  (e.g. uint32_t) for 32/64 bit interoperability. Also, made consistent use of size_t
  and made serialization API signatures consistent across modules.
  
- deprecated sxvalue_t; use xvalue_serialize().

- bug-fix [subc, sdc]: serialization between 32 and 64 bit machines wasn't working. Changed
  serialization formats and methods for better portability. The floating point serialization 
  could be more portable (relies on standard sizes for double), but should work for now.

- [test-dcon.c, xf-data.c,h]: added unit test for data_container
- [zmq-client, zmq-server]added command line args to choose endpoints at run time

2014-05-12 kent headley <headley@mbari.org>
- configure.ac: increment revision [0.43]

- xf-data.c: Added type information to data_container_t and sdata (serialized data_container).
  A short unsigned holds two unsigned bytes. The least significant byte indicates the data type,
  the most significant may indicate a binary type (for structs). 
  Added tid_...() methods to get and set type_id fields. Declared (#define) constants for type values.
  Added method to convert data fields to strings.
  Eliminated capacity member variable from data_container_s.
  Changed type of data member from (void *) to (byte *).
  Changed dcon/sdata CTOR signatures to take type.
  
- sbe52mp and other drivers: 
  Drivers and parsers now use typed data containers. 
  Parsers no longer need to wrap data in a serialized xvalue. 
  
- bug-fix [log-show.c]: not skipping non-printables; logical OR should have been AND


2014-05-09 kent headley <headley@mbari.org>
- parsing revision: changed signature for service parser functions. previously returned linked list of data containers containing strings.
  now return array of data containers containing (serialized) xvalues.
  Example parsers implemented in sbe52mp and dcraft drivers, showing how to use the convenient new combination
  of xsvalue, data container no-copy ctor, and xtokenize utility (and test-xtok)
  
- xvalue.c: 
  xvalue now uses xf_alloc (reference counted allocation).
  Added sxvalue_t, a serialized xvalue object. It is like xvalue_t, except that it doesn't have 
  a byte pointer, and the data is contiguous with the header. 
  There are malloc and xf_alloc constructors, with variants for typed and variable size (string, binary) types.
  Together, with the no-copy dcon constructor, it is easy to create parsed data objects, which consist 
  of an sxvalue_t wrapped in a data_container.
  sxvalue_t has the same operators as xvalue_t (except set), and it is convenient to work with these
  exclusively, if you don't need arrays of objects (could use arrays of sxvalue_t pointers).
  The serialize method for xvalue_t is greatly simplified by using sxvalue_t.
    
  changed size member type from off_t to size_t
  Added xvalue_sizeof()to return total size (struct+data). xvalue_size() still returns size of data. 
  Added serialization operations to test function.
  Removed modification time member
  
- data.c: added no-copy constructor that accepts xf_alloc'd data
  Added a new no-copy constructor, which takes ownership of a contiguous block of xf_alloc'd 
  data, instead of copying.
  added dcon_release_array to release an array of data_containers

- dreactor.c: modified per new parsed data scheme (array of data_containers)

- driver.c: added driver_type and driver_instance convenience methods
  
- xf_task.c: added xftask_nstart, which takes name arg, and prints thread name to stdout; called by gateway, logger, jobq, psclient/server,
  sdclient etc.
  bug fix: Added logic to skip service if already running 

- xf-utils.c: added xtokenize, which accepts a delimited string and returns an array of (malloc'd) strings.
  This is useful for writing parsers (see also sxvalue_t and the dcon no-copy ctor)

- xf_log.c: updated header dump formatting

- log-info.c: more formatting changes (cleaned up header dumps)
- bug fix [xf-buffer.c]: vsnprintf with NULL/0 args fails on 64-bit; fix with ap_copy (appeared earlier in xf-logger.c)
- bug fix [gateway.c, mdp_client.c]: services would hang after random intervals, from min to hrs. when a mdp_worker returns a message for device_svc,
  the device_svc must handle the request before the worker client times out, otherwise, the worker is disconnected from the broker, and it leaves 
  the client (in sample_worker_action) hanging, waiting for a reply. The solution is to make mdp_client poll instead of block. If no reply is received
  before some timeout, the client can reconnect to the broker.

- xsvc: added aliases for command names (to make shown name consistent)
- configure.ac: CHECK_HEADERS

2014-05-06 kent headley <headley@mbari.org>
- bug fix[xf-sdclient.c]: services would hang when there was more than one calling sdclient_get. 
  Caused when clone_get violates send/recv order on pipe to agent.
  Added mutex in sdclient set/get calls to ensure exclusive access.


2014-05-05 kent headley <headley@mbari.org>
- log-info.c: minor output formatting (line spacing)
- log-show.c: added support for iso time format (mnemonic "iso"), and printable ascii data (ignores ascii control chars, mnemonic "pas")


2014-04-28 kent headley <headley@mbari.org>
- configure.ac: new revision [0.42]
- xf-svc-device.c, gateway.c, gq-: added type frame to GETD, GETM, GETL
- xf-driver.c: added/changed debug (see also bug fixes)
- bug fix [driver.c, config.c]: key mismatch caused some parameters not to be found, depending on lookup.
  Use fully qualified keys in driver properties during configuration and consistently across lookup functions.
  Was using driver_prop() to generate keys, which consists of (qualified) topic only; now uses xkey_device_key(),
  which contains path+qualified topic
- bug fix [xf-properties.c:propse_set]: some property entries (service status) not being released.
  do set_freefn before update, otherwise, existing entry may not be released
- bug fix [xf-svc-config.c]: mem leak; set hash freefn for status_hash before releasing

2014-04-25.1 kent headley <headley@mbari.org>
- decrufted deprecated code from vfile, xhash.
- removed misc cruft (actuation code from config.c, proxy code from gateway.c
- moved deprecated proxy files to scraps:
  gw-query-fmq.c
  test-gwproxc.c
  test-gwproxs.c
  xf-proxcli.c
  xf-proxcli.h
  xf-proxsvr.c
  xf-proxsvr.h
- started plumbing in some missing configuration properties so they are accessible 
  via gq...more to do.

2014-04-25 kent headley <headley@mbari.org>
- added post_ttl (time to live) parameter to sprule (stream processing rule).
  shared data streams expire after ttl seconds, after which the sdclient_get 
  requests will return NULL until the value is refreshed.
- brought mdp_broker, mdp_worker, and mdp_client into gateway (src/gateway/contrib/zmq/mdpb).
  This was done b/c libmdp has hard-coded heartbeat intervals that don't work for slow sampling rates.
  In addition, we may want to make these run-time configurable, integrate the broker into the gateway.
  or make other mods. Plus, it eliminates a library dependency (downside, we maintain the code)
- pubsub client: now takes multiple topics, and filters using strncmp (so can show multiple (and/or match partial) topics)
- xsvc: removed xtrim, added sbr (service broker)
- fixed bug: memory leak caused by NULL rbuf in sbe52mp. Probably not in previous release(s). 
- deprecated use of vfile
- deprecated xhash_t, removing much of the xhash API. Now just use zmq zhash_t, with remaining xhash API providing
  hash utilities, such as serialization, key sets, special operations, console dump, etc.
- NOTE: though vfile and xhash are deprecated, this snapshot contains commented-out code sections, and 
  an intermediate typedef zhash_t xhash_t. Compiles and runs, but checking in as a rollback point.
  Will follow with de-crufted version.

2014-04-21 kent headley <headley@mbari.org>
- configure.ac: new revision [0.41]
- major revision of configuration and proxy functions
- introduced majordomo protocol service broker/handlers for configuration and device ops
- eliminated proxy based on fmq_server and fmq_client
- eliminated configuration values from gateway xhash instance (still use as key index)
  i.e., all configuration exists in only one place (the structs created by config).
- deprecated fmq and related components (proxy, proxcli, proxsvr)
- compiling C99/GNU99 (via AC_PROG_CC_STDC macro in configure.ac), fixed resulting warnings
- fixed issues for 64-bit build
- added zmq majordomo protocol lib (libmdp) to dependencies
  libmdp is available here: https://github.com/zeromq/majordomo 
- reorganized zmq code directories (clone, mdp, fmq (deprecated) now in separate directories, added include dir)
- renamed (fmq-based) gw-query.c to gw-query_0.c, added new gw_query.c (based on mdp)

2014-04-10 kent headley <headley@mbari.org>
- xfhome: now uses pwd as default XF_HOME
- gw-logr: debug/comment statements

2014-04-08 kent headley <headley@mbari.org>
- bug fix [xf-task.c]: sometimes the gateway would hang on shutdown, after signaling the first
  sampling worker thread to stop. Inserted checks of the xftask interrupted member during
  wait_worker (sem_trywait/sem_wait) to bail out if interrupted.

- added gw-logr.c: stdout,stderr log manager. Reads from stdin/pipe, creates managed logs 
  with segmenting, rotation. Use multiple instances to implement separate logs for stdout, stderr.

- added src/tmp: for files that are experimental, not part of main distribution, but still need
  revision control. [affects top level Makefile.am, configure.ac]
  
- sbe18s, sbe52mp: added debug messages

2014-04-02.1 kent headley <headley@mbari.org>
- configure.ac: new revision [0.40]
- changed signature of prule post and pub functions; they are now symmetric and
  take a prule, topic and data-container. The topic is redundant in most cases,
  since the prule contains a post/pub topic, but other components that publish data
  may not have/use a prule to pub/post data. This also eliminates the need for
  dreactor to maintain a special pub socket. 
  Files affected:
  xf-data.c,h
  xf-dreactor.c
  test-dreactor.c
  
 
2014-04-02 kent headley <headley@mbari.org>

- added xf-psclient.c,h: easy-to-use pubsub client. may be configures as subsciber and/or publisher.
  sub client may be used in either an asynchronous mode by configuring it with a message handler; a separate
  thread managed by psclient receives messages and passes them to the handler. In synchronous mode, the
  user calls psclient_sub_recv in the foreground thread. The subscriber may apply (string) filters that 
  use the first frame of the message as the key. Clients may use multi-part messages, as long as they can use
  the key to differentiate message types and handle the data appropriately; psclient in general uses
  zmsg_t throughout. 
- added test-ps

- gateway.c, data.c: gateway now has a psclient_t instance, and the prule pub method in data.c now
  uses the psclient to publish data in a simple key:value (pub_topic:sdata) format. This eliminates the
  need for the xmsg_t class.

- xf-xmsg.c deprecated (replaced by xf-psclient.c)
- xf-psclient.c deprecated (replaced by gw-subc.c)

- replaced ps-client.c (client now uses xf-psclient, previously used xmsg)

- renamed gw app sources related to pub sub: 
  ps-client.c->gw-subc.c:subc (note that now gw-subc uses psclient_t)
  ps-server.c,h -> gw-subs.c,h:subs
  ps-launch.c -> gw-pslaunch.c:subs

- bug-fix:[configure.ac, various Makefile.am] - fixed problems that were breaking bitbake build. 
  In this configure.ac, included empty case for bitbake architecture so that oebb could configure its own environment.
  The existing case for beaglebone build is preserved, so it can be built on the target.
  Also, some of the data_x_DATA entries in several Makefiles were breaking oebb do_install. They were not 
  specifying a sub-directory, so files with the same name would try to overwrite each other in /usr/share.
  Now correctly creates subdirs for these.
  
- somehow, qfoce.conf was not in the repo; added now

2014-03-31 kent headley <headley@mbari.org>
- configure.ac: new revision [0.33], added some environment for trying to cross-compile.
- bug: some of the definitions for setting up the compilation environment in configure.ac 
  break the bitbake build. If needed, removing these from configure.ac will allow bitbake to build.
  This version *should* build under bitbake.
- xf-config.c: implemented module-level debug setting via gq;
- added SPI device support. Each SPI device has a node on /dev (/dev/spidev<bus>.<chip_sel>). SPI bus enumerations
  are 1-indexed (devices on spi0 -> spidev2.x). In this rev, only spi1 is supported. 
  New files:
  - bbone-spi.c,h
  - xf-spi.c,h
  - xf-spi-bbspi.c,h
  - test-spi.c
  - beaglebone-xfoce-enable-SPI21-v2.patch [kernel patch to configure SPI bus/driver for xfoce at boot]
  Modified:
  - xf-ral.h,c
  - xf-api.h
  - xf-config.c,h
- gateway.c,h, config.c,h, *.conf: now using configuration item "proxy_hport" to set the TCP/IP port
  used by the proxy to connect back to the host for get/do operations (proviously hard coded) 
- motor-control.c: added status return option
- gwcard: now deletes temporary mount directories and added some verbose messages
- bug-fix [repotar]: was backing up an old directory...yikes.
- bug-fix [xf-dio-bbdio.c]: debug message was referencing incorrect API function in intialize

2014-03-25 kent headley <headley@mbari.org>
- xf-data.c - changed sdata destructor, added sdata free
- clone.c, gateway.c - bug fix: was leaking memory when the server sent delete updates, and also the clone was not getting heartbeats.
  To fix heartbeats, changed gateway sdclient to consumer instead of producer (pending:why don't producers get hbeats?).
  To fix memleak, server SET update handler checks for zero len update and deletes local hash copy. Also, client SET stores
  locally as kvmsg instead of body value (was supposed to have done that earlier, but still storing only the message body).

- sbe18s.c: implemented tref topic as property
- sbe52mp.c: implemented pump speed property
- TCP/Port config: changed tcp port configuration, and made fully configurable throughout (previously, gateway used fixed, default port
  values). This is to enable multiple gateways to run on the same machine. Cleaned up configuration (added config object) to SD and PS client/servers
  that didn't have them. Renamed configuration file parameter config_port to proxy_port. Added new io_tcpaddr_ methods to io.c 
  affects: gateway, config, xkey, xf_xhash_platform, sd-client, ps-client, xf-sdclient, xf-psserver, clonecli6, clonesrv6 etc.
- xf-utils.c: added macros for stringification and token pasting (concatenation); used to generate default zmq endpoint addresses from default ports
- renamed term-motor.c motor-control.c, and renamed mut to moco.
- fixed up formatting on sdc and subc output

2014-03-18 kent headley <headley@mbari.org>
-  new revision [0.32]
- xf-buffer.c: fixed a long-standing bug in xfbuf_printf; mal-adjusted pointer caused incorrect NULL insertion
  which would sometimes (state-dependent) truncate the strings.
- devicecraft.c: major revision adding protocol, parsing, actuation, initialization
- ersatz.c: renamed methods to match API changes
- hrph.c: renamed methods to match API changes
- proxr.c: renamed methods to match API changes
- sbe-common.c: new; has common SBE API
- sbe18s.c: moved some API to sbe-common.c, added metadata and other protocol features
- sbe19s.c: removed cruft
- xf-config.c, xf-gateway.c, xf-proxcli.c, xf-proxsvr.c, xf-gmsg.c, xf-xkey.c, gw-query.c : added actuation plumbing
- xf-xfhash-platform.c: fixed bug (added checks for NULL values)
- xf-debug.c: added/moved modules
- xf-driver.c: added support for new drivers, starting to move away from methods that return driver 
   callbacks, and towards directing all calls through the driver operation request so that concurrency 
   can be managed. Added acutation op, renamed some other ops.
- xf-io.c, xf-io-*: allow NULL buffer to pass into io_readto (does skip until match/limit/timeout)
- test-driver.c: added tests for new drivers protocols
- test-ioport.c, various drivers: bug fix: potential loop forever on io_drain 
- log-show.c: bug fix (or create?): would not read source_id from command file; changed list push to add in process_args
- config updates: (gateway.conf, simple.conf)
- script updates: (socatd.sh (stop now doesn't depend on PID files), .xfenv (added alias goxf='cd $XF_HOME'))
- added script:  xflog (aliases vim -R for BBONE) to page logs read-only
- added drivers: sbe52mp, proxr
  
2014-02-27 kent headley <headley@mbari.org>

- established driver structural convention: develop separate device/procotol and application/driver APIs.
  The device/protocol API is application-independent, takes only abstract IO port and operation parameters.
  The application/driver API uses the device/protocol API to build application functions (e.g. initialize, 
  take a sample, etc.). 
  This enables the device driver to be tested independently (need only create an IO instance,e.g.) and
  also used to build other applications (e.g. command line utils to operate devices when system is not running).
  
- added test-driver.c: unit test driver application and/or device APIs
- added drivers 
  - hrph (MBARI pH)
  - proxr (MEH relay board+ADC)
- support for new drivers
  - xf-driver.c
  - xf-debug.c
  - Makefiles
  - simple.conf, gateway.conf
-  xf-id.h: 
  - removed obsolete hard-coded source IDs
  - added ids for new devices
- xf-io-snlib.c
  - additional NULL checks to prevent crashes for non-existing devices
- xf-io-term.c
  - replaced some fprintf ferr w/ MDEBUG
  - added NULL check for fstream in fputs
- xf-io.c
  - added memory initialization
  - added io_srid2type
  - added stream/fd closure/NULL to io destructor
  - added io_sys_release in test
  - created io_test_cfg and constructor/destructor (in io.c,h)
- xf-xhash.c
  - added vfile_dump and renamed vfile_dump to vfile_idump
  - fixed related incomplete arg list call to vfile_dump in xf-proxcli (see Scary Compiler Feature)
- xf-proxsvr.c
  - added initializers for client.request, client.next_event in ctor
- xf-utils
  - added bin2asc (binary buffer to ascii hex string)
- xf-xvalue.c
  - added xvalue_parse_json; property parsing helper function
- xf-properties.h
  - updates props_clookup macro to do NULL checking
- devicecraft.c
  - under construction
- ersatz.c
  - replaced property key array with map_entry
  - added include
  - moved code, added comments
- hrph.c
  - branched sbe18s into new file, since it's significantly different from sbe18s
- sbe18s.c
  - moved cal/constants into proper device properties
  - created cal struct
  - better separation of protocol and policy APIs
  - added new functions (standard SBE metadata functions)
  - added write/read function sbe18s_getxx as foundation of many other functions
  - simplified property parsing
  - comments
- test-driver.c
  - added xprox
- test-ioport.c
  - now use io_test_cfg in other apps that need io ports (e.g. test-driver)
  
- gateway.c:
  - fixed incomplete commands 
- Scary Compiler Feature/Bug Discovered: the compiler allows function calls with incomplete
  parameter lists. At least Valgrind will flag them as unitialized data created on the stack.

2014-01-29 kent headley <headley@mbari.org>
* configure.ac
  - bumped revision to 0.31
* Major revision of information lookup/key API
* replaced xf-xhash topic functions and data with new module, xf-xkey.c
* xf-xkey provides simpler, (type) safer functions for generating keys used
  to query a gateway proxy. There are two major parts to the API: one for
  command line clients (cli), the other for machine-to-machine clients (m2m).
  The cli interface includes methods for generating keys from (user input) strings.
  The m2m interface features functions for generating keys using IDs, making it 
  easier for developers to write clients.The key naming scheme as been refined 
  somewhat and features
  - simple and consistent syntax for obtaining and using keys
  - CLI syntax designed for easy/minimal typing
  - simple queries for related groups or single parameters
* implemented some proxy SET operations
  - Pass in gateway reference to proxy handler and update handler so that they may
    call config methods
  - implemented parsing/conversion/lookup functions to exchange keys and IDs
  - implemented set entry point in config.c (and some delegate set functions)
* defined props_validate_fn typedef (drivers should implement to validate device specific properties)
* added xf-names.h to hold const string name values
* updated gw_query: use xkeys, help message, filtering/sorting for ioprops (TODO: use cleaner io_props 
  algorithms for sorting and filtering schemes elsewhere)

2014-01-17 kent headley <headley@mbari.org>
* configure.ac
  - added checks for canonical build type that set
    environment (eliminates need to run gwconf before configure)
  - bumped revision to 0.30
* renamed viman and vitem
  - viman -> xhash
  - vitem -> xvalue
  - functions and methods: vim_->xhash_, vitem_->xvalue_
  - .c,h files xf-viman*->xf-xhash*
  - .c,h files xf-vitem*->xf-xvalue*
  - related data structures and constants were also renamed
  - eliminated viops_t and related functions in xvalue
* fixed fifo_test return value in test-queue.c
* bug fix: in test-xhash.c, xhash_hdump went into infinite loop
* bug fix: xf-buffer.c, xfbuf_new not returning value, xfbuf_destroy should have void return.
* bug fix: xf-xmsg.c, kmsg.c: fixed Valgrind errors (invalid read) that started appearing.
    malloc'd buffer wasn't initialized correctly. Unclear why this didn't appear 
    earlier (stale deps? lib update? configure.ac environment?)
* bug fix: xf-xhash.c: xhash_subtopic_key did not return (NULL) value on failure

2014-01-14 kent headley <headley@mbari.org>
* xf-buffer.c
  - fixed bugs and expanded test for xfbuf_printf
* xf-jobq.c
  - added command line settings
  - added/changed some state variables
  - updated critical sections
  - modified debug code
* test-jobq.c
  - updated test code to use multiple queues and multiple job generators
  - added config struct
* test-proxs.c
  - restructured test code to use jobq and run in threads more like it does 
    in the application (mostly to facilitate debugging the proxy bug)
* xf-gateway.c
  - added s_gw_snapshot method (not yet used)
* xf-proxsvr.c
  - bug fix: removed bad host heartbeat code that flooded the gateway with hbeat messages, causing
   the  proxy to crash after 30 min. 
* Removed instances where zmsg_destroy was called after zmsg_send, since zmsg_send destroys 
  messages after sending. Potentially, this would cause a race condition.

2014-01-06 kent headley <headley@mbari.org>
* gwrun.c, test-gateway.c: 
  - updated gwrun signal handling to match gw internals/test-gateway.c
  - removed obsolete code and variables
  - test-gateway uses config struct instead of discrete static vars
* doxygen-examples.c: comments, whitespace

2014-01-05 kent headley <headley@mbari.org>
* general style maintenance pass and cruft removal
  - converted existing doxygen comments to C++ style i.e. '///'
  - made whitespace and function formats consistent 
  - all files have consistent IP disclaimers
* added doxygen test file in doc
* added zmqv (prints zmq version)
* bug fix: test-vim 
  - xf-viman.c: after update to gwcfg_destroy,
    was passing wrong type to gwcfg_destroy in
    s_init_item_hash() [crashed test-vim].
  - added missing modules (XF_VIMAN, XF_VITEM) in xf-debug.h

2014-01-03 kent headley <headley@mbari.org>
* xf-gateway.c: 
  - moved code blocks to put related functions together
  - eliminated gateway data_handler accessor methods
  - added s_start_data_handler
* xf-dreactor.c:
  - made dreactor opaque
  - added transparent data handler stat struct (dhstat_t)
    in xf-dreactor.h for job stats tracking
  - replaced dreactor built-in queue management with xf-jobq 
  - eliminates several members
  - simplifies dreactor internals
  - reuse of jobq
* xf-jobq.c: 
  - eliminated inc_ methods
  - xfjq_post: removed thread-unsafe variables

2014-01-02 kent headley <headley@mbari.org>
* removing src/common directory

2014-01-02 kent headley <headley@mbari.org>
* Updating files moved from src/common to src/gateway/core
* note: botched commit/message 2013-12-18; this is part of that change
  and the full commit message appears below

2013-12-18 kent headley <headley@mbari.org>
* updated headers
  - moved declaration of types with circular dependencies to xf-types.h
  - commented both xf-types.h and header of origin to indicate where they
	belong
  - To prevent circular dependencies, xf-types.h does not include other 
    xfoce headers (except xf-debug.h)
  - all source files (.h,.c) include the minimum set of headers
  - xf-types.h is used to either for common project types, or for 
    declarations that would otherwise cause circular dependencies.
  - .h files should only include headers containing types used in the headers
  - .c files should include their associated .h and any headers not covered.
  - removed cruft (comments, redundancies, etc.)

* updated build
  - now build a single library (libxfoce)
  - defs still retained in original headers, using guards (e.g. XF_HEADER_NAME_SHARED),
	so they may be compiled independently
  - by convention, we include the relevant header(s), and include xf-types.h
    if needed to resolve circular dependencies
* moved src/common/* files to core
* deprecated singletons.h
* deprecated xfoce.h (created in last update)
* deprecated gateway.h
* changed the stream_id passed to lindex update (was record header, is data container)
* Update to gw-run.c (uses gw_start/stop, signal handing)
* Cleaned up some debug noise (hard-coded printfs in various modules)
* Changed xf-config debug output to print debug settings at a higher level
* added debug module XF_PSSERVER, XF_PROXSVR
* renamed debug module GATEWAY to XF_GATEWAY
* xf-debug uses fprintf(sdtderr) instead of printf
* gave dreactor it's own zmq context, and eliminated the shared message context from gateway
* added src/gateway/test/test-sig.c, a test program to validate concepts for signal handling and start/stop of multiple threads
* bug-fix shutdown sequence syslog race in testgw/gwrun (last couple of messages weren't making it into syslog
  when run outside of Valgrind)
* bug fix: added null/size check to args in xfbuf_append (TODO: check other functions)
* bug-fix: added mutex in xf_thread_start to prevent concurrent thread start
* bug-fix: replaced delay_msec() with macro that forces cast of argument to uint64_t. The missing cast produced a nasty 
		   bug: start up and shutdown were badly hosed on ARM, as an uncast arg would be interpreted as a 
		   valid but incorrect (e.g. very large) number.
* bug-fix: for threads that need to wait on a semaphore, now using separate static wait methods, instead of
           trying to share one and make it thread safe(how?).
* bumped version to 0.29

2013-12-18 kent headley <headley@mbari.org>
* Header and file fix-ups needed to make distribution build on Angstrom/beaglebone
  - An improvement, but still need to fix delicate build deps and clunky gaurd statements

2013-12-16 kent headley <headley@mbari.org>

* bumped version to 0.28

* ps-client.c
  - added help on available subtrees
  
* Implemented pubsub message topics in stream_process_info
  - changed pub_func API (eliminates need for gateway/handler reference
  
* Refactored data_process_rule
  - combined data_process_rule and data_process_info
  - made opaque
  - eliminated mtype and sdtopic (id types)
  - added pub_topic and post_topic (string types)
  - renamed data_process_rule -> sprule

* Refactored sdclient
  - made opaque
  - added start/stop methods (to start stop client in a worker thread)
  - added s_sdclient_action
  - renamed subtrees member -> topic
  - added necessary accessor methods
  
* Refactored sdata, source_id
  - made opaque
  - added necessary accessor methods

* Modified config files
  - sub_topic and pub_topic are free-form strings
  - strings are more flexible, simpler
  - eliminated sd_topic, mtype, lookup/parsing functions, proxy data items
  - stopped tracking some of the lesser used test config files

* Deprecated decl.c,h
  - moved relevant members to data.h,c and renamed
  - pubsub_subtree_id2str()
  - sdata_topic_id2str()

* Deprecated gateway.c,h
  - replaced with xf-gateway.c,h

* Modified shared data client update time
  - made less than (3s) clone/server timeout (5s)
  - prevents constant server fail over and resulting log messages

* Revised monotonicity warning condition in log.c
  - Fixes constant warnings about non-monotonic keys in logs
  - (it's OK to have duplicate timestamps if the streams are different)
  - Added kmax_source_id to index chunk header (icheader_t)
  - updated warning condition in index update function
  - compares key<=max_key && stream_id of max/current key
  

 
2013-12-10 kent headley <headley@mbari.org>

* Major refactor of gateway
  - completely opaque gateway
  - eliminated dependencies on gateway in independent modules (e.g. logger)
    (gateway references are passed or included in structs)
  - gateway no longer assumed to be single global instance per machine
  - eliminated several obsolete accessor methods
  - made function names and signatures consistent
  - made syslog and datalog gateway functions
  - eliminated global_thread_quit

* Made single xfoce.h header. All C modules optionally include a header
  of the same name, which includes xfoce.h

* data_container is fully opaque
  - added constructor dcon_xinew to replace package_data in driver.c
  - methods renamed with dcon_ prefix

* Eliminated Singletons

* Fixed Valgrind errors and leaks in all test code

* Config refactor
  - eliminated device_config_t
  - moved platform ID completely into config space as platform_config_t (removed from xfgw_t)
  - renamed gw_config_* gwcfg_*

* Removed redundant logging functions

* PUBSUB server (psserver)
  - now fully opaque, with start/stop methods
  - pub/sub server endpoint config now via config file
    - eliminated global, hard-coded values
    - added tcp_addr_tostring functions)

* Binary version string now automatically generated at compile time by autotools

* Much cruft removal throughout (unused/redundant variables, functions, etc.)