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.



62
63
64
# File 'lib/net/snmp.rb', line 62

def initialize value
		@value = value
end

Instance Method Details

#to_berObject



65
66
67
# File 'lib/net/snmp.rb', line 65

def to_ber
		@value.to_ber_application(1)
end