You can configure various parts of GSEOS with options you set in the configuration file gseos.ini. The gseos.ini file is an ASCII file organized like a typical Windows configuration file (e.g. WIN.INI). It contains sections and keys with associated values in the various sections. Sections are delimited by '[Section]'. The sample below shows a sample entry:
[Project]
Name=MyProject
Title=MyProject
This entry defines the section 'Project' which has two keys: 'Name' and 'Title'.
Command line
You can specify a different ini file on the command line with the /ini switch. The argument following the /ini switch must be the path to a valid GSEOS configuration file (although it does not need to be named gseos.ini). This allows to manage several projects independently of each other. Also see the [ChooseConfig] section later in this chapter.
The syntax of the GSEOS ini handling is a superset of the Windows format. Please refer to the following paragraphs for more details:
Section and entry names are not case sensitive.
Section
The ini file consists of a sequence of sections. A section is identified by a section name embedded in square brackets. There can be only whitespaces leading the open bracket and only whitespace or comment after the section name. Comment characters are hash '#', and semi-colon ';'.
[Section]
Key = Value
[Section] # This is a comment, this is still a valid section.
Name = Image
Section Entries
A section can have a body consisting of Name = Value entries.
Load = System.cpd
It is also possible (unlike with regular Windows style ini files) to have multiple entries with the same name. In this case all values are added to the multi value list for that name.
[Config]
Load = System.cpb
Load = Rtiu\Rtiu.py
Instances
The special section [Instance] allows to map various different instances of GSEOS to start with different settings. The command line switch /Ixxx lets you specify the instance number you want to start. The entries in the [Instance] section have to list the section mappings you want to apply to the instance to start.
[Instance]
Project = ProjMOC PrjXRS PrjGRS
In the above example the section [Project] gets mapped to section [ProjMOC] for /I1, to [PrjXRS] for /I2, and to [PrjGRS] for /I3.
Note that the values have to be specified in the numerical order of the instance number. I.e. if you want to configure an instance /I5 you have to specify all instance mappings from 1 to 5. If you don't have any custom settings for a particular instance you can map this to the original section:
[Instance]
Project = Project Project PrjGRS Project Project5
If a particular instance mapping is not specified a section with the name of [InstanceNNN.Section] is looked up. If you run /I8 on the above configuration and you have defined a section [Instance8.Project] this section will be used.
The /I instance switch also takes a name argument. This name will be used to look up the instance section in the following way: InstanceName.Section
So if you specify /I MOC on the command line all sections will be mapped to MOC.Section.
[MOC.Project]
[MOC.Config]
If a section with that name doesn't exist it falls back to the original section name. If you have multiple configurations that share common sections like: Master1, Master2, Master3 all use the same [Config] section you can map the [Master1.Config], [Master2.Config], [Master3.Config] sections to another section (probably [Config]) with the following entries in the [Instance] section:
Master1.Config=Config
Master2.Config=Config
Master3.Config=Config
Choosing a configuration
The section [ChooseConfig] acts as an interactive configuration selector. You can configure various command line options and they are displayed in a dialog for the user to choose a configuration.
The [ChooseConfig] section has two entries: Option and CmdLine. The format of the entries is somewhat special. The entries have to be specified in pairs, Option and CmdLine together. The Option key specifies the name that is listed in the list box and the CmdLine is the command line switches with which GSEOS will be invoked. The following settings generate the dialog box above:
[ChooseConfig]
Option = P-ALICE
CmdLine = /ini i_ALICE/gseos.ini
Option = LORRI...
CmdLine = /I Master /ini i_LORRI/LORRI_ConfigFiles/gseos.ini
Option = PEPSSI...
CmdLine = /I Master /ini i_PEPSSI/PEPSSI_ConfigFiles/gseos.ini
Option = RALPH
CmdLine = /ini i_RALPH/gseos.ini
Option = SDC
CmdLine = /ini i_SDC/gseos.ini
Option = SWAP
CmdLine = /ini i_SWAP/gseos.ini
The entries are listed in the order in which they are specified in the ini file. Note that you can specify the /I and /ini switches especially which allows you to redirect to other configuration files. Processing of the [ChooseConfig] section is recursive. That is if you have another [ChooseConfig] section in another instance or ini file you direct to you can display child dialogs and can therefore build a hierarchy for more complex configurations.
__include__ Directive
The __include__ directive allows you to reference information from other ini files and therefore decentralize management of the gseos.ini file. The __include__ directive has the following syntax:
__include__ Filename [Section [Entry]]
__include__ directives can be placed either at top level or within a section. Depending on the arguments specified in the __include__ directive the amount of data to be included can be controlled. If only the file name is specified the entire file is added. If a section name is specified the section is added. If a section and entry is specified only the particular entry (or if multiple entries exist for the same name, those entries) will be added.
The process of adding is a merging process. If the section in question does not exist a new one is created and the contents added to the new section. If the section does exist the entries from the source section are added to the existing section. If an __include__ is specified on section level no new section is created but the entries from the source section are added (at the position where the include is located) to the existing section. If the __include__ directive specifies individual entries only those are added.
Writing sections takes the __include__ directive into account and writes the section back to the proper file. However, if single entries are __include__ed those are not written back to the include file, only entire included sections will be written to the source file.
The following sections list the configuration options recognized by GSEOS.
[Buffer]
[Command]
[Config]
[Console]
[Instance]
[Net]
[Project]
[PyStartup]
[Recorder]
[System]