Class: Majoron::AntHill::SMPP::SMPPPDU
- Inherits:
-
Object
- Object
- Majoron::AntHill::SMPP::SMPPPDU
- Defined in:
- lib/pdu/smpp_pdu.rb
Overview
The base class for all SMPP protocol data units. All SMPP packages inherited from this class.
Direct Known Subclasses
SMPPAlertNotification, SMPPBind, SMPPBroadcastSM, SMPPCancelBroadcastSM, SMPPCancelSM, SMPPDataSM, SMPPDeliverSM, SMPPEnquireLink, SMPPGenericNack, SMPPOutbind, SMPPQueryBroadcastSM, SMPPQuerySM, SMPPReplaceSM, SMPPResp, SMPPSubmitMulti, SMPPSubmitSM, SMPPUnbind
Instance Attribute Summary collapse
-
#header ⇒ Object
Returns the value of attribute header.
Instance Method Summary collapse
- #command_id ⇒ Object
- #command_length ⇒ Object
- #command_status ⇒ Object
- #command_status=(command_status) ⇒ Object
-
#decode_packet(decoder) ⇒ Object
Interface to decode SMPP packet.
-
#encode_packet(encoder) ⇒ Object
Interface to encode SMPP packet.
-
#initialize(command_id, command_status, sequence_number) ⇒ SMPPPDU
constructor
Constructor.
-
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet.
- #sequence_number ⇒ Object
- #sequence_number=(sequence_number) ⇒ Object
-
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet.
Constructor Details
#initialize(command_id, command_status, sequence_number) ⇒ SMPPPDU
Constructor
27 28 29 30 31 32 |
# File 'lib/pdu/smpp_pdu.rb', line 27 def initialize(command_id, command_status, sequence_number) @header = Header.new() @header.command_id = command_id @header.command_status = command_status @header.sequence_number = sequence_number end |
Instance Attribute Details
#header ⇒ Object
Returns the value of attribute header.
86 87 88 |
# File 'lib/pdu/smpp_pdu.rb', line 86 def header @header end |
Instance Method Details
#command_id ⇒ Object
62 63 64 |
# File 'lib/pdu/smpp_pdu.rb', line 62 def command_id(command_id) @header.command_id = command_id end |
#command_length ⇒ Object
54 55 56 |
# File 'lib/pdu/smpp_pdu.rb', line 54 def command_length(command_length) @header.command_length = command_length end |
#command_status ⇒ Object
74 75 76 |
# File 'lib/pdu/smpp_pdu.rb', line 74 def command_status() @header.command_status end |
#command_status=(command_status) ⇒ Object
70 71 72 |
# File 'lib/pdu/smpp_pdu.rb', line 70 def command_status=(command_status) @header.command_status = command_status end |
#decode_packet(decoder) ⇒ Object
Interface to decode SMPP packet
40 41 42 |
# File 'lib/pdu/smpp_pdu.rb', line 40 def decode_packet(decoder) raise Errors::INTERFACE_NOT_IMPLEMENTED end |
#encode_packet(encoder) ⇒ Object
Interface to encode SMPP packet
35 36 37 |
# File 'lib/pdu/smpp_pdu.rb', line 35 def encode_packet(encoder) raise Errors::INTERFACE_NOT_IMPLEMENTED end |
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet
50 51 52 |
# File 'lib/pdu/smpp_pdu.rb', line 50 def output_packet(outputter) raise Errors::INTERFACE_NOT_IMPLEMENTED end |
#sequence_number ⇒ Object
82 83 84 |
# File 'lib/pdu/smpp_pdu.rb', line 82 def sequence_number() @header.sequence_number end |
#sequence_number=(sequence_number) ⇒ Object
78 79 80 |
# File 'lib/pdu/smpp_pdu.rb', line 78 def sequence_number=(sequence_number) @header.sequence_number = sequence_number end |
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet
45 46 47 |
# File 'lib/pdu/smpp_pdu.rb', line 45 def validate_packet(validator) raise Errors::INTERFACE_NOT_IMPLEMENTED end |