anthill_smpp_ruby 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +21 -0
- data/README +30 -0
- data/anthill_smpp_ruby.gemspec +18 -0
- data/changelog +43 -0
- data/data/dumps/random_command.dump +1 -0
- data/data/dumps/smpp_alert_notification.dump +1 -0
- data/data/dumps/smpp_bind_receiver.dump +1 -0
- data/data/dumps/smpp_bind_receiver_resp.dump +1 -0
- data/data/dumps/smpp_bind_transceiver.dump +1 -0
- data/data/dumps/smpp_bind_transceiver_1.dump +2 -0
- data/data/dumps/smpp_bind_transceiver_resp.dump +1 -0
- data/data/dumps/smpp_bind_transmitter.dump +1 -0
- data/data/dumps/smpp_bind_transmitter_resp.dump +1 -0
- data/data/dumps/smpp_broadcast_sm.dump +1 -0
- data/data/dumps/smpp_broadcast_sm_resp.dump +1 -0
- data/data/dumps/smpp_cancel_broadcast_sm.dump +1 -0
- data/data/dumps/smpp_cancel_broadcast_sm_resp.dump +1 -0
- data/data/dumps/smpp_cancel_sm.dump +1 -0
- data/data/dumps/smpp_cancel_sm_resp.dump +1 -0
- data/data/dumps/smpp_data_sm.dump +1 -0
- data/data/dumps/smpp_data_sm_resp.dump +1 -0
- data/data/dumps/smpp_deliver_sm.dump +1 -0
- data/data/dumps/smpp_deliver_sm_resp.dump +1 -0
- data/data/dumps/smpp_enquire_link.dump +1 -0
- data/data/dumps/smpp_enquire_link_resp.dump +1 -0
- data/data/dumps/smpp_generic_nack.dump +1 -0
- data/data/dumps/smpp_outbind.dump +1 -0
- data/data/dumps/smpp_query_broadcast_sm.dump +1 -0
- data/data/dumps/smpp_query_broadcast_sm_resp.dump +1 -0
- data/data/dumps/smpp_query_broadcast_sm_resp_1.dump +1 -0
- data/data/dumps/smpp_query_sm.dump +1 -0
- data/data/dumps/smpp_query_sm_resp.dump +1 -0
- data/data/dumps/smpp_replace_sm.dump +1 -0
- data/data/dumps/smpp_replace_sm_resp.dump +1 -0
- data/data/dumps/smpp_submit_multi.dump +1 -0
- data/data/dumps/smpp_submit_multi_resp.dump +1 -0
- data/data/dumps/smpp_submit_sm.dump +1 -0
- data/data/dumps/smpp_submit_sm_resp.dump +1 -0
- data/data/dumps/smpp_unbind.dump +1 -0
- data/data/dumps/smpp_unbind_resp.dump +1 -0
- data/data/pdus/random_command.xml +35 -0
- data/data/pdus/smpp_alert_notification.xml +14 -0
- data/data/pdus/smpp_alert_notification_no_optional.xml +13 -0
- data/data/pdus/smpp_bind_receiver.xml +17 -0
- data/data/pdus/smpp_bind_receiver_resp.xml +12 -0
- data/data/pdus/smpp_bind_receiver_resp_no_optional.xml +11 -0
- data/data/pdus/smpp_bind_transceiver.xml +17 -0
- data/data/pdus/smpp_bind_transceiver_resp.xml +12 -0
- data/data/pdus/smpp_bind_transceiver_resp_no_optional.xml +11 -0
- data/data/pdus/smpp_bind_transmitter.xml +17 -0
- data/data/pdus/smpp_bind_transmitter_resp.xml +12 -0
- data/data/pdus/smpp_bind_transmitter_resp_no_optional.xml +11 -0
- data/data/pdus/smpp_broadcast_sm.xml +47 -0
- data/data/pdus/smpp_broadcast_sm_no_optional.xml +26 -0
- data/data/pdus/smpp_broadcast_sm_resp.xml +14 -0
- data/data/pdus/smpp_broadcast_sm_resp_no_optional.xml +8 -0
- data/data/pdus/smpp_cancel_broadcast_sm.xml +17 -0
- data/data/pdus/smpp_cancel_broadcast_sm_no_optional.xml +15 -0
- data/data/pdus/smpp_cancel_broadcast_sm_resp.xml +7 -0
- data/data/pdus/smpp_cancel_sm.xml +18 -0
- data/data/pdus/smpp_cancel_sm_resp.xml +10 -0
- data/data/pdus/smpp_commands.xsd +914 -0
- data/data/pdus/smpp_data_sm.xml +58 -0
- data/data/pdus/smpp_data_sm_no_optional.xml +17 -0
- data/data/pdus/smpp_data_sm_resp.xml +15 -0
- data/data/pdus/smpp_data_sm_resp_no_optional.xml +8 -0
- data/data/pdus/smpp_deliver_sm.xml +46 -0
- data/data/pdus/smpp_deliver_sm_no_optional.xml +25 -0
- data/data/pdus/smpp_deliver_sm_resp.xml +14 -0
- data/data/pdus/smpp_deliver_sm_resp_no_optional.xml +8 -0
- data/data/pdus/smpp_enquire_link.xml +10 -0
- data/data/pdus/smpp_enquire_link_resp.xml +10 -0
- data/data/pdus/smpp_generic_nack.xml +10 -0
- data/data/pdus/smpp_outbind.xml +12 -0
- data/data/pdus/smpp_query_broadcast_sm.xml +12 -0
- data/data/pdus/smpp_query_broadcast_sm_no_optional.xml +11 -0
- data/data/pdus/smpp_query_broadcast_sm_resp.xml +17 -0
- data/data/pdus/smpp_query_broadcast_sm_resp_no_optional.xml +15 -0
- data/data/pdus/smpp_query_sm.xml +11 -0
- data/data/pdus/smpp_query_sm_resp.xml +11 -0
- data/data/pdus/smpp_replace_sm.xml +18 -0
- data/data/pdus/smpp_replace_sm_no_optional.xml +17 -0
- data/data/pdus/smpp_replace_sm_resp.xml +7 -0
- data/data/pdus/smpp_submit_multi.xml +73 -0
- data/data/pdus/smpp_submit_multi_no_optional.xml +51 -0
- data/data/pdus/smpp_submit_multi_resp.xml +35 -0
- data/data/pdus/smpp_submit_sm.xml +57 -0
- data/data/pdus/smpp_submit_sm_no_optional.xml +28 -0
- data/data/pdus/smpp_submit_sm_resp.xml +8 -0
- data/data/pdus/smpp_unbind.xml +10 -0
- data/data/pdus/smpp_unbind_resp.xml +10 -0
- data/examples/dump_viewer.rb +298 -0
- data/examples/pdu_composer.rb +1331 -0
- data/knownbugs +24 -0
- data/lib/anthill_smpp_ruby.rb +83 -0
- data/lib/i_smpp_outputter.rb +425 -0
- data/lib/pdu/smpp_alert_notification.rb +132 -0
- data/lib/pdu/smpp_bind.rb +102 -0
- data/lib/pdu/smpp_bind_receiver.rb +29 -0
- data/lib/pdu/smpp_bind_receiver_resp.rb +30 -0
- data/lib/pdu/smpp_bind_resp.rb +100 -0
- data/lib/pdu/smpp_bind_transceiver.rb +29 -0
- data/lib/pdu/smpp_bind_transceiver_resp.rb +31 -0
- data/lib/pdu/smpp_bind_transmitter.rb +29 -0
- data/lib/pdu/smpp_bind_transmitter_resp.rb +30 -0
- data/lib/pdu/smpp_broadcast_sm.rb +566 -0
- data/lib/pdu/smpp_broadcast_sm_resp.rb +130 -0
- data/lib/pdu/smpp_cancel_broadcast_sm.rb +143 -0
- data/lib/pdu/smpp_cancel_broadcast_sm_resp.rb +60 -0
- data/lib/pdu/smpp_cancel_sm.rb +110 -0
- data/lib/pdu/smpp_cancel_sm_resp.rb +60 -0
- data/lib/pdu/smpp_data_sm.rb +679 -0
- data/lib/pdu/smpp_data_sm_resp.rb +148 -0
- data/lib/pdu/smpp_deliver_sm.rb +458 -0
- data/lib/pdu/smpp_deliver_sm_resp.rb +137 -0
- data/lib/pdu/smpp_enquire_link.rb +59 -0
- data/lib/pdu/smpp_enquire_link_resp.rb +61 -0
- data/lib/pdu/smpp_generic_nack.rb +61 -0
- data/lib/pdu/smpp_outbind.rb +71 -0
- data/lib/pdu/smpp_pdu.rb +90 -0
- data/lib/pdu/smpp_query_broadcast_sm.rb +120 -0
- data/lib/pdu/smpp_query_broadcast_sm_resp.rb +192 -0
- data/lib/pdu/smpp_query_sm.rb +92 -0
- data/lib/pdu/smpp_query_sm_resp.rb +92 -0
- data/lib/pdu/smpp_replace_sm.rb +172 -0
- data/lib/pdu/smpp_replace_sm_resp.rb +61 -0
- data/lib/pdu/smpp_resp.rb +40 -0
- data/lib/pdu/smpp_submit_multi.rb +517 -0
- data/lib/pdu/smpp_submit_multi_resp.rb +90 -0
- data/lib/pdu/smpp_submit_sm.rb +591 -0
- data/lib/pdu/smpp_submit_sm_resp.rb +72 -0
- data/lib/pdu/smpp_unbind.rb +60 -0
- data/lib/pdu/smpp_unbind_resp.rb +61 -0
- data/lib/smpp_constants.rb +917 -0
- data/lib/smpp_csv_outputter.rb +1601 -0
- data/lib/smpp_datatypes.rb +89 -0
- data/lib/smpp_decoder.rb +627 -0
- data/lib/smpp_encoder.rb +495 -0
- data/lib/smpp_hex_outputter.rb +36 -0
- data/lib/smpp_outputter_base.rb +315 -0
- data/lib/smpp_structures.rb +98 -0
- data/lib/smpp_txt_outputter.rb +1895 -0
- data/lib/smpp_validator.rb +373 -0
- data/lib/smpp_xml_outputter.rb +34 -0
- data/roadmap +18 -0
- data/setup.rb +1585 -0
- data/test/anthill_smpp_test.rb +29 -0
- data/test/smpp_codec_test.rb +30 -0
- data/test/smpp_datatypes_test.rb +69 -0
- data/test/smpp_outputter_test.rb +1261 -0
- data/test/smpp_parsing_test.rb +1758 -0
- data/test/smpp_rawdump_test.rb +2095 -0
- data/test/smpp_validator_test.rb +441 -0
- metadata +206 -0
@@ -0,0 +1,679 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2007 Majoron.com (developers@majoron.com)
|
3
|
+
# Original sources are available at www.majoron.com
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
|
19
|
+
module Majoron
|
20
|
+
module AntHill
|
21
|
+
module SMPP
|
22
|
+
class SMPPDataSM < SMPPPDU
|
23
|
+
def initialize(command_status = ErrorCode::ESME_ROK, sequence_number = nil)
|
24
|
+
super(CommandId::CM_DATA_SM, command_status, sequence_number)
|
25
|
+
|
26
|
+
# Mandatory fields
|
27
|
+
@service_type = ""
|
28
|
+
@source_addr_ton = TON::UNKNOWN
|
29
|
+
@source_addr_npi = NPI::UNKNOWN
|
30
|
+
@source_addr = ""
|
31
|
+
@dest_addr_ton = TON::UNKNOWN
|
32
|
+
@dest_addr_npi = NPI::UNKNOWN
|
33
|
+
@dest_addr = ""
|
34
|
+
@esm_class = 0
|
35
|
+
@registered_delivery = 0
|
36
|
+
@data_coding = 0
|
37
|
+
|
38
|
+
|
39
|
+
# Optional fields
|
40
|
+
@source_port = nil
|
41
|
+
@source_addr_subunit = nil
|
42
|
+
@source_network_type = nil
|
43
|
+
@source_bearer_type = nil
|
44
|
+
@source_telematics_id = nil
|
45
|
+
@destination_port = nil
|
46
|
+
@dest_addr_subunit = nil
|
47
|
+
@dest_network_type = nil
|
48
|
+
@dest_bearer_type = nil
|
49
|
+
@dest_telematics_id = nil
|
50
|
+
@sar_msg_ref_num = nil
|
51
|
+
@sar_total_segments = nil
|
52
|
+
@sar_segment_seqnum = nil
|
53
|
+
@more_messages_to_send = nil
|
54
|
+
@qos_time_to_live = nil
|
55
|
+
@payload_type = nil
|
56
|
+
@message_payload = nil
|
57
|
+
@set_dpf = nil
|
58
|
+
@receipted_message_id = nil
|
59
|
+
@message_state = nil
|
60
|
+
@network_error_code = nil
|
61
|
+
@user_message_reference = nil
|
62
|
+
@privacy_indicator = nil
|
63
|
+
@callback_num = nil
|
64
|
+
@callback_num_pres_ind = nil
|
65
|
+
@callback_num_atag = nil
|
66
|
+
@source_subaddress = nil
|
67
|
+
@dest_subaddress = nil
|
68
|
+
@user_response_code = nil
|
69
|
+
@display_time = nil
|
70
|
+
@sms_signal = nil
|
71
|
+
@ms_validity = nil
|
72
|
+
@ms_msg_wait_facilities = nil
|
73
|
+
@number_of_messages = nil
|
74
|
+
@alert_on_msg_delivery = nil
|
75
|
+
@language_indicator = nil
|
76
|
+
@its_reply_type = nil
|
77
|
+
@its_session_info = nil
|
78
|
+
|
79
|
+
# Optional fields length
|
80
|
+
@source_port_len = SMPPTLVLen::WORD_LEN
|
81
|
+
@source_addr_subunit_len = SMPPTLVLen::BYTE_LEN
|
82
|
+
@source_network_type_len = SMPPTLVLen::BYTE_LEN
|
83
|
+
@source_bearer_type_len = SMPPTLVLen::BYTE_LEN
|
84
|
+
@source_telematics_id_len = SMPPTLVLen::BYTE_LEN
|
85
|
+
@destination_port_len = SMPPTLVLen::WORD_LEN
|
86
|
+
@dest_addr_subunit_len = SMPPTLVLen::BYTE_LEN
|
87
|
+
@dest_network_type_len = SMPPTLVLen::BYTE_LEN
|
88
|
+
@dest_bearer_type_len = SMPPTLVLen::BYTE_LEN
|
89
|
+
@dest_telematics_id_len = SMPPTLVLen::BYTE_LEN
|
90
|
+
@sar_msg_ref_num_len = SMPPTLVLen::WORD_LEN
|
91
|
+
@sar_total_segments_len = SMPPTLVLen::BYTE_LEN
|
92
|
+
@sar_segment_seqnum_len = SMPPTLVLen::BYTE_LEN
|
93
|
+
@more_messages_to_send_len = SMPPTLVLen::BYTE_LEN
|
94
|
+
@qos_time_to_live_len = SMPPTLVLen::DWORD_LEN
|
95
|
+
@payload_type_len = SMPPTLVLen::BYTE_LEN
|
96
|
+
@message_payload_len = SMPPTLVLen::ZERO_LEN
|
97
|
+
@set_dpf_len = SMPPTLVLen::BYTE_LEN
|
98
|
+
@receipted_message_id_len = SMPPTLVLen::ZERO_LEN
|
99
|
+
@message_state_len = SMPPTLVLen::BYTE_LEN
|
100
|
+
@network_error_code_len = SMPPTLVLen::BYTE_LEN + SMPPTLVLen::WORD_LEN
|
101
|
+
@user_message_reference_len = SMPPTLVLen::WORD_LEN
|
102
|
+
@privacy_indicator_len = SMPPTLVLen::BYTE_LEN
|
103
|
+
@callback_num_len = SMPPTLVLen::ZERO_LEN
|
104
|
+
@callback_num_pres_ind_len = SMPPTLVLen::BYTE_LEN
|
105
|
+
@callback_num_atag_len = SMPPTLVLen::ZERO_LEN
|
106
|
+
@source_subaddress_len = SMPPTLVLen::ZERO_LEN
|
107
|
+
@dest_subaddress_len = SMPPTLVLen::ZERO_LEN
|
108
|
+
@user_response_code_len = SMPPTLVLen::BYTE_LEN
|
109
|
+
@display_time_len = SMPPTLVLen::BYTE_LEN
|
110
|
+
@sms_signal_len = SMPPTLVLen::WORD_LEN
|
111
|
+
@ms_validity_len = SMPPTLVLen::BYTE_LEN
|
112
|
+
@ms_msg_wait_facilities_len = SMPPTLVLen::BYTE_LEN
|
113
|
+
@number_of_messages_len = SMPPTLVLen::BYTE_LEN
|
114
|
+
@alert_on_msg_delivery_len = SMPPTLVLen::BYTE_LEN
|
115
|
+
@language_indicator_len = SMPPTLVLen::BYTE_LEN
|
116
|
+
@its_reply_type_len = SMPPTLVLen::BYTE_LEN
|
117
|
+
@its_session_info_len = SMPPTLVLen::WORD_LEN
|
118
|
+
end
|
119
|
+
# Interface to encode SMPP packet
|
120
|
+
def encode_packet(encoder)
|
121
|
+
# Encode header and mandatory fields
|
122
|
+
encoder.encode_header(@header)
|
123
|
+
encoder.encode_service_type(@service_type)
|
124
|
+
encoder.encode_source_addr_ton(@source_addr_ton)
|
125
|
+
encoder.encode_source_addr_npi(@source_addr_npi)
|
126
|
+
encoder.encode_source_addr65(@source_addr)
|
127
|
+
encoder.encode_dest_addr_ton(@dest_addr_ton)
|
128
|
+
encoder.encode_dest_addr_npi(@dest_addr_npi)
|
129
|
+
encoder.encode_dest_addr65(@dest_addr)
|
130
|
+
encoder.encode_esm_class(@esm_class)
|
131
|
+
encoder.encode_registered_delivery(@registered_delivery)
|
132
|
+
encoder.encode_data_coding(@data_coding)
|
133
|
+
|
134
|
+
|
135
|
+
# Encode optional fields
|
136
|
+
encoder.encode_source_port(@source_port,
|
137
|
+
@source_port_len) if !@source_port.nil?
|
138
|
+
encoder.encode_source_addr_subunit(@source_addr_subunit,
|
139
|
+
@source_addr_subunit_len) if !@source_addr_subunit.nil?
|
140
|
+
encoder.encode_source_network_type(@source_network_type,
|
141
|
+
@source_network_type_len) if !@source_network_type.nil?
|
142
|
+
encoder.encode_source_bearer_type(@source_bearer_type,
|
143
|
+
@source_bearer_type_len) if !@source_bearer_type.nil?
|
144
|
+
encoder.encode_source_telematics_id(@source_telematics_id,
|
145
|
+
@source_telematics_id_len) if !@source_telematics_id.nil?
|
146
|
+
encoder.encode_destination_port(@destination_port,
|
147
|
+
@destination_port_len) if !@destination_port.nil?
|
148
|
+
encoder.encode_dest_addr_subunit(@dest_addr_subunit,
|
149
|
+
@dest_addr_subunit_len) if !@dest_addr_subunit.nil?
|
150
|
+
encoder.encode_dest_network_type(@dest_network_type,
|
151
|
+
@dest_network_type_len) if !@dest_network_type.nil?
|
152
|
+
encoder.encode_dest_bearer_type(@dest_bearer_type,
|
153
|
+
@dest_bearer_type_len) if !@dest_bearer_type.nil?
|
154
|
+
encoder.encode_dest_telematics_id(@dest_telematics_id,
|
155
|
+
@dest_telematics_id_len) if !@dest_telematics_id.nil?
|
156
|
+
encoder.encode_sar_msg_ref_num(@sar_msg_ref_num,
|
157
|
+
@sar_msg_ref_num_len) if !@sar_msg_ref_num.nil?
|
158
|
+
encoder.encode_sar_total_segments(@sar_total_segments,
|
159
|
+
@sar_total_segments_len) if !@sar_total_segments.nil?
|
160
|
+
encoder.encode_sar_segment_seqnum(@sar_segment_seqnum,
|
161
|
+
@sar_segment_seqnum_len) if !@sar_segment_seqnum.nil?
|
162
|
+
encoder.encode_more_messages_to_send(@more_messages_to_send,
|
163
|
+
@more_messages_to_send_len) if !@more_messages_to_send.nil?
|
164
|
+
encoder.encode_qos_time_to_live(@qos_time_to_live,
|
165
|
+
@qos_time_to_live_len) if !@qos_time_to_live.nil?
|
166
|
+
encoder.encode_payload_type(@payload_type,
|
167
|
+
@payload_type_len) if !@payload_type.nil?
|
168
|
+
encoder.encode_message_payload(@message_payload,
|
169
|
+
@message_payload_len) if !@message_payload.nil?
|
170
|
+
encoder.encode_set_dpf(@set_dpf,
|
171
|
+
@set_dpf_len) if !@set_dpf.nil?
|
172
|
+
encoder.encode_receipted_message_id(@receipted_message_id,
|
173
|
+
@receipted_message_id_len) if !@receipted_message_id.nil?
|
174
|
+
encoder.encode_message_state_tlv(@message_state,
|
175
|
+
@message_state_len) if !@message_state.nil?
|
176
|
+
encoder.encode_network_error_code(@network_error_code,
|
177
|
+
@network_error_code_len) if !@network_error_code.nil?
|
178
|
+
encoder.encode_user_message_reference(@user_message_reference,
|
179
|
+
@user_message_reference_len) if !@user_message_reference.nil?
|
180
|
+
encoder.encode_privacy_indicator(@privacy_indicator,
|
181
|
+
@privacy_indicator_len) if !@privacy_indicator.nil?
|
182
|
+
encoder.encode_callback_num(@callback_num,
|
183
|
+
@callback_num_len) if !@callback_num.nil?
|
184
|
+
encoder.encode_callback_num_pres_ind(@callback_num_pres_ind,
|
185
|
+
@callback_num_pres_ind_len) if !@callback_num_pres_ind.nil?
|
186
|
+
encoder.encode_callback_num_atag(@callback_num_atag,
|
187
|
+
@callback_num_atag_len) if !@callback_num_atag.nil?
|
188
|
+
encoder.encode_source_subaddress(@source_subaddress,
|
189
|
+
@source_subaddress_len) if !@source_subaddress.nil?
|
190
|
+
encoder.encode_dest_subaddress(@dest_subaddress,
|
191
|
+
@dest_subaddress_len) if !@dest_subaddress.nil?
|
192
|
+
encoder.encode_user_response_code(@user_response_code,
|
193
|
+
@user_response_code_len) if !@user_response_code.nil?
|
194
|
+
encoder.encode_display_time(@display_time,
|
195
|
+
@display_time_len) if !@display_time.nil?
|
196
|
+
encoder.encode_sms_signal(@sms_signal,
|
197
|
+
@sms_signal_len) if !@sms_signal.nil?
|
198
|
+
encoder.encode_ms_validity(@ms_validity,
|
199
|
+
@ms_validity_len) if !@ms_validity.nil?
|
200
|
+
encoder.encode_ms_msg_wait_facilities(@ms_msg_wait_facilities,
|
201
|
+
@ms_msg_wait_facilities_len) if !@ms_msg_wait_facilities.nil?
|
202
|
+
encoder.encode_number_of_messages(@number_of_messages,
|
203
|
+
@number_of_messages_len) if !@number_of_messages.nil?
|
204
|
+
encoder.encode_number_of_messages(@number_of_messages,
|
205
|
+
@number_of_messages_len) if !@number_of_messages.nil?
|
206
|
+
encoder.encode_alert_on_msg_delivery(@alert_on_msg_delivery,
|
207
|
+
@alert_on_msg_delivery_len) if !@alert_on_msg_delivery.nil?
|
208
|
+
encoder.encode_language_indicator(@language_indicator,
|
209
|
+
@language_indicator_len) if !@language_indicator.nil?
|
210
|
+
encoder.encode_its_reply_type(@its_reply_type,
|
211
|
+
@its_reply_type_len) if !@its_reply_type.nil?
|
212
|
+
encoder.encode_its_session_info(@its_session_info,
|
213
|
+
@its_session_info_len) if !@its_session_info.nil?
|
214
|
+
end
|
215
|
+
|
216
|
+
# Interface to decode SMPP packet
|
217
|
+
def decode_packet(decoder)
|
218
|
+
# Decode header and mandatory fields
|
219
|
+
@header = decoder.decode_header()
|
220
|
+
@service_type = decoder.decode_service_type(command_length())
|
221
|
+
@source_addr_ton = decoder.decode_source_addr_ton(command_length())
|
222
|
+
@source_addr_npi = decoder.decode_source_addr_npi(command_length())
|
223
|
+
@source_addr = decoder.decode_source_addr65(command_length())
|
224
|
+
@dest_addr_ton = decoder.decode_dest_addr_ton(command_length())
|
225
|
+
@dest_addr_npi = decoder.decode_dest_addr_npi(command_length())
|
226
|
+
@dest_addr = decoder.decode_dest_addr65(command_length())
|
227
|
+
@esm_class = decoder.decode_esm_class(command_length())
|
228
|
+
@registered_delivery = decoder.decode_registered_delivery(command_length())
|
229
|
+
@data_coding = decoder.decode_data_coding(command_length())
|
230
|
+
|
231
|
+
|
232
|
+
# Decode optional fields
|
233
|
+
while decoder.has_tlvs()
|
234
|
+
case decoder.get_tlv_code()
|
235
|
+
when OptTags::TAG_SOURCE_PORT
|
236
|
+
@source_port, @source_port_len =
|
237
|
+
decoder.decode_source_port(command_length())
|
238
|
+
when OptTags::TAG_SOURCE_ADDR_SUBUNIT
|
239
|
+
@source_addr_subunit, @source_addr_subunit_len =
|
240
|
+
decoder.decode_source_addr_subunit(command_length())
|
241
|
+
when OptTags::TAG_SOURCE_NETWORK_TYPE
|
242
|
+
@source_network_type, @source_network_type_len =
|
243
|
+
decoder.decode_source_network_type(command_length())
|
244
|
+
when OptTags::TAG_SOURCE_BEARER_TYPE
|
245
|
+
@source_bearer_type, @source_bearer_type_len =
|
246
|
+
decoder.decode_source_bearer_type(command_length())
|
247
|
+
when OptTags::TAG_SOURCE_TELEMATICS_ID
|
248
|
+
@source_telematics_id, @source_telematics_id_len =
|
249
|
+
decoder.decode_source_telematics_id(command_length())
|
250
|
+
when OptTags::TAG_DESTINATION_PORT
|
251
|
+
@destination_port, @destination_port_len =
|
252
|
+
decoder.decode_destination_port(command_length())
|
253
|
+
when OptTags::TAG_DEST_ADDR_SUBUNIT
|
254
|
+
@dest_addr_subunit, @dest_addr_subunit_len =
|
255
|
+
decoder.decode_dest_addr_subunit(command_length())
|
256
|
+
when OptTags::TAG_DEST_NETWORK_TYPE
|
257
|
+
@dest_network_type, @dest_network_type_len =
|
258
|
+
decoder.decode_dest_network_type(command_length())
|
259
|
+
when OptTags::TAG_DEST_BEARER_TYPE
|
260
|
+
@dest_bearer_type, @dest_bearer_type_len =
|
261
|
+
decoder.decode_dest_bearer_type(command_length())
|
262
|
+
when OptTags::TAG_DEST_TELEMATICS_ID
|
263
|
+
@dest_telematics_id, @dest_telematics_id_len =
|
264
|
+
decoder.decode_dest_telematics_id(command_length())
|
265
|
+
when OptTags::TAG_SAR_MSG_REF_NUM
|
266
|
+
@sar_msg_ref_num, @sar_msg_ref_num_len =
|
267
|
+
decoder.decode_sar_msg_ref_num(command_length())
|
268
|
+
when OptTags::TAG_SAR_TOTAL_SEGMENTS
|
269
|
+
@sar_total_segments, @sar_total_segments_len =
|
270
|
+
decoder.decode_sar_total_segments(command_length())
|
271
|
+
when OptTags::TAG_SAR_SEGMENT_SEQNUM
|
272
|
+
@sar_segment_seqnum, @sar_segment_seqnum_len =
|
273
|
+
decoder.decode_sar_segment_seqnum(command_length())
|
274
|
+
when OptTags::TAG_MORE_MESSAGES_TO_SEND
|
275
|
+
@more_messages_to_send, @more_messages_to_send_len =
|
276
|
+
decoder.decode_more_messages_to_send(command_length())
|
277
|
+
when OptTags::TAG_QOS_TIME_TO_LIVE
|
278
|
+
@qos_time_to_live, @qos_time_to_live_len =
|
279
|
+
decoder.decode_qos_time_to_live(command_length())
|
280
|
+
when OptTags::TAG_PAYLOAD_TYPE
|
281
|
+
@payload_type, @payload_type_len =
|
282
|
+
decoder.decode_payload_type(command_length())
|
283
|
+
when OptTags::TAG_MESSAGE_PAYLOAD
|
284
|
+
@message_payload, @message_payload_len =
|
285
|
+
decoder.decode_message_payload(command_length())
|
286
|
+
when OptTags::TAG_SET_DPF
|
287
|
+
@set_dpf, @set_dpf_len =
|
288
|
+
decoder.decode_set_dpf(command_length())
|
289
|
+
when OptTags::TAG_RECEIPTED_MESSAGE_ID
|
290
|
+
@receipted_message_id, @receipted_message_id_len =
|
291
|
+
decoder.decode_receipted_message_id(command_length())
|
292
|
+
when OptTags::TAG_MESSAGE_STATE
|
293
|
+
@message_state, @message_state_len =
|
294
|
+
decoder.decode_message_state_tlv(command_length())
|
295
|
+
when OptTags::TAG_NETWORK_ERROR_CODE
|
296
|
+
@network_error_code, @network_error_code_len =
|
297
|
+
decoder.decode_network_error_code(command_length())
|
298
|
+
when OptTags::TAG_USER_MESSAGE_REFERENCE
|
299
|
+
@user_message_reference, @user_message_reference_len =
|
300
|
+
decoder.decode_user_message_reference(command_length())
|
301
|
+
when OptTags::TAG_PRIVACY_INDICATOR
|
302
|
+
@privacy_indicator, @privacy_indicator_len =
|
303
|
+
decoder.decode_privacy_indicator(command_length())
|
304
|
+
when OptTags::TAG_CALLBACK_NUM
|
305
|
+
@callback_num, @callback_num_len =
|
306
|
+
decoder.decode_callback_num(command_length())
|
307
|
+
when OptTags::TAG_CALLBACK_NUM_PRES_IND
|
308
|
+
@callback_num_pres_ind, @callback_num_pres_ind_len =
|
309
|
+
decoder.decode_callback_num_pres_ind(command_length())
|
310
|
+
when OptTags::TAG_CALLBACK_NUM_ATAG
|
311
|
+
@callback_num_atag, @callback_num_atag_len =
|
312
|
+
decoder.decode_callback_num_atag(command_length())
|
313
|
+
when OptTags::TAG_SOURCE_SUBADDRESS
|
314
|
+
@source_subaddress, @source_subaddress_len =
|
315
|
+
decoder.decode_source_subaddress(command_length())
|
316
|
+
when OptTags::TAG_DEST_SUBADDRESS
|
317
|
+
@dest_subaddress, @dest_subaddress_len =
|
318
|
+
decoder.decode_dest_subaddress(command_length())
|
319
|
+
when OptTags::TAG_USER_RESPONSE_CODE
|
320
|
+
@user_response_code, @user_response_code_len =
|
321
|
+
decoder.decode_user_response_code(command_length())
|
322
|
+
when OptTags::TAG_DISPLAY_TIME
|
323
|
+
@display_time, @display_time_len =
|
324
|
+
decoder.decode_display_time(command_length())
|
325
|
+
when OptTags::TAG_SMS_SIGNAL
|
326
|
+
@sms_signal, @sms_signal_len =
|
327
|
+
decoder.decode_sms_signal(command_length())
|
328
|
+
when OptTags::TAG_MS_VALIDITY
|
329
|
+
@ms_validity, @ms_validity_len =
|
330
|
+
decoder.decode_ms_validity(command_length())
|
331
|
+
when OptTags::TAG_MS_MSG_WAIT_FACILITIES
|
332
|
+
@ms_msg_wait_facilities, @ms_msg_wait_facilities_len =
|
333
|
+
decoder.decode_ms_msg_wait_facilities(command_length())
|
334
|
+
when OptTags::TAG_NUMBER_OF_MESSAGES
|
335
|
+
@number_of_messages, @number_of_messages_len =
|
336
|
+
decoder.decode_number_of_messages(command_length())
|
337
|
+
when OptTags::TAG_ALERT_ON_MESSAGE_DELIVERY
|
338
|
+
@alert_on_msg_delivery, @alert_on_msg_delivery_len =
|
339
|
+
decoder.decode_alert_on_msg_delivery(command_length())
|
340
|
+
when OptTags::TAG_LANGUAGE_INDICATOR
|
341
|
+
@language_indicator, @language_indicator_len =
|
342
|
+
decoder.decode_language_indicator(command_length())
|
343
|
+
when OptTags::TAG_ITS_REPLY_TYPE
|
344
|
+
@its_reply_type, @its_reply_type_len =
|
345
|
+
decoder.decode_its_reply_type(command_length())
|
346
|
+
when OptTags::TAG_ITS_SESSION_INFO
|
347
|
+
@its_session_info, @its_session_info_len =
|
348
|
+
decoder.decode_its_session_info(command_length())
|
349
|
+
else
|
350
|
+
# Report about error
|
351
|
+
raise Errors::UNKNOWN_TAG_MSG + decoder.get_tlv_error()
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
# Interface to validate SMPP packet
|
357
|
+
def validate_packet(validator)
|
358
|
+
# Validate header and mandatory fields
|
359
|
+
validator.validate_header(@header)
|
360
|
+
validator.validate_service_type(@service_type)
|
361
|
+
validator.validate_source_addr_ton(@source_addr_ton)
|
362
|
+
validator.validate_source_addr_npi(@source_addr_npi)
|
363
|
+
validator.validate_source_addr65(@source_addr)
|
364
|
+
validator.validate_dest_addr_ton(@dest_addr_ton)
|
365
|
+
validator.validate_dest_addr_npi(@dest_addr_npi)
|
366
|
+
validator.validate_dest_addr65(@dest_addr)
|
367
|
+
validator.validate_esm_class(@esm_class)
|
368
|
+
validator.validate_registered_delivery(@registered_delivery)
|
369
|
+
validator.validate_data_coding(@data_coding)
|
370
|
+
|
371
|
+
|
372
|
+
# Validate optional fields
|
373
|
+
validator.validate_source_port(@source_port,
|
374
|
+
@source_port_len) if !@source_port.nil?
|
375
|
+
validator.validate_source_addr_subunit(@source_addr_subunit,
|
376
|
+
@source_addr_subunit_len) if !@source_addr_subunit.nil?
|
377
|
+
validator.validate_source_network_type(@source_network_type,
|
378
|
+
@source_network_type_len) if !@source_network_type.nil?
|
379
|
+
validator.validate_source_bearer_type(@source_bearer_type,
|
380
|
+
@source_bearer_type_len) if !@source_bearer_type.nil?
|
381
|
+
validator.validate_source_telematics_id(@source_telematics_id,
|
382
|
+
@source_telematics_id_len) if !@source_telematics_id.nil?
|
383
|
+
validator.validate_destination_port(@destination_port,
|
384
|
+
@destination_port_len) if !@destination_port.nil?
|
385
|
+
validator.validate_dest_addr_subunit(@dest_addr_subunit,
|
386
|
+
@dest_addr_subunit_len) if !@dest_addr_subunit.nil?
|
387
|
+
validator.validate_dest_network_type(@dest_network_type,
|
388
|
+
@dest_network_type_len) if !@dest_network_type.nil?
|
389
|
+
validator.validate_dest_bearer_type(@dest_bearer_type,
|
390
|
+
@dest_bearer_type_len) if !@dest_bearer_type.nil?
|
391
|
+
validator.validate_dest_telematics_id(@dest_telematics_id,
|
392
|
+
@dest_telematics_id_len) if !@dest_telematics_id.nil?
|
393
|
+
validator.validate_sar_msg_ref_num(@sar_msg_ref_num,
|
394
|
+
@sar_msg_ref_num_len) if !@sar_msg_ref_num.nil?
|
395
|
+
validator.validate_sar_total_segments(@sar_total_segments,
|
396
|
+
@sar_total_segments_len) if !@sar_total_segments.nil?
|
397
|
+
validator.validate_sar_segment_seqnum(@sar_segment_seqnum,
|
398
|
+
@sar_segment_seqnum_len) if !@sar_segment_seqnum.nil?
|
399
|
+
validator.validate_more_messages_to_send(@more_messages_to_send,
|
400
|
+
@more_messages_to_send_len) if !@more_messages_to_send.nil?
|
401
|
+
validator.validate_qos_time_to_live(@qos_time_to_live,
|
402
|
+
@qos_time_to_live_len) if !@qos_time_to_live.nil?
|
403
|
+
validator.validate_payload_type(@payload_type,
|
404
|
+
@payload_type_len) if !@payload_type.nil?
|
405
|
+
validator.validate_message_payload(@message_payload,
|
406
|
+
@message_payload_len) if !@message_payload.nil?
|
407
|
+
validator.validate_set_dpf(@set_dpf,
|
408
|
+
@set_dpf_len) if !@set_dpf.nil?
|
409
|
+
validator.validate_receipted_message_id(@receipted_message_id,
|
410
|
+
@receipted_message_id_len) if !@receipted_message_id.nil?
|
411
|
+
validator.validate_message_state_tlv(@message_state,
|
412
|
+
@message_state_len) if !@message_state.nil?
|
413
|
+
validator.validate_network_error_code(@network_error_code,
|
414
|
+
@network_error_code_len) if !@network_error_code.nil?
|
415
|
+
validator.validate_user_message_reference(@user_message_reference,
|
416
|
+
@user_message_reference_len) if !@user_message_reference.nil?
|
417
|
+
validator.validate_privacy_indicator(@privacy_indicator,
|
418
|
+
@privacy_indicator_len) if !@privacy_indicator.nil?
|
419
|
+
validator.validate_callback_num(@callback_num,
|
420
|
+
@callback_num_len) if !@callback_num.nil?
|
421
|
+
validator.validate_callback_num_pres_ind(@callback_num_pres_ind,
|
422
|
+
@callback_num_pres_ind_len) if !@callback_num_pres_ind.nil?
|
423
|
+
validator.validate_callback_num_atag(@callback_num_atag,
|
424
|
+
@callback_num_atag_len) if !@callback_num_atag.nil?
|
425
|
+
validator.validate_source_subaddress(@source_subaddress,
|
426
|
+
@source_subaddress_len) if !@source_subaddress.nil?
|
427
|
+
validator.validate_dest_subaddress(@dest_subaddress,
|
428
|
+
@dest_subaddress_len) if !@dest_subaddress.nil?
|
429
|
+
validator.validate_user_response_code(@user_response_code,
|
430
|
+
@user_response_code_len) if !@user_response_code.nil?
|
431
|
+
validator.validate_display_time(@display_time,
|
432
|
+
@display_time_len) if !@display_time.nil?
|
433
|
+
validator.validate_sms_signal(@sms_signal,
|
434
|
+
@sms_signal_len) if !@sms_signal.nil?
|
435
|
+
validator.validate_ms_validity(@ms_validity,
|
436
|
+
@ms_validity_len) if !@ms_validity.nil?
|
437
|
+
validator.validate_ms_msg_wait_facilities(@ms_msg_wait_facilities,
|
438
|
+
@ms_msg_wait_facilities_len) if !@ms_msg_wait_facilities.nil?
|
439
|
+
validator.validate_number_of_messages(@number_of_messages,
|
440
|
+
@number_of_messages_len) if !@number_of_messages.nil?
|
441
|
+
validator.validate_number_of_messages(@number_of_messages,
|
442
|
+
@number_of_messages_len) if !@number_of_messages.nil?
|
443
|
+
validator.validate_alert_on_msg_delivery(@alert_on_msg_delivery,
|
444
|
+
@alert_on_msg_delivery_len) if !@alert_on_msg_delivery.nil?
|
445
|
+
validator.validate_language_indicator(@language_indicator,
|
446
|
+
@language_indicator_len) if !@language_indicator.nil?
|
447
|
+
validator.validate_its_reply_type(@its_reply_type,
|
448
|
+
@its_reply_type_len) if !@its_reply_type.nil?
|
449
|
+
validator.validate_its_session_info(@its_session_info,
|
450
|
+
@its_session_info_len) if !@its_session_info.nil?
|
451
|
+
end
|
452
|
+
|
453
|
+
# Interface to output SMPP packet
|
454
|
+
def output_packet(outputter)
|
455
|
+
# Output header and mandatory fields
|
456
|
+
outputter.output_header(@header)
|
457
|
+
outputter.output_service_type(@service_type)
|
458
|
+
outputter.output_source_addr_ton(@source_addr_ton)
|
459
|
+
outputter.output_source_addr_npi(@source_addr_npi)
|
460
|
+
outputter.output_source_addr65(@source_addr)
|
461
|
+
outputter.output_dest_addr_ton(@dest_addr_ton)
|
462
|
+
outputter.output_dest_addr_npi(@dest_addr_npi)
|
463
|
+
outputter.output_dest_addr65(@dest_addr)
|
464
|
+
outputter.output_esm_class(@esm_class)
|
465
|
+
outputter.output_registered_delivery(@registered_delivery)
|
466
|
+
outputter.output_data_coding(@data_coding)
|
467
|
+
|
468
|
+
|
469
|
+
# Output optional fields
|
470
|
+
outputter.output_source_port(@source_port,
|
471
|
+
@source_port_len) if !@source_port.nil?
|
472
|
+
outputter.output_source_addr_subunit(@source_addr_subunit,
|
473
|
+
@source_addr_subunit_len) if !@source_addr_subunit.nil?
|
474
|
+
outputter.output_source_network_type(@source_network_type,
|
475
|
+
@source_network_type_len) if !@source_network_type.nil?
|
476
|
+
outputter.output_source_bearer_type(@source_bearer_type,
|
477
|
+
@source_bearer_type_len) if !@source_bearer_type.nil?
|
478
|
+
outputter.output_source_telematics_id(@source_telematics_id,
|
479
|
+
@source_telematics_id_len) if !@source_telematics_id.nil?
|
480
|
+
outputter.output_destination_port(@destination_port,
|
481
|
+
@destination_port_len) if !@destination_port.nil?
|
482
|
+
outputter.output_dest_addr_subunit(@dest_addr_subunit,
|
483
|
+
@dest_addr_subunit_len) if !@dest_addr_subunit.nil?
|
484
|
+
outputter.output_dest_network_type(@dest_network_type,
|
485
|
+
@dest_network_type_len) if !@dest_network_type.nil?
|
486
|
+
outputter.output_dest_bearer_type(@dest_bearer_type,
|
487
|
+
@dest_bearer_type_len) if !@dest_bearer_type.nil?
|
488
|
+
outputter.output_dest_telematics_id(@dest_telematics_id,
|
489
|
+
@dest_telematics_id_len) if !@dest_telematics_id.nil?
|
490
|
+
outputter.output_sar_msg_ref_num(@sar_msg_ref_num,
|
491
|
+
@sar_msg_ref_num_len) if !@sar_msg_ref_num.nil?
|
492
|
+
outputter.output_sar_total_segments(@sar_total_segments,
|
493
|
+
@sar_total_segments_len) if !@sar_total_segments.nil?
|
494
|
+
outputter.output_sar_segment_seqnum(@sar_segment_seqnum,
|
495
|
+
@sar_segment_seqnum_len) if !@sar_segment_seqnum.nil?
|
496
|
+
outputter.output_more_messages_to_send(@more_messages_to_send,
|
497
|
+
@more_messages_to_send_len) if !@more_messages_to_send.nil?
|
498
|
+
outputter.output_qos_time_to_live(@qos_time_to_live,
|
499
|
+
@qos_time_to_live_len) if !@qos_time_to_live.nil?
|
500
|
+
outputter.output_payload_type(@payload_type,
|
501
|
+
@payload_type_len) if !@payload_type.nil?
|
502
|
+
outputter.output_message_payload(@message_payload,
|
503
|
+
@message_payload_len) if !@message_payload.nil?
|
504
|
+
outputter.output_set_dpf(@set_dpf,
|
505
|
+
@set_dpf_len) if !@set_dpf.nil?
|
506
|
+
outputter.output_receipted_message_id(@receipted_message_id,
|
507
|
+
@receipted_message_id_len) if !@receipted_message_id.nil?
|
508
|
+
outputter.output_message_state_tlv(@message_state,
|
509
|
+
@message_state_len) if !@message_state.nil?
|
510
|
+
outputter.output_network_error_code(@network_error_code,
|
511
|
+
@network_error_code_len) if !@network_error_code.nil?
|
512
|
+
outputter.output_user_message_reference(@user_message_reference,
|
513
|
+
@user_message_reference_len) if !@user_message_reference.nil?
|
514
|
+
outputter.output_privacy_indicator(@privacy_indicator,
|
515
|
+
@privacy_indicator_len) if !@privacy_indicator.nil?
|
516
|
+
outputter.output_callback_num(@callback_num,
|
517
|
+
@callback_num_len) if !@callback_num.nil?
|
518
|
+
outputter.output_callback_num_pres_ind(@callback_num_pres_ind,
|
519
|
+
@callback_num_pres_ind_len) if !@callback_num_pres_ind.nil?
|
520
|
+
outputter.output_callback_num_atag(@callback_num_atag,
|
521
|
+
@callback_num_atag_len) if !@callback_num_atag.nil?
|
522
|
+
outputter.output_source_subaddress(@source_subaddress,
|
523
|
+
@source_subaddress_len) if !@source_subaddress.nil?
|
524
|
+
outputter.output_dest_subaddress(@dest_subaddress,
|
525
|
+
@dest_subaddress_len) if !@dest_subaddress.nil?
|
526
|
+
outputter.output_user_response_code(@user_response_code,
|
527
|
+
@user_response_code_len) if !@user_response_code.nil?
|
528
|
+
outputter.output_display_time(@display_time,
|
529
|
+
@display_time_len) if !@display_time.nil?
|
530
|
+
outputter.output_sms_signal(@sms_signal,
|
531
|
+
@sms_signal_len) if !@sms_signal.nil?
|
532
|
+
outputter.output_ms_validity(@ms_validity,
|
533
|
+
@ms_validity_len) if !@ms_validity.nil?
|
534
|
+
outputter.output_ms_msg_wait_facilities(@ms_msg_wait_facilities,
|
535
|
+
@ms_msg_wait_facilities_len) if !@ms_msg_wait_facilities.nil?
|
536
|
+
outputter.output_number_of_messages(@number_of_messages,
|
537
|
+
@number_of_messages_len) if !@number_of_messages.nil?
|
538
|
+
outputter.output_number_of_messages(@number_of_messages,
|
539
|
+
@number_of_messages_len) if !@number_of_messages.nil?
|
540
|
+
outputter.output_alert_on_msg_delivery(@alert_on_msg_delivery,
|
541
|
+
@alert_on_msg_delivery_len) if !@alert_on_msg_delivery.nil?
|
542
|
+
outputter.output_language_indicator(@language_indicator,
|
543
|
+
@language_indicator_len) if !@language_indicator.nil?
|
544
|
+
outputter.output_its_reply_type(@its_reply_type,
|
545
|
+
@its_reply_type_len) if !@its_reply_type.nil?
|
546
|
+
outputter.output_its_session_info(@its_session_info,
|
547
|
+
@its_session_info_len) if !@its_session_info.nil?
|
548
|
+
end
|
549
|
+
|
550
|
+
public
|
551
|
+
def message_payload=(message_payload)
|
552
|
+
@message_payload = message_payload
|
553
|
+
@message_payload_len = message_payload.size()
|
554
|
+
end
|
555
|
+
|
556
|
+
def receipted_message_id=(receipted_message_id)
|
557
|
+
@receipted_message_id = receipted_message_id
|
558
|
+
@receipted_message_id_len = receipted_message_id.size() + 1 # 1 = NULL terminator
|
559
|
+
end
|
560
|
+
|
561
|
+
def callback_num=(callback_num)
|
562
|
+
@callback_num = callback_num
|
563
|
+
@callback_num_len = callback_num.size()
|
564
|
+
end
|
565
|
+
|
566
|
+
def callback_num_atag=(callback_num_atag)
|
567
|
+
@callback_num_atag = callback_num_atag
|
568
|
+
@callback_num_atag_len = callback_num_atag.size()
|
569
|
+
end
|
570
|
+
|
571
|
+
def source_subaddress=(source_subaddress)
|
572
|
+
@source_subaddress = source_subaddress
|
573
|
+
@source_subaddress_len = source_subaddress.size()
|
574
|
+
end
|
575
|
+
|
576
|
+
def dest_subaddress=(dest_subaddress)
|
577
|
+
@dest_subaddress = dest_subaddress
|
578
|
+
@dest_subaddress_len = dest_subaddress.size()
|
579
|
+
end
|
580
|
+
|
581
|
+
|
582
|
+
public
|
583
|
+
# Mandatory fields
|
584
|
+
attr_accessor :service_type
|
585
|
+
attr_accessor :source_addr_ton
|
586
|
+
attr_accessor :source_addr_npi
|
587
|
+
attr_accessor :source_addr
|
588
|
+
attr_accessor :dest_addr_ton
|
589
|
+
attr_accessor :dest_addr_npi
|
590
|
+
attr_accessor :dest_addr
|
591
|
+
attr_accessor :esm_class
|
592
|
+
attr_accessor :registered_delivery
|
593
|
+
attr_accessor :data_coding
|
594
|
+
|
595
|
+
|
596
|
+
# Optional fields
|
597
|
+
attr_accessor :source_port
|
598
|
+
attr_accessor :source_addr_subunit
|
599
|
+
attr_accessor :source_network_type
|
600
|
+
attr_accessor :source_bearer_type
|
601
|
+
attr_accessor :source_telematics_id
|
602
|
+
attr_accessor :destination_port
|
603
|
+
attr_accessor :dest_addr_subunit
|
604
|
+
attr_accessor :dest_network_type
|
605
|
+
attr_accessor :dest_bearer_type
|
606
|
+
attr_accessor :dest_telematics_id
|
607
|
+
attr_accessor :sar_msg_ref_num
|
608
|
+
attr_accessor :sar_total_segments
|
609
|
+
attr_accessor :sar_segment_seqnum
|
610
|
+
attr_accessor :more_messages_to_send
|
611
|
+
attr_accessor :qos_time_to_live
|
612
|
+
attr_accessor :payload_type
|
613
|
+
attr_reader :message_payload
|
614
|
+
attr_accessor :set_dpf
|
615
|
+
attr_reader :receipted_message_id
|
616
|
+
attr_accessor :message_state
|
617
|
+
attr_accessor :network_error_code
|
618
|
+
attr_accessor :user_message_reference
|
619
|
+
attr_accessor :privacy_indicator
|
620
|
+
attr_reader :callback_num
|
621
|
+
attr_accessor :callback_num_pres_ind
|
622
|
+
attr_reader :callback_num_atag
|
623
|
+
attr_reader :source_subaddress
|
624
|
+
attr_reader :dest_subaddress
|
625
|
+
attr_accessor :user_response_code
|
626
|
+
attr_accessor :display_time
|
627
|
+
attr_accessor :sms_signal
|
628
|
+
attr_accessor :ms_validity
|
629
|
+
attr_accessor :ms_msg_wait_facilities
|
630
|
+
attr_accessor :number_of_messages
|
631
|
+
attr_accessor :alert_on_msg_delivery
|
632
|
+
attr_accessor :language_indicator
|
633
|
+
attr_accessor :its_reply_type
|
634
|
+
attr_accessor :its_session_info
|
635
|
+
|
636
|
+
# Optional fields length
|
637
|
+
attr_accessor :source_port_len
|
638
|
+
attr_accessor :source_addr_subunit_len
|
639
|
+
attr_accessor :source_network_type_len
|
640
|
+
attr_accessor :source_bearer_type_len
|
641
|
+
attr_accessor :source_telematics_id_len
|
642
|
+
attr_accessor :destination_port_len
|
643
|
+
attr_accessor :dest_addr_subunit_len
|
644
|
+
attr_accessor :dest_network_type_len
|
645
|
+
attr_accessor :dest_bearer_type_len
|
646
|
+
attr_accessor :dest_telematics_id_len
|
647
|
+
attr_accessor :sar_msg_ref_num_len
|
648
|
+
attr_accessor :sar_total_segments_len
|
649
|
+
attr_accessor :sar_segment_seqnum_len
|
650
|
+
attr_accessor :more_messages_to_send_len
|
651
|
+
attr_accessor :qos_time_to_live_len
|
652
|
+
attr_accessor :payload_type_len
|
653
|
+
attr_accessor :message_payload_len
|
654
|
+
attr_accessor :set_dpf_len
|
655
|
+
attr_accessor :receipted_message_id_len
|
656
|
+
attr_accessor :message_state_len
|
657
|
+
attr_accessor :network_error_code_len
|
658
|
+
attr_accessor :user_message_reference_len
|
659
|
+
attr_accessor :privacy_indicator_len
|
660
|
+
attr_accessor :callback_num_len
|
661
|
+
attr_accessor :callback_num_pres_ind_len
|
662
|
+
attr_accessor :callback_num_atag_len
|
663
|
+
attr_accessor :source_subaddress_len
|
664
|
+
attr_accessor :dest_subaddress_len
|
665
|
+
attr_accessor :user_response_code_len
|
666
|
+
attr_accessor :display_time_len
|
667
|
+
attr_accessor :sms_signal_len
|
668
|
+
attr_accessor :ms_validity_len
|
669
|
+
attr_accessor :ms_msg_wait_facilities_len
|
670
|
+
attr_accessor :number_of_messages_len
|
671
|
+
attr_accessor :alert_on_msg_delivery_len
|
672
|
+
attr_accessor :language_indicator_len
|
673
|
+
attr_accessor :its_reply_type_len
|
674
|
+
attr_accessor :its_session_info_len
|
675
|
+
|
676
|
+
end
|
677
|
+
end
|
678
|
+
end
|
679
|
+
end
|