Overview

Your Process may generate a large amount of data during the whole execution, and logging data can be slow. If you are only interested in reviewing its output in one or more time windows, you can set these logging windows in advance of execution. Currently, all windows have to be specified explicitly in advance of execution.

Instants and windows

You can request that an individual output be logged by using the following syntax (in Matlab):

M Source Code (against 995)
exe = brahms_execution; exe = exe.log('process>output');

To have a particular time instant logged, and no other, use this syntax:

M Source Code (against 995)
exe = brahms_execution; exe = exe.log('process>output', {'window', '0.2'});

This will log the output at t=0.2 seconds, and turn off logging at all other sample times. To log in a particular time range, use this syntax:

M Source Code (against 995)
exe = brahms_execution; exe = exe.log('process>output', {'window', '0.2:0.4'});

This will log from 0.2 to 0.4 seconds. Note that the output for t=0.2 is logged, that for t=0.4 is not - to include the output at t=0.4 as well, specify the t=0.4 instant explicitly:

M Source Code (against 995)
exe = brahms_execution; exe = exe.log('process>output', {'window', '0.2:0.4,0.4'});

Any number of instants and ranges can be included in this comma-separated string, to build up any pattern of logging you require.

Periodic logging

It may happen that you want to record the logs periodically. You could specify each logging range explicitly using the syntax outlined above, but that may make for a very long string. Alternatively, you can specify periodic logging. Examine the following:

M Source Code (against 995)
exe = brahms_execution; exe = exe.log('process>output', {'window', '@0:1:10,0.2:0.4'});

This will log the window t=0.2 seconds to t=0.4 seconds, and the window t=1.2 to t=1.4, etc., up until the last at t=9.2 to t=9.4. The sub-string beginning with the '@' character is the 'origin specifier', because it specifies ten time instants at which we specify the virtual time to be zero, t_v=0, relative to which the range t_v=0.2 to t_v=0.4 is then logged.

Complex examples

More formally, the 'window specifier' (the whole string passed) is made up of multiple 'origin specifiers', separated by semi-colons. '0.2:0.4,0.4' and '@0:1:10,0.2:0.4' are examples of origin specifiers. The second of these begins with a 'repeat specifier' (a sub-string beginning with the "@" character). The first is, by lacking a repeat specifier, the 'global origin specifier', and implies the base time origin (i.e. the single non-repeating window beginning at t=0, not repeating, and not ending). The remainder of both origin specifiers is a comma-separated list of time instants and time ranges, relative to the specified repeating window (or base window), at which logging should be performed.

Most window specifier cases will be very simple - to illustrate a complex case, consider the following taken from brahms_test window.

M Source Code (against 995)
window = '0.03,0.07:0.27; @0.33:0.1:0.63,0.02:0.04,0.06,0.08; @0.7:0.04:0.9,0.01'; exe = exe.log('src>out', {'window', window});

This example will log the output src>out at t=0.03, and at all samples between t=0.07 and t=0.27 (not including t=0.27). Then, for each of the time origins t=0.33, t=0.43, t=0.53, it will log the output at t_v=0.02 to t_v=0.04, along with the instants t_v=0.06 and t_v=0.08. Then, for each of the origins t=0.7, t=0.74, t=0.78, t=0.82, t=0.86, it will log the instant at t_v=0.01. Examine brahms_test window if this sordid explanation remains unclear.

Whole system

You can set windowing for the whole system - settings for individual logs will override it, if present. Just use, for instance:

M Source Code (against 995)
window = '0.03,0.07:0.27; @0.33:0.1:0.63,0.02:0.04,0.06,0.08; @0.7:0.04:0.9,0.01'; exe.window = window;