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.



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

def initialize value
		@value = value
end

Instance Method Details

#to_berObject



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

def to_ber
		@value.to_ber_application(1)
end