Class: Net::SNMP::Counter32

Inherits:
Object
  • Object
show all
Defined in:
lib/net/snmp.rb

Overview

SNMP 32-bit counter. Defined in RFC1155 (Structure of Mangement Information), section 6. A 32-bit counter is an ASN.1 application [1] implicit unsigned integer with a range from 0 to 2^^32 - 1.

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Counter32

Returns a new instance of Counter32.


32
33
34
# File 'lib/net/snmp.rb', line 32

def initialize value
  @value = value
end

Instance Method Details

#to_berObject


35
36
37
# File 'lib/net/snmp.rb', line 35

def to_ber
  @value.to_ber_application(1)
end