Module for keeping track of data record synchronisation status.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | SYNC_ID_LEN | = | UUID_LEN |
Synchronisation id length (must equal UUID length). |
integer, | public, | parameter | :: | SYNC_TYPE_NONE | = | 0 |
No type (invalid). |
integer, | public, | parameter | :: | SYNC_TYPE_NODE | = | 1 |
Node. |
integer, | public, | parameter | :: | SYNC_TYPE_SENSOR | = | 2 |
Sensor. |
integer, | public, | parameter | :: | SYNC_TYPE_TARGET | = | 3 |
Target. |
integer, | public, | parameter | :: | SYNC_TYPE_OBSERV | = | 4 |
Observation. |
integer, | public, | parameter | :: | SYNC_TYPE_LOG | = | 5 |
Log. |
integer, | public, | parameter | :: | SYNC_TYPE_LAST | = | 5 |
Never use this. |
integer, | public, | parameter | :: | SYNC_TYPE_NAME_LEN | = | 6 |
Max. type name length. |
character(len=*), | public, | parameter | :: | SYNC_TYPE_NAMES(SYNC_TYPE_NONE:SYNC_TYPE_LAST) | = | [character(len=SYNC_TYPE_NAME_LEN)::'none', 'node', 'sensor', 'target', 'observ', 'log'] |
Array of sync type names. |
integer, | public, | parameter | :: | SYNC_SIZE | = | storage_size(sync_type())/8 |
Size of |
Returns whether sync types are equal.
Returns .true.
if given sync types are equal.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sync_type), | intent(in) | :: | sync1 |
First sync data. |
||
type(sync_type), | intent(in) | :: | sync2 |
Second sync data. |
Log, observation, node, sensor and target synchronisation type.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | type | = | SYNC_TYPE_NONE |
Sync data type. |
|
character(len=SYNC_ID_LEN), | public | :: | id | = | ' ' |
Sync data id. |
|
character(len=TIME_LEN), | public | :: | timestamp | = | TIME_DEFAULT |
Timestamp of last synchronisation attempt. |
|
integer, | public | :: | code | = | 0 |
HTTP response code of DMPACK server. |
|
integer, | public | :: | attempts | = | 0 |
Number of (unsuccessful) attempts to transfer. |
Returns .true.
if given sync data is valid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sync_type), | intent(in) | :: | sync |
Sync type. |
Returns synchonisation type from given name.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Sync type name. |
Returns .true.
if given sync type enumerator is valid. The
type SYNC_TYPE_NONE
is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | type |
Sync type enum. |
Returns name of synchronisation type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | type |
Sync type enum. |
Name of sync type.
Prints sync type to standard output or given file unit.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sync_type), | intent(inout) | :: | sync |
Sync type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |