Contains subroutines to convert various derived types to CSV format.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=1), | public, | parameter | :: | CSV_SEPARATOR | = | ',' |
Default CSV field separator. |
integer, | public, | parameter | :: | CSV_BUFFER_LEN | = | 8192 |
CSV line buffer length. |
Generic derived type to CSV serialisation function.
Returns allocatable string of beat in CSV format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(beat_type), | intent(inout) | :: | beat |
Beat type. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of beats in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dp_type), | intent(inout) | :: | dp |
Data point type. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of data points in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Returns allocatable string of log in CSV format: id, level, error, timestamp, node_id, sensor_id, target_id, observ_id, message.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(log_type), | intent(inout) | :: | log |
Log data. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV field separator. |
Allocatable CSV string.
Returns allocatable string of logs in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Returns allocatable string of node in CSV format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(node_type), | intent(inout) | :: | node |
Node type. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of nodes in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Returns allocatable string of observation in CSV format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(observ_type), | intent(inout) | :: | observ |
Observation data. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of observation view (stub observation without receivers, requests, responses) in CSV format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(observ_view_type), | intent(inout) | :: | view |
Observation view type. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of observation views in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Returns allocatable string of observations in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Returns allocatable string of sensor in CSV format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sensor_type), | intent(inout) | :: | sensor |
Sensor type. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of sensors in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Returns allocatable string of target in CSV format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(target_type), | intent(inout) | :: | target |
Target type. |
||
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Allocatable CSV string.
Returns allocatable string of targets in CSV format.
Type | Intent | Optional | 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. |
Allocatable CSV string.
Generic derived type from CSV reader.
Reads log from file or standard input. If no separator character is passed, the default one will be used (comma). If a quote character is given, separators within quoted strings will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(log_type), | intent(out) | :: | log |
Log type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
|
character(len=1), | intent(in), | optional | :: | quote |
CSV quote character. |
Reads node from file or standard input. If no separator character is passed, the default one will be used (comma). If a quote character is given, separators within quoted strings will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(node_type), | intent(out) | :: | node |
Node type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
|
character(len=1), | intent(in), | optional | :: | quote |
CSV quote character. |
Reads observation from file or standard input. If no separator character is passed, the default one will be used (comma). If a quote character is given, separators within quoted strings will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(observ_type), | intent(out) | :: | observ |
Observation type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
|
character(len=1), | intent(in), | optional | :: | quote |
CSV quote character. |
Reads sensor from file or standard input. If no separator character is passed, the default one will be used (comma). If a quote character is given, separators within quoted strings will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sensor_type), | intent(out) | :: | sensor |
Sensor type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
|
character(len=1), | intent(in), | optional | :: | quote |
CSV quote character. |
Reads target from file or standard input. If no separator character is passed, the default one will be used (comma). If a quote character is given, separators within quoted strings will be ignored.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(target_type), | intent(out) | :: | target |
Target type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
|
character(len=1), | intent(in), | optional | :: | quote |
CSV quote character. |
Generic derived type to CSV writer.
Writes beat to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(beat_type), | intent(inout) | :: | beat |
Beat type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes beats to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(beat_type), | intent(inout) | :: | beats(:) |
Beat array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes data point to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dp_type), | intent(inout) | :: | data_point |
Data point type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes data points to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dp_type), | intent(inout) | :: | data_points(:) |
Data point array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes log to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(log_type), | intent(inout) | :: | log |
Log type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV field separator. |
Writes logs to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(log_type), | intent(inout) | :: | logs(:) |
Log array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV field separator. |
Writes node to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(node_type), | intent(inout) | :: | node |
Node type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes nodes to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(node_type), | intent(inout) | :: | nodes(:) |
Node array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes observation to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(observ_type), | intent(inout) | :: | observ |
Observation type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes observations to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(observ_type), | intent(inout) | :: | observs(:) |
Observation array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Write sensor to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sensor_type), | intent(inout) | :: | sensor |
Sensor type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes sensors to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sensor_type), | intent(inout) | :: | sensors(:) |
Sensor array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes target to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(target_type), | intent(inout) | :: | target |
Target type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Writes targets to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(target_type), | intent(inout) | :: | targets(:) |
Target array. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
|
logical, | intent(in), | optional | :: | header |
CSV header flag. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
Returns header string of CSV representation of the beat type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns header string of CSV representation of the data point type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns header string of CSV representation of the log type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns header string of CSV representation of the node type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns CSV header string of CSV representation of the observation type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns CSV header string of CSV representation of the observation view type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns header string of CSV representation of the sensor type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.
Returns header string of CSV representation of the target type as allocatable string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
CSV header string.