Difference between revisions of "ONELAB scripting syntax"
From ONELAB
(→Clients declaration) |
(→Clients declaration) |
||
Line 6: | Line 6: | ||
== Clients declaration == | == Clients declaration == | ||
− | ;''name''.register(interfaced|encapsulated, pathname); | + | ;''name''.register(interfaced|encapsulated{, pathname}); |
− | :register the client ''name'' as an interfaced or native (encapsulated) client. The second argument is the | + | :register the client ''name'' as an interfaced or native (encapsulated) client. The second argument is the executable name (full pathname or any alias that would be defined on your system). |
;''name''.Path(''path'') | ;''name''.Path(''path'') | ||
− | :defines the pathname | + | :defines the pathname to the client executable, if it was not given as second argument in the ''register'' statement. |
;''name''.in(''file'',...) | ;''name''.in(''file'',...) | ||
− | :comma-separated list of input files. Their presence is checked before execution. File with a ''.ol'' extension are | + | :comma-separated list of input files. Their presence is checked before execution. File with a ''.ol'' extension are converted before execution. |
;''name'.out(''file'',...) | ;''name'.out(''file'',...) | ||
:comma separated list of output files. They are deleted before execution. | :comma separated list of output files. They are deleted before execution. | ||
− | ;''name''. | + | ;''name''.args('options'') |
− | : | + | :the string''options'' is interpreted (if it contains substitution statements) and appended to the commandline when calling the client. |
− | |||
− | |||
;''name''.Active(0|1) | ;''name''.Active(0|1) | ||
− | : | + | :sets the client active or inactive. Inactive clients are not executed but remain registered. |
+ | ;''name''.up(''file'',''i'',''j'',''Parameter/Name'', ...) | ||
+ | :tells ONELAB to extract the ''i''th numbers from the ''j''st line in the file ''file'', and to upload it as a new parameters named If the line number i is "-1", the last line of the file is considered instead of the ith. | ||
+ | ;''name''.merge(''file'', ...) | ||
+ | : | ||
+ | ;''name''.check() | ||
+ | : | ||
== Parameter declaration == | == Parameter declaration == |
Revision as of 12:25, 17 September 2012
Contents
Clients declaration
- name.register(interfaced|encapsulated{, pathname});
- register the client name as an interfaced or native (encapsulated) client. The second argument is the executable name (full pathname or any alias that would be defined on your system).
- name.Path(path)
- defines the pathname to the client executable, if it was not given as second argument in the register statement.
- name.in(file,...)
- comma-separated list of input files. Their presence is checked before execution. File with a .ol extension are converted before execution.
- name'.out(file,...)
- comma separated list of output files. They are deleted before execution.
- name.args('options)
- the stringoptions is interpreted (if it contains substitution statements) and appended to the commandline when calling the client.
- name.Active(0|1)
- sets the client active or inactive. Inactive clients are not executed but remain registered.
- name.up(file,i,j,Parameter/Name, ...)
- tells ONELAB to extract the ith numbers from the jst line in the file file, and to upload it as a new parameters named If the line number i is "-1", the last line of the file is considered instead of the ith.
- name.merge(file, ...)
- name.check()
Parameter declaration
- OL.parameter param_def; <param_def; ...>
- où param_def est une des commandes suivantes:
- name.number(Value,Path,Range,ShortHelp)
- définit un paramètre numérique Path/name, lui attribue la valeur Value et le range Range.
- La donnée Range est soit a:b:c (p.ex. 1:10:1) où a est la valeur minimale, b la valeur maximale et c le step; soit a:b#n où n est le nombre de steps.
- name.string(Value,Path,ShortHelp)
- définit un paramètre de type string
Conditional statements
- OL.iftrue(param)
- lignes de codes transférées si le paramètre "param est différent de 0 ou ""
- OL.else
- lignes de codes transférées si le paramètre "param est égal à 0 ""
- OL.endif
File inclusion
- OL.include(file)
- insert here the result of the preprocessing of the file file
Value substitution
- OL.get(name)
- insert here the value from the server of the parameter name. This command may appear several time in the same line.