dm_csv_from Interface

public interface dm_csv_from

Generic derived type to CSV serialisation function.


Module Procedures

private function csv_from_beat(beat, separator) result(csv)

Returns allocatable string of beat in CSV format.

Arguments

Type IntentOptional Attributes Name
type(beat_type), intent(inout) :: beat

Beat type.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_beats(beats, header, separator) result(csv)

Returns allocatable string of beats in CSV format.

Arguments

Type IntentOptional Attributes Name
type(beat_type), intent(inout) :: beats(:)

Beat array.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_data_point(dp, separator) result(csv)

Arguments

Type IntentOptional Attributes Name
type(dp_type), intent(inout) :: dp

Data point type.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_data_points(data_points, header, separator) result(csv)

Returns allocatable string of data points in CSV format.

Arguments

Type IntentOptional Attributes Name
type(dp_type), intent(inout) :: data_points(:)

Data point array.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_log(log, separator) result(csv)

Returns allocatable string of log in CSV format: id, level, error, timestamp, node_id, sensor_id, target_id, observ_id, message.

Arguments

Type IntentOptional Attributes Name
type(log_type), intent(inout) :: log

Log data.

character(len=1), intent(in), optional :: separator

CSV field separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_logs(logs, header, separator) result(csv)

Returns allocatable string of logs in CSV format.

Arguments

Type IntentOptional Attributes Name
type(log_type), intent(inout) :: logs(:)

Array of log data.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_node(node, separator) result(csv)

Returns allocatable string of node in CSV format.

Arguments

Type IntentOptional Attributes Name
type(node_type), intent(inout) :: node

Node type.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_nodes(nodes, header, separator) result(csv)

Returns allocatable string of nodes in CSV format.

Arguments

Type IntentOptional Attributes Name
type(node_type), intent(inout) :: nodes(:)

Nodes array.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_observ(observ, separator) result(csv)

Returns allocatable string of observation in CSV format.

Arguments

Type IntentOptional Attributes Name
type(observ_type), intent(inout) :: observ

Observation data.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_observ_view(view, separator) result(csv)

Returns allocatable string of observation view (stub observation without receivers, requests, responses) in CSV format.

Arguments

Type IntentOptional Attributes Name
type(observ_view_type), intent(inout) :: view

Observation view type.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_observ_views(views, header, separator) result(csv)

Returns allocatable string of observation views in CSV format.

Arguments

Type IntentOptional Attributes Name
type(observ_view_type), intent(inout) :: views(:)

Array of observation views.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_observs(observs, header, separator) result(csv)

Returns allocatable string of observations in CSV format.

Arguments

Type IntentOptional Attributes Name
type(observ_type), intent(inout) :: observs(:)

Array of observations.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_sensor(sensor, separator) result(csv)

Returns allocatable string of sensor in CSV format.

Arguments

Type IntentOptional Attributes Name
type(sensor_type), intent(inout) :: sensor

Sensor type.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_sensors(sensors, header, separator) result(csv)

Returns allocatable string of sensors in CSV format.

Arguments

Type IntentOptional Attributes Name
type(sensor_type), intent(inout) :: sensors(:)

Sensors array.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_target(target, separator) result(csv)

Returns allocatable string of target in CSV format.

Arguments

Type IntentOptional Attributes Name
type(target_type), intent(inout) :: target

Target type.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.

private function csv_from_targets(targets, header, separator) result(csv)

Returns allocatable string of targets in CSV format.

Arguments

Type IntentOptional Attributes Name
type(target_type), intent(inout) :: targets(:)

Targets array.

logical, intent(in), optional :: header

CSV header flag.

character(len=1), intent(in), optional :: separator

CSV separator.

Return Value character(len=:), allocatable

Allocatable CSV string.