dm_response Module

The observation response data derived type declaration.


Uses

  • module~~dm_response~~UsesGraph module~dm_response dm_response module~dm_error dm_error module~dm_response->module~dm_error module~dm_id dm_id module~dm_response->module~dm_id module~dm_kind dm_kind module~dm_response->module~dm_kind module~dm_util dm_util module~dm_response->module~dm_util module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_util->module~dm_error module~dm_util->module~dm_kind

Used by

  • module~~dm_response~~UsedByGraph module~dm_response dm_response module~dm_geocom dm_geocom module~dm_geocom->module~dm_response module~dm_geocom_api dm_geocom_api module~dm_geocom->module~dm_geocom_api module~dm_request dm_request module~dm_geocom->module~dm_request module~dm_geocom_api->module~dm_response module~dm_geocom_api->module~dm_request module~dm_observ dm_observ module~dm_observ->module~dm_response module~dm_observ->module~dm_request module~dm_report dm_report module~dm_report->module~dm_response module~dm_log dm_log module~dm_report->module~dm_log module~dm_request->module~dm_response module~dmpack dmpack module~dmpack->module~dm_response module~dmpack->module~dm_geocom module~dmpack->module~dm_geocom_api module~dmpack->module~dm_observ module~dmpack->module~dm_report module~dmpack->module~dm_request module~dm_job dm_job module~dmpack->module~dm_job module~dmpack->module~dm_log module~dm_logger dm_logger module~dmpack->module~dm_logger module~dm_lua_geocom dm_lua_geocom module~dmpack->module~dm_lua_geocom module~dm_mqueue dm_mqueue module~dmpack->module~dm_mqueue module~dm_sync dm_sync module~dmpack->module~dm_sync module~dm_atom dm_atom module~dmpack->module~dm_atom module~dm_mqueue_util dm_mqueue_util module~dmpack->module~dm_mqueue_util proc~dm_html_responses dm_html_responses proc~dm_html_responses->module~dm_response proc~dm_lua_api_register dm_lua_api_register proc~dm_lua_api_register->module~dm_response proc~dm_lua_api_register->module~dm_log proc~dm_regex_request dm_regex_request proc~dm_regex_request->module~dm_response proc~dm_regex_request->module~dm_request proc~dm_test_dummy_request dm_test_dummy_request proc~dm_test_dummy_request->module~dm_response proc~dm_test_dummy_request->module~dm_request module~dm_job->module~dm_observ module~dm_log->module~dm_observ module~dm_logger->module~dm_observ module~dm_logger->module~dm_log module~dm_lua_geocom->module~dm_geocom_api module~dm_lua_geocom->module~dm_request module~dm_mqueue->module~dm_observ module~dm_mqueue->module~dm_log module~dm_sync->module~dm_observ proc~dm_csv_header_observ dm_csv_header_observ proc~dm_csv_header_observ->module~dm_observ proc~dm_csv_header_observ->module~dm_request proc~dm_db_insert_observ dm_db_insert_observ proc~dm_db_insert_observ->module~dm_observ proc~dm_db_insert_observs dm_db_insert_observs proc~dm_db_insert_observs->module~dm_observ proc~dm_db_select_observ dm_db_select_observ proc~dm_db_select_observ->module~dm_observ proc~dm_db_select_observ_ids dm_db_select_observ_ids proc~dm_db_select_observ_ids->module~dm_observ proc~dm_db_select_observ_views dm_db_select_observ_views proc~dm_db_select_observ_views->module~dm_observ proc~dm_db_select_observs_by_id dm_db_select_observs_by_id proc~dm_db_select_observs_by_id->module~dm_observ proc~dm_db_select_observs_by_time dm_db_select_observs_by_time proc~dm_db_select_observs_by_time->module~dm_observ proc~dm_html_observ dm_html_observ proc~dm_html_observ->module~dm_observ proc~dm_html_observs dm_html_observs proc~dm_html_observs->module~dm_observ proc~dm_html_request dm_html_request proc~dm_html_request->module~dm_request proc~dm_regex_response_string dm_regex_response_string proc~dm_regex_response_string->module~dm_request proc~dm_test_dummy_observ dm_test_dummy_observ proc~dm_test_dummy_observ->module~dm_observ proc~dm_test_dummy_observ->module~dm_request proc~dm_tty_read_request dm_tty_read_request proc~dm_tty_read_request->module~dm_request proc~dm_tty_write_request dm_tty_write_request proc~dm_tty_write_request->module~dm_request proc~dm_z_compress_type dm_z_compress_type proc~dm_z_compress_type->module~dm_observ proc~dm_z_compress_type->module~dm_log module~dm_atom->module~dm_log module~dm_mqueue_util->module~dm_mqueue proc~dm_arg_validate dm_arg_validate proc~dm_arg_validate->module~dm_log proc~dm_config_open dm_config_open proc~dm_config_open->module~dm_lua_geocom proc~dm_db_insert_log dm_db_insert_log proc~dm_db_insert_log->module~dm_log proc~dm_db_insert_sync dm_db_insert_sync proc~dm_db_insert_sync->module~dm_sync proc~dm_db_insert_sync_log dm_db_insert_sync_log proc~dm_db_insert_sync_log->module~dm_sync proc~dm_db_insert_sync_node dm_db_insert_sync_node proc~dm_db_insert_sync_node->module~dm_sync proc~dm_db_insert_sync_observ dm_db_insert_sync_observ proc~dm_db_insert_sync_observ->module~dm_sync proc~dm_db_insert_sync_sensor dm_db_insert_sync_sensor proc~dm_db_insert_sync_sensor->module~dm_sync proc~dm_db_insert_sync_target dm_db_insert_sync_target proc~dm_db_insert_sync_target->module~dm_sync proc~dm_db_select_log dm_db_select_log proc~dm_db_select_log->module~dm_log proc~dm_db_select_logs_by_observ dm_db_select_logs_by_observ proc~dm_db_select_logs_by_observ->module~dm_log proc~dm_db_select_sync_log dm_db_select_sync_log proc~dm_db_select_sync_log->module~dm_sync proc~dm_db_select_sync_logs dm_db_select_sync_logs proc~dm_db_select_sync_logs->module~dm_sync proc~dm_db_select_sync_node dm_db_select_sync_node proc~dm_db_select_sync_node->module~dm_sync proc~dm_db_select_sync_nodes dm_db_select_sync_nodes proc~dm_db_select_sync_nodes->module~dm_sync proc~dm_db_select_sync_observ dm_db_select_sync_observ proc~dm_db_select_sync_observ->module~dm_sync proc~dm_db_select_sync_observs dm_db_select_sync_observs proc~dm_db_select_sync_observs->module~dm_sync proc~dm_db_select_sync_sensor dm_db_select_sync_sensor proc~dm_db_select_sync_sensor->module~dm_sync proc~dm_db_select_sync_sensors dm_db_select_sync_sensors proc~dm_db_select_sync_sensors->module~dm_sync proc~dm_db_select_sync_target dm_db_select_sync_target proc~dm_db_select_sync_target->module~dm_sync proc~dm_db_select_sync_targets dm_db_select_sync_targets proc~dm_db_select_sync_targets->module~dm_sync proc~dm_html_log dm_html_log proc~dm_html_log->module~dm_log proc~dm_html_logs dm_html_logs proc~dm_html_logs->module~dm_log proc~dm_test_dummy_log dm_test_dummy_log proc~dm_test_dummy_log->module~dm_log proc~luaopen_libdmpack luaopen_libdmpack proc~luaopen_libdmpack->module~dm_lua_geocom

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: RESPONSE_NAME_LEN = 8

Max. response name length.

integer, public, parameter :: RESPONSE_UNIT_LEN = 8

Max. response unit length.

integer, public, parameter :: RESPONSE_TYPE_REAL64 = 0

8-byte signed real.

integer, public, parameter :: RESPONSE_TYPE_REAL32 = 1

4-byte signed real.

integer, public, parameter :: RESPONSE_TYPE_INT64 = 2

8-byte signed integer.

integer, public, parameter :: RESPONSE_TYPE_INT32 = 3

4-byte signed integer.

integer, public, parameter :: RESPONSE_TYPE_LOGICAL = 4

Boolean.

integer, public, parameter :: RESPONSE_TYPE_BYTE = 5

Byte.

integer, public, parameter :: RESPONSE_TYPE_STRING = 6

Byte string.

integer, public, parameter :: RESPONSE_TYPE_LAST = 6

Never use this.

integer, public, parameter :: RESPONSE_TYPE_DEFAULT = RESPONSE_TYPE_REAL64

Default response type.

integer, public, parameter :: RESPONSE_TYPE_NAME_LEN = 7

Max. response type name length.

character(len=*), public, parameter :: RESPONSE_TYPE_NAMES(RESPONSE_TYPE_REAL64:RESPONSE_TYPE_LAST) = [character(len=RESPONSE_TYPE_NAME_LEN)::'real64', 'real32', 'int64', 'int32', 'logical', 'byte', 'string']

Response value type names.

integer, public, parameter :: RESPONSE_SIZE = storage_size(response_type())/8

Size of response_type in bytes.


Interfaces

public interface operator (==)

Returns whether requests are equal.

  • public pure elemental function dm_response_equals(response1, response2) result(equals)

    Returns .true. if given responses are equal.

    Arguments

    Type IntentOptional Attributes Name
    type(response_type), intent(in) :: response1

    The first response.

    type(response_type), intent(in) :: response2

    The second response.

    Return Value logical


Derived Types

type, public ::  response_type

Response of a sensor.

Components

Type Visibility Attributes Name Initial
character(len=RESPONSE_NAME_LEN), public :: name = ' '

Response name (-0-9A-Z_a-z).

character(len=RESPONSE_UNIT_LEN), public :: unit = ' '

Response unit.

integer, public :: type = RESPONSE_TYPE_DEFAULT

Response value type.

integer, public :: error = E_NONE

Response error.

real(kind=r8), public :: value = 0.0_r8

Response value.


Functions

public pure elemental function dm_response_equals(response1, response2) result(equals)

Returns .true. if given responses are equal.

Arguments

Type IntentOptional Attributes Name
type(response_type), intent(in) :: response1

The first response.

type(response_type), intent(in) :: response2

The second response.

Return Value logical

public pure elemental function dm_response_is_valid(response) result(valid)

Returns .true. if given response is valid. A response is valid if attribute name is a valid id, attribute type is a valid response value type, and attribute error is a valid error code.

Arguments

Type IntentOptional Attributes Name
type(response_type), intent(in) :: response

Response type.

Return Value logical

public pure elemental function dm_response_type_is_valid(type) result(valid)

Returns .true. if the given response value type is valid.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: type

Response value type.

Return Value logical

public pure function dm_response_type_to_name(type) result(str)

Returns allocatable string of response value type name, or invalid if the type is invalid.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: type

Response value type.

Return Value character(len=:), allocatable

Response value type name.


Subroutines

public subroutine dm_response_out(response, unit)

Prints response to standard output or given file unit.

Arguments

Type IntentOptional Attributes Name
type(response_type), intent(inout) :: response
integer, intent(in), optional :: unit