Class: Majoron::AntHill::SMPP::SMPPDataSM
- Defined in:
- lib/pdu/smpp_data_sm.rb
Instance Attribute Summary collapse
-
#alert_on_msg_delivery ⇒ Object
Returns the value of attribute alert_on_msg_delivery.
-
#alert_on_msg_delivery_len ⇒ Object
Returns the value of attribute alert_on_msg_delivery_len.
-
#callback_num ⇒ Object
Returns the value of attribute callback_num.
-
#callback_num_atag ⇒ Object
Returns the value of attribute callback_num_atag.
-
#callback_num_atag_len ⇒ Object
Returns the value of attribute callback_num_atag_len.
-
#callback_num_len ⇒ Object
Returns the value of attribute callback_num_len.
-
#callback_num_pres_ind ⇒ Object
Returns the value of attribute callback_num_pres_ind.
-
#callback_num_pres_ind_len ⇒ Object
Returns the value of attribute callback_num_pres_ind_len.
-
#data_coding ⇒ Object
Returns the value of attribute data_coding.
-
#dest_addr ⇒ Object
Returns the value of attribute dest_addr.
-
#dest_addr_npi ⇒ Object
Returns the value of attribute dest_addr_npi.
-
#dest_addr_subunit ⇒ Object
Returns the value of attribute dest_addr_subunit.
-
#dest_addr_subunit_len ⇒ Object
Returns the value of attribute dest_addr_subunit_len.
-
#dest_addr_ton ⇒ Object
Returns the value of attribute dest_addr_ton.
-
#dest_bearer_type ⇒ Object
Returns the value of attribute dest_bearer_type.
-
#dest_bearer_type_len ⇒ Object
Returns the value of attribute dest_bearer_type_len.
-
#dest_network_type ⇒ Object
Returns the value of attribute dest_network_type.
-
#dest_network_type_len ⇒ Object
Returns the value of attribute dest_network_type_len.
-
#dest_subaddress ⇒ Object
Returns the value of attribute dest_subaddress.
-
#dest_subaddress_len ⇒ Object
Returns the value of attribute dest_subaddress_len.
-
#dest_telematics_id ⇒ Object
Returns the value of attribute dest_telematics_id.
-
#dest_telematics_id_len ⇒ Object
Returns the value of attribute dest_telematics_id_len.
-
#destination_port ⇒ Object
Returns the value of attribute destination_port.
-
#destination_port_len ⇒ Object
Returns the value of attribute destination_port_len.
-
#display_time ⇒ Object
Returns the value of attribute display_time.
-
#display_time_len ⇒ Object
Returns the value of attribute display_time_len.
-
#esm_class ⇒ Object
Returns the value of attribute esm_class.
-
#its_reply_type ⇒ Object
Returns the value of attribute its_reply_type.
-
#its_reply_type_len ⇒ Object
Returns the value of attribute its_reply_type_len.
-
#its_session_info ⇒ Object
Returns the value of attribute its_session_info.
-
#its_session_info_len ⇒ Object
Returns the value of attribute its_session_info_len.
-
#language_indicator ⇒ Object
Returns the value of attribute language_indicator.
-
#language_indicator_len ⇒ Object
Returns the value of attribute language_indicator_len.
-
#message_payload ⇒ Object
Returns the value of attribute message_payload.
-
#message_payload_len ⇒ Object
Returns the value of attribute message_payload_len.
-
#message_state ⇒ Object
Returns the value of attribute message_state.
-
#message_state_len ⇒ Object
Returns the value of attribute message_state_len.
-
#more_messages_to_send ⇒ Object
Returns the value of attribute more_messages_to_send.
-
#more_messages_to_send_len ⇒ Object
Returns the value of attribute more_messages_to_send_len.
-
#ms_msg_wait_facilities ⇒ Object
Returns the value of attribute ms_msg_wait_facilities.
-
#ms_msg_wait_facilities_len ⇒ Object
Returns the value of attribute ms_msg_wait_facilities_len.
-
#ms_validity ⇒ Object
Returns the value of attribute ms_validity.
-
#ms_validity_len ⇒ Object
Returns the value of attribute ms_validity_len.
-
#network_error_code ⇒ Object
Returns the value of attribute network_error_code.
-
#network_error_code_len ⇒ Object
Returns the value of attribute network_error_code_len.
-
#number_of_messages ⇒ Object
Returns the value of attribute number_of_messages.
-
#number_of_messages_len ⇒ Object
Returns the value of attribute number_of_messages_len.
-
#payload_type ⇒ Object
Returns the value of attribute payload_type.
-
#payload_type_len ⇒ Object
Returns the value of attribute payload_type_len.
-
#privacy_indicator ⇒ Object
Returns the value of attribute privacy_indicator.
-
#privacy_indicator_len ⇒ Object
Returns the value of attribute privacy_indicator_len.
-
#qos_time_to_live ⇒ Object
Returns the value of attribute qos_time_to_live.
-
#qos_time_to_live_len ⇒ Object
Returns the value of attribute qos_time_to_live_len.
-
#receipted_message_id ⇒ Object
Returns the value of attribute receipted_message_id.
-
#receipted_message_id_len ⇒ Object
Returns the value of attribute receipted_message_id_len.
-
#registered_delivery ⇒ Object
Returns the value of attribute registered_delivery.
-
#sar_msg_ref_num ⇒ Object
Returns the value of attribute sar_msg_ref_num.
-
#sar_msg_ref_num_len ⇒ Object
Returns the value of attribute sar_msg_ref_num_len.
-
#sar_segment_seqnum ⇒ Object
Returns the value of attribute sar_segment_seqnum.
-
#sar_segment_seqnum_len ⇒ Object
Returns the value of attribute sar_segment_seqnum_len.
-
#sar_total_segments ⇒ Object
Returns the value of attribute sar_total_segments.
-
#sar_total_segments_len ⇒ Object
Returns the value of attribute sar_total_segments_len.
-
#service_type ⇒ Object
Mandatory fields.
-
#set_dpf ⇒ Object
Returns the value of attribute set_dpf.
-
#set_dpf_len ⇒ Object
Returns the value of attribute set_dpf_len.
-
#sms_signal ⇒ Object
Returns the value of attribute sms_signal.
-
#sms_signal_len ⇒ Object
Returns the value of attribute sms_signal_len.
-
#source_addr ⇒ Object
Returns the value of attribute source_addr.
-
#source_addr_npi ⇒ Object
Returns the value of attribute source_addr_npi.
-
#source_addr_subunit ⇒ Object
Returns the value of attribute source_addr_subunit.
-
#source_addr_subunit_len ⇒ Object
Returns the value of attribute source_addr_subunit_len.
-
#source_addr_ton ⇒ Object
Returns the value of attribute source_addr_ton.
-
#source_bearer_type ⇒ Object
Returns the value of attribute source_bearer_type.
-
#source_bearer_type_len ⇒ Object
Returns the value of attribute source_bearer_type_len.
-
#source_network_type ⇒ Object
Returns the value of attribute source_network_type.
-
#source_network_type_len ⇒ Object
Returns the value of attribute source_network_type_len.
-
#source_port ⇒ Object
Optional fields.
-
#source_port_len ⇒ Object
Optional fields length.
-
#source_subaddress ⇒ Object
Returns the value of attribute source_subaddress.
-
#source_subaddress_len ⇒ Object
Returns the value of attribute source_subaddress_len.
-
#source_telematics_id ⇒ Object
Returns the value of attribute source_telematics_id.
-
#source_telematics_id_len ⇒ Object
Returns the value of attribute source_telematics_id_len.
-
#user_message_reference ⇒ Object
Returns the value of attribute user_message_reference.
-
#user_message_reference_len ⇒ Object
Returns the value of attribute user_message_reference_len.
-
#user_response_code ⇒ Object
Returns the value of attribute user_response_code.
-
#user_response_code_len ⇒ Object
Returns the value of attribute user_response_code_len.
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) ⇒ SMPPDataSM
constructor
A new instance of SMPPDataSM.
-
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet.
-
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet.
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) ⇒ SMPPDataSM
Returns a new instance of SMPPDataSM.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/pdu/smpp_data_sm.rb', line 23 def initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil) super(CommandId::CM_DATA_SM, command_status, sequence_number) # Mandatory fields @service_type = "" @source_addr_ton = TON::UNKNOWN @source_addr_npi = NPI::UNKNOWN @source_addr = "" @dest_addr_ton = TON::UNKNOWN @dest_addr_npi = NPI::UNKNOWN @dest_addr = "" @esm_class = 0 @registered_delivery = 0 @data_coding = 0 # Optional fields @source_port = nil @source_addr_subunit = nil @source_network_type = nil @source_bearer_type = nil @source_telematics_id = nil @destination_port = nil @dest_addr_subunit = nil @dest_network_type = nil @dest_bearer_type = nil @dest_telematics_id = nil @sar_msg_ref_num = nil @sar_total_segments = nil @sar_segment_seqnum = nil @more_messages_to_send = nil @qos_time_to_live = nil @payload_type = nil @message_payload = nil @set_dpf = nil @receipted_message_id = nil @message_state = nil @network_error_code = nil @user_message_reference = nil @privacy_indicator = nil @callback_num = nil @callback_num_pres_ind = nil @callback_num_atag = nil @source_subaddress = nil @dest_subaddress = nil @user_response_code = nil @display_time = nil @sms_signal = nil @ms_validity = nil @ms_msg_wait_facilities = nil @number_of_messages = nil @alert_on_msg_delivery = nil @language_indicator = nil @its_reply_type = nil @its_session_info = nil # Optional fields length @source_port_len = SMPPTLVLen::WORD_LEN @source_addr_subunit_len = SMPPTLVLen::BYTE_LEN @source_network_type_len = SMPPTLVLen::BYTE_LEN @source_bearer_type_len = SMPPTLVLen::BYTE_LEN @source_telematics_id_len = SMPPTLVLen::BYTE_LEN @destination_port_len = SMPPTLVLen::WORD_LEN @dest_addr_subunit_len = SMPPTLVLen::BYTE_LEN @dest_network_type_len = SMPPTLVLen::BYTE_LEN @dest_bearer_type_len = SMPPTLVLen::BYTE_LEN @dest_telematics_id_len = SMPPTLVLen::BYTE_LEN @sar_msg_ref_num_len = SMPPTLVLen::WORD_LEN @sar_total_segments_len = SMPPTLVLen::BYTE_LEN @sar_segment_seqnum_len = SMPPTLVLen::BYTE_LEN @more_messages_to_send_len = SMPPTLVLen::BYTE_LEN @qos_time_to_live_len = SMPPTLVLen::DWORD_LEN @payload_type_len = SMPPTLVLen::BYTE_LEN @message_payload_len = SMPPTLVLen::ZERO_LEN @set_dpf_len = SMPPTLVLen::BYTE_LEN @receipted_message_id_len = SMPPTLVLen::ZERO_LEN @message_state_len = SMPPTLVLen::BYTE_LEN @network_error_code_len = SMPPTLVLen::BYTE_LEN + SMPPTLVLen::WORD_LEN @user_message_reference_len = SMPPTLVLen::WORD_LEN @privacy_indicator_len = SMPPTLVLen::BYTE_LEN @callback_num_len = SMPPTLVLen::ZERO_LEN @callback_num_pres_ind_len = SMPPTLVLen::BYTE_LEN @callback_num_atag_len = SMPPTLVLen::ZERO_LEN @source_subaddress_len = SMPPTLVLen::ZERO_LEN @dest_subaddress_len = SMPPTLVLen::ZERO_LEN @user_response_code_len = SMPPTLVLen::BYTE_LEN @display_time_len = SMPPTLVLen::BYTE_LEN @sms_signal_len = SMPPTLVLen::WORD_LEN @ms_validity_len = SMPPTLVLen::BYTE_LEN @ms_msg_wait_facilities_len = SMPPTLVLen::BYTE_LEN @number_of_messages_len = SMPPTLVLen::BYTE_LEN @alert_on_msg_delivery_len = SMPPTLVLen::BYTE_LEN @language_indicator_len = SMPPTLVLen::BYTE_LEN @its_reply_type_len = SMPPTLVLen::BYTE_LEN @its_session_info_len = SMPPTLVLen::WORD_LEN end |
Instance Attribute Details
#alert_on_msg_delivery ⇒ Object
Returns the value of attribute alert_on_msg_delivery.
631 632 633 |
# File 'lib/pdu/smpp_data_sm.rb', line 631 def alert_on_msg_delivery @alert_on_msg_delivery end |
#alert_on_msg_delivery_len ⇒ Object
Returns the value of attribute alert_on_msg_delivery_len.
671 672 673 |
# File 'lib/pdu/smpp_data_sm.rb', line 671 def alert_on_msg_delivery_len @alert_on_msg_delivery_len end |
#callback_num ⇒ Object
Returns the value of attribute callback_num.
620 621 622 |
# File 'lib/pdu/smpp_data_sm.rb', line 620 def callback_num @callback_num end |
#callback_num_atag ⇒ Object
Returns the value of attribute callback_num_atag.
622 623 624 |
# File 'lib/pdu/smpp_data_sm.rb', line 622 def callback_num_atag @callback_num_atag end |
#callback_num_atag_len ⇒ Object
Returns the value of attribute callback_num_atag_len.
662 663 664 |
# File 'lib/pdu/smpp_data_sm.rb', line 662 def callback_num_atag_len @callback_num_atag_len end |
#callback_num_len ⇒ Object
Returns the value of attribute callback_num_len.
660 661 662 |
# File 'lib/pdu/smpp_data_sm.rb', line 660 def callback_num_len @callback_num_len end |
#callback_num_pres_ind ⇒ Object
Returns the value of attribute callback_num_pres_ind.
621 622 623 |
# File 'lib/pdu/smpp_data_sm.rb', line 621 def callback_num_pres_ind @callback_num_pres_ind end |
#callback_num_pres_ind_len ⇒ Object
Returns the value of attribute callback_num_pres_ind_len.
661 662 663 |
# File 'lib/pdu/smpp_data_sm.rb', line 661 def callback_num_pres_ind_len @callback_num_pres_ind_len end |
#data_coding ⇒ Object
Returns the value of attribute data_coding.
593 594 595 |
# File 'lib/pdu/smpp_data_sm.rb', line 593 def data_coding @data_coding end |
#dest_addr ⇒ Object
Returns the value of attribute dest_addr.
590 591 592 |
# File 'lib/pdu/smpp_data_sm.rb', line 590 def dest_addr @dest_addr end |
#dest_addr_npi ⇒ Object
Returns the value of attribute dest_addr_npi.
589 590 591 |
# File 'lib/pdu/smpp_data_sm.rb', line 589 def dest_addr_npi @dest_addr_npi end |
#dest_addr_subunit ⇒ Object
Returns the value of attribute dest_addr_subunit.
603 604 605 |
# File 'lib/pdu/smpp_data_sm.rb', line 603 def dest_addr_subunit @dest_addr_subunit end |
#dest_addr_subunit_len ⇒ Object
Returns the value of attribute dest_addr_subunit_len.
643 644 645 |
# File 'lib/pdu/smpp_data_sm.rb', line 643 def dest_addr_subunit_len @dest_addr_subunit_len end |
#dest_addr_ton ⇒ Object
Returns the value of attribute dest_addr_ton.
588 589 590 |
# File 'lib/pdu/smpp_data_sm.rb', line 588 def dest_addr_ton @dest_addr_ton end |
#dest_bearer_type ⇒ Object
Returns the value of attribute dest_bearer_type.
605 606 607 |
# File 'lib/pdu/smpp_data_sm.rb', line 605 def dest_bearer_type @dest_bearer_type end |
#dest_bearer_type_len ⇒ Object
Returns the value of attribute dest_bearer_type_len.
645 646 647 |
# File 'lib/pdu/smpp_data_sm.rb', line 645 def dest_bearer_type_len @dest_bearer_type_len end |
#dest_network_type ⇒ Object
Returns the value of attribute dest_network_type.
604 605 606 |
# File 'lib/pdu/smpp_data_sm.rb', line 604 def dest_network_type @dest_network_type end |
#dest_network_type_len ⇒ Object
Returns the value of attribute dest_network_type_len.
644 645 646 |
# File 'lib/pdu/smpp_data_sm.rb', line 644 def dest_network_type_len @dest_network_type_len end |
#dest_subaddress ⇒ Object
Returns the value of attribute dest_subaddress.
624 625 626 |
# File 'lib/pdu/smpp_data_sm.rb', line 624 def dest_subaddress @dest_subaddress end |
#dest_subaddress_len ⇒ Object
Returns the value of attribute dest_subaddress_len.
664 665 666 |
# File 'lib/pdu/smpp_data_sm.rb', line 664 def dest_subaddress_len @dest_subaddress_len end |
#dest_telematics_id ⇒ Object
Returns the value of attribute dest_telematics_id.
606 607 608 |
# File 'lib/pdu/smpp_data_sm.rb', line 606 def dest_telematics_id @dest_telematics_id end |
#dest_telematics_id_len ⇒ Object
Returns the value of attribute dest_telematics_id_len.
646 647 648 |
# File 'lib/pdu/smpp_data_sm.rb', line 646 def dest_telematics_id_len @dest_telematics_id_len end |
#destination_port ⇒ Object
Returns the value of attribute destination_port.
602 603 604 |
# File 'lib/pdu/smpp_data_sm.rb', line 602 def destination_port @destination_port end |
#destination_port_len ⇒ Object
Returns the value of attribute destination_port_len.
642 643 644 |
# File 'lib/pdu/smpp_data_sm.rb', line 642 def destination_port_len @destination_port_len end |
#display_time ⇒ Object
Returns the value of attribute display_time.
626 627 628 |
# File 'lib/pdu/smpp_data_sm.rb', line 626 def display_time @display_time end |
#display_time_len ⇒ Object
Returns the value of attribute display_time_len.
666 667 668 |
# File 'lib/pdu/smpp_data_sm.rb', line 666 def display_time_len @display_time_len end |
#esm_class ⇒ Object
Returns the value of attribute esm_class.
591 592 593 |
# File 'lib/pdu/smpp_data_sm.rb', line 591 def esm_class @esm_class end |
#its_reply_type ⇒ Object
Returns the value of attribute its_reply_type.
633 634 635 |
# File 'lib/pdu/smpp_data_sm.rb', line 633 def its_reply_type @its_reply_type end |
#its_reply_type_len ⇒ Object
Returns the value of attribute its_reply_type_len.
673 674 675 |
# File 'lib/pdu/smpp_data_sm.rb', line 673 def its_reply_type_len @its_reply_type_len end |
#its_session_info ⇒ Object
Returns the value of attribute its_session_info.
634 635 636 |
# File 'lib/pdu/smpp_data_sm.rb', line 634 def its_session_info @its_session_info end |
#its_session_info_len ⇒ Object
Returns the value of attribute its_session_info_len.
674 675 676 |
# File 'lib/pdu/smpp_data_sm.rb', line 674 def its_session_info_len @its_session_info_len end |
#language_indicator ⇒ Object
Returns the value of attribute language_indicator.
632 633 634 |
# File 'lib/pdu/smpp_data_sm.rb', line 632 def language_indicator @language_indicator end |
#language_indicator_len ⇒ Object
Returns the value of attribute language_indicator_len.
672 673 674 |
# File 'lib/pdu/smpp_data_sm.rb', line 672 def language_indicator_len @language_indicator_len end |
#message_payload ⇒ Object
Returns the value of attribute message_payload.
613 614 615 |
# File 'lib/pdu/smpp_data_sm.rb', line 613 def @message_payload end |
#message_payload_len ⇒ Object
Returns the value of attribute message_payload_len.
653 654 655 |
# File 'lib/pdu/smpp_data_sm.rb', line 653 def @message_payload_len end |
#message_state ⇒ Object
Returns the value of attribute message_state.
616 617 618 |
# File 'lib/pdu/smpp_data_sm.rb', line 616 def @message_state end |
#message_state_len ⇒ Object
Returns the value of attribute message_state_len.
656 657 658 |
# File 'lib/pdu/smpp_data_sm.rb', line 656 def @message_state_len end |
#more_messages_to_send ⇒ Object
Returns the value of attribute more_messages_to_send.
610 611 612 |
# File 'lib/pdu/smpp_data_sm.rb', line 610 def @more_messages_to_send end |
#more_messages_to_send_len ⇒ Object
Returns the value of attribute more_messages_to_send_len.
650 651 652 |
# File 'lib/pdu/smpp_data_sm.rb', line 650 def @more_messages_to_send_len end |
#ms_msg_wait_facilities ⇒ Object
Returns the value of attribute ms_msg_wait_facilities.
629 630 631 |
# File 'lib/pdu/smpp_data_sm.rb', line 629 def ms_msg_wait_facilities @ms_msg_wait_facilities end |
#ms_msg_wait_facilities_len ⇒ Object
Returns the value of attribute ms_msg_wait_facilities_len.
669 670 671 |
# File 'lib/pdu/smpp_data_sm.rb', line 669 def ms_msg_wait_facilities_len @ms_msg_wait_facilities_len end |
#ms_validity ⇒ Object
Returns the value of attribute ms_validity.
628 629 630 |
# File 'lib/pdu/smpp_data_sm.rb', line 628 def ms_validity @ms_validity end |
#ms_validity_len ⇒ Object
Returns the value of attribute ms_validity_len.
668 669 670 |
# File 'lib/pdu/smpp_data_sm.rb', line 668 def ms_validity_len @ms_validity_len end |
#network_error_code ⇒ Object
Returns the value of attribute network_error_code.
617 618 619 |
# File 'lib/pdu/smpp_data_sm.rb', line 617 def network_error_code @network_error_code end |
#network_error_code_len ⇒ Object
Returns the value of attribute network_error_code_len.
657 658 659 |
# File 'lib/pdu/smpp_data_sm.rb', line 657 def network_error_code_len @network_error_code_len end |
#number_of_messages ⇒ Object
Returns the value of attribute number_of_messages.
630 631 632 |
# File 'lib/pdu/smpp_data_sm.rb', line 630 def @number_of_messages end |
#number_of_messages_len ⇒ Object
Returns the value of attribute number_of_messages_len.
670 671 672 |
# File 'lib/pdu/smpp_data_sm.rb', line 670 def @number_of_messages_len end |
#payload_type ⇒ Object
Returns the value of attribute payload_type.
612 613 614 |
# File 'lib/pdu/smpp_data_sm.rb', line 612 def payload_type @payload_type end |
#payload_type_len ⇒ Object
Returns the value of attribute payload_type_len.
652 653 654 |
# File 'lib/pdu/smpp_data_sm.rb', line 652 def payload_type_len @payload_type_len end |
#privacy_indicator ⇒ Object
Returns the value of attribute privacy_indicator.
619 620 621 |
# File 'lib/pdu/smpp_data_sm.rb', line 619 def privacy_indicator @privacy_indicator end |
#privacy_indicator_len ⇒ Object
Returns the value of attribute privacy_indicator_len.
659 660 661 |
# File 'lib/pdu/smpp_data_sm.rb', line 659 def privacy_indicator_len @privacy_indicator_len end |
#qos_time_to_live ⇒ Object
Returns the value of attribute qos_time_to_live.
611 612 613 |
# File 'lib/pdu/smpp_data_sm.rb', line 611 def qos_time_to_live @qos_time_to_live end |
#qos_time_to_live_len ⇒ Object
Returns the value of attribute qos_time_to_live_len.
651 652 653 |
# File 'lib/pdu/smpp_data_sm.rb', line 651 def qos_time_to_live_len @qos_time_to_live_len end |
#receipted_message_id ⇒ Object
Returns the value of attribute receipted_message_id.
615 616 617 |
# File 'lib/pdu/smpp_data_sm.rb', line 615 def @receipted_message_id end |
#receipted_message_id_len ⇒ Object
Returns the value of attribute receipted_message_id_len.
655 656 657 |
# File 'lib/pdu/smpp_data_sm.rb', line 655 def @receipted_message_id_len end |
#registered_delivery ⇒ Object
Returns the value of attribute registered_delivery.
592 593 594 |
# File 'lib/pdu/smpp_data_sm.rb', line 592 def registered_delivery @registered_delivery end |
#sar_msg_ref_num ⇒ Object
Returns the value of attribute sar_msg_ref_num.
607 608 609 |
# File 'lib/pdu/smpp_data_sm.rb', line 607 def sar_msg_ref_num @sar_msg_ref_num end |
#sar_msg_ref_num_len ⇒ Object
Returns the value of attribute sar_msg_ref_num_len.
647 648 649 |
# File 'lib/pdu/smpp_data_sm.rb', line 647 def sar_msg_ref_num_len @sar_msg_ref_num_len end |
#sar_segment_seqnum ⇒ Object
Returns the value of attribute sar_segment_seqnum.
609 610 611 |
# File 'lib/pdu/smpp_data_sm.rb', line 609 def sar_segment_seqnum @sar_segment_seqnum end |
#sar_segment_seqnum_len ⇒ Object
Returns the value of attribute sar_segment_seqnum_len.
649 650 651 |
# File 'lib/pdu/smpp_data_sm.rb', line 649 def sar_segment_seqnum_len @sar_segment_seqnum_len end |
#sar_total_segments ⇒ Object
Returns the value of attribute sar_total_segments.
608 609 610 |
# File 'lib/pdu/smpp_data_sm.rb', line 608 def sar_total_segments @sar_total_segments end |
#sar_total_segments_len ⇒ Object
Returns the value of attribute sar_total_segments_len.
648 649 650 |
# File 'lib/pdu/smpp_data_sm.rb', line 648 def sar_total_segments_len @sar_total_segments_len end |
#service_type ⇒ Object
Mandatory fields
584 585 586 |
# File 'lib/pdu/smpp_data_sm.rb', line 584 def service_type @service_type end |
#set_dpf ⇒ Object
Returns the value of attribute set_dpf.
614 615 616 |
# File 'lib/pdu/smpp_data_sm.rb', line 614 def set_dpf @set_dpf end |
#set_dpf_len ⇒ Object
Returns the value of attribute set_dpf_len.
654 655 656 |
# File 'lib/pdu/smpp_data_sm.rb', line 654 def set_dpf_len @set_dpf_len end |
#sms_signal ⇒ Object
Returns the value of attribute sms_signal.
627 628 629 |
# File 'lib/pdu/smpp_data_sm.rb', line 627 def sms_signal @sms_signal end |
#sms_signal_len ⇒ Object
Returns the value of attribute sms_signal_len.
667 668 669 |
# File 'lib/pdu/smpp_data_sm.rb', line 667 def sms_signal_len @sms_signal_len end |
#source_addr ⇒ Object
Returns the value of attribute source_addr.
587 588 589 |
# File 'lib/pdu/smpp_data_sm.rb', line 587 def source_addr @source_addr end |
#source_addr_npi ⇒ Object
Returns the value of attribute source_addr_npi.
586 587 588 |
# File 'lib/pdu/smpp_data_sm.rb', line 586 def source_addr_npi @source_addr_npi end |
#source_addr_subunit ⇒ Object
Returns the value of attribute source_addr_subunit.
598 599 600 |
# File 'lib/pdu/smpp_data_sm.rb', line 598 def source_addr_subunit @source_addr_subunit end |
#source_addr_subunit_len ⇒ Object
Returns the value of attribute source_addr_subunit_len.
638 639 640 |
# File 'lib/pdu/smpp_data_sm.rb', line 638 def source_addr_subunit_len @source_addr_subunit_len end |
#source_addr_ton ⇒ Object
Returns the value of attribute source_addr_ton.
585 586 587 |
# File 'lib/pdu/smpp_data_sm.rb', line 585 def source_addr_ton @source_addr_ton end |
#source_bearer_type ⇒ Object
Returns the value of attribute source_bearer_type.
600 601 602 |
# File 'lib/pdu/smpp_data_sm.rb', line 600 def source_bearer_type @source_bearer_type end |
#source_bearer_type_len ⇒ Object
Returns the value of attribute source_bearer_type_len.
640 641 642 |
# File 'lib/pdu/smpp_data_sm.rb', line 640 def source_bearer_type_len @source_bearer_type_len end |
#source_network_type ⇒ Object
Returns the value of attribute source_network_type.
599 600 601 |
# File 'lib/pdu/smpp_data_sm.rb', line 599 def source_network_type @source_network_type end |
#source_network_type_len ⇒ Object
Returns the value of attribute source_network_type_len.
639 640 641 |
# File 'lib/pdu/smpp_data_sm.rb', line 639 def source_network_type_len @source_network_type_len end |
#source_port ⇒ Object
Optional fields
597 598 599 |
# File 'lib/pdu/smpp_data_sm.rb', line 597 def source_port @source_port end |
#source_port_len ⇒ Object
Optional fields length
637 638 639 |
# File 'lib/pdu/smpp_data_sm.rb', line 637 def source_port_len @source_port_len end |
#source_subaddress ⇒ Object
Returns the value of attribute source_subaddress.
623 624 625 |
# File 'lib/pdu/smpp_data_sm.rb', line 623 def source_subaddress @source_subaddress end |
#source_subaddress_len ⇒ Object
Returns the value of attribute source_subaddress_len.
663 664 665 |
# File 'lib/pdu/smpp_data_sm.rb', line 663 def source_subaddress_len @source_subaddress_len end |
#source_telematics_id ⇒ Object
Returns the value of attribute source_telematics_id.
601 602 603 |
# File 'lib/pdu/smpp_data_sm.rb', line 601 def source_telematics_id @source_telematics_id end |
#source_telematics_id_len ⇒ Object
Returns the value of attribute source_telematics_id_len.
641 642 643 |
# File 'lib/pdu/smpp_data_sm.rb', line 641 def source_telematics_id_len @source_telematics_id_len end |
#user_message_reference ⇒ Object
Returns the value of attribute user_message_reference.
618 619 620 |
# File 'lib/pdu/smpp_data_sm.rb', line 618 def @user_message_reference end |
#user_message_reference_len ⇒ Object
Returns the value of attribute user_message_reference_len.
658 659 660 |
# File 'lib/pdu/smpp_data_sm.rb', line 658 def @user_message_reference_len end |
#user_response_code ⇒ Object
Returns the value of attribute user_response_code.
625 626 627 |
# File 'lib/pdu/smpp_data_sm.rb', line 625 def user_response_code @user_response_code end |
#user_response_code_len ⇒ Object
Returns the value of attribute user_response_code_len.
665 666 667 |
# File 'lib/pdu/smpp_data_sm.rb', line 665 def user_response_code_len @user_response_code_len end |
Instance Method Details
#decode_packet(decoder) ⇒ Object
Interface to decode SMPP packet
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/pdu/smpp_data_sm.rb', line 217 def decode_packet(decoder) # Decode header and mandatory fields @header = decoder.decode_header() @service_type = decoder.decode_service_type(command_length()) @source_addr_ton = decoder.decode_source_addr_ton(command_length()) @source_addr_npi = decoder.decode_source_addr_npi(command_length()) @source_addr = decoder.decode_source_addr65(command_length()) @dest_addr_ton = decoder.decode_dest_addr_ton(command_length()) @dest_addr_npi = decoder.decode_dest_addr_npi(command_length()) @dest_addr = decoder.decode_dest_addr65(command_length()) @esm_class = decoder.decode_esm_class(command_length()) @registered_delivery = decoder.decode_registered_delivery(command_length()) @data_coding = decoder.decode_data_coding(command_length()) # Decode optional fields while decoder.has_tlvs() case decoder.get_tlv_code() when OptTags::TAG_SOURCE_PORT @source_port, @source_port_len = decoder.decode_source_port(command_length()) when OptTags::TAG_SOURCE_ADDR_SUBUNIT @source_addr_subunit, @source_addr_subunit_len = decoder.decode_source_addr_subunit(command_length()) when OptTags::TAG_SOURCE_NETWORK_TYPE @source_network_type, @source_network_type_len = decoder.decode_source_network_type(command_length()) when OptTags::TAG_SOURCE_BEARER_TYPE @source_bearer_type, @source_bearer_type_len = decoder.decode_source_bearer_type(command_length()) when OptTags::TAG_SOURCE_TELEMATICS_ID @source_telematics_id, @source_telematics_id_len = decoder.decode_source_telematics_id(command_length()) when OptTags::TAG_DESTINATION_PORT @destination_port, @destination_port_len = decoder.decode_destination_port(command_length()) when OptTags::TAG_DEST_ADDR_SUBUNIT @dest_addr_subunit, @dest_addr_subunit_len = decoder.decode_dest_addr_subunit(command_length()) when OptTags::TAG_DEST_NETWORK_TYPE @dest_network_type, @dest_network_type_len = decoder.decode_dest_network_type(command_length()) when OptTags::TAG_DEST_BEARER_TYPE @dest_bearer_type, @dest_bearer_type_len = decoder.decode_dest_bearer_type(command_length()) when OptTags::TAG_DEST_TELEMATICS_ID @dest_telematics_id, @dest_telematics_id_len = decoder.decode_dest_telematics_id(command_length()) when OptTags::TAG_SAR_MSG_REF_NUM @sar_msg_ref_num, @sar_msg_ref_num_len = decoder.decode_sar_msg_ref_num(command_length()) when OptTags::TAG_SAR_TOTAL_SEGMENTS @sar_total_segments, @sar_total_segments_len = decoder.decode_sar_total_segments(command_length()) when OptTags::TAG_SAR_SEGMENT_SEQNUM @sar_segment_seqnum, @sar_segment_seqnum_len = decoder.decode_sar_segment_seqnum(command_length()) when OptTags::TAG_MORE_MESSAGES_TO_SEND @more_messages_to_send, @more_messages_to_send_len = decoder.(command_length()) when OptTags::TAG_QOS_TIME_TO_LIVE @qos_time_to_live, @qos_time_to_live_len = decoder.decode_qos_time_to_live(command_length()) when OptTags::TAG_PAYLOAD_TYPE @payload_type, @payload_type_len = decoder.decode_payload_type(command_length()) when OptTags::TAG_MESSAGE_PAYLOAD @message_payload, @message_payload_len = decoder.(command_length()) when OptTags::TAG_SET_DPF @set_dpf, @set_dpf_len = decoder.decode_set_dpf(command_length()) when OptTags::TAG_RECEIPTED_MESSAGE_ID @receipted_message_id, @receipted_message_id_len = decoder.(command_length()) when OptTags::TAG_MESSAGE_STATE @message_state, @message_state_len = decoder.(command_length()) when OptTags::TAG_NETWORK_ERROR_CODE @network_error_code, @network_error_code_len = decoder.decode_network_error_code(command_length()) when OptTags::TAG_USER_MESSAGE_REFERENCE @user_message_reference, @user_message_reference_len = decoder.(command_length()) when OptTags::TAG_PRIVACY_INDICATOR @privacy_indicator, @privacy_indicator_len = decoder.decode_privacy_indicator(command_length()) when OptTags::TAG_CALLBACK_NUM @callback_num, @callback_num_len = decoder.decode_callback_num(command_length()) when OptTags::TAG_CALLBACK_NUM_PRES_IND @callback_num_pres_ind, @callback_num_pres_ind_len = decoder.decode_callback_num_pres_ind(command_length()) when OptTags::TAG_CALLBACK_NUM_ATAG @callback_num_atag, @callback_num_atag_len = decoder.decode_callback_num_atag(command_length()) when OptTags::TAG_SOURCE_SUBADDRESS @source_subaddress, @source_subaddress_len = decoder.decode_source_subaddress(command_length()) when OptTags::TAG_DEST_SUBADDRESS @dest_subaddress, @dest_subaddress_len = decoder.decode_dest_subaddress(command_length()) when OptTags::TAG_USER_RESPONSE_CODE @user_response_code, @user_response_code_len = decoder.decode_user_response_code(command_length()) when OptTags::TAG_DISPLAY_TIME @display_time, @display_time_len = decoder.decode_display_time(command_length()) when OptTags::TAG_SMS_SIGNAL @sms_signal, @sms_signal_len = decoder.decode_sms_signal(command_length()) when OptTags::TAG_MS_VALIDITY @ms_validity, @ms_validity_len = decoder.decode_ms_validity(command_length()) when OptTags::TAG_MS_MSG_WAIT_FACILITIES @ms_msg_wait_facilities, @ms_msg_wait_facilities_len = decoder.decode_ms_msg_wait_facilities(command_length()) when OptTags::TAG_NUMBER_OF_MESSAGES @number_of_messages, @number_of_messages_len = decoder.(command_length()) when OptTags::TAG_ALERT_ON_MESSAGE_DELIVERY @alert_on_msg_delivery, @alert_on_msg_delivery_len = decoder.decode_alert_on_msg_delivery(command_length()) when OptTags::TAG_LANGUAGE_INDICATOR @language_indicator, @language_indicator_len = decoder.decode_language_indicator(command_length()) when OptTags::TAG_ITS_REPLY_TYPE @its_reply_type, @its_reply_type_len = decoder.decode_its_reply_type(command_length()) when OptTags::TAG_ITS_SESSION_INFO @its_session_info, @its_session_info_len = decoder.decode_its_session_info(command_length()) else # Report about error raise Errors::UNKNOWN_TAG_MSG + decoder.get_tlv_error() end end end |
#encode_packet(encoder) ⇒ Object
Interface to encode SMPP packet
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/pdu/smpp_data_sm.rb', line 120 def encode_packet(encoder) # Encode header and mandatory fields encoder.encode_header(@header) encoder.encode_service_type(@service_type) encoder.encode_source_addr_ton(@source_addr_ton) encoder.encode_source_addr_npi(@source_addr_npi) encoder.encode_source_addr65(@source_addr) encoder.encode_dest_addr_ton(@dest_addr_ton) encoder.encode_dest_addr_npi(@dest_addr_npi) encoder.encode_dest_addr65(@dest_addr) encoder.encode_esm_class(@esm_class) encoder.encode_registered_delivery(@registered_delivery) encoder.encode_data_coding(@data_coding) # Encode optional fields encoder.encode_source_port(@source_port, @source_port_len) if !@source_port.nil? encoder.encode_source_addr_subunit(@source_addr_subunit, @source_addr_subunit_len) if !@source_addr_subunit.nil? encoder.encode_source_network_type(@source_network_type, @source_network_type_len) if !@source_network_type.nil? encoder.encode_source_bearer_type(@source_bearer_type, @source_bearer_type_len) if !@source_bearer_type.nil? encoder.encode_source_telematics_id(@source_telematics_id, @source_telematics_id_len) if !@source_telematics_id.nil? encoder.encode_destination_port(@destination_port, @destination_port_len) if !@destination_port.nil? encoder.encode_dest_addr_subunit(@dest_addr_subunit, @dest_addr_subunit_len) if !@dest_addr_subunit.nil? encoder.encode_dest_network_type(@dest_network_type, @dest_network_type_len) if !@dest_network_type.nil? encoder.encode_dest_bearer_type(@dest_bearer_type, @dest_bearer_type_len) if !@dest_bearer_type.nil? encoder.encode_dest_telematics_id(@dest_telematics_id, @dest_telematics_id_len) if !@dest_telematics_id.nil? encoder.encode_sar_msg_ref_num(@sar_msg_ref_num, @sar_msg_ref_num_len) if !@sar_msg_ref_num.nil? encoder.encode_sar_total_segments(@sar_total_segments, @sar_total_segments_len) if !@sar_total_segments.nil? encoder.encode_sar_segment_seqnum(@sar_segment_seqnum, @sar_segment_seqnum_len) if !@sar_segment_seqnum.nil? encoder.(@more_messages_to_send, @more_messages_to_send_len) if !@more_messages_to_send.nil? encoder.encode_qos_time_to_live(@qos_time_to_live, @qos_time_to_live_len) if !@qos_time_to_live.nil? encoder.encode_payload_type(@payload_type, @payload_type_len) if !@payload_type.nil? encoder.(@message_payload, @message_payload_len) if !@message_payload.nil? encoder.encode_set_dpf(@set_dpf, @set_dpf_len) if !@set_dpf.nil? encoder.(@receipted_message_id, @receipted_message_id_len) if !@receipted_message_id.nil? encoder.(@message_state, @message_state_len) if !@message_state.nil? encoder.encode_network_error_code(@network_error_code, @network_error_code_len) if !@network_error_code.nil? encoder.(@user_message_reference, @user_message_reference_len) if !@user_message_reference.nil? encoder.encode_privacy_indicator(@privacy_indicator, @privacy_indicator_len) if !@privacy_indicator.nil? encoder.encode_callback_num(@callback_num, @callback_num_len) if !@callback_num.nil? encoder.encode_callback_num_pres_ind(@callback_num_pres_ind, @callback_num_pres_ind_len) if !@callback_num_pres_ind.nil? encoder.encode_callback_num_atag(@callback_num_atag, @callback_num_atag_len) if !@callback_num_atag.nil? encoder.encode_source_subaddress(@source_subaddress, @source_subaddress_len) if !@source_subaddress.nil? encoder.encode_dest_subaddress(@dest_subaddress, @dest_subaddress_len) if !@dest_subaddress.nil? encoder.encode_user_response_code(@user_response_code, @user_response_code_len) if !@user_response_code.nil? encoder.encode_display_time(@display_time, @display_time_len) if !@display_time.nil? encoder.encode_sms_signal(@sms_signal, @sms_signal_len) if !@sms_signal.nil? encoder.encode_ms_validity(@ms_validity, @ms_validity_len) if !@ms_validity.nil? encoder.encode_ms_msg_wait_facilities(@ms_msg_wait_facilities, @ms_msg_wait_facilities_len) if !@ms_msg_wait_facilities.nil? encoder.(@number_of_messages, @number_of_messages_len) if !@number_of_messages.nil? encoder.(@number_of_messages, @number_of_messages_len) if !@number_of_messages.nil? encoder.encode_alert_on_msg_delivery(@alert_on_msg_delivery, @alert_on_msg_delivery_len) if !@alert_on_msg_delivery.nil? encoder.encode_language_indicator(@language_indicator, @language_indicator_len) if !@language_indicator.nil? encoder.encode_its_reply_type(@its_reply_type, @its_reply_type_len) if !@its_reply_type.nil? encoder.encode_its_session_info(@its_session_info, @its_session_info_len) if !@its_session_info.nil? end |
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/pdu/smpp_data_sm.rb', line 454 def output_packet(outputter) # Output header and mandatory fields outputter.output_header(@header) outputter.output_service_type(@service_type) outputter.output_source_addr_ton(@source_addr_ton) outputter.output_source_addr_npi(@source_addr_npi) outputter.output_source_addr65(@source_addr) outputter.output_dest_addr_ton(@dest_addr_ton) outputter.output_dest_addr_npi(@dest_addr_npi) outputter.output_dest_addr65(@dest_addr) outputter.output_esm_class(@esm_class) outputter.output_registered_delivery(@registered_delivery) outputter.output_data_coding(@data_coding) # Output optional fields outputter.output_source_port(@source_port, @source_port_len) if !@source_port.nil? outputter.output_source_addr_subunit(@source_addr_subunit, @source_addr_subunit_len) if !@source_addr_subunit.nil? outputter.output_source_network_type(@source_network_type, @source_network_type_len) if !@source_network_type.nil? outputter.output_source_bearer_type(@source_bearer_type, @source_bearer_type_len) if !@source_bearer_type.nil? outputter.output_source_telematics_id(@source_telematics_id, @source_telematics_id_len) if !@source_telematics_id.nil? outputter.output_destination_port(@destination_port, @destination_port_len) if !@destination_port.nil? outputter.output_dest_addr_subunit(@dest_addr_subunit, @dest_addr_subunit_len) if !@dest_addr_subunit.nil? outputter.output_dest_network_type(@dest_network_type, @dest_network_type_len) if !@dest_network_type.nil? outputter.output_dest_bearer_type(@dest_bearer_type, @dest_bearer_type_len) if !@dest_bearer_type.nil? outputter.output_dest_telematics_id(@dest_telematics_id, @dest_telematics_id_len) if !@dest_telematics_id.nil? outputter.output_sar_msg_ref_num(@sar_msg_ref_num, @sar_msg_ref_num_len) if !@sar_msg_ref_num.nil? outputter.output_sar_total_segments(@sar_total_segments, @sar_total_segments_len) if !@sar_total_segments.nil? outputter.output_sar_segment_seqnum(@sar_segment_seqnum, @sar_segment_seqnum_len) if !@sar_segment_seqnum.nil? outputter.(@more_messages_to_send, @more_messages_to_send_len) if !@more_messages_to_send.nil? outputter.output_qos_time_to_live(@qos_time_to_live, @qos_time_to_live_len) if !@qos_time_to_live.nil? outputter.output_payload_type(@payload_type, @payload_type_len) if !@payload_type.nil? outputter.(@message_payload, @message_payload_len) if !@message_payload.nil? outputter.output_set_dpf(@set_dpf, @set_dpf_len) if !@set_dpf.nil? outputter.(@receipted_message_id, @receipted_message_id_len) if !@receipted_message_id.nil? outputter.(@message_state, @message_state_len) if !@message_state.nil? outputter.output_network_error_code(@network_error_code, @network_error_code_len) if !@network_error_code.nil? outputter.(@user_message_reference, @user_message_reference_len) if !@user_message_reference.nil? outputter.output_privacy_indicator(@privacy_indicator, @privacy_indicator_len) if !@privacy_indicator.nil? outputter.output_callback_num(@callback_num, @callback_num_len) if !@callback_num.nil? outputter.output_callback_num_pres_ind(@callback_num_pres_ind, @callback_num_pres_ind_len) if !@callback_num_pres_ind.nil? outputter.output_callback_num_atag(@callback_num_atag, @callback_num_atag_len) if !@callback_num_atag.nil? outputter.output_source_subaddress(@source_subaddress, @source_subaddress_len) if !@source_subaddress.nil? outputter.output_dest_subaddress(@dest_subaddress, @dest_subaddress_len) if !@dest_subaddress.nil? outputter.output_user_response_code(@user_response_code, @user_response_code_len) if !@user_response_code.nil? outputter.output_display_time(@display_time, @display_time_len) if !@display_time.nil? outputter.output_sms_signal(@sms_signal, @sms_signal_len) if !@sms_signal.nil? outputter.output_ms_validity(@ms_validity, @ms_validity_len) if !@ms_validity.nil? outputter.output_ms_msg_wait_facilities(@ms_msg_wait_facilities, @ms_msg_wait_facilities_len) if !@ms_msg_wait_facilities.nil? outputter.(@number_of_messages, @number_of_messages_len) if !@number_of_messages.nil? outputter.(@number_of_messages, @number_of_messages_len) if !@number_of_messages.nil? outputter.output_alert_on_msg_delivery(@alert_on_msg_delivery, @alert_on_msg_delivery_len) if !@alert_on_msg_delivery.nil? outputter.output_language_indicator(@language_indicator, @language_indicator_len) if !@language_indicator.nil? outputter.output_its_reply_type(@its_reply_type, @its_reply_type_len) if !@its_reply_type.nil? outputter.output_its_session_info(@its_session_info, @its_session_info_len) if !@its_session_info.nil? end |
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
# File 'lib/pdu/smpp_data_sm.rb', line 357 def validate_packet(validator) # Validate header and mandatory fields validator.validate_header(@header) validator.validate_service_type(@service_type) validator.validate_source_addr_ton(@source_addr_ton) validator.validate_source_addr_npi(@source_addr_npi) validator.validate_source_addr65(@source_addr) validator.validate_dest_addr_ton(@dest_addr_ton) validator.validate_dest_addr_npi(@dest_addr_npi) validator.validate_dest_addr65(@dest_addr) validator.validate_esm_class(@esm_class) validator.validate_registered_delivery(@registered_delivery) validator.validate_data_coding(@data_coding) # Validate optional fields validator.validate_source_port(@source_port, @source_port_len) if !@source_port.nil? validator.validate_source_addr_subunit(@source_addr_subunit, @source_addr_subunit_len) if !@source_addr_subunit.nil? validator.validate_source_network_type(@source_network_type, @source_network_type_len) if !@source_network_type.nil? validator.validate_source_bearer_type(@source_bearer_type, @source_bearer_type_len) if !@source_bearer_type.nil? validator.validate_source_telematics_id(@source_telematics_id, @source_telematics_id_len) if !@source_telematics_id.nil? validator.validate_destination_port(@destination_port, @destination_port_len) if !@destination_port.nil? validator.validate_dest_addr_subunit(@dest_addr_subunit, @dest_addr_subunit_len) if !@dest_addr_subunit.nil? validator.validate_dest_network_type(@dest_network_type, @dest_network_type_len) if !@dest_network_type.nil? validator.validate_dest_bearer_type(@dest_bearer_type, @dest_bearer_type_len) if !@dest_bearer_type.nil? validator.validate_dest_telematics_id(@dest_telematics_id, @dest_telematics_id_len) if !@dest_telematics_id.nil? validator.validate_sar_msg_ref_num(@sar_msg_ref_num, @sar_msg_ref_num_len) if !@sar_msg_ref_num.nil? validator.validate_sar_total_segments(@sar_total_segments, @sar_total_segments_len) if !@sar_total_segments.nil? validator.validate_sar_segment_seqnum(@sar_segment_seqnum, @sar_segment_seqnum_len) if !@sar_segment_seqnum.nil? validator.(@more_messages_to_send, @more_messages_to_send_len) if !@more_messages_to_send.nil? validator.validate_qos_time_to_live(@qos_time_to_live, @qos_time_to_live_len) if !@qos_time_to_live.nil? validator.validate_payload_type(@payload_type, @payload_type_len) if !@payload_type.nil? validator.(@message_payload, @message_payload_len) if !@message_payload.nil? validator.validate_set_dpf(@set_dpf, @set_dpf_len) if !@set_dpf.nil? validator.(@receipted_message_id, @receipted_message_id_len) if !@receipted_message_id.nil? validator.(@message_state, @message_state_len) if !@message_state.nil? validator.validate_network_error_code(@network_error_code, @network_error_code_len) if !@network_error_code.nil? validator.(@user_message_reference, @user_message_reference_len) if !@user_message_reference.nil? validator.validate_privacy_indicator(@privacy_indicator, @privacy_indicator_len) if !@privacy_indicator.nil? validator.validate_callback_num(@callback_num, @callback_num_len) if !@callback_num.nil? validator.validate_callback_num_pres_ind(@callback_num_pres_ind, @callback_num_pres_ind_len) if !@callback_num_pres_ind.nil? validator.validate_callback_num_atag(@callback_num_atag, @callback_num_atag_len) if !@callback_num_atag.nil? validator.validate_source_subaddress(@source_subaddress, @source_subaddress_len) if !@source_subaddress.nil? validator.validate_dest_subaddress(@dest_subaddress, @dest_subaddress_len) if !@dest_subaddress.nil? validator.validate_user_response_code(@user_response_code, @user_response_code_len) if !@user_response_code.nil? validator.validate_display_time(@display_time, @display_time_len) if !@display_time.nil? validator.validate_sms_signal(@sms_signal, @sms_signal_len) if !@sms_signal.nil? validator.validate_ms_validity(@ms_validity, @ms_validity_len) if !@ms_validity.nil? validator.validate_ms_msg_wait_facilities(@ms_msg_wait_facilities, @ms_msg_wait_facilities_len) if !@ms_msg_wait_facilities.nil? validator.(@number_of_messages, @number_of_messages_len) if !@number_of_messages.nil? validator.(@number_of_messages, @number_of_messages_len) if !@number_of_messages.nil? validator.validate_alert_on_msg_delivery(@alert_on_msg_delivery, @alert_on_msg_delivery_len) if !@alert_on_msg_delivery.nil? validator.validate_language_indicator(@language_indicator, @language_indicator_len) if !@language_indicator.nil? validator.validate_its_reply_type(@its_reply_type, @its_reply_type_len) if !@its_reply_type.nil? validator.validate_its_session_info(@its_session_info, @its_session_info_len) if !@its_session_info.nil? end |