Class: Majoron::AntHill::SMPP::SMPPSubmitSM
- Defined in:
- lib/pdu/smpp_submit_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_subaddress ⇒ Object
Returns the value of attribute dest_subaddress.
-
#dest_subaddress_len ⇒ Object
Returns the value of attribute dest_subaddress_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.
-
#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.
-
#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.
-
#priority_flag ⇒ Object
Returns the value of attribute priority_flag.
-
#privacy_indicator ⇒ Object
Returns the value of attribute privacy_indicator.
-
#privacy_indicator_len ⇒ Object
Returns the value of attribute privacy_indicator_len.
-
#protocol_id ⇒ Object
Returns the value of attribute protocol_id.
-
#registered_delivery ⇒ Object
Returns the value of attribute registered_delivery.
-
#replace_if_present_flag ⇒ Object
Returns the value of attribute replace_if_present_flag.
-
#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.
-
#schedule_delivery_time ⇒ Object
Returns the value of attribute schedule_delivery_time.
-
#service_type ⇒ Object
Mandatory fields.
-
#short_message ⇒ Object
Returns the value of attribute short_message.
-
#sm_default_msg_id ⇒ Object
Returns the value of attribute sm_default_msg_id.
-
#sm_length ⇒ Object
Returns the value of attribute sm_length.
-
#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_port ⇒ Object
Returns the value of attribute source_port.
-
#source_port_len ⇒ Object
Returns the value of attribute source_port_len.
-
#source_subaddress ⇒ Object
Returns the value of attribute source_subaddress.
-
#source_subaddress_len ⇒ Object
Returns the value of attribute source_subaddress_len.
-
#user_message_reference ⇒ Object
Optional fields.
-
#user_message_reference_len ⇒ Object
Optional fields length.
-
#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.
-
#ussd_service_op ⇒ Object
Returns the value of attribute ussd_service_op.
-
#ussd_service_op_len ⇒ Object
Returns the value of attribute ussd_service_op_len.
-
#validity_period ⇒ Object
Returns the value of attribute validity_period.
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) ⇒ SMPPSubmitSM
constructor
A new instance of SMPPSubmitSM.
-
#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) ⇒ SMPPSubmitSM
Returns a new instance of SMPPSubmitSM.
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 |
# File 'lib/pdu/smpp_submit_sm.rb', line 23 def initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil) super(CommandId::CM_SUBMIT_SM, command_status, sequence_number) # Mandatory fields @service_type = "" @source_addr_ton = 0 @source_addr_npi = 0 @source_addr = "" @dest_addr_ton = 0 @dest_addr_npi = 0 @dest_addr = "" @esm_class = 0 @protocol_id = 0 @priority_flag = 0 @schedule_delivery_time = "" @validity_period = "" @registered_delivery = 0 @replace_if_present_flag = 0 @data_coding = 0 @sm_default_msg_id = 0 @sm_length = 0 @short_message = "" # Optional fields @user_message_reference = nil @source_port = nil @source_addr_subunit = nil @destination_port = nil @dest_addr_subunit = nil @sar_msg_ref_num = nil @sar_total_segments = nil @sar_segment_seqnum = nil @more_messages_to_send = nil @payload_type = nil @message_payload = 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 @ussd_service_op = nil # Optional fields length @user_message_reference_len = SMPPTLVLen::WORD_LEN @source_port_len = SMPPTLVLen::WORD_LEN @source_addr_subunit_len = SMPPTLVLen::BYTE_LEN @destination_port_len = SMPPTLVLen::WORD_LEN @dest_addr_subunit_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 @payload_type_len = SMPPTLVLen::BYTE_LEN @message_payload_len = SMPPTLVLen::ZERO_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 @ussd_service_op_len = SMPPTLVLen::BYTE_LEN end |
Instance Attribute Details
#alert_on_msg_delivery ⇒ Object
Returns the value of attribute alert_on_msg_delivery.
553 554 555 |
# File 'lib/pdu/smpp_submit_sm.rb', line 553 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.
583 584 585 |
# File 'lib/pdu/smpp_submit_sm.rb', line 583 def alert_on_msg_delivery_len @alert_on_msg_delivery_len end |
#callback_num ⇒ Object
Returns the value of attribute callback_num.
542 543 544 |
# File 'lib/pdu/smpp_submit_sm.rb', line 542 def callback_num @callback_num end |
#callback_num_atag ⇒ Object
Returns the value of attribute callback_num_atag.
544 545 546 |
# File 'lib/pdu/smpp_submit_sm.rb', line 544 def callback_num_atag @callback_num_atag end |
#callback_num_atag_len ⇒ Object
Returns the value of attribute callback_num_atag_len.
574 575 576 |
# File 'lib/pdu/smpp_submit_sm.rb', line 574 def callback_num_atag_len @callback_num_atag_len end |
#callback_num_len ⇒ Object
Returns the value of attribute callback_num_len.
572 573 574 |
# File 'lib/pdu/smpp_submit_sm.rb', line 572 def callback_num_len @callback_num_len end |
#callback_num_pres_ind ⇒ Object
Returns the value of attribute callback_num_pres_ind.
543 544 545 |
# File 'lib/pdu/smpp_submit_sm.rb', line 543 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.
573 574 575 |
# File 'lib/pdu/smpp_submit_sm.rb', line 573 def callback_num_pres_ind_len @callback_num_pres_ind_len end |
#data_coding ⇒ Object
Returns the value of attribute data_coding.
524 525 526 |
# File 'lib/pdu/smpp_submit_sm.rb', line 524 def data_coding @data_coding end |
#dest_addr ⇒ Object
Returns the value of attribute dest_addr.
516 517 518 |
# File 'lib/pdu/smpp_submit_sm.rb', line 516 def dest_addr @dest_addr end |
#dest_addr_npi ⇒ Object
Returns the value of attribute dest_addr_npi.
515 516 517 |
# File 'lib/pdu/smpp_submit_sm.rb', line 515 def dest_addr_npi @dest_addr_npi end |
#dest_addr_subunit ⇒ Object
Returns the value of attribute dest_addr_subunit.
534 535 536 |
# File 'lib/pdu/smpp_submit_sm.rb', line 534 def dest_addr_subunit @dest_addr_subunit end |
#dest_addr_subunit_len ⇒ Object
Returns the value of attribute dest_addr_subunit_len.
564 565 566 |
# File 'lib/pdu/smpp_submit_sm.rb', line 564 def dest_addr_subunit_len @dest_addr_subunit_len end |
#dest_addr_ton ⇒ Object
Returns the value of attribute dest_addr_ton.
514 515 516 |
# File 'lib/pdu/smpp_submit_sm.rb', line 514 def dest_addr_ton @dest_addr_ton end |
#dest_subaddress ⇒ Object
Returns the value of attribute dest_subaddress.
546 547 548 |
# File 'lib/pdu/smpp_submit_sm.rb', line 546 def dest_subaddress @dest_subaddress end |
#dest_subaddress_len ⇒ Object
Returns the value of attribute dest_subaddress_len.
576 577 578 |
# File 'lib/pdu/smpp_submit_sm.rb', line 576 def dest_subaddress_len @dest_subaddress_len end |
#destination_port ⇒ Object
Returns the value of attribute destination_port.
533 534 535 |
# File 'lib/pdu/smpp_submit_sm.rb', line 533 def destination_port @destination_port end |
#destination_port_len ⇒ Object
Returns the value of attribute destination_port_len.
563 564 565 |
# File 'lib/pdu/smpp_submit_sm.rb', line 563 def destination_port_len @destination_port_len end |
#display_time ⇒ Object
Returns the value of attribute display_time.
548 549 550 |
# File 'lib/pdu/smpp_submit_sm.rb', line 548 def display_time @display_time end |
#display_time_len ⇒ Object
Returns the value of attribute display_time_len.
578 579 580 |
# File 'lib/pdu/smpp_submit_sm.rb', line 578 def display_time_len @display_time_len end |
#esm_class ⇒ Object
Returns the value of attribute esm_class.
517 518 519 |
# File 'lib/pdu/smpp_submit_sm.rb', line 517 def esm_class @esm_class end |
#its_reply_type ⇒ Object
Returns the value of attribute its_reply_type.
555 556 557 |
# File 'lib/pdu/smpp_submit_sm.rb', line 555 def its_reply_type @its_reply_type end |
#its_reply_type_len ⇒ Object
Returns the value of attribute its_reply_type_len.
585 586 587 |
# File 'lib/pdu/smpp_submit_sm.rb', line 585 def its_reply_type_len @its_reply_type_len end |
#its_session_info ⇒ Object
Returns the value of attribute its_session_info.
556 557 558 |
# File 'lib/pdu/smpp_submit_sm.rb', line 556 def its_session_info @its_session_info end |
#its_session_info_len ⇒ Object
Returns the value of attribute its_session_info_len.
586 587 588 |
# File 'lib/pdu/smpp_submit_sm.rb', line 586 def its_session_info_len @its_session_info_len end |
#language_indicator ⇒ Object
Returns the value of attribute language_indicator.
554 555 556 |
# File 'lib/pdu/smpp_submit_sm.rb', line 554 def language_indicator @language_indicator end |
#language_indicator_len ⇒ Object
Returns the value of attribute language_indicator_len.
584 585 586 |
# File 'lib/pdu/smpp_submit_sm.rb', line 584 def language_indicator_len @language_indicator_len end |
#message_payload ⇒ Object
Returns the value of attribute message_payload.
540 541 542 |
# File 'lib/pdu/smpp_submit_sm.rb', line 540 def @message_payload end |
#message_payload_len ⇒ Object
Returns the value of attribute message_payload_len.
570 571 572 |
# File 'lib/pdu/smpp_submit_sm.rb', line 570 def @message_payload_len end |
#more_messages_to_send ⇒ Object
Returns the value of attribute more_messages_to_send.
538 539 540 |
# File 'lib/pdu/smpp_submit_sm.rb', line 538 def @more_messages_to_send end |
#more_messages_to_send_len ⇒ Object
Returns the value of attribute more_messages_to_send_len.
568 569 570 |
# File 'lib/pdu/smpp_submit_sm.rb', line 568 def @more_messages_to_send_len end |
#ms_msg_wait_facilities ⇒ Object
Returns the value of attribute ms_msg_wait_facilities.
551 552 553 |
# File 'lib/pdu/smpp_submit_sm.rb', line 551 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.
581 582 583 |
# File 'lib/pdu/smpp_submit_sm.rb', line 581 def ms_msg_wait_facilities_len @ms_msg_wait_facilities_len end |
#ms_validity ⇒ Object
Returns the value of attribute ms_validity.
550 551 552 |
# File 'lib/pdu/smpp_submit_sm.rb', line 550 def ms_validity @ms_validity end |
#ms_validity_len ⇒ Object
Returns the value of attribute ms_validity_len.
580 581 582 |
# File 'lib/pdu/smpp_submit_sm.rb', line 580 def ms_validity_len @ms_validity_len end |
#number_of_messages ⇒ Object
Returns the value of attribute number_of_messages.
552 553 554 |
# File 'lib/pdu/smpp_submit_sm.rb', line 552 def @number_of_messages end |
#number_of_messages_len ⇒ Object
Returns the value of attribute number_of_messages_len.
582 583 584 |
# File 'lib/pdu/smpp_submit_sm.rb', line 582 def @number_of_messages_len end |
#payload_type ⇒ Object
Returns the value of attribute payload_type.
539 540 541 |
# File 'lib/pdu/smpp_submit_sm.rb', line 539 def payload_type @payload_type end |
#payload_type_len ⇒ Object
Returns the value of attribute payload_type_len.
569 570 571 |
# File 'lib/pdu/smpp_submit_sm.rb', line 569 def payload_type_len @payload_type_len end |
#priority_flag ⇒ Object
Returns the value of attribute priority_flag.
519 520 521 |
# File 'lib/pdu/smpp_submit_sm.rb', line 519 def priority_flag @priority_flag end |
#privacy_indicator ⇒ Object
Returns the value of attribute privacy_indicator.
541 542 543 |
# File 'lib/pdu/smpp_submit_sm.rb', line 541 def privacy_indicator @privacy_indicator end |
#privacy_indicator_len ⇒ Object
Returns the value of attribute privacy_indicator_len.
571 572 573 |
# File 'lib/pdu/smpp_submit_sm.rb', line 571 def privacy_indicator_len @privacy_indicator_len end |
#protocol_id ⇒ Object
Returns the value of attribute protocol_id.
518 519 520 |
# File 'lib/pdu/smpp_submit_sm.rb', line 518 def protocol_id @protocol_id end |
#registered_delivery ⇒ Object
Returns the value of attribute registered_delivery.
522 523 524 |
# File 'lib/pdu/smpp_submit_sm.rb', line 522 def registered_delivery @registered_delivery end |
#replace_if_present_flag ⇒ Object
Returns the value of attribute replace_if_present_flag.
523 524 525 |
# File 'lib/pdu/smpp_submit_sm.rb', line 523 def replace_if_present_flag @replace_if_present_flag end |
#sar_msg_ref_num ⇒ Object
Returns the value of attribute sar_msg_ref_num.
535 536 537 |
# File 'lib/pdu/smpp_submit_sm.rb', line 535 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.
565 566 567 |
# File 'lib/pdu/smpp_submit_sm.rb', line 565 def sar_msg_ref_num_len @sar_msg_ref_num_len end |
#sar_segment_seqnum ⇒ Object
Returns the value of attribute sar_segment_seqnum.
537 538 539 |
# File 'lib/pdu/smpp_submit_sm.rb', line 537 def sar_segment_seqnum @sar_segment_seqnum end |
#sar_segment_seqnum_len ⇒ Object
Returns the value of attribute sar_segment_seqnum_len.
567 568 569 |
# File 'lib/pdu/smpp_submit_sm.rb', line 567 def sar_segment_seqnum_len @sar_segment_seqnum_len end |
#sar_total_segments ⇒ Object
Returns the value of attribute sar_total_segments.
536 537 538 |
# File 'lib/pdu/smpp_submit_sm.rb', line 536 def sar_total_segments @sar_total_segments end |
#sar_total_segments_len ⇒ Object
Returns the value of attribute sar_total_segments_len.
566 567 568 |
# File 'lib/pdu/smpp_submit_sm.rb', line 566 def sar_total_segments_len @sar_total_segments_len end |
#schedule_delivery_time ⇒ Object
Returns the value of attribute schedule_delivery_time.
520 521 522 |
# File 'lib/pdu/smpp_submit_sm.rb', line 520 def schedule_delivery_time @schedule_delivery_time end |
#service_type ⇒ Object
Mandatory fields
510 511 512 |
# File 'lib/pdu/smpp_submit_sm.rb', line 510 def service_type @service_type end |
#short_message ⇒ Object
Returns the value of attribute short_message.
527 528 529 |
# File 'lib/pdu/smpp_submit_sm.rb', line 527 def @short_message end |
#sm_default_msg_id ⇒ Object
Returns the value of attribute sm_default_msg_id.
525 526 527 |
# File 'lib/pdu/smpp_submit_sm.rb', line 525 def sm_default_msg_id @sm_default_msg_id end |
#sm_length ⇒ Object
Returns the value of attribute sm_length.
526 527 528 |
# File 'lib/pdu/smpp_submit_sm.rb', line 526 def sm_length @sm_length end |
#sms_signal ⇒ Object
Returns the value of attribute sms_signal.
549 550 551 |
# File 'lib/pdu/smpp_submit_sm.rb', line 549 def sms_signal @sms_signal end |
#sms_signal_len ⇒ Object
Returns the value of attribute sms_signal_len.
579 580 581 |
# File 'lib/pdu/smpp_submit_sm.rb', line 579 def sms_signal_len @sms_signal_len end |
#source_addr ⇒ Object
Returns the value of attribute source_addr.
513 514 515 |
# File 'lib/pdu/smpp_submit_sm.rb', line 513 def source_addr @source_addr end |
#source_addr_npi ⇒ Object
Returns the value of attribute source_addr_npi.
512 513 514 |
# File 'lib/pdu/smpp_submit_sm.rb', line 512 def source_addr_npi @source_addr_npi end |
#source_addr_subunit ⇒ Object
Returns the value of attribute source_addr_subunit.
532 533 534 |
# File 'lib/pdu/smpp_submit_sm.rb', line 532 def source_addr_subunit @source_addr_subunit end |
#source_addr_subunit_len ⇒ Object
Returns the value of attribute source_addr_subunit_len.
562 563 564 |
# File 'lib/pdu/smpp_submit_sm.rb', line 562 def source_addr_subunit_len @source_addr_subunit_len end |
#source_addr_ton ⇒ Object
Returns the value of attribute source_addr_ton.
511 512 513 |
# File 'lib/pdu/smpp_submit_sm.rb', line 511 def source_addr_ton @source_addr_ton end |
#source_port ⇒ Object
Returns the value of attribute source_port.
531 532 533 |
# File 'lib/pdu/smpp_submit_sm.rb', line 531 def source_port @source_port end |
#source_port_len ⇒ Object
Returns the value of attribute source_port_len.
561 562 563 |
# File 'lib/pdu/smpp_submit_sm.rb', line 561 def source_port_len @source_port_len end |
#source_subaddress ⇒ Object
Returns the value of attribute source_subaddress.
545 546 547 |
# File 'lib/pdu/smpp_submit_sm.rb', line 545 def source_subaddress @source_subaddress end |
#source_subaddress_len ⇒ Object
Returns the value of attribute source_subaddress_len.
575 576 577 |
# File 'lib/pdu/smpp_submit_sm.rb', line 575 def source_subaddress_len @source_subaddress_len end |
#user_message_reference ⇒ Object
Optional fields
530 531 532 |
# File 'lib/pdu/smpp_submit_sm.rb', line 530 def @user_message_reference end |
#user_message_reference_len ⇒ Object
Optional fields length
560 561 562 |
# File 'lib/pdu/smpp_submit_sm.rb', line 560 def @user_message_reference_len end |
#user_response_code ⇒ Object
Returns the value of attribute user_response_code.
547 548 549 |
# File 'lib/pdu/smpp_submit_sm.rb', line 547 def user_response_code @user_response_code end |
#user_response_code_len ⇒ Object
Returns the value of attribute user_response_code_len.
577 578 579 |
# File 'lib/pdu/smpp_submit_sm.rb', line 577 def user_response_code_len @user_response_code_len end |
#ussd_service_op ⇒ Object
Returns the value of attribute ussd_service_op.
557 558 559 |
# File 'lib/pdu/smpp_submit_sm.rb', line 557 def ussd_service_op @ussd_service_op end |
#ussd_service_op_len ⇒ Object
Returns the value of attribute ussd_service_op_len.
587 588 589 |
# File 'lib/pdu/smpp_submit_sm.rb', line 587 def ussd_service_op_len @ussd_service_op_len end |
#validity_period ⇒ Object
Returns the value of attribute validity_period.
521 522 523 |
# File 'lib/pdu/smpp_submit_sm.rb', line 521 def validity_period @validity_period end |
Instance Method Details
#decode_packet(decoder) ⇒ Object
Interface to decode SMPP packet
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 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 |
# File 'lib/pdu/smpp_submit_sm.rb', line 191 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_addr21(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_addr21(command_length()) @esm_class = decoder.decode_esm_class(command_length()) @protocol_id = decoder.decode_protocol_id(command_length()) @priority_flag = decoder.decode_priority_flag(command_length()) @schedule_delivery_time = decoder.decode_schedule_delivery_time(command_length()) @validity_period = decoder.decode_validity_period(command_length()) @registered_delivery = decoder.decode_registered_delivery(command_length()) @replace_if_present_flag = decoder.decode_replace_if_present_flag(command_length()) @data_coding = decoder.decode_data_coding(command_length()) @sm_default_msg_id = decoder.decode_sm_default_msg_id(command_length()) @sm_length = decoder.decode_sm_length(command_length()) @short_message = decoder.(@sm_length, command_length()) # Decode optional fields while decoder.has_tlvs() case decoder.get_tlv_code() when OptTags::TAG_USER_MESSAGE_REFERENCE @user_message_reference, @user_message_reference_len = decoder.(command_length()) 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_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_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_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_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()) when OptTags::TAG_USSD_SERVICE_OP @ussd_service_op, @ussd_service_op_len = decoder.decode_ussd_service_op(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
109 110 111 112 113 114 115 116 117 118 119 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 |
# File 'lib/pdu/smpp_submit_sm.rb', line 109 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_addr21(@source_addr) encoder.encode_dest_addr_ton(@dest_addr_ton) encoder.encode_dest_addr_npi(@dest_addr_npi) encoder.encode_dest_addr21(@dest_addr) encoder.encode_esm_class(@esm_class) encoder.encode_protocol_id(@protocol_id) encoder.encode_priority_flag(@priority_flag) encoder.encode_schedule_delivery_time(@schedule_delivery_time) encoder.encode_validity_period(@validity_period) encoder.encode_registered_delivery(@registered_delivery) encoder.encode_replace_if_present_flag(@replace_if_present_flag) encoder.encode_data_coding(@data_coding) encoder.encode_sm_default_msg_id(@sm_default_msg_id) encoder.encode_sm_length(@sm_length) encoder.(@short_message) # Encode optional fields encoder.(@user_message_reference, @user_message_reference_len) if !@user_message_reference.nil? 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_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_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_payload_type(@payload_type, @payload_type_len) if !@payload_type.nil? encoder.(@message_payload, @message_payload_len) if !@message_payload.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.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? encoder.encode_ussd_service_op(@ussd_service_op, @ussd_service_op_len) if !@ussd_service_op.nil? end |
#output_packet(outputter) ⇒ Object
Interface to output SMPP packet
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 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/pdu/smpp_submit_sm.rb', line 395 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_addr21(@source_addr) outputter.output_dest_addr_ton(@dest_addr_ton) outputter.output_dest_addr_npi(@dest_addr_npi) outputter.output_dest_addr21(@dest_addr) outputter.output_esm_class(@esm_class) outputter.output_protocol_id(@protocol_id) outputter.output_priority_flag(@priority_flag) outputter.output_schedule_delivery_time(@schedule_delivery_time) outputter.output_validity_period(@validity_period) outputter.output_registered_delivery(@registered_delivery) outputter.output_replace_if_present_flag(@replace_if_present_flag) outputter.output_data_coding(@data_coding) outputter.output_sm_default_msg_id(@sm_default_msg_id) outputter.output_sm_length(@sm_length) outputter.(@short_message) # Encode optional fields outputter.(@user_message_reference, @user_message_reference_len) if !@user_message_reference.nil? 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_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_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_payload_type(@payload_type, @payload_type_len) if !@payload_type.nil? outputter.(@message_payload, @message_payload_len) if !@message_payload.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.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? outputter.output_ussd_service_op(@ussd_service_op, @ussd_service_op_len) if !@ussd_service_op.nil? end |
#validate_packet(validator) ⇒ Object
Interface to validate SMPP packet
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 355 356 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 |
# File 'lib/pdu/smpp_submit_sm.rb', line 309 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_addr21(@source_addr) validator.validate_dest_addr_ton(@dest_addr_ton) validator.validate_dest_addr_npi(@dest_addr_npi) validator.validate_dest_addr21(@dest_addr) validator.validate_esm_class(@esm_class) validator.validate_protocol_id(@protocol_id) validator.validate_priority_flag(@priority_flag) validator.validate_schedule_delivery_time(@schedule_delivery_time) validator.validate_validity_period(@validity_period) validator.validate_registered_delivery(@registered_delivery) validator.validate_replace_if_present_flag(@replace_if_present_flag) validator.validate_data_coding(@data_coding) validator.validate_sm_default_msg_id(@sm_default_msg_id) validator.validate_sm_length(@sm_length) validator.(@short_message) # Encode optional fields validator.(@user_message_reference, @user_message_reference_len) if !@user_message_reference.nil? 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_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_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_payload_type(@payload_type, @payload_type_len) if !@payload_type.nil? validator.(@message_payload, @message_payload_len) if !@message_payload.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.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? validator.validate_ussd_service_op(@ussd_service_op, @ussd_service_op_len) if !@ussd_service_op.nil? # Validate complex rules validator.(@short_message, @message_payload) if !@message_payload.nil? end |