DelftIO Configuration Fortran 90 Interface
Module files
use dio_plt_rw
Module includes the module dio_config, which implements the Init-functions below.
Initialization of the configuration
subroutine DioInit( [ configFile ] )
arguments | I/O | ||
character(*) | :: name | I | Optional: name of configuration file |
This routine may be called by each program that uses the DelftIO library
(if it's not called, the library will use its own defaults, see below).
If the (optional) configFilename is provided, this file is used to determine the required
configuration.
If it is not provided, DelftIO checks if a file dioconfig.ini exists on the current
working directory, in which case that file is used. If this file isn't available, its
existence is checked on the directory containing the current executable program. If
neither file exists, the following stream defaults are used for each dataset that is
opened on an automatically created stream:
In the dioconfig.ini file, information can be provided to overrule these library-defaults on two levels:
Of course, if required, the programmer still can overrule the configuration still force a dataset to be created on another type of stream than specified in the configuration file, by defining the dataset explicitly on a stream that he first has created.
The configuration file is according to the 'ini-file' format. An example will illustrate its use. Note that not all keywords (in as well the Defaults part a the a specific dataset part) need to be present (except of course for the 'Name' keyword).
Run time settings
The following options can be specified in the [Settings] part (the third column
shows the default DelftIO uses if no configuration file is used, or if the option is
not included in the configuration file).
Dataset options
The following options can be specified in the [Defaults] part or in a [Dataset<n>] part (the third column shows the default DelftIO uses if no configuration file is used, or if the option is not included in the configuration file).
Note 1: 'enumerated' options (like ASCII / Binary) are - for the moment - case sensitive.
Note 2: Boolean options can be specified in other terms than True/False:
Y|YES|yes|Yes|T|TRUE|true|True|J|JA|Ja|ja
N|NO|no|No|F|FALSE|false|False|N|NEE|Nee|nee
Option | Values | Description | Library Default |
StreamType | ASCII / Binary | File format for storage/retrieval of dataset | Binary |
Active | True / False | Indicaties if dataset set should be stored/retrieved indeed, or should be skipped (used for testing purposes). |
True |
OnLine | True / False | Indicaties if dataset is used for online coupling, i.e. if should DelftIO take care of the synchronization between the providing and retreiving process. | False |
Example of a DelftIO configuration file
[Settings]
Delay=200
TimeOut=00;00:02:00.00
[Defaults]
StreamType=ASCII
OnLine=True
NumberOfDatasets=2
[Dataset1]
Name=Dataset_A
StreamType=Binary
OnLine=False
[Dataset2]
Name=Dataset_B
Active=False