Serialisation class.
Constructor of serialisation class. Argument type
must be one of:
beat_type
log_type
node_type
observ_type
sensor_type
target_type
If argument newline
is passed and .true.
, a newline character is
appended to output in format CSV, JSONL, or NML passed to the
callback routine callback
. The argument error
is set to E_INVALID
if one of the arguments is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(out) | :: | this |
Serial object to create. |
||
class(*), | intent(inout) | :: | type |
Type to serialise. |
||
integer, | intent(in) | :: | format |
Format enumerator ( |
||
procedure(dm_serial_callback), | optional | :: | callback |
Output callback. |
||
integer, | intent(in), | optional | :: | unit |
Output unit. |
|
logical, | intent(in), | optional | :: | empty |
No content to expect. |
|
logical, | intent(in), | optional | :: | header |
Add CSV header. |
|
logical, | intent(in), | optional | :: | newline |
Add newline to callback argument. |
|
character(len=1), | intent(in), | optional | :: | separator |
CSV separator. |
|
integer, | intent(out), | optional | :: | error |
Error code. |
Destroys serialisation object and outputs last bytes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Serialises the passed beat type to CSV, JSON, JSONL, or Namelist, depending on the format configured.
On error, the subroutine sets argument error
to:
E_EMPTY
if the serial object has been declared as empty.E_WRITE
if writing to unit failed.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
type(beat_type), | intent(inout) | :: | beat |
Beat type. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Serialises the passed log type to CSV, JSON, JSONL, or Namelist, depending on the format configured.
On error, the subroutine sets argument error
to:
E_EMPTY
if the serial object has been declared as empty.E_WRITE
if writing to unit failed.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
type(log_type), | intent(inout) | :: | log |
Log type. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Serialises the passed node type to CSV, JSON, JSONL, or Namelist, depending on the format configured.
On error, the subroutine sets argument error
to:
E_EMPTY
if the serial object has been declared as empty.E_WRITE
if writing to unit failed.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
type(node_type), | intent(inout) | :: | node |
Node type. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Serialises the passed observation type to CSV, JSON, JSONL, or Namelist, depending on the format configured.
On error, the subroutine sets argument error
to:
E_EMPTY
if the serial object has been declared as empty.E_WRITE
if writing to unit failed.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
type(observ_type), | intent(inout) | :: | observ |
Observation type. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Serialises the passed sensor type to CSV, JSON, JSONL, or Namelist, depending on the format configured.
On error, the subroutine sets argument error
to:
E_EMPTY
if the serial object has been declared as empty.E_WRITE
if writing to unit failed.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
type(sensor_type), | intent(inout) | :: | sensor |
Sensor type. |
||
integer, | intent(out), | optional | :: | error |
Error code. |
Serialises the passed target type to CSV, JSON, JSONL, or Namelist, depending on the format configured.
On error, the subroutine sets argument error
to:
E_EMPTY
if the serial object has been declared as empty.E_WRITE
if writing to unit failed.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(serial_class), | intent(inout) | :: | this |
Serial object. |
||
type(target_type), | intent(inout) | :: | target |
Target type. |
||
integer, | intent(out), | optional | :: | error |
Error code. |