Profiles are INI files that can configure the IIO-Oscilloscope software or manipulate its behavior.
There are several situations where profiles can be used.
The state of a IIO-Oscilloscope session can be saved to a profile. In a similar way the state of the session can be restored by loading the saved profile or other profiles with different configurations.
A special use of profiles is the ability to use them as a set of instructions in order to run/close the software, start/stop the data acquisition, test if certain software properties are within a specified range of values, log properties and their values to files, capture screenshots or display custom popup message.
Properties that profiles contain are grouped into sections. Each section is designated to one different part of IIO-Oscilloscope. The following sections are recognized by the profile parser of the software:
A section of a profile can be split which allows a section to be placed in more than one place inside a file.
Sections can be skipped out of a profile without making the profile invalid. But as a result the software profile parser will use the default values for all properties that are related to that section.
The cycle instruction runs (cycles) the software for a given number of microseconds.
cycle=[microseconds]
Where:
[microseconds] - Number of microseconds. Type: unsigned int.
Applies in section: [IIO Oscilloscope - Capture Window<N>]
The quit instruction signals the software to terminate its execution.
quit=1
Applies in section: [IIO Oscilloscope - Capture Window<N>]
The capture instruction signals the software to start capturing data or to stop the process.
capture=[state]
Where:
[state] - State of the capture process. It can be 0 or 1.
Applies in section: [IIO Oscilloscope - Capture Window<N>]
Profile instructions that repeat themselves can be rewritten in a more compact way using loops. There are two types of available loops:
The sequence of numbers the SEQ loop iterates through, starts from [first] and reaches [last] with a step of [increment].
<SEQ> [var] [first] [increment] [] </SEQ>
Where:
[var] - The name of the loop variable. Type: string. Longer names that 127 characters will be truncated.
[first] - Type: long long.
[increment] - Type: long long.
[last] - Type: long long.
Applies in section: All sections.
The FOR loop iterates through the values specified within the curly brackets. All values must be separated by the space character.
<FOR> [var] in {[space-separated values]} </FOR>
Where:
[var] - The name of the loop variable. Type: string. Longer names that 127 characters will be truncated.
[space-separated values] - strings without the space character.
Applies in section: All sections.
Loops can be nested. Any combination is possible and the nesting level is not limited.
Usage example:
<FOR> y in {1960 1995 2000} year=<y> <SEQ> d 1 7 28 day=<d> </SEQ> </FOR>
The test instruction tells the software profile parser to treat the profile as a test profile.
test=1
Applies in section: [IIO Oscilloscope]
The instructions below will test if markers and iio attributes values are within a given interval. A test failure will stop the parsing of the profile and a popup with an error message will be displayed.
test.marker.[m]=[min] [max]
test.[device].[attribute].[type]=[min] [max]
Where:
[m] - The index of the marker.
[device] - The name of the iio device.
[attribute] - The name of the iio attribute of the iio device.
[type] - Any of the following: int, double.
[min] - Type: double.
[max] - Type: double.
The test.message instruction will display a popup window with the message specified in the instruction.
test.message=[message to display]
Where:
[message] - Any string message.
Applies in section: [IIO Oscilloscope - Capture Window<N>]
- nothing yet
The save_png instruction signals the software to terminate its execution.
save_png=[filename].png
Where:
[filename] - The name of the file the image should be saved.
Applies in section: [IIO Oscilloscope - Capture Window<N>]