![]() |
Stellarator-Tools
|
Base class representing a diagnostic dot file. This is an opaqe class. More...
Public Member Functions | |
| procedure | open (this, file, signal_id) |
| Open a diagnostic dot file. | |
| procedure | close (this) |
| Close a diagnostic dot file. | |
| procedure | parse_chord (signal_dot_file_ref, coordinate_type, chord_name, xcart_i, xcart_f) |
| Parse a chord from a diagnostic dot file. | |
| procedure | parse_real (this, message) |
| Parse a single real from a diagnostic dot file. | |
| procedure | parse_2_real (this, message) |
| Parse a two reals from a diagnostic dot file. | |
| procedure | parse_3_real (this, message) |
| Parse a three reals from a diagnostic dot file. | |
| procedure | parse_int (this, message) |
| Parse a single integer from a diagnostic dot file. | |
| procedure | parse_2_int (this, message) |
| Parse two integers from a diagnostic dot file. | |
| procedure | read_keyword (this, keywords) |
| Read a keyword from the diagnostic dot file. | |
| procedure | read_line (this, pre_message, post_message) |
| Read line from diagnostic dot file. | |
| procedure | check_status (this, status, pre_message, post_message) |
| Check and handle errors. | |
Public Attributes | |
| integer | i_line |
| Current line being parsed. | |
| character(len=6) | signal_id |
| Identify specifying the signal being parsed. | |
Base class representing a diagnostic dot file. This is an opaqe class.
| procedure signal_dot::signal_dot_file::check_status | ( | class (signal_dot_file), intent(inout) | this, |
| integer, intent(in) | status, | ||
| character (len=*), intent(in) | pre_message, | ||
| character (len=*), intent(in) | post_message | ||
| ) |
Check and handle errors.
Checks the staus for an error condition. If there was a error, report it. Error messages are formatted as:
pre_message signal_dot_file::signal_id post message signal_dot_file::i_line
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | status | The error code to check. |
| [in] | pre_message | Prefix message incase of error. |
| [in] | post_message | Post message incase of error. |
| procedure signal_dot::signal_dot_file::close | ( | class (signal_dot_file), intent(in) | this | ) |
Close a diagnostic dot file.
Closes a diagnostic dot file.
| [in] | this | An instance of a signal_dot_file object. |
| procedure signal_dot::signal_dot_file::open | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | file, | ||
| character (len=*), intent(in) | signal_id | ||
| ) |
Open a diagnostic dot file.
Opens a diagnostic dot file for reading.
| [input] | this A signal_dot_file instance. | |
| [in] | file | Filename of the diagnostic dot file. |
| [in] | signal_id | Description of the diagnostic dot file. |
| procedure signal_dot::signal_dot_file::parse_2_int | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | message | ||
| ) |
Parse two integers from a diagnostic dot file.
Reads two integers from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | message | Error message to report back if there was a problem. |
| procedure signal_dot::signal_dot_file::parse_2_real | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | message | ||
| ) |
Parse a two reals from a diagnostic dot file.
Reads three reals from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | message | Error message to report back if there was a problem. |
| procedure signal_dot::signal_dot_file::parse_3_real | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | message | ||
| ) |
Parse a three reals from a diagnostic dot file.
Reads three reals from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | message | Error message to report back if there was a problem. |
| procedure signal_dot::signal_dot_file::parse_chord | ( | class (signal_dot_file), intent(inout) | signal_dot_file_ref, |
| character (len=*), intent(in) | coordinate_type, | ||
| character (len=data_short_name_length), intent(out) | chord_name, | ||
| real(rprec), dimension(3), intent(out) | xcart_i, | ||
| real(rprec), dimension(3), intent(out), optional | xcart_f | ||
| ) |
Parse a chord from a diagnostic dot file.
Chords start with the first line as the chord name. The it is followed by one or two lines of 3 coordinates. All coodinates for the cord are returned in carteasian coordinates.
| [in,out] | signal_dot_file_ref | An instance of a signal_dot_file object. |
| [in] | coordinate_type | Specifies if the coordinate is cartesian or cylindrical. |
| [out] | chord_name | The name of the chord. |
| [out] | xcart_i | The initial position of the chord in cartesian coordinates. |
| [out] | xcart_f | The final position of the chord in cartesian coordinates. |
| procedure signal_dot::signal_dot_file::parse_int | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | message | ||
| ) |
Parse a single integer from a diagnostic dot file.
Reads a single integer from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | message | Error message to report back if there was a problem. |
| procedure signal_dot::signal_dot_file::parse_real | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | message | ||
| ) |
Parse a single real from a diagnostic dot file.
Reads a single real from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | message | Error message to report back if there was a problem. |
| procedure signal_dot::signal_dot_file::read_keyword | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), dimension(:), intent(in) | keywords | ||
| ) |
Read a keyword from the diagnostic dot file.
Read lines until a valid keyword is reached ot the end of the file is reached.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | keywords | List of keywords to search for. |
| procedure signal_dot::signal_dot_file::read_line | ( | class (signal_dot_file), intent(inout) | this, |
| character (len=*), intent(in) | pre_message, | ||
| character (len=*), intent(in) | post_message | ||
| ) |
Read line from diagnostic dot file.
Reads single line from the diagnostic dot file.
| [in,out] | this | An instance of a signal_dot_file object. |
| [in] | pre_message | Prefix message incase of error. |
| [in] | post_message | Post message incase of error. |