Class: Majoron::AntHill::SMPP::SMPPUnbindResp

Inherits:
SMPPResp show all
Defined in:
lib/pdu/smpp_unbind_resp.rb

Instance Attribute Summary

Attributes inherited from SMPPPDU

#header

Instance Method Summary collapse

Methods inherited from SMPPResp

#init

Methods inherited from SMPPPDU

#command_id, #command_length, #command_status, #command_status=, #sequence_number, #sequence_number=

Constructor Details

#initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil) ⇒ SMPPUnbindResp

Constructor.



24
25
26
# File 'lib/pdu/smpp_unbind_resp.rb', line 24

def initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil)
	super(CommandId::CM_UNBIND_RESP, command_status, sequence_number)
end

Instance Method Details

#decode_packet(decoder) ⇒ Object

Interface to decode SMPP packet



35
36
37
38
# File 'lib/pdu/smpp_unbind_resp.rb', line 35

def decode_packet(decoder)
	# Decode header and mandatory fields
	@header = decoder.decode_header()
end

#encode_packet(encoder) ⇒ Object

Interface to encode SMPP packet



29
30
31
32
# File 'lib/pdu/smpp_unbind_resp.rb', line 29

def encode_packet(encoder)
	# Encode header and mandatory fields
	encoder.encode_header(@header)
end

#output_packet(outputter) ⇒ Object

Interface to output SMPP packet



47
48
49
50
# File 'lib/pdu/smpp_unbind_resp.rb', line 47

def output_packet(outputter)
	# Output header and mandatory fields
	outputter.output_header(@header)
end

#validate_packet(validator) ⇒ Object

Interface to validate SMPP packet



41
42
43
44
# File 'lib/pdu/smpp_unbind_resp.rb', line 41

def validate_packet(validator)
	# Validate header and mandatory fields
	validator.validate_header(@header)
end