Skip to content

Release notes

develop branch

The vast majority of users just checkout the develop branch from the git repository, and update whenever a new feature is deployed that they wish to use.

Changes since last tagged release

These are the changes since midas-2026-07-a.

The repository moved to GitLab, C++20 is now the default and mhttpd no longer serves HTTPS itself. Highlights are the reworked ODB browser, sequencer breakpoints and this new documentation.

Major new features
  • Repository moved from Bitbucket to the TRIUMF GitLab (https://gitlab.triumf.ca/midas/midas), including all submodules
  • New Markdown-based documentation replacing the MidasWiki. mhttpd can serve it too (/Experiment/Menu/Documentation, off by default)
  • ODB browser: tabs, split view, shared favourites (stored in /WebServer/ODB Browser/Favourites), save sets that save and restore predefined groups of ODB paths in one click, and comments on keys and directories (from Comment <key> keys)
  • Sequencer breakpoints in MSL and Python scripts. Click a line number, start with Debug, then step line by line from the breakpoint (details)
  • Optional browser terminal with a shell on the mhttpd host, in tabs. Off by default: build with -DMIDAS_ENABLE_TERMINAL=1 and set /WebServer/Terminal/Enable. Optional login and extra password
  • New EPICS Channel Access library that doesn't need EPICS Base, with midas-caget, midas-caput and an example soft IOC (midas-soft-ioc)
  • New automated test suite (GoogleTest, pytest and Playwright), enabled with -DMIDAS_BUILD_TESTS=ON and run in GitLab CI
Breaking changes
  • Repository moved to GitLab. Point existing clones to the new address, as shown in the upgrade guide
  • C++20 by default. midas is built as C++20 by default (needed for TinyExpr++), so a C++20 compiler is needed. Use -DMIDAS_CXX17_FALLBACK=1 for C++17 (e.g. to match a ROOT built with C++17). This is a manual cmake option, not chosen automatically. Your own code must use the same C++ standard as midas. CMake projects linking midas::midas get it automatically. Makefile projects need -std=c++20 (or -std=c++17 with the fallback). odbxx.h refuses to compile below C++17 (details).
  • mhttpd no longer serves HTTPS. Run mhttpd behind a web server that handles HTTPS. /WebServer/Enable https port and the related keys are ignored, and the openssl/mbedtls build options were removed. The browser terminal only works over HTTP if /WebServer/Terminal/Allow HTTP is y.
  • Removed or changed C/C++ functions
    • db_get_data1() removed. Use db_get_key() with db_get_data_vec(), or db_get_data()
    • cm_execute() removed, along with the odbedit exec command and /Experiment/Enable cm_execute. Use system() or ssh
    • json_write() split into json_write_json() and json_write_string(). db_copy_json_obsolete() renamed db_copy_json_jcopy(). db_copy_json_array() and db_copy_json_index() moved to msystem.h with a new signature
    • PROGRAM_INFO_STR, ALARM_ODB_STR and ALARM_PERIODIC_STR macros removed
  • cm_exist(name, FALSE) now matches the program name (from /System/Clients/<pid>/Program) instead of a client name prefix. cm_exist(name, TRUE) matches the exact client name
  • RPC calls were added (RPC_DB_GET_DATA_CXX, RPC_AL_RESET_ALARM) and removed (cm_execute, db_get_data1). Remote clients and mserver should be rebuilt from the same version
  • mlogger won't start if MIDAS_SERVER_HOST is set, as it must run on the experiment host
  • Sequencer scripts that fail syntax validation can no longer be started, saved or queued
  • MSL expressions and multi class driver formulas now use TinyExpr++ (C++20 builds). A few edge cases differ, e.g. 1/0 is now an error instead of inf
  • JavaScript: file_browser() was removed from filesrw.js. Use file_picker(), which takes the same arguments
  • Python
    • pip install of the midas package now installs pyflakes, numpy and lz4
    • odb_set() with None raises ValueError
    • odb_stop_watching() raises KeyError for a path that isn't watched
    • Empty strings in XML ODB dumps are read as "" instead of None
Deprecations
  • cm_shutdown(name, bUnique) is deprecated. Use cm_shutdown(name), which only matches the exact client name
Upgrade guide

If your clone still uses the old Bitbucket address, switch it to GitLab first (only needed once):

cd $MIDASSYS
git remote set-url origin https://gitlab.triumf.ca/midas/midas.git
git pull
git submodule sync
git submodule update --init --recursive

Then update as usual:

cd $MIDASSYS
git pull
git submodule update
cd build
make install

The minimum cmake version is still 3.14 (unchanged since midas-2025-01-a). The test suite (-DMIDAS_BUILD_TESTS=ON) needs cmake 3.24.

Other enhancements
  • Web interface
    • ODB browser
      • Duplicate a key or directory
      • Preview a file before loading or importing it. Save, export or copy several selected directories at once
      • Many keyboard shortcuts, type-ahead to jump to a key, and keyboard editing of array elements
      • Search results in a floating dialog
      • Open records only lists records below the current directory
      • Change the mode bits of one or more keys, or of a directory and everything in it. Active hotlinks are shown as H in the Mode column
      • Loading or saving an ODB file (browser or odbedit) writes a line to the message log
    • Keyboard shortcuts for the built-in menu pages: Alt and a letter (e.g. Alt+S for Status, Alt+O for ODB). Holding Alt underlines the letters in the menu
    • Snooze... button on the Status and Alarms pages silences alarm sounds and speech in that browser for 1 min to 1 h
    • Programs page groups clients by program name and has a Stop all button
    • Event dump page: bank selection, and bytes shown as decimal with ASCII
    • Cursor and Tab key navigation in all dialog boxes
    • Built-in pages use the new modbswitch toggle
  • Sequencer
    • Debugger highlights variables that changed
    • Syntax validation is always done before a script is started, saved or queued (no longer optional). MSL is checked by the same C++ parser that msequencer uses, including INCLUDE files and warnings for missing ODB keys. Python is checked by PySequencer (with pyflakes if installed)
    • New /Sequencer/Command/Goto line jumps a running script to a line (ODB keys). Jumps into or out of a LOOP, IF or SUBROUTINE are refused
    • MSL: subroutines can be called without CALL. Commands can have long arguments and more than 99 arguments
    • Reworked web page: state badges (running, paused, stopped, debug, waiting), redesigned side panel with draggable divider, more keyboard shortcuts
    • PySequencer: many fixes, and a new example pysequencer_mscb_read.py
  • Alarms
    • Conditions can combine terms with && and ||. && binds tighter than ||, and parentheses are not supported
    • al_reset_alarm() runs inside mserver for remote clients (faster)
    • If the browser blocks the alarm sound, it is played after the next click on the page
  • ODB
    • Key and data free lists are checked when a client connects, and more kinds of corruption are reported. Repair is done only if MIDAS_ODB_REPAIR_FREE_LIST=1 is set
    • New odbedit du command shows the memory used by each subtree
    • Program name stored in /System/Clients/<pid>/Program (details)
    • JSON saves stay valid if an ODB read fails, and handle links to single array elements
  • History
    • Measure the time and value differences between two points on a plot
    • /History/Images/Demo is no longer created by default
    • mdev define_history_panel() can take a group name
  • Frontends and drivers
    • New mdev driver for TDK power supplies
    • RevolutionPi example frontend moved to examples/revolutionpi, now with EPICS
    • MSetPoint: comma-separated EPICS commands (e.g. EIN,ON) and new documentation
    • msysmon-lmsensors is installed if it was built
  • C++ API
  • Python API
    • Robustness review of the midas package: about 100 fixes (memory release, string truncation, UTF-8, links on remote clients, numpy, file reader)
    • New reset_all_alarms(). clients_exist() takes exact_match
    • KeyError and TypeError raised for midas errors carry the midas status in e.code
    • odb_set() accepts "0x..." strings for float and double keys
    • Frontend data rate calculated exactly as in mfe
  • Web API (JavaScript)
  • Build
    • install.sh compiles in parallel and adds the mscb Python package to PYTHONPATH
    • New cmake option -DMIDAS_BUILD_DOCS=1 builds this documentation (details)
  • The shiftschedule shift-planning page and frontend is now part of the midas repository, in shiftschedule/ (set up with its own setup.bash)
  • Internal
    • More legacy C code moved to C++ (std::string, std::vector, odbxx instead of db_create_record())
    • Clients with the same name handled more consistently: cm_shutdown() matches exact client names, cm_exist() matches client or program name
    • msequencer command handling refactored into a command registry
    • Old mongoose 4/6 web server libraries and the old C-generated equipment page removed
Bug fixes
  • Many bugs found by AI-assisted code review and by the new test suite
  • ODB: infinite loop in malloc_key()/malloc_data() with a corrupted free list, wrong free-list size for an empty ODB
  • ODB: odbedit couldn't start if the ODB held a bad SYSMSG buffer size
  • ODB: invalid JSON saved for keys with zero values
  • JSON-RPC: invalid JSON from db_get_values with omit_old_timestamp if the first key in a directory was skipped
  • bk_locate() and bk_find() no longer read past the end of corrupted events
  • msysmon aborted at startup on hosts with long network interface names
  • mmessenger skipped the first bytes of each message
  • hs_define_panel() read access violation
  • Sequencer: crash on macOS in name validation, Ctrl-X in Firefox deleted text from the start of the script, variables table missing after start, editor undo/redo, paste and scrolling
  • mhttpd: wrong decoding of + in URLs. Encoded / (%2F) in URLs is now rejected
  • Web pages: editing strings containing ', data-show-fill on history panels, Zero ylow with Log axis giving a 1E-20 axis, mplot hangs and bad axes for very small or NaN ranges, mplot error bars cut off at zero, mplot datasets in JSON that didn't give every setting, mplot data-x/data-y plots drawn in dark gray instead of blue
  • ODB browser: missing or hidden subdirectories, broken links, watch bit display
  • Python: big-endian numpy data, TID_STRUCT banks, non-ASCII ODB paths, truncated files returned as complete events
  • PySequencer: File/Path starting with / could escape the sequencer directory, seq.range() off-by-one, Stop moved on to the next queued script
  • odbinit: -s and .ODB_SIZE.TXT parsing, sizes over 2 GB (e.g. -s 4GiB gave a 1 MB ODB), MIDAS_DIR without a trailing /, --env path to $MIDASSYS/bin
  • mdump: -w range check
  • mdev_mscb: MSCB node names containing :, tight retry loops

Tagged releases

Occasionally tags are applied in the git repository to denote specific versions. Tags are generally applied after major features have been deployed, or before breaking changes are introduced.

Tags are of the format midas-YEAR-MONTH-SUFFIX, e.g. midas-2019-06-b. This page details the major changes in each release, and highlights how to update client code to adapt to any changes that are not backwards-compatible.

2026-07

Release midas-2026-07-a

C++17 is now required (was C++11), and mlogger no longer writes ROOT files. Highlights are tabs on custom pages, an install script and history buttons on the equipment page.

Major new features
  • Custom pages can be split into tabs with the mtabs, mtab and mpanel classes
  • New install script (install.sh). It checks dependencies, builds midas, creates an experiment and can install mhttpd as a systemd service.
  • Equipment page
    • History buttons in /Equipment/<name>/Settings adds a button to each variable that opens a plot of its history
    • Options <variable> in Settings gives a drop-down list for editing that variable
  • New mdev driver and example frontend (mdev_revpi_fe) for the Revolution Pi
  • RPC calls can pass std::string and std::vector arguments, without fixed buffer sizes (RPC_CXX). New JSON-RPC methods jrpc_cxx and brpc_cxx, with no limit on the reply size
Breaking changes
  • C++17 is required. midas is now compiled as C++17 (was C++11). Your compiler and any code built against midas must support it.
  • mlogger no longer writes ROOT files. ROOT output and rmlogger were removed. Convert midas files to ROOT with an analyzer instead (e.g. manalyzer).
  • db_delete_key() never follows links, so deleting a link deletes only the link
  • ALARM_CLASS_STR was removed from midas.h
  • Custom pages: for a modb element on an ODB directory, .value is now a JavaScript object, not a JSON string. Remove any JSON.parse() of it.
  • mplot JSON settings: the ODB paths of a dataset are now xPath, yPath, zPath, xErrorPath and yErrorPath (were x, y, z, xError and yError). The data-x etc. attributes are unchanged.
  • PySequencer: on timeout, wait_clients_running() raises midas.WaitTimeoutExpired instead of RuntimeError
  • plot_example.html was removed. The examples are now a tab of custom_example.html.
  • mjson_test was renamed mjson_parse
Deprecations
  • The follow_links argument of db_delete_key() is ignored. Remove it from your code.
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2026-07-a
git submodule update
cd build
make install
Other enhancements
  • Web interface
    • custom_example.html is organised in tabs and now includes the mplot examples
    • New experiments show the example status page (Example) in the menu
    • Pages refresh faster for half a second after a value is written to the ODB, so hardware changes show up quickly.
    • Dialogs can be resized from any edge
    • History plots
      • Binned data is used for time ranges of 8 hours or more (was 1 day)
      • Better resizing of floating panels
      • Warning when the time range is too long for automatic scrolling
    • New midas icon
    • mhttpd
      • New --expdir option, needed when mhttpd connects through the mserver
      • With -D, mhttpd becomes a daemon only after the web server has started, so errors such as a port already in use are shown.
  • Sequencer
    • Web page
      • Scripts can be edited in the main tab while the sequencer is stopped. A lock icon shows when it is running.
      • Editor tabs can be inserted and reordered
      • Better syntax validation with clearer error messages, also for Python scripts (e.g. indentation)
      • New Auto validate option checks the syntax before a script is started, saved or set as next, and refuses invalid scripts
    • MSL: WAIT ODBValue takes an optional timeout, e.g. WAIT ODBValue, <path>, <op>, <value>, timeout, <seconds>[, <status variable>]. The status variable is 1 if the condition was met and 0 if the timeout expired. The web page shows the timeout countdown.
    • New /Sequencer/Command/Goto line jumps to a line of the running script
    • PySequencer
  • Alarms: periodic alarms trigger exactly one period after the previous trigger, even if they were reset later
  • History: faster reads from SQL databases with many schema versions
  • ODB: better recovery when the ODB is full, and less fragmentation when allocating keys
  • Frontends and drivers
    • mdev skips equipment that has Common/Enabled set to n
    • The mdev example frontends (mdev_fe, mdev_revpi_fe) are built by default
    • tmfe frontends handle binary RPCs (brpc) and the new jrpc_cxx/brpc_cxx calls
    • MSetPoint: non-working EPICS channels are disabled, and the page starts the EPICS frontend if it isn't running
  • C++ API
    • New db_enum() returns the handles and keys of all subkeys of a directory
    • New db_delete() deletes a key by path
    • odbxx
      • TID_CHAR support
      • String arrays get the size of their longest string. New string_size()
      • Offline use: XML files without handle attributes can be read, and files are parsed only once
  • Python API
  • Web API (JavaScript)
    • mplot
      • Bar plots with string X data get a category axis, and several bar datasets are drawn side by side (plot types)
      • Box of statistics for scatter plots, histograms, bar plots and color maps. data-stats="0" hides it
      • New addPlot(), modifyPlot() and deletePlot()
      • New mouseWheelZoom setting. Set it to false to scroll the page instead of zooming.
      • A maximize button opens the plot in a resizable dialog
      • mplot.js also works without midas (example in mplot.html)
      • An invalid plot type gives an error
    • modbgauge: data-color can be a list of value/color pairs, to draw colored segments
    • Sliders accept data-min-value and data-max-value
  • Build
    • CMake writes compile_commands.json (e.g. for clangd)
    • New thread sanitizer option (cmake -DUSE_THREAD_SANITIZER=ON, or YES_THREAD_SANITIZER=1 with the Makefile)
    • The example CMake files need CMake 3.10 or newer
  • Internal
    • Refactored ODB code (key lookup, deletion and locking), with new ODB torture tests in make test
    • Alarm classes use odbxx
    • Fixes for warnings from the address, thread and undefined behaviour sanitizers
Bug fixes
  • Messages logged on 29 to 31 December got the next year in the message log (a bug since 2015)
  • ODB: buffer overflow in db_copy(). Saving very deeply nested directories as JSON, XML or .odb is now safe.
  • Sequencer
    • Crash at start-up when Stop immediately was set
    • Very small numbers (e.g. 1E-10) were written to the ODB as zero
    • Values typed on the start page were ignored unless Enter was pressed
    • /Experiment/Edit on sequence parameters were sometimes not loaded
    • Editor fixes for paste, Shift+Tab and illegal characters in scripts
  • mhttpd rejected elog posts from some clients (e.g. Python requests) because of a multipart parsing error
  • melog used an old URL and a wrong Host header
  • History plots: wrong updates when the browser and server clocks differ, data shown from 1.1.1970, a crash while loading, and plots extending half a width into the future
  • ODB browser: copy to clipboard, and the context menu closing when the mouse moved
  • mplot: CSV download of bar plots, category axes when zooming, and conflicts with mhistory.js on the same page
  • odbxx: a memory leak, and a string comparison bug
  • Python: errors with numpy 1.24 to 2.0 (np.bool)
  • Many small fixes in the equipment page, dialogs, sliders and file dialogs

2025-11

Release midas-2025-11-a

Introduces PySequencer, a sequencer that runs plain Python scripts. This is the last release that builds as C++11.

Major new features
  • New Python-based sequencer, PySequencer, alongside the MSL sequencer. Scripts are plain Python using the midas.sequencer API.
  • Sequencer page validates MSL scripts before running. Errors are highlighted in the editor and shown on hover.
  • Custom pages: dynamic ODB paths, where data-odb-path can be a JavaScript function call
  • FILE history supports files larger than 2 GB, and starts a new file once a file exceeds 100 MiB
  • odbxx can read the ODB from an XML or JSON file
Breaking changes
  • mfe: write cache size is set in code. /Equipment/<name>/Common/Write cache size is no longer used by mfe, and the write_cache_size field was removed from EQUIPMENT_INFO. Remove the last value of your equipment's info initializer if you set it. Call set_write_cache_size("<buffer>", <bytes>) in frontend_init() instead. Without this call there is no write cache.
  • The custom status page is now set with /Custom/Status, not /Custom/Default
  • FORMAT_YBOS, FORMAT_ASCII, FORMAT_DUMP and FORMAT_HBOOK removed. Use FORMAT_MIDAS.
  • odbxx lookups are case-insensitive. Code that relied on keys differing only in case now finds the existing key.
  • The equipment page no longer creates Settings/Grid Display automatically
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2025-11-a
git submodule update
cd build
make install
Other enhancements
  • Sequencer
    • PySequencer is run with python3 $MIDASSYS/python/midas/sequencer.py and uses /PySequencer in the ODB. Only one instance can run at a time (use -c <name> for more).
    • PySequencer: wait_func(), more wait_odb() options, disable_tracing() for hot loops, numpy variables and params in the Variables list
    • PySequencer: logging to the midas message log (--log-to-midas, set_py_logger())
    • PySequencer: modules imported by a script are reloaded each time it runs
    • PySequencer creates an example script in userfiles/sequencer when first run
    • MSL: $variables in ODBLOOKUP, and an error if a $variable is not defined
    • MSL: the script stops if ODBLOOKUP fails or ODBSET writes beyond the end of an array
    • MSL: INCLUDE files may have an explicit .msl extension
    • MSL: # comments at the end of lines
  • Web interface
    • Sequencer page supports PySequencer (Python syntax highlighting and validation, .py files, offers to start the program). New PySequencer menu entry (/Experiment/Menu/PySequencer).
    • Sequencer page: validation is also in the drop-down menu
    • Sequencer page: improved next file queue (added to the next free slot, length limit, drag-and-drop fixes)
    • Status page shows Restart: PySequencer when needed
    • ODB editor
      • Select keys and array elements by dragging
      • Integers can be edited in decimal or hex
      • Drop-down to set all values of a boolean array
      • The ODB picker for links starts in the previously used directory
    • Equipment page: device names, group lines without grid display, and a warning if the frontend is not running
    • Custom pages
    • Works behind F5 proxies (modbvalue links no longer use #)
    • mhttpd serves .ROOT files
  • Web API (JavaScript)
    • mplot: time axis, error bars, data-bgcolor, and data-tooltip for custom hover text
    • RPC errors show the server response
  • History
    • History data is flushed every second
    • History plots reload with one second of overlap, so late data is not lost
    • History editor handles tag names containing colons (e.g. EXP:HTR107:CUR)
    • Error if a history variable name starts with a space
    • New hs_define_panel2() taking vectors of variables, labels, formulas and colors
  • Alarms: the alarm message says how many times the condition was met when Trigger count required is set
  • Logger
    • Read cache increased to 1 MB
    • The history system is no longer re-opened at every run start
  • Frontends and drivers
    • mfe: new set_write_cache_size() (see Breaking changes)
    • mfe: set_max_event_size() can be called in frontend_init(). The event buffer is set to twice the maximum event size.
    • mfe: messages in the message log when a frontend starts or stops
    • mfe: rates are computed over 1 s instead of 3 s
    • mdev: configurable readout period. MSCB driver gains groups, units, formats, conversion functions and error reporting.
  • ODB
  • C++ API
    • odbxx: key lookups are case-insensitive (like db_find_key()), and links are followed throughout
    • odbxx: resize(size, default) fills new elements with a default value
    • manalyzer: midas::odb uses the ODB from the run file when running offline
  • Python API
    • Logging handler that copies messages to the midas message log
    • MidasFile can be used in a with statement
    • MidasClient can raise an exception if a client with the same name exists
    • Equipment overwrite_common argument (like mfe's equipment_common_overwrite)
    • Faster odb_set() for directories with many entries
  • RPC and networking
    • Falls back to IPv4 if the kernel has no IPv6 support
    • The watchdog timeout set by cm_set_watchdog_params() also applies to the mserver process
    • New BM_TIMEOUT status: flushing the event buffer cache over RPC gives up instead of looping forever
  • Build
    • find_package(Midas) can provide manalyzer as a component
    • New make clang-tidy target. AlmaLinux 10 and macOS build fixes.
  • Internal: many fixes from static analyzers (cppcheck, clang-tidy), including checks for failed malloc()/fopen()
Bug fixes
  • mserver crash when a client does not answer a watchdog message
  • The ODB and event buffers are unlocked before abort(), so a slow core dump no longer makes other programs time out.
  • Crash reading history, and a broken removal of inactive columns in SQL history
  • Memory leaks in mhttpd, JSON-RPC and odbxx
  • db_get_open_records() only returned the last open record
  • midas::odb::save() of the whole ODB wrote an extra "root" key
  • mdump decoded the equipment format incorrectly
  • MSL sequencer: next_filename was overwritten while a script was running
  • Web interface
    • ODB editor: crash and failures editing single keys, broken key re-sorting, selection and deletion, clicks in input boxes, the link dialog and the More menu
    • History plots: empty plots not shown, extending arrays, unwanted scrolling and a spurious "No data available"
    • mplot: crashes with fast zoom and large 2D histograms, colour maps without limits, adding data with setData()
    • Equipment page crashes when settings are missing, and problems with disabled rows and single multi-channel devices
    • Status page: logger colour (yellow when writing is disabled) and disk level bar colour
    • Messages page: messages dated in the future and loading without scrolling
    • r/u keys typed in input fields were captured by history and mplot panels
    • Sequencer page race conditions with script parameters, and the Variables table not redrawing
    • Custom pages: modbcheckbox with float values, format specifiers, and robustness of mhttpd POST decoding
  • Many other small fixes in the web interface, sequencer and drivers

2025-01

Release midas-2025-01-a

New CMake targets make it much simpler to build programs against midas. CMake 3.14 is now required.

Major new features
  • CMake targets midas::midas, midas::mfe, midas::mfed, midas::drivers and midas::mscb. Link to these instead of compiling mfe.cxx, drivers or mscb sources in your project.
  • Alarms: new Trigger count required, so that the alarm condition must be met this many times in a row
Breaking changes
  • CMake 3.14 or later is required
  • Libraries and CMake target files are installed to lib (not CMAKE_INSTALL_LIBDIR, which may be lib64)
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2025-01-a
git submodule update
cd build
make install
Other enhancements
  • Alarms: new Alarm sound setting for alarm classes, also in the Python helper
  • Web interface
  • Frontends and drivers: mdev drivers take the event ID from the equipment
  • Build: examples use the new CMake targets
Bug fixes
  • odb::get_full_path() returned a wrong path
  • ODB editor: boolean arrays. Equipment page: enabling paged equipment, case of Editable settings

2024-12

Release midas-2024-12-a

A large release with a new ODB editor, sequencer page, equipment page, the mplot plotting library and the mdev slow control framework. Several changes need code updates, e.g. mfe only copies events to the ODB if RO_ODB is set.

Major new features
  • New default ODB editor with in-place editing and drag-and-drop. Old page kept as OldOdb
  • New sequencer page with a syntax-highlighting editor. Old page kept as sequencer_v1.html
  • New mplot.js plotting library: graphs, histograms and colour maps
  • New equipment page (eqtable), also available as a dialog via dlgEquipment()
  • New mdev framework for slow-control frontends
  • New PostgreSQL/TimescaleDB history backend
  • 64-bit integer support in the ODB (TID_INT64/TID_UINT64)
  • IPv6 support
Breaking changes
  • mfe: events are only copied to the ODB if RO_ODB is set. Previously this also happened whenever history was enabled. If your history relies on /Equipment/<name>/Variables, add RO_ODB to read_on.
  • mlogger does not overwrite files. Output files are read-only, and a run will not start if its output file already exists.
  • strlcpy()/strlcat() removed. Use mstrlcpy()/mstrlcat() from mstrlcpy.h
  • db_copy_xml() has an extra header argument
  • odbxx: set_string() renamed set_string_size(). The constructor throws if the key is missing
  • ODB key names can no longer start or end with a space
  • tinyexpr is now in libmidas. Remove tinyexpr.c from your CMake files
  • mana/rmana removed. Use manalyzer
  • JSON
    • TID_INT64 values are encoded as strings
    • db_save_json/db_load_json JSON-RPC methods removed
    • Loading JSON or XML truncates arrays to the file's size
  • runlog.log moved to /Logger/Message dir
  • Sequencer
    • Parameters go to /Sequencer/Param/Value
    • Command/Load filename removed. Set State/Filename, then Command/Load new file
    • A leading / in INCLUDE, ODBLOAD and ODBSAVE means <experiment>/userfiles/sequencer
  • mhistory_init_single() removed. Use mhistory_init()
Deprecations
  • char* versions of cm_get_path(), db_get_path() etc. are deprecated
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2024-12-a
git submodule update
cd build
make install
Other enhancements
  • Web interface
    • Options <key> ODB keys show <key> as a drop-down list
    • History plots: binned display, touch zoom and a reworked panel editor
    • Custom pages can read and write files in <experiment>/userfiles (filesrw.js)
    • Custom pages
      • /Custom/Default start page and link: menu entries
      • setValue() on custom elements
      • data-confirm and data-input on modbvalue
    • Message notifications and search, hex view in the event dump
    • New MSetPoint application for beamline setpoints
  • Sequencer
    • Several sequencers can run at the same time (msequencer -c <name>)
    • Full control through /Sequencer/Command
    • New EXIT, ATEXIT and ODBLOOKUP commands
    • SCRIPT output is stored in SCRIPT_RESULT
    • PARAM supports defaults, option lists and booleans
    • WAIT accepts fractional seconds
    • Relative INCLUDE paths
    • Scripts live in <experiment>/userfiles/sequencer
  • History
    • Binned history reads via JSON-RPC
    • mh2sql can write to PostgreSQL
    • New experiments use FILE history by default
  • ODB
    • The ODB is flushed to disk periodically (/System/Flush)
    • odbxx: automatic local/remote access, odb::save()/odb::load() and other new methods
    • New MIDAS_EXPT_NAME environment variable
  • Alarms: conditions accept index lists and ranges (e.g. [1,3,5-7])
  • Logger: new JSON runlog
  • Frontends and drivers
    • The multi class driver supports formulas and units
    • New CAEN v1740 driver, EPICS frontend improvements
    • mfe no longer uses 100% CPU with only periodic equipment
  • RPC and networking: new BRPC (JRPC returning binary data), also in tmfe and Python
  • Python API
    • Read history and create history plots
    • Higher event rates and numpy support (about 10x faster)
    • BRPC, frontend_exit() and disconnect callbacks
  • Build
    • armv7_remoteonly and arm64_remoteonly cross-compile targets
    • Coverage build type
    • make install also installs drivers, headers and cmake config
    • Examples are built by cmake
  • Internal: much legacy char* code converted to std::string
Bug fixes
  • mhttpd crash due to non thread-safe gethostbyname()
  • RPC stack corruption and parameter encoding bugs
  • History file read races and non-monotonic data
  • Locale-dependent decimal separator in JSON output
  • Leading spaces lost when loading .odb files
  • TID_BITFIELD is now consistently 32 bits
  • Many sequencer fixes

2022-05

Releases midas-2022-05-a, midas-2022-05-b and midas-2022-05-c

The TMFE frontend framework was rewritten, and event buffers and RPC are now fully thread-safe. midasio and manalyzer are now submodules.

Major new features
Breaking changes
  • New submodules and requirements. midasio and manalyzer are new submodules (git submodule update --init). ZLIB and cmake 3.10+ are required. Bundled lz4 headers were removed.
  • TMFE API rewritten. The old API is in tmfe_rev0.h
  • rpc_get/set_option() removed. Use rpc_get/set_timeout()
  • cm_get_client_info() replaced by cm_get_client_name()
  • ss_asctime() returns std::string
  • msystem.h forbids localtime(), gmtime(), ctime() and asctime(). Use the _r variants
  • midas.h defines INT8…UINT64. Define NO_INT_TYPES_DEFINE to suppress them
  • Device driver CMD_GET_* numbers changed. Recompile custom drivers
  • mlogger no longer writes unchanged history values periodically
  • RelWithDebInfo defines NDEBUG, disabling assert()
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2022-05-c
git submodule update --init
cd build
cmake ..
make install
Other enhancements
  • Web interface
    • Time zone selection for history plots and CSV exports
    • Submenus for custom pages
    • New modbvalue formats (thousands separators, %x, %b, ...)
    • The ODB page can show open records and clients
    • New JSON-RPC calls db_save, db_load and bm_receive_event
    • Rewritten sequencer page with debug mode
    • mhttpd exits if it cannot listen on all enabled ports
  • History
    • Factor/offset migrated into formulas
    • Tag names with colons and infinite values supported
    • Faster MySQL and FILE backends
    • RTSP camera recording via OpenCV
  • ODB
    • odbxx: new methods such as connect_and_fix_structure(). Arrays auto-enlarge by default
    • db_load() and odbedit load accept .json files
  • Sequencer
    • New ODBCREATE, ODBDELETE, ODBSAVE, ODBLOAD, BREAK and MSG commands
    • PARAM default values
    • Recursive INCLUDE and deeper nesting
  • Frontends
    • New mfed.cxx helper library and mdevice classes
    • Slow control reworked for multithreaded readout
    • New VXI-11 and mscbhv4 drivers
  • Event buffers and RPC
    • Vector and scatter-gather send/receive functions
    • Sensible write cache limits (elog 2401)
  • Logger and run control
  • Python API
    • Daemon mode for frontends
    • odb_watch reports which item changed
    • Alarm functions
    • New mmessenger forwards messages to Discord, Slack or Mattermost
  • Build
    • midasio and manalyzer are now submodules
    • Exported cmake targets (midas-targets.cmake)
    • Default build type is RelWithDebInfo
    • New sanitizer and NO_* cmake options
  • mdump reads .lz4 and .bz2 files
  • Internal: many sanitizer fixes, old elog and sequencer code removed

midas-2022-05-b and midas-2022-05-c add:

  • Faster odbxx subkey reading
  • History request limit raised to 1000 MB
  • Fixes for an mserver freeze and crash
  • mdump displays up to 9999 events
Bug fixes
  • Event buffer corruption and race conditions
  • mserver crashes and buffer overruns
  • mhttpd replies sent to the wrong socket
  • mlogger infinite loop in system history
  • Many sequencer fixes

2020-12

Release midas-2020-12-a

Frontends written with mfe must define a new variable, equipment_common_overwrite, or they won't compile.

Relevant elog entry - 2089 (midas-2020-12-a)

Major new features
Breaking changes

New variable for mfe frontends. Any frontends that are written in the mfe framework need to have an extra variable declared. This dictates whether the "Common" settings for an equipment get overwritten by the defaults specified in the EQUIPMENT listing part of the code when the frontend is started.

The old behaviour was that ODB values are never overwritten by the values in the code. Now it is configurable for whether the ODB or the code takes precedence.

To keep the old behaviour, add this line to your frontend code (somewhere near the equipment listing, in the global scope):

BOOL equipment_common_overwrite = false;

To use the new option, set the above variable to true.

If you do not add a line like this, your compiler will complain that the variable is undefined.

Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2020-12-a
git submodule update
cd build
make install

Then add equipment_common_overwrite to your mfe frontends, as described in Breaking changes.

Other enhancements
  • New ODB variable /Experiment/Enable sound can be used to globally prevent mhttpd from playing sounds
  • modbvalue elements on custom pages now support an onload() callback as well as onchange(). Most elements now also support a data-validate callback.
  • Minor improvements to mdump program: support for 64-bit data types and ability to load larger events if needed
  • Minor improvements to History plots and Buffers webpage
Bug fixes
  • Various bug fixes

2020-08

Release midas-2020-08-a

Adds odbxx, the C++ ODB interface, and image history. /Logger/Message file is replaced by new keys.

Relevant elog entry - 1987 (midas-2020-08-a)

Major new features
Deprecations
  • /Logger/Message file deprecated. mlogger warns about this when you restart it. /Logger/Message file has been replaced by /Logger/Message dir and /Logger/Message file date format. If your "Message file" used to just say "midas.log", then you can just delete the "Message file" key and leave the new entries blank. If you had a more customised value, then read the documentation of these keys to see how to use them.
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2020-08-a
git submodule update
cd build
make install
Other enhancements
  • Sequencer page is now JavaScript-based and more responsive
  • UTF-8 clean ODB (complains if any TID_STRING is invalid UTF-8)
  • mhttpd updated to mongoose 6.16 with much improved multithreading
  • mhttpd updated to use MBEDTLS in preference to problematic OpenSSL
  • MidasConfig.cmake contributed by Mathieu Guigue
Bug fixes
  • Various bug fixes

2020-03

Release midas-2020-03-a

Adds the Python library and the /WebServer ODB tree.

Relevant elog entry - 1854 (midas-2020-03-a)

Major new features
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2020-03-a
git submodule update
cd build
make install

Then, restart mhttpd and configure the new /WebServer ODB directory to your liking.

Other enhancements
  • New JavaScript-based sequencer page (via the "NewSequencer" link in the mhttpd menu)
Bug fixes
  • Various bug fixes

2019-09

Releases midas-2019-09-a through midas-2019-09-i

New JavaScript-based history plots. If you're upgrading from before 2019-06, also follow the C to C++ migration of 2019-06.

Relevant elog entries - 1706 (midas-2019-09), 1747 (midas-2019-09-e), 1749 (midas-2019-09-g) and 1750 (midas-2019-09-i)

Major new features
  • New JavaScript-based history plots (old image-based plots are available via the "OldHistory" link in the mhttpd menu)
Upgrade guide

If updating from a version before 2019-06, take special note of the upgrade instructions for that version. You will have to update your client code to adapt to C++.

# Grab the new code
cd $MIDASSYS
git checkout develop
git pull
git checkout midas-2019-09-a
git submodule update
git pull
# Finally, update mxml by updating the submodules
git submodule update --recursive
cd build 
cmake ..
make
make install
Other enhancements
  • Reduced memory and CPU usage of mhttpd web pages
  • Latest version of mxml
  • Support for MySQL 8+, which removed the my_global.h header
Bug fixes

2019-06

Releases midas-2019-06-a, midas-2019-06-b.

midas moved from C to C++, so client code needs changes. midas can now be built with cmake, and mxml and mscb are now git submodules.

Relevant elog entries - 1564 (midas-2019-06 with cmake and c++) and 1526 (How to convert C midas frontends to C++).

Major new features
  • Migration from C to C++. You will have to make changes to your clients (see Breaking changes).
  • Ability to compile using cmake/cmake3 as well as make. To use cmake, you can either build manually with mkdir build; cd build; cmake ..; make; make install, or use the handy shortcut make cmake3.
  • mxml and mscb are now included as git submodules. See the upgrade guide for how to checkout the latest version of these modules.
Breaking changes

Install location changed. The location where libraries and executables are built has changed. The OS-specific subdirectories (e.g. /linux/lib) have been replaced by common /lib and /bin directories for the main build. OS-specific directories are still used if you cross-compile midas for other architectures (e.g. using make linux32).

Migration from C to C++. This is one of the biggest user-facing changes in midas for a long time. Unfortunately it requires manual work from experimenters to update their client code:

  1. Update your Makefile
    1. Update library search path for code that links against libmidas or mfe.o ($MIDASSYS/linux/lib becomes $MIDASSYS/lib)
    2. If you reference mxml in your Makefile, change the include path to $MIDASSYS/mxml
    3. If you explicitly have the compiler as gcc, change it to g++
  2. Update frontend code to use mfe.h and build as C++
    1. Add #include "mfe.h" after including midas.h
    2. Remove extern C brackets around mfe-related code. Ideally there should be no extern C brackets anywhere.
    3. Ensure that frontend_name and frontend_file_name are const char* rather than char*.
    4. If you define your own global HNDLE hDB, change it to extern HNDLE hDB to pick up the one provided by mfe.
    5. Ensure that poll_event and interrupt_configure() use INT rather than INT[] for the source argument.
    6. If you use extern int frontend_index, change it to use the get_frontend_index() function from mfe.h instead.
    7. Ensure that the last argument to bk_create is cast to (void**)
  3. Try to compile, and fix any more compilation errors. Examples may include:
    1. Duplicate or mismatched declarations of functions defined in mfe.h (fix the mismatched declarations in your code)
    2. bool debug colliding with declaration in mfe.h (suggest to rename the variable in the client)
    3. Return value of malloc() etc needs to be cast to the correct data type (e.g. char* s = (char*)malloc(...))

An example diff of a frontend is:

  #include "midas.h"
+ #include "mfe.h"
  #include "msystem.h"
  #include "utils1.h"

- #ifdef __cplusplus
- extern "C" {
- #endif

- char *frontend_name = FE_NAME;
+ const char *frontend_name = FE_NAME;

- HNDLE hDB;
+ extern HNDLE hDB;

- #ifdef __cplusplus
- }
- #endif

- extern "C" int frontend_index;

  INT frontend_init() {
-   printf("We are running as frontend index %d", frontend_index);
+   printf("We are running as frontend index %d", get_frontend_index());
    return SUCCESS;
  }

- extern "C" INT interrupt_configure(INT cmd, INT[] source, PTYPE adr) {
+ INT interrupt_configure(INT cmd, INT source, PTYPE adr) {
   return 0;
  }
Known issues
  • cmake/cmake3: ZLIB support is not detected, so gzipped files cannot be written by the logger. Will be fixed in the next release, or you can update midas to a commit after August 2.
  • mxml can segfault due to a double free. Will be fixed in the next release, or you can update mxml to commit f6fc49d: cd mxml; git checkout f6fc49d; cd .. and re-compile midas.
Upgrade guide

Update midas:

# Grab the new code
cd $MIDASSYS
git checkout develop
git pull
git checkout midas-2019-06-b
git submodule update
git pull
git submodule update --init # this will checkout correct versions of mxml and mscb

# Tidy up the old build - be sure to delete the deprecated linux directory!
make clean
make cclean
rm -rf linux/bin
rm -rf linux/lib
rmdir linux

# Build the new midas
mkdir build 
cd build 
cmake ..
make
make install

If you have a script that sets up environment variables, you should change PATH from $MIDASSYS/linux/bin to $MIDASSYS/bin.

You should then restart mserver, mlogger, mhttpd, and any other midas programs that you run.

As mxml and mscb are included as submodules now, you can remove the external packages that were downloaded previously (assuming they aren't used by other experiments on the same machine). E.g.

rm -r $HOME/packages/mxml # new location $MIDASSYS/mxml
rm -r $HOME/packages/mscb # new location $MIDASSYS/mscb

Finally, update your experiment frontends as described in Breaking changes.

Bug fixes

2019-05

Releases midas-2019-05-cxx and midas-2019-05-before-cmake were development tags that are not intended to be used more widely.

2019-03

Releases midas-2019-03-f through midas-2019-03-h.

ODB and event buffer access is now fully thread-safe.

Relevant elog entries: 1513 (midas-2019-03-f), 1530 (midas-2019-03-g), 1543 (midas-2019-03-h).

Major new features
  • ODB and event buffer access is now fully thread-safe
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2019-03-h
make clean
make
Other enhancements
  • Stability improvements
Bug fixes

2019-02

Releases midas-2019-02-a and midas-2019-02-b.

The default format of ODB dumps in midas files is now JSON, and mhttpd has a new, more secure URL scheme.

Major new features
  • Format of ODB dumps in midas files can now be specified using new ODB key /Logger/Channels/<N>/Settings/ODB dump format
  • Rationalised and more secure URL scheme for webpages served by mhttpd
  • Conversion of many midas pages to more responsive design
Breaking changes
  • Default ODB dump format is now JSON. If your analysis tools parse the ODB dump at the start/end of your midas files and expect XML format, you may want to change the setting to xml.
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2019-02-b
make clean
make
Other enhancements
  • Location of most recent end-of-run ODB dump can be set using new ODB key /Logger/ODB Last Dump File
  • New mhttpd_exec_script() JavaScript function to execute a custom script
  • Stability and usability improvements
Bug fixes

2018-12

Release midas-2018-12-a.

The event buffer code was rewritten, and cm_watchdog() was removed, so programs must now call cm_yield() regularly.

Relevant elog entries - 1435 (removal of cm_watchdog()) and 1442 (cm_watchdog_thread())

Major new features
  • Rewrite of the event buffer code that sends and receives events, with checks of the buffer contents and mutexes to protect sending events from several threads
  • Corrupted event buffers are detected and automatically reset when a program connects to them
  • The write cache size of each mfe equipment can be set with the new ODB key /Equipment/<name>/Common/Write cache size
Breaking changes

cm_watchdog() removed. midas no longer uses a SIGALRM signal every second to update the watchdog timestamps and remove dead clients. Instead:

  • mfe frontends and mhttpd start a cm_watchdog_thread() that updates their timestamps every 2 seconds
  • Removing dead clients and checking alarms are done by cm_periodic_tasks(), which is called by cm_yield(). Other programs must call cm_yield() at least every 1-2 seconds, as described in Long-running programs. Programs that don't use cm_yield() (e.g. mserver) can call cm_periodic_tasks() instead, but it doesn't handle RPC requests, hotlinks or events
  • Code that relied on SIGALRM interrupting sleep() or select() every second will now wait for the full time

Remove any calls to cm_enable_watchdog() and cm_watchdog() from your programs, as these functions no longer exist.

bm_poll_event() takes no arguments. Remove the argument from any calls to bm_poll_event().

Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2018-12-a
make clean
make

Then update your programs as described in Breaking changes, and re-compile them.

Other enhancements
  • mlogger stops if an event buffer is corrupted
  • A program can connect to an existing event buffer even if it asks for a different buffer size
  • The message page remembers the selected facility when the page is reloaded
  • Improved parameter checking in odbedit
Bug fixes
  • Messy shutdown of remote clients and mserver when the connection between them is unexpectedly closed
  • Links on the status page now work when mhttpd is behind a proxy
  • Crash when a .odb file contains a zero-length string
  • ODB inline editor on slow network connections
  • Various other bug fixes

2017-10

Release midas-2017-10-a.

New HTML and JavaScript web pages, and the ODB is protected against corruption. This release was prepared on the feature/midas-2017-10 branch, and tagged in December 2018.

Relevant elog entries - 1329 (Pending release of midas), 1318 (odb multithread support repaired) and 1319 (Fixed mlogger memory corruption, updated mxml)

Major new features
  • New HTML and JavaScript web pages, including the status page, with a side navigation menu, a header showing the latest message and alarms, and spoken messages and alarm sounds (configured on the new Config page)
  • New custom page widgets: bars, thermometers and gauges, data-format for values, and onchange() callbacks
  • ODB shared memory is read-only except inside ODB functions, so that a bug in a program can't corrupt the ODB
  • Improved multithreading support for the ODB, using recursive mutexes
Breaking changes

The sequencer is a separate program. The sequencer no longer runs inside mhttpd. To use it, start the new msequencer program.

Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2017-10-a
make clean
make

Also update mxml to the latest version, as it fixes a memory corruption bug that affected mlogger.

Other enhancements
  • New ODB key /Experiment/ODB timeout sets how long programs wait to lock the ODB
  • New ODB key /Experiment/Enable core dumps
  • Maximum number of banks in an event increased from 1024 to 4096
  • Faster loading of JSON ODB files
  • New preserve_case option for the db_get_values JSON-RPC method
  • Tracing and timing of HTTP and JSON-RPC requests in mhttpd
  • The git revision is included in the midas version string
  • midas can be optionally compiled as C++
Bug fixes
  • ODB corruption when the ODB becomes 100% full
  • Race condition in the ODB locking code
  • mlogger memory corruption
  • Many JSON and JSON-RPC fixes
  • Various other bug fixes

2017-07

Releases midas-2017-07-a through midas-2017-07-c.

This was the first release that was tagged using a git tag.