Module for serialising beat, log, node, observation, sensor, and target
derived types to CSV, JSON, JSONL, and Namelist.
The following serialisation formats are valid:
FORMAT_CSV
FORMAT_JSON
FORMAT_JSONL
FORMAT_NML
FORMAT_TSV
The example reads sensors from an observation database and writes them
in JSON format to a scratch file:
integer::rc,unittype(db_type)::dbtype(db_stmt_type)::db_stmttype(sensor_type)::sensortype(serial_class)::serialopen(action='readwrite',form='formatted',newunit=unit,status='scratch')call serial%create(sensor,FORMAT_JSON,unit=unit,empty=(rc/=E_NONE))rc=dm_db_open(db,'/var/dmpack/observ.sqlite')rc=dm_db_select_sensors(db,db_stmt,sensor)do while(rc==E_NONE)call serial%next(sensor)rc=dm_db_select_sensors(db,db_stmt,sensor)end docall dm_db_finalize(db_stmt)call dm_db_close(db)call serial%destroy()! Do something with the scratch file.! ...close(unit)
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Variables
Type
Visibility
Attributes
Name
Initial
integer,
public,
parameter
::
SERIAL_UNIT_NONE
=
-99999
Default file unit.
Abstract Interfaces
abstract interface
public subroutine dm_serial_callback(string)
Public callback routine to pass serialised type to.