class Smpp::Pdu::GenericNack

signals invalid message header

Attributes

error_code[RW]

Public Class Methods

from_wire_data(seq, status, body) click to toggle source
# File lib/smpp/pdu/generic_nack.rb, line 17
def self.from_wire_data(seq, status, body)
  new(seq,status,body) 
end
new(seq, error_code, original_sequence_code = nil) click to toggle source
Calls superclass method Smpp::Pdu::Base::new
# File lib/smpp/pdu/generic_nack.rb, line 7
def initialize(seq, error_code, original_sequence_code = nil)
  #TODO: original_sequence_code used to be passed to this function
  #however, a GENERIC_NACK has only one sequence number and no body
  #so this is a useless variable.  I leave it here only to preserve
  #the API, but it has no practical use.
  seq ||= next_sequence_number
  super(GENERIC_NACK, error_code, seq)
  @error_code = error_code
end