2014-06-XX [v0.53:] 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.)