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 (fromComment <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=1and set/WebServer/Terminal/Enable. Optional login and extra password - New EPICS Channel Access library that doesn't need EPICS Base, with
midas-caget,midas-caputand an example soft IOC (midas-soft-ioc) - New automated test suite (GoogleTest, pytest and Playwright), enabled with
-DMIDAS_BUILD_TESTS=ONand 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=1for 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 linkingmidas::midasget it automatically. Makefile projects need-std=c++20(or-std=c++17with the fallback).odbxx.hrefuses to compile below C++17 (details). - mhttpd no longer serves HTTPS. Run mhttpd behind a web server that handles HTTPS.
/WebServer/Enable https portand the related keys are ignored, and the openssl/mbedtls build options were removed. The browser terminal only works over HTTP if/WebServer/Terminal/Allow HTTPisy. - Removed or changed C/C++ functions
db_get_data1()removed. Usedb_get_key()withdb_get_data_vec(), ordb_get_data()cm_execute()removed, along with the odbeditexeccommand and/Experiment/Enable cm_execute. Usesystem()or sshjson_write()split intojson_write_json()andjson_write_string().db_copy_json_obsolete()renameddb_copy_json_jcopy().db_copy_json_array()anddb_copy_json_index()moved tomsystem.hwith a new signaturePROGRAM_INFO_STR,ALARM_ODB_STRandALARM_PERIODIC_STRmacros 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_HOSTis 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
multiclass driver formulas now use TinyExpr++ (C++20 builds). A few edge cases differ, e.g.1/0is now an error instead ofinf - JavaScript:
file_browser()was removed fromfilesrw.js. Usefile_picker(), which takes the same arguments - Python
pip installof themidaspackage now installspyflakes,numpyandlz4odb_set()withNoneraisesValueErrorodb_stop_watching()raisesKeyErrorfor a path that isn't watched- Empty strings in XML ODB dumps are read as
""instead ofNone
Deprecations
cm_shutdown(name, bUnique)is deprecated. Usecm_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
Hin 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:
Altand a letter (e.g.Alt+SforStatus,Alt+OforODB). HoldingAltunderlines the letters in the menu Snooze...button on theStatusandAlarmspages 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 allbutton - Event dump page: bank selection, and bytes shown as decimal with ASCII
- Cursor and
Tabkey navigation in all dialog boxes - Built-in pages use the new
modbswitchtoggle
- ODB browser
- 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
INCLUDEfiles and warnings for missing ODB keys. Python is checked by PySequencer (with pyflakes if installed) - New
/Sequencer/Command/Goto linejumps a running script to a line (ODB keys). Jumps into or out of aLOOP,IForSUBROUTINEare 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
- Conditions can combine terms with
- 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=1is set - New odbedit
ducommand 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
- Key and data free lists are checked when a client connects, and more kinds of corruption are reported. Repair is done only if
- History
- Measure the time and value differences between two points on a plot
/History/Images/Demois 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-lmsensorsis installed if it was built
- C++ API
- New
db_get_data_vec()anddb_get_data_index_vec()read ODB data into astd::vector, also over RPC - odbxx: typed exceptions (
odb_missing_key,odb_type_error, ...), file- and string-backed objects (odb::file(),odb::string()),contains(),is_directory(),named_items(), and full dirty-write support - odbxx:
compare()two trees, andmidas::odb::array()creates an array of a size chosen at runtime - odbxx string arrays grow to fit the longest string
- New
- Python API
- Robustness review of the
midaspackage: about 100 fixes (memory release, string truncation, UTF-8, links on remote clients, numpy, file reader) - New
reset_all_alarms().clients_exist()takesexact_match KeyErrorandTypeErrorraised for midas errors carry the midas status ine.codeodb_set()accepts"0x..."strings for float and double keys- Frontend data rate calculated exactly as in mfe
- Robustness review of the
- Web API (JavaScript)
- New widgets
modbtile,modbswitchandmodbgauge2 - Array elements can be selected by name in
data-odb-path, e.g.Variables/Input['Temp1'] - mplot: function plots (
data-function), measuring the differences between two points, Viridis palette, faster colour maps, CSV export of functions mtabsremember the selected tab and can be bookmarked with a URL parameter- New
dlgListBox().dlgGeneral()dialogs can be resized - New JSON-RPC methods
seq_validate,db_set_mode,ext_rename_fileandext_delete_file
- New widgets
- Build
install.shcompiles in parallel and adds the mscb Python package toPYTHONPATH- New cmake option
-DMIDAS_BUILD_DOCS=1builds this documentation (details)
- The
shiftscheduleshift-planning page and frontend is now part of the midas repository, inshiftschedule/(set up with its ownsetup.bash) - Internal
- More legacy C code moved to C++ (
std::string,std::vector, odbxx instead ofdb_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
- More legacy C code moved to C++ (
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_valueswithomit_old_timestampif the first key in a directory was skipped bk_locate()andbk_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-Xin 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-fillon history panels,Zero ylowwithLog axisgiving 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, mplotdata-x/data-yplots drawn in dark gray instead of blue - ODB browser: missing or hidden subdirectories, broken links,
watchbit display - Python: big-endian numpy data,
TID_STRUCTbanks, non-ASCII ODB paths, truncated files returned as complete events - PySequencer:
File/Pathstarting with/could escape the sequencer directory,seq.range()off-by-one,Stopmoved on to the next queued script - odbinit:
-sand.ODB_SIZE.TXTparsing, sizes over 2 GB (e.g.-s 4GiBgave a 1 MB ODB),MIDAS_DIRwithout a trailing/,--envpath to$MIDASSYS/bin - mdump:
-wrange 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,mtabandmpanelclasses - New install script (
install.sh). It checks dependencies, builds midas, creates an experiment and can install mhttpd as a systemd service. - Equipment page
History buttonsin/Equipment/<name>/Settingsadds a button to each variable that opens a plot of its historyOptions <variable>inSettingsgives 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::stringandstd::vectorarguments, without fixed buffer sizes (RPC_CXX). New JSON-RPC methodsjrpc_cxxandbrpc_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
rmloggerwere 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 linkALARM_CLASS_STRwas removed frommidas.h- Custom pages: for a
modbelement on an ODB directory,.valueis now a JavaScript object, not a JSON string. Remove anyJSON.parse()of it. - mplot JSON settings: the ODB paths of a dataset are now
xPath,yPath,zPath,xErrorPathandyErrorPath(werex,y,z,xErrorandyError). Thedata-xetc. attributes are unchanged. - PySequencer: on timeout,
wait_clients_running()raisesmidas.WaitTimeoutExpiredinstead ofRuntimeError plot_example.htmlwas removed. The examples are now a tab ofcustom_example.html.mjson_testwas renamedmjson_parse
Deprecations
- The
follow_linksargument ofdb_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.htmlis 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
--expdiroption, 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.
- New
- 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 validateoption checks the syntax before a script is started, saved or set as next, and refuses invalid scripts
- MSL:
WAIT ODBValuetakes an optional timeout, e.g.WAIT ODBValue, <path>, <op>, <value>, timeout, <seconds>[, <status variable>]. The status variable is1if the condition was met and0if the timeout expired. The web page shows the timeout countdown. - New
/Sequencer/Command/Goto linejumps to a line of the running script - PySequencer
- Timeouts for
wait_odb(),wait_events()andwait_func(), and more options forwait_func() - Timeout progress of waits is shown on the sequencer page
keep_modules_when_reloading_script()keeps modules (e.g. Rust/PyO3 ones) from being reloaded when a script starts
- Timeouts for
- Web page
- 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/Enabledset ton - The mdev example frontends (
mdev_fe,mdev_revpi_fe) are built by default - tmfe frontends handle binary RPCs (
brpc) and the newjrpc_cxx/brpc_cxxcalls - MSetPoint: non-working EPICS channels are disabled, and the page starts the EPICS frontend if it isn't running
- mdev skips equipment that has
- 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_CHARsupport- String arrays get the size of their longest string. New
string_size() - Offline use: XML files without
handleattributes can be read, and files are parsed only once
- New
- Python API
- Frontends support manually-triggered equipment (
EQ_MANUAL_TRIG), triggered withmanual_trig_client_call() - New
odb_chmod()sets the access mode of an ODB key - New
check_deferred_transition()for deferred transitions in programs that don't use the frontend framework
- Frontends support manually-triggered equipment (
- 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()anddeletePlot() - New
mouseWheelZoomsetting. Set it tofalseto 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-colorcan be a list of value/color pairs, to draw colored segments- Sliders accept
data-min-valueanddata-max-value
- mplot
- Build
- CMake writes
compile_commands.json(e.g. for clangd) - New thread sanitizer option (
cmake -DUSE_THREAD_SANITIZER=ON, orYES_THREAD_SANITIZER=1with the Makefile) - The example CMake files need CMake 3.10 or newer
- CMake writes
- 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
- Refactored ODB code (key lookup, deletion and locking), with new ODB torture tests in
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.odbis now safe. - Sequencer
- Crash at start-up when
Stop immediatelywas 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 sequenceparameters were sometimes not loaded- Editor fixes for paste, Shift+Tab and illegal characters in scripts
- Crash at start-up when
- 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
Hostheader - 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.json 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.sequencerAPI. - 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-pathcan 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 sizeis no longer used by mfe, and thewrite_cache_sizefield was removed fromEQUIPMENT_INFO. Remove the last value of your equipment's info initializer if you set it. Callset_write_cache_size("<buffer>", <bytes>)infrontend_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_DUMPandFORMAT_HBOOKremoved. UseFORMAT_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 Displayautomatically
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.pyand uses/PySequencerin the ODB. Only one instance can run at a time (use-c <name>for more). - PySequencer:
wait_func(), morewait_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/sequencerwhen first run - MSL:
$variablesinODBLOOKUP, and an error if a$variableis not defined - MSL: the script stops if
ODBLOOKUPfails orODBSETwrites beyond the end of an array - MSL:
INCLUDEfiles may have an explicit.mslextension - MSL:
#comments at the end of lines
- PySequencer is run with
- Web interface
- Sequencer page supports PySequencer (Python syntax highlighting and validation,
.pyfiles, offers to start the program). NewPySequencermenu 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: PySequencerwhen 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
/Custommenu entries without a file extension run JavaScript- The
Statusmenu entry also opens the custom status page
- Works behind F5 proxies (
modbvaluelinks no longer use#) - mhttpd serves
.ROOTfiles
- Sequencer page supports PySequencer (Python syntax highlighting and validation,
- Web API (JavaScript)
- mplot: time axis, error bars,
data-bgcolor, anddata-tooltipfor custom hover text - RPC errors show the server response
- mplot: time axis, error bars,
- 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 requiredis 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()(seeBreaking changes) - mfe:
set_max_event_size()can be called infrontend_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.
- mfe: new
- ODB
/Programs/<name>/Start commandis filled with the full command line, including arguments
- 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::odbuses the ODB from the run file when running offline
- odbxx: key lookups are case-insensitive (like
- Python API
- Logging handler that copies messages to the midas message log
MidasFilecan be used in awithstatementMidasClientcan raise an exception if a client with the same name exists- Equipment
overwrite_commonargument (like mfe'sequipment_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_TIMEOUTstatus: 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-tidytarget. 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 recordmidas::odb::save()of the whole ODB wrote an extra "root" key- mdump decoded the equipment format incorrectly
- MSL sequencer:
next_filenamewas 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/ukeys 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:
modbcheckboxwith float values, format specifiers, and robustness of mhttpd POST decoding
- ODB editor: crash and failures editing single keys, broken key re-sorting, selection and deletion, clicks in input boxes, the link dialog and the
- 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::driversandmidas::mscb. Link to these instead of compilingmfe.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(notCMAKE_INSTALL_LIBDIR, which may belib64)
Upgrade guide
cd $MIDASSYS
git pull
git checkout midas-2025-01-a
git submodule update
cd build
make install
Other enhancements
- Alarms: new
Alarm soundsetting for alarm classes, also in the Python helper - Web interface
- Equipment page: pager, units for extra display items
modbvalueshows arrays as comma-separated listsmodbselectworks with arrays (shows...if values differ)
- 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
Editablesettings
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.jsplotting library: graphs, histograms and colour maps - New equipment page (
eqtable), also available as a dialog viadlgEquipment() - 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_ODBis set. Previously this also happened whenever history was enabled. If your history relies on/Equipment/<name>/Variables, addRO_ODBtoread_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. Usemstrlcpy()/mstrlcat()frommstrlcpy.hdb_copy_xml()has an extraheaderargument- odbxx:
set_string()renamedset_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.cfrom your CMake files mana/rmanaremoved. Use manalyzer- JSON
TID_INT64values are encoded as stringsdb_save_json/db_load_jsonJSON-RPC methods removed- Loading JSON or XML truncates arrays to the file's size
runlog.logmoved to/Logger/Message dir- Sequencer
- Parameters go to
/Sequencer/Param/Value Command/Load filenameremoved. SetState/Filename, thenCommand/Load new file- A leading
/inINCLUDE,ODBLOADandODBSAVEmeans<experiment>/userfiles/sequencer
- Parameters go to
mhistory_init_single()removed. Usemhistory_init()
Deprecations
char*versions ofcm_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/Defaultstart page andlink:menu entriessetValue()on custom elementsdata-confirmanddata-inputonmodbvalue
- 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,ATEXITandODBLOOKUPcommands SCRIPToutput is stored inSCRIPT_RESULTPARAMsupports defaults, option lists and booleansWAITaccepts fractional seconds- Relative
INCLUDEpaths - Scripts live in
<experiment>/userfiles/sequencer
- Several sequencers can run at the same time (
- History
- Binned history reads via JSON-RPC
mh2sqlcan 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_NAMEenvironment variable
- The ODB is flushed to disk periodically (
- 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_remoteonlyandarm64_remoteonlycross-compile targets- Coverage build type
make installalso installs drivers, headers and cmake config- Examples are built by cmake
- Internal: much legacy
char*code converted tostd::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
.odbfiles TID_BITFIELDis 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
- TMFE C++ frontend framework rewritten
- Fully thread-safe event buffers and RPC, with millisecond timeouts and events up to 2 GB
- Sequencer: expressions, assignments, array variables and variables in ODB paths
- New Event Dump page showing live events
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. Userpc_get/set_timeout()cm_get_client_info()replaced bycm_get_client_name()ss_asctime()returnsstd::stringmsystem.hforbidslocaltime(),gmtime(),ctime()andasctime(). Use the_rvariantsmidas.hdefinesINT8…UINT64. DefineNO_INT_TYPES_DEFINEto suppress them- Device driver
CMD_GET_*numbers changed. Recompile custom drivers - mlogger no longer writes unchanged history values periodically
- RelWithDebInfo defines
NDEBUG, disablingassert()
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
modbvalueformats (thousands separators,%x,%b, ...) - The ODB page can show open records and clients
- New JSON-RPC calls
db_save,db_loadandbm_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 odbeditloadaccept.jsonfiles
- odbxx: new methods such as
- Sequencer
- New
ODBCREATE,ODBDELETE,ODBSAVE,ODBLOAD,BREAKandMSGcommands PARAMdefault values- Recursive
INCLUDEand deeper nesting
- New
- Frontends
- New
mfed.cxxhelper library andmdeviceclasses - Slow control reworked for multithreaded readout
- New VXI-11 and mscbhv4 drivers
- New
- Event buffers and RPC
- Vector and scatter-gather send/receive functions
- Sensible write cache limits (elog 2401)
- Logger and run control
- New
/Logger/Auto restart delay - More reliable transitions from mlogger
- New
- Python API
- Daemon mode for frontends
odb_watchreports which item changed- Alarm functions
- New
mmessengerforwards 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
.lz4and.bz2files - 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
- Ability to choose whether the code or the current ODB values take precedence for the "Common" settings of an equipment when starting a frontend. See elog thread 2014 for more details, and
Breaking changesbelow for instructions. - Lazylogger now supports writing data over SFTP
- Custom pages can now tie a
selectdrop-down box to an ODB value usingmodbselect
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 soundcan be used to globally prevent mhttpd from playing sounds modbvalueelements on custom pages now support anonload()callback as well asonchange(). Most elements now also support adata-validatecallback.- 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
- C++ ODB interface (odbxx). Think of it like a "magic"
std::mapthat syncs changes with the ODB - Image history for logging webcam images and displaying timelapses
- Much improved history plots
Deprecations
/Logger/Message filedeprecated. mlogger warns about this when you restart it./Logger/Message filehas been replaced by/Logger/Message dirand/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_STRINGis 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
- Python library wrapping the C++ library, with framework for writing clients and frontends
- New ODB tree
/WebServerthat gathers all mhttpd settings in one place, including the new ability for mhttpd to act as a proxy to other web servers
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 shortcutmake 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:
- Update your Makefile
- Update library search path for code that links against libmidas or mfe.o (
$MIDASSYS/linux/libbecomes$MIDASSYS/lib) - If you reference mxml in your Makefile, change the include path to
$MIDASSYS/mxml - If you explicitly have the compiler as
gcc, change it tog++
- Update library search path for code that links against libmidas or mfe.o (
- Update frontend code to use mfe.h and build as C++
- Add
#include "mfe.h"after includingmidas.h - Remove
extern Cbrackets around mfe-related code. Ideally there should be noextern Cbrackets anywhere. - Ensure that
frontend_nameandfrontend_file_nameareconst char*rather thanchar*. - If you define your own global
HNDLE hDB, change it toextern HNDLE hDBto pick up the one provided by mfe. - Ensure that
poll_eventandinterrupt_configure()useINTrather thanINT[]for thesourceargument. - If you use
extern int frontend_index, change it to use theget_frontend_index()function from mfe.h instead. - Ensure that the last argument to
bk_createis cast to(void**)
- Add
- Try to compile, and fix any more compilation errors. Examples may include:
- Duplicate or mismatched declarations of functions defined in mfe.h (fix the mismatched declarations in your code)
bool debugcolliding with declaration in mfe.h (suggest to rename the variable in the client)- 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
- 183 - mhttpd could write garbage to midas.log, which would break webpages that try to show messages
- 181 - race condition between msequencer and mhttpd could make sequencer webpage buttons useless
- 171 - make RPC calls more thread-safe
- 180 - addition of strcomb1 which is thread-safe; strcomb will be deprecated
- 179 - don't try to send an ODB dump to mlogger's ROOT output, as it would crash mlogger
- 184 - don't trap the user in an error loop if elog doesn't exist
- Minor fixes and stability improvements
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 bycm_yield(). Other programs must callcm_yield()at least every 1-2 seconds, as described in Long-running programs. Programs that don't usecm_yield()(e.g. mserver) can callcm_periodic_tasks()instead, but it doesn't handle RPC requests, hotlinks or events - Code that relied on
SIGALRMinterruptingsleep()orselect()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
.odbfile 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
Configpage) - New custom page widgets: bars, thermometers and gauges,
data-formatfor values, andonchange()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 timeoutsets 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_caseoption for thedb_get_valuesJSON-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.