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).

Configuration options

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).

Option Values Description Library Default
Delay nr. of milliseconds Number of milliseconds to wait before checking file existence (used by the low level synchronization functions). This delay time is very important when running applications on other drives then the local PC-drives, or when running on Unix. If its value is set too low, DelftIO may access files that are not available yet (due to delays in the operating system), which will lead to errors in the data exchange. 10 mSec. for PC,
500 for Unix
TimeOut day;hour:min:sec.centiSec
string
Determines after which time synchronized Get/Put functions should return, if the data is not available or can not be put;
Format: dd;hh:mm:ss.cs
00;00:01:00.00

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