If an iso file is read with the debug mode on, the source data (e.g. binary file) is stored with the file. By default this is not the case because it makes file objects unnecessarily large. Use these functions to retrieve and explore source structures.

iso_get_source_file_structure(iso_file)

iso_print_source_file_structure(x, ..., save_to_file = NULL)

# S3 method for iso_file
iso_print_source_file_structure(x, ..., save_to_file = NULL)

# S3 method for binary_isodat_file
iso_print_source_file_structure(
  x,
  start = 1,
  length = NULL,
  end = start + length,
  ...,
  save_to_file = NULL
)

# S3 method for binary_isodat_file
print(x, start = x$pos, length = 200, ...)

Arguments

iso_file

iso file object

x

the object for which to print the source file structure.

...

additional parameters depending on source file types

save_to_file

whether to save the source file structure to a text file (provide file path, will overwrite anything already in the file!) in addition to printing it out

start

starting position in the binary file to print from (prints the first block that spans this range)

length

length in the binary file to print to (by default NULL, which means print everything)

end

until which point in the binary file to print to. If provided, overrides whatever is specified in length

Details

Typically these functions are used for debugging purposes only.

Examples

isoreader:::iso_turn_debug_on()
#> Info: debug mode turned on, error catching turned on, caching turned off
iso_get_reader_example("dual_inlet_example.did") |>  
   iso_read_dual_inlet() |>
   iso_get_source_file_structure() |>
   iso_print_source_file_structure(length = 500)
#> Info: preparing to read 1 data files...
#> Info: reading file 'dual_inlet_example.did' with '.did' reader...
#> Info: finished reading 1 files in 0.92 secs
#> # Textual representation of the partial structure (bytes 1 - 504) of the isodat file.
#> # Print more/less by specifying the 'start', 'length' or 'end' parameters.
#> 0000001: <CFileHeader>{unknown-4: 'fe f7 31 01'}
#> 0000022:   <06-000>{text-10: 'CBlockData'}{text-18: 'CDualInletDocument'}<4x00>
#> 0000094:   <03-000>{unknown-2: '2f 00'}{text-20: 'Acquisition-1568.did'}{text-11: 'File Header'}<4x00>
#> 0000174:   <02-000>
#> 0000178:   <02-000>
#> 0000182: <CTimeObject>
#> 0000199:   <03-000>{unknown-2: '2f 00'}{text-4: 'Date'}{text-4: 'Date'}<4x00>
#> 0000233:   <01-000>{unknown-4: '4a 2b 4e 54'}
#> 0000241: <CStr>
#> 0000251:   <02-000>{text-18: 'RW2000TemplateName'}
#> 0000295:   <02-000>{text-84: 'C:\Thermo\Isodat NT\Global\User\Dual Inlet System\Result Workshop\Default Result.IRW'}
#> 0000471: <CDataIndex>
#> 0000487:   <03-000>{unknown-2: '2f 00'}{text-0: 'NA'}{text-0: 'NA'}<4x00>
if (FALSE) {
isoreader:::iso_turn_debug_on()
iso_get_reader_example("dual_inlet_example.did") |>  
   iso_read_dual_inlet() |>
   iso_get_source_file_structure() |>
   iso_print_source_file_structure(save_to_file = "structure.txt")
}