Class: SNMP::Response

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

Constant Summary

Constants inherited from PDU

PDU::ERROR_STATUS_CODE, PDU::ERROR_STATUS_NAME

Instance Attribute Summary

Attributes inherited from PDU

#error_index, #request_id, #varbind_list

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PDU

decode, #each_varbind, #encode_pdu, #error_status, #error_status=, #initialize

Constructor Details

This class inherits a constructor from SNMP::PDU

Class Method Details

.from_pdu(request) ⇒ Object


240
241
242
243
# File 'lib/snmp/pdu.rb', line 240

def from_pdu(request)
  Response.new(request.request_id, request.varbind_list,
               :noError, 0)
end

Instance Method Details

#encodeObject


246
247
248
# File 'lib/snmp/pdu.rb', line 246

def encode
  encode_pdu(Response_PDU_TAG)
end