Class: Majoron::AntHill::SMPP::SMPPSubmitSMResp
- Defined in:
- lib/pdu/smpp_submit_sm_resp.rb
Instance Attribute Summary collapse
-
#message_id ⇒ Object
Mandatory fields.
Attributes inherited from SMPPPDU
Instance Method Summary collapse
-
#decode_packet(decoder) ⇒ Object
Interface to decode SMPP packet.
-
#encode_packet(encoder) ⇒ Object
Interface to encode SMPP packet.
-
#initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil) ⇒ SMPPSubmitSMResp
constructor
Constructor.
-
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet.
-
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet.
Methods inherited from SMPPResp
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) ⇒ SMPPSubmitSMResp
Constructor.
25 26 27 28 29 30 31 |
# File 'lib/pdu/smpp_submit_sm_resp.rb', line 25 def initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil) super(CommandId::CM_SUBMIT_SM_RESP, command_status, sequence_number) # Mandatory fields @message_id = "" end |
Instance Attribute Details
#message_id ⇒ Object
Mandatory fields
63 64 65 |
# File 'lib/pdu/smpp_submit_sm_resp.rb', line 63 def @message_id end |
Instance Method Details
#decode_packet(decoder) ⇒ Object
Interface to decode SMPP packet
41 42 43 44 45 |
# File 'lib/pdu/smpp_submit_sm_resp.rb', line 41 def decode_packet(decoder) # Decode header and mandatory fields @header = decoder.decode_header() @message_id = decoder.(command_length()) end |
#encode_packet(encoder) ⇒ Object
Interface to encode SMPP packet
34 35 36 37 38 |
# File 'lib/pdu/smpp_submit_sm_resp.rb', line 34 def encode_packet(encoder) # Encode header and mandatory fields encoder.encode_header(@header) encoder.(@message_id) end |
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet
55 56 57 58 59 |
# File 'lib/pdu/smpp_submit_sm_resp.rb', line 55 def output_packet(outputter) # Output header and mandatory fields outputter.output_header(@header) outputter.(@message_id) end |
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet
48 49 50 51 52 |
# File 'lib/pdu/smpp_submit_sm_resp.rb', line 48 def validate_packet(validator) # Validate header and mandatory fields validator.validate_header(@header) validator.(@message_id) end |