Changes between Version 13 and Version 14 of AlsprocDevelopment


Ignore:
Timestamp:
Sep 20, 2013, 3:15:04 PM (11 years ago)
Author:
besm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AlsprocDevelopment

    v13 v14  
    1515Generally, the structure of the program is arranged by branches where alsproc.c is the root of the tree and branches are things like scn parsing, sup reading, navigation reading, etcetera. Output formats are modular, making them very easy to add and remove. Parameters passed to the program externally should be passed around internally using pointers to a config_struct structure, to help avoid dramatic changes in the API on a regular basis among other things, any developer should be sure to use it. The broadness of its use could be expanded at the time of writing.
    1616
     17Arguments are passed into alsproc.c and processing into a config_struct structure, which is passed to processor.c which commissions each branch and passes the data into alspro.dll and gives the result to output.c.
     18
     19SCN reading and interpreting is the most complex part of the problem, split into 3 abstraction layers. At the first level, scn_stream.c, raw data is read in from the relevant files and serialised. At the next layer, scn_record.c, the program makes sense of the raw data casting it into records and validating them, dropping any garbage. At the third layer, scn_interpreter.c, records are combined with meta-data and a-priori knowledge to produce meaningful interpretations of each record.
    1720
    1821Output modules can be added by defining 3 functions and a structure instance: functions for each of opening, writing, and closing; and a structure to hold pointers to those functions. Access to these should be exposed in a header file, while actual code should be contained in their own source file. ''out_txt'' is a good example of an output module, which outputs point data to a .txt file simply translating points to human readable text using fprintf, it can be copied and used as a template for any future modules. Once you have a module, edit output.c and add a clause for your module in open_output_stream which translates config->output_format to your structure holding pointers to your functions, and stores the result in out->fmt.