dm_beat Module

Heartbeat message type.


Uses

  • module~~dm_beat~~UsesGraph module~dm_beat dm_beat module~dm_error dm_error module~dm_beat->module~dm_error module~dm_id dm_id module~dm_beat->module~dm_id module~dm_kind dm_kind module~dm_beat->module~dm_kind module~dm_net dm_net module~dm_beat->module~dm_net module~dm_node dm_node module~dm_beat->module~dm_node module~dm_time dm_time module~dm_beat->module~dm_time 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_node->module~dm_id module~dm_node->module~dm_kind module~dm_time->module~dm_error module~dm_time->module~dm_kind module~dm_util dm_util module~dm_time->module~dm_util module~dm_util->module~dm_error module~dm_util->module~dm_kind

Used by

  • module~~dm_beat~~UsedByGraph module~dm_beat dm_beat module~dmpack dmpack module~dmpack->module~dm_beat proc~dm_db_insert_beat dm_db_insert_beat proc~dm_db_insert_beat->module~dm_beat proc~dm_db_insert_beats dm_db_insert_beats proc~dm_db_insert_beats->module~dm_beat proc~dm_db_select_beat dm_db_select_beat proc~dm_db_select_beat->module~dm_beat proc~dm_html_beat dm_html_beat proc~dm_html_beat->module~dm_beat proc~dm_html_beats dm_html_beats proc~dm_html_beats->module~dm_beat proc~dm_test_dummy_beat dm_test_dummy_beat proc~dm_test_dummy_beat->module~dm_beat proc~dm_z_compress_type dm_z_compress_type proc~dm_z_compress_type->module~dm_beat

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: BEAT_CLIENT_LEN = 32

Client software name and version length.

integer, public, parameter :: BEAT_SIZE = storage_size(beat_type())/8

Size of beat_type in bytes.


Interfaces

public interface operator (==)

Returns whether heartbeats are equal.

  • public pure elemental function dm_beat_equals(beat1, beat2) result(equals)

    Returns .true. if given beats are equal.

    Arguments

    Type IntentOptional Attributes Name
    type(beat_type), intent(in) :: beat1

    The first beat.

    type(beat_type), intent(in) :: beat2

    The second beat.

    Return Value logical


Derived Types

type, public ::  beat_type

Status message (heartbeat) type.

Components

Type Visibility Attributes Name Initial
character(len=NODE_ID_LEN), public :: node_id = ' '

Node id (-0-9A-Z_a-z).

character(len=NET_IPV6_LEN), public :: address = ' '

Client IP address (IPv4, IPv6).

character(len=BEAT_CLIENT_LEN), public :: client = ' '

Client software name and version.

character(len=TIME_LEN), public :: time_sent = TIME_DEFAULT

Time heartbeat was sent.

character(len=TIME_LEN), public :: time_recv = TIME_DEFAULT

Time heartbeat was received.

integer, public :: error = E_NONE

Last client error.

integer, public :: interval = 0

Transmission interval in seconds.

integer, public :: uptime = 0

System uptime in seconds.


Functions

public pure elemental function dm_beat_equals(beat1, beat2) result(equals)

Returns .true. if given beats are equal.

Arguments

Type IntentOptional Attributes Name
type(beat_type), intent(in) :: beat1

The first beat.

type(beat_type), intent(in) :: beat2

The second beat.

Return Value logical

public pure elemental function dm_beat_is_valid(beat) result(valid)

Returns .true. if given beat type elements are valid.

Arguments

Type IntentOptional Attributes Name
type(beat_type), intent(in) :: beat

Beat type.

Return Value logical


Subroutines

public subroutine dm_beat_out(beat, unit)

Prints beat to standard output or given file unit.

Arguments

Type IntentOptional Attributes Name
type(beat_type), intent(inout) :: beat

Beat type.

integer, intent(in), optional :: unit

File unit.