Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  01 Apr 2025, Lukas Gerritzen, Suggestion, Sequencer ODBSET feature requests 
    Reply  01 Apr 2025, Lukas Gerritzen, Suggestion, Sequencer ODBSET feature requests 
       Reply  01 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
    Reply  01 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
    Reply  01 Apr 2025, Konstantin Olchanski, Suggestion, Sequencer ODBSET feature requests 
       Reply  01 Apr 2025, Pavel Murat, Suggestion, Sequencer ODBSET feature requests 
          Reply  02 Apr 2025, Konstantin Olchanski, Suggestion, Sequencer ODBSET feature requests 
             Reply  02 Apr 2025, Stefan Ritt, Suggestion, Sequencer ODBSET feature requests 
Message ID: 3019     Entry time: 01 Apr 2025     In reply to: 3013     Reply to this: 3021
Author: Konstantin Olchanski 
Topic: Suggestion 
Subject: Sequencer ODBSET feature requests 
> ODBSET "/Path/value[1,3,5]"
> ODBSET "/Path/value[1-5,7-9]"

we support this array index syntax in several places,
specifically, in javascript odb get and set mjsonrpc RPCs.

> SET GOODCHANNELS, "1-5,7,9"; ODBSET "/Path/value[$GOODCHANNELS]"
> SET BADCHANNELS, "6,8"; ODBSET "/Path/value[!$BADCHANNELS]"
> ODBSET "/Path/value[0-100, except $BADCHANNELS]"

this is very clever syntax, but I have not seen any programming
language actually implement it (not even perl).

there must be a good reason why nobody does this. probably we should not do it either.

but as Stefan said (and my opinion), the route of extending MIDAS sequencer
language until it becomes a superset of python, perl, tcl, bash, javascript
and algol is not a sustainable approach. I once looked at using LUA for this,
but I think basing off an full featured programming language like python
is better.

K.O.
ELOG V3.1.4-2e1708b5