OpenCMISS-Iron Internal API Documentation
binary_file Module Reference

This module handles the reading and writing of binary files. More...

Data Types

type  binary_file_info_type
 
type  binary_file_type
 
type  binary_tag_type
 
interface  BINARYCLOSEFILE
 
interface  BINARYOPENFILE
 
interface  BINARYSETFILE
 
interface  BINARYSKIPFILE
 
interface  ISBINARYFILEOPEN
 
interface  ISENDBINARYFILE
 
interface  read_binary_file
 
interface  write_binary_file
 

Functions/Subroutines

logical function inquire_open_binary_file (FILEID)
 
logical function inquire_eof_binary_file (FILEID, ERR, ERROR)
 
subroutine close_binary_file (FILEID, ERR, ERROR,)
 
subroutine close_cmiss_binary_file (FILEID, ERR, ERROR,)
 
subroutine open_binary_file (FILEID, COMMAND, FILENAME, ERR, ERROR,)
 
subroutine open_cmiss_binary_file (FILEID, FILE_TYPE, NUMBER_TAGS, VERSION, FILEVERSION, COMMAND, EXTENSION, FILENAME, ERR, ERROR,)
 
subroutine read_binary_file_intg (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_intg1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_sintg (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_sintg1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_lintg (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_lintg1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_sp (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_sp1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_dp (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_dp1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_character (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_logical (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_logical1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_spc (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_spc1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_dpc (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_file_dpc1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine read_binary_tag_header (FILEID, TAG, ERR, ERROR,)
 
subroutine reset_binary_number_tags (FILEID, NUMBER_TAGS, ERR, ERROR,)
 
subroutine set_binary_file (FILEID, SET_CODE, ERR, ERROR,)
 
subroutine skip_cm_binary_header (FILEID, SKIP, ERR, ERROR,)
 
subroutine skip_binary_file (FILEID, NUMBER_BYTES, ERR, ERROR,)
 
recursive subroutine skip_binary_tags (FILEID, TAG, ERR, ERROR,)
 
subroutine write_binary_file_intg (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_intg1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_sintg (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_sintg1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_lintg (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_lintg1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_sp (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_sp1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_dp (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_dp1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_character (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_logical (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_logical1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_spc (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_spc1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_dpc (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_file_dpc1 (FILEID, NUM_DATA, DATA, ERR, ERROR,)
 
subroutine write_binary_tag_header (FILEID, TAG, ERR, ERROR,)
 

Variables

integer(intg), parameter max_num_binary_files =99
 
integer(intg), parameter, public file_beginning =0
 
integer(intg), parameter, public file_current =1
 
integer(intg), parameter, public file_end =2
 
integer(intg), parameter file_same_endian =0
 
integer(intg), parameter file_change_endian =1
 
integer(intg), parameter binary_file_readable =1
 
integer(intg), parameter binary_file_writable =2
 
integer(intg), parameter cmiss_binary_identity =7
 
integer(intg), parameter, public cmiss_binary_matrix_file =1
 
integer(intg), parameter, public cmiss_binary_history_file =2
 
integer(intg), parameter, public cmiss_binary_signal_file =3
 
integer(intg), parameter cmiss_binary_identity_header =1
 
integer(intg), parameter cmiss_binary_machine_header =2
 
integer(intg), parameter cmiss_binary_file_header =3
 
logical, dimension(max_num_binary_files), save binary_file_used =.FALSE.
 

Detailed Description

This module handles the reading and writing of binary files.

Function/Subroutine Documentation

subroutine binary_file::close_binary_file ( type(binary_file_type), intent(out)  FILEID,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
subroutine binary_file::close_cmiss_binary_file ( type(binary_file_type), intent(inout)  FILEID,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
logical function binary_file::inquire_eof_binary_file ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 434 of file binary_file_f.f90.

References base_routines::enters(), and base_routines::exits().

logical function binary_file::inquire_open_binary_file ( type(binary_file_type), intent(in)  FILEID)

Definition at line 411 of file binary_file_f.f90.

subroutine binary_file::open_binary_file ( type(binary_file_type), intent(out)  FILEID,
character(len=*), intent(in)  COMMAND,
character(len=*), intent(in)  FILENAME,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
subroutine binary_file::open_cmiss_binary_file ( type(binary_file_type), intent(out)  FILEID,
integer(intg), intent(in)  FILE_TYPE,
integer(intg), intent(inout)  NUMBER_TAGS,
integer(intg), dimension(3), intent(in)  VERSION,
integer(intg), dimension(3), intent(out)  FILEVERSION,
character(len=*), intent(in)  COMMAND,
character(len=*), intent(in)  EXTENSION,
character(len=*), intent(in)  FILENAME,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
subroutine binary_file::read_binary_file_character ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
character(len=*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1330 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::read_binary_file_dp ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(dp), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1234 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_dp1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(dp), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1280 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_dpc ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(dpc), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1575 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_dpc1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(dpc), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1622 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_intg ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(intg), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
subroutine binary_file::read_binary_file_intg1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(intg), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 896 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_lintg ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(lintg), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1042 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_lintg1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(lintg), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1088 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_logical ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
logical, dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1381 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_logical1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
logical, intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1427 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_sintg ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(sintg), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 946 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_sintg1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(sintg), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 992 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_sp ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(sp), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1138 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_sp1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(sp), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1184 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_spc ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(spc), dimension(*), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1477 of file binary_file_f.f90.

subroutine binary_file::read_binary_file_spc1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(spc), intent(out)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1524 of file binary_file_f.f90.

subroutine binary_file::read_binary_tag_header ( type(binary_file_type), intent(in)  FILEID,
type(binary_tag_type), intent(out)  TAG,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1673 of file binary_file_f.f90.

Referenced by skip_binary_tags().

subroutine binary_file::reset_binary_number_tags ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUMBER_TAGS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
subroutine binary_file::set_binary_file ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  SET_CODE,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1783 of file binary_file_f.f90.

Referenced by reset_binary_number_tags().

subroutine binary_file::skip_binary_file ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUMBER_BYTES,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
recursive subroutine binary_file::skip_binary_tags ( type(binary_file_type), intent(in)  FILEID,
type(binary_tag_type), intent(in)  TAG,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1937 of file binary_file_f.f90.

References read_binary_tag_header().

subroutine binary_file::skip_cm_binary_header ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  SKIP,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
subroutine binary_file::write_binary_file_character ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
character(len=*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2432 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_dp ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(dp), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2344 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_dp1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(dp), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2387 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_dpc ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(dpc), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2650 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_dpc1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(dpc), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2693 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_intg ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(intg), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 1998 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_intg1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(intg), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2038 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_lintg ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(lintg), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2169 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_lintg1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(lintg), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2211 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_logical ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
logical, dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2475 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_logical1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
logical, intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2516 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_sintg ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(sintg), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2082 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_sintg1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
integer(sintg), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2124 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_sp ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(sp), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2256 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_sp1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
real(sp), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2299 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_spc ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(spc), dimension(*), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2561 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_file_spc1 ( type(binary_file_type), intent(in)  FILEID,
integer(intg), intent(in)  NUM_DATA,
complex(spc), intent(in)  DATA,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2604 of file binary_file_f.f90.

References file_same_endian.

subroutine binary_file::write_binary_tag_header ( type(binary_file_type), intent(in)  FILEID,
type(binary_tag_type), intent(out)  TAG,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Definition at line 2739 of file binary_file_f.f90.

Variable Documentation

integer(intg), parameter binary_file::binary_file_readable =1

Definition at line 252 of file binary_file_f.f90.

Referenced by open_binary_file().

logical, dimension(max_num_binary_files), save binary_file::binary_file_used =.FALSE.

Definition at line 304 of file binary_file_f.f90.

Referenced by close_binary_file(), and open_binary_file().

integer(intg), parameter binary_file::binary_file_writable =2

Definition at line 253 of file binary_file_f.f90.

Referenced by open_binary_file().

integer(intg), parameter binary_file::cmiss_binary_file_header =3

Definition at line 262 of file binary_file_f.f90.

Referenced by skip_cm_binary_header().

integer(intg), parameter, public binary_file::cmiss_binary_history_file =2

Definition at line 258 of file binary_file_f.f90.

integer(intg), parameter binary_file::cmiss_binary_identity =7

Definition at line 256 of file binary_file_f.f90.

Referenced by open_cmiss_binary_file(), and skip_cm_binary_header().

integer(intg), parameter binary_file::cmiss_binary_identity_header =1

Definition at line 260 of file binary_file_f.f90.

Referenced by skip_cm_binary_header().

integer(intg), parameter binary_file::cmiss_binary_machine_header =2

Definition at line 261 of file binary_file_f.f90.

Referenced by reset_binary_number_tags(), and skip_cm_binary_header().

integer(intg), parameter, public binary_file::cmiss_binary_matrix_file =1

Definition at line 257 of file binary_file_f.f90.

integer(intg), parameter, public binary_file::cmiss_binary_signal_file =3

Definition at line 259 of file binary_file_f.f90.

integer(intg), parameter, public binary_file::file_beginning =0

Definition at line 243 of file binary_file_f.f90.

Referenced by reset_binary_number_tags().

integer(intg), parameter binary_file::file_change_endian =1

Definition at line 249 of file binary_file_f.f90.

integer(intg), parameter, public binary_file::file_current =1

Definition at line 244 of file binary_file_f.f90.

Referenced by reset_binary_number_tags().

integer(intg), parameter, public binary_file::file_end =2

Definition at line 245 of file binary_file_f.f90.

Referenced by reset_binary_number_tags().

integer(intg), parameter binary_file::max_num_binary_files =99

Definition at line 240 of file binary_file_f.f90.

Referenced by open_binary_file().