Class: Dtn::Messages::System::ClientStats

Inherits:
MessageWithSimpleParser show all
Defined in:
lib/dtn/messages/system/client_stats.rb

Overview

Full client statistics

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MessageWithSimpleParser

parse, #termination?

Methods inherited from Dtn::Message

#callback_name, callback_name, parse

Class Method Details

.fieldsObject

rubocop:disable Metrics/MethodLength



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dtn/messages/system/client_stats.rb', line 10

def fields
  @fields ||= {
    _skip1: nil,
    _skip2: nil,
    type_int: :to_i,
    client_id: :to_i,
    client_name: :to_s,
    timestamp: :to_s,
    num_sym: :to_i,
    num_reg_sym: :to_i,
    kb_sent: :to_f,
    kb_recvd: :to_f,
    kb_queued: :to_f
  }
end

Instance Method Details

#after_initializationObject



28
29
30
# File 'lib/dtn/messages/system/client_stats.rb', line 28

def after_initialization
  normalize_type
end