dm_report Module

Derived types for report generation.


Uses

  • module~~dm_report~~UsesGraph module~dm_report dm_report module~dm_file dm_file module~dm_report->module~dm_file module~dm_id dm_id module~dm_report->module~dm_id module~dm_kind dm_kind module~dm_report->module~dm_kind module~dm_log dm_log module~dm_report->module~dm_log module~dm_node dm_node module~dm_report->module~dm_node module~dm_plot dm_plot module~dm_report->module~dm_plot module~dm_response dm_response module~dm_report->module~dm_response module~dm_sensor dm_sensor module~dm_report->module~dm_sensor module~dm_target dm_target module~dm_report->module~dm_target module~dm_time dm_time module~dm_report->module~dm_time module~dm_file->module~dm_kind module~dm_error dm_error module~dm_file->module~dm_error iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_log->module~dm_id module~dm_log->module~dm_kind module~dm_log->module~dm_node module~dm_log->module~dm_sensor module~dm_log->module~dm_target module~dm_log->module~dm_time module~dm_log->module~dm_error module~dm_observ dm_observ module~dm_log->module~dm_observ module~dm_uuid dm_uuid module~dm_log->module~dm_uuid module~dm_node->module~dm_id module~dm_node->module~dm_kind module~dm_plot->module~dm_file module~dm_plot->module~dm_kind module~dm_plot->module~dm_time iso_c_binding iso_c_binding module~dm_plot->iso_c_binding module~dm_dp dm_dp module~dm_plot->module~dm_dp module~dm_plot->module~dm_error module~dm_pipe dm_pipe module~dm_plot->module~dm_pipe module~dm_string dm_string module~dm_plot->module~dm_string module~dm_response->module~dm_id module~dm_response->module~dm_kind module~dm_response->module~dm_error module~dm_util dm_util module~dm_response->module~dm_util module~dm_sensor->module~dm_id module~dm_sensor->module~dm_kind module~dm_sensor->module~dm_node module~dm_target->module~dm_id module~dm_target->module~dm_kind module~dm_target->module~dm_util module~dm_time->module~dm_kind module~dm_time->module~dm_error module~dm_time->module~dm_util unix unix module~dm_time->unix module~dm_dp->module~dm_kind module~dm_dp->module~dm_time module~dm_dp->module~dm_error module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii module~dm_observ->module~dm_id module~dm_observ->module~dm_kind module~dm_observ->module~dm_node module~dm_observ->module~dm_response module~dm_observ->module~dm_sensor module~dm_observ->module~dm_target module~dm_observ->module~dm_time module~dm_observ->module~dm_error module~dm_observ->module~dm_util module~dm_observ->module~dm_uuid module~dm_request dm_request module~dm_observ->module~dm_request module~dm_pipe->module~dm_kind module~dm_pipe->module~dm_error module~dm_pipe->unix module~dm_string->module~dm_kind module~dm_string->module~dm_error module~dm_util->module~dm_kind module~dm_util->module~dm_error module~dm_request->module~dm_id module~dm_request->module~dm_kind module~dm_request->module~dm_response module~dm_request->module~dm_time module~dm_request->module~dm_error module~dm_request->module~dm_util

Used by

  • module~~dm_report~~UsedByGraph module~dm_report dm_report module~dmpack dmpack module~dmpack->module~dm_report

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: REPORT_FORMAT_LEN = PLOT_TERMINAL_NAME_LEN

Max. plot format name length.

integer, public, parameter :: REPORT_META_LEN = 4096

Max. plot meta description length.

integer, public, parameter :: REPORT_TITLE_LEN = 256

Max. plot title length.

integer, public, parameter :: REPORT_FORMAT_NONE = 0

Invalid format.

integer, public, parameter :: REPORT_FORMAT_HTML = 1

HTML5.

integer, public, parameter :: REPORT_FORMAT_PDF = 2

PDF.

integer, public, parameter :: REPORT_FORMAT_PS = 3

PostScript.

integer, public, parameter :: REPORT_FORMAT_LAST = 3

Never use this.

integer, public, parameter :: REPORT_FORMAT_NAME_LEN = 4

Max. report format name.

character(len=*), public, parameter :: REPORT_FORMAT_NAMES(REPORT_FORMAT_NONE:REPORT_FORMAT_LAST) = [character(len=REPORT_FORMAT_NAME_LEN)::'none', 'html', 'pdf', 'ps']

Report format names.


Derived Types

type, public ::  report_observ_type

Single plot of observations.

Components

Type Visibility Attributes Name Initial
character(len=REPORT_FORMAT_LEN), public :: format = PLOT_TERMINAL_NAMES(PLOT_TERMINAL_SVG)

Plot format.

character(len=SENSOR_ID_LEN), public :: sensor = ' '

Sensor id.

character(len=TARGET_ID_LEN), public :: target = ' '

Target id.

character(len=RESPONSE_NAME_LEN), public :: response = ' '

Response name.

character(len=RESPONSE_UNIT_LEN), public :: unit = ' '

Response unit.

character(len=REPORT_TITLE_LEN), public :: title = ' '

Plot title.

character(len=REPORT_TITLE_LEN), public :: subtitle = ' '

Plot sub-title.

character(len=REPORT_META_LEN), public :: meta = ' '

Plot description.

character(len=8), public :: color = ' '

Foreground colour.

integer, public :: width = 1000

Plot width in pixels.

integer, public :: height = 400

Plot height in pixels.

logical, public :: pagebreak = .false.

Add page break behind (for PDF output only).

logical, public :: disabled = .false.

Disable plot.

real(kind=r8), public :: scale = 1.0_r8

Scale factor for respone value (optional).

type, public ::  report_plot_type

Section plots of report.

Components

Type Visibility Attributes Name Initial
character(len=FILE_PATH_LEN), public :: database = ' '

Path to observation database (required).

character(len=REPORT_TITLE_LEN), public :: title = 'Plots'

Section title.

character(len=REPORT_META_LEN), public :: meta = ' '

Description text.

logical, public :: disabled = .false.

Generate plots.

type(report_observ_type), public, allocatable :: observs(:)

Plots to generate.

type, public ::  report_log_type

Section logs of report.

Components

Type Visibility Attributes Name Initial
character(len=FILE_PATH_LEN), public :: database = ' '

Path to observation database (required).

character(len=REPORT_TITLE_LEN), public :: title = 'Logs'

Section title.

character(len=REPORT_META_LEN), public :: meta = ' '

Description text.

integer, public :: min_level = LL_WARNING

Minimum log level.

integer, public :: max_level = LL_CRITICAL

Maximum log level.

logical, public :: disabled = .false.

Generate plots.

type, public ::  report_type

Report type with plot and log settings.

Components

Type Visibility Attributes Name Initial
character(len=NODE_ID_LEN), public :: node = ' '

Node id.

character(len=TIME_LEN), public :: from = ' '

Timestamp (ISO 8601).

character(len=TIME_LEN), public :: to = ' '

Timestamp (ISO 8601).

character(len=FILE_PATH_LEN), public :: output = ' '

Path of output file.

character(len=FILE_PATH_LEN), public :: style = ' '

Path to CSS file to inline (HTML only).

character(len=REPORT_TITLE_LEN), public :: title = 'Report'

Report title.

character(len=REPORT_TITLE_LEN), public :: subtitle = ' '

Report sub-title.

character(len=REPORT_META_LEN), public :: meta = ' '

Report description text.

integer, public :: format = REPORT_FORMAT_NONE

Format (HTML, PDF, PS).

logical, public :: verbose = .true.

Include warnings, errors, and empty plot sections.

type(report_plot_type), public :: plot

Plots section.

type(report_log_type), public :: log

Logs sections.


Functions

public pure elemental function dm_report_format_from_name(name) result(format)

Returns report format enumerator from name. On error, the result is REPORT_FORMAT_NONE.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

Format name.

Return Value integer

public pure elemental function dm_report_format_is_valid(format) result(valid)

Returns .true. if format enumerator is valid. The format REPORT_FORMAT_NONE is invalid.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: format

Report format type (REPORT_FORMAT_*).

Return Value logical

public function dm_report_is_valid(report) result(valid)

Returns .true. if given report type is valid, else .false.. The attributes plot and log are only validated if enabled.

Arguments

Type IntentOptional Attributes Name
type(report_type), intent(inout) :: report

Report type.

Return Value logical