Class: CollectdServer::Packet::Values::Counter

Inherits:
Value
  • Object
show all
Defined in:
lib/collectd_server/packet.rb

Instance Attribute Summary

Attributes inherited from Value

#value

Instance Method Summary collapse

Methods inherited from Value

new_for_type

Constructor Details

#initialize(content) ⇒ Counter

Returns a new instance of Counter.



168
169
170
171
# File 'lib/collectd_server/packet.rb', line 168

def initialize(content)
  big, small = content.unpack('NN')
  @value = (big << 32) + (small)
end