ruby_ucp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +42 -0
- data/LICENSE +505 -0
- data/README +10 -0
- data/Rakefile +118 -0
- data/Rakefile.orig +45 -0
- data/VERSION +1 -0
- data/lib/ruby_ucp.rb +42 -0
- data/lib/samples/main.rb +182 -0
- data/lib/ucp/base.rb +24 -0
- data/lib/ucp/pdu/base.rb +22 -0
- data/lib/ucp/pdu/ucp01.rb +37 -0
- data/lib/ucp/pdu/ucp01_operation.rb +61 -0
- data/lib/ucp/pdu/ucp01_result.rb +60 -0
- data/lib/ucp/pdu/ucp30.rb +28 -0
- data/lib/ucp/pdu/ucp30_operation.rb +59 -0
- data/lib/ucp/pdu/ucp30_result.rb +63 -0
- data/lib/ucp/pdu/ucp31.rb +29 -0
- data/lib/ucp/pdu/ucp31_operation.rb +50 -0
- data/lib/ucp/pdu/ucp31_result.rb +61 -0
- data/lib/ucp/pdu/ucp51_operation.rb +167 -0
- data/lib/ucp/pdu/ucp51_result.rb +64 -0
- data/lib/ucp/pdu/ucp52_operation.rb +31 -0
- data/lib/ucp/pdu/ucp52_result.rb +31 -0
- data/lib/ucp/pdu/ucp53_operation.rb +31 -0
- data/lib/ucp/pdu/ucp53_result.rb +31 -0
- data/lib/ucp/pdu/ucp54_operation.rb +31 -0
- data/lib/ucp/pdu/ucp54_result.rb +31 -0
- data/lib/ucp/pdu/ucp55_operation.rb +31 -0
- data/lib/ucp/pdu/ucp55_result.rb +31 -0
- data/lib/ucp/pdu/ucp56_operation.rb +31 -0
- data/lib/ucp/pdu/ucp56_result.rb +31 -0
- data/lib/ucp/pdu/ucp57_operation.rb +31 -0
- data/lib/ucp/pdu/ucp57_result.rb +31 -0
- data/lib/ucp/pdu/ucp58_operation.rb +31 -0
- data/lib/ucp/pdu/ucp58_result.rb +31 -0
- data/lib/ucp/pdu/ucp5x.rb +40 -0
- data/lib/ucp/pdu/ucp60.rb +30 -0
- data/lib/ucp/pdu/ucp60_operation.rb +58 -0
- data/lib/ucp/pdu/ucp60_result.rb +60 -0
- data/lib/ucp/pdu/ucp61.rb +31 -0
- data/lib/ucp/pdu/ucp61_operation.rb +49 -0
- data/lib/ucp/pdu/ucp61_result.rb +60 -0
- data/lib/ucp/pdu/ucp_operation.rb +27 -0
- data/lib/ucp/pdu/ucp_result.rb +26 -0
- data/lib/ucp/pdu/ucpmessage.rb +125 -0
- data/lib/ucp/util/base.rb +22 -0
- data/lib/ucp/util/gsm_packed_msg.rb +50 -0
- data/lib/ucp/util/packed_msg.rb +34 -0
- data/lib/ucp/util/sms_request.rb +48 -0
- data/lib/ucp/util/ucp.rb +885 -0
- data/lib/ucp/util/ucp_client.rb +207 -0
- data/lib/ucp/util/ucp_server.rb +122 -0
- data/lib/ucp/util/ucs2_packed_msg.rb +29 -0
- metadata +120 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
class Ucp::Pdu::Ucp31Operation < Ucp::Pdu::UCP31
|
22
|
+
|
23
|
+
def initialize(fields=nil)
|
24
|
+
super()
|
25
|
+
@operation_type="O"
|
26
|
+
@fields=[:adc,:pid]
|
27
|
+
|
28
|
+
if fields.nil?
|
29
|
+
return
|
30
|
+
end
|
31
|
+
|
32
|
+
@trn=fields[0]
|
33
|
+
@operation_type=fields[2]
|
34
|
+
@operation=fields[3]
|
35
|
+
|
36
|
+
# *02/00035/O/31/0234765439845/0139/A0#
|
37
|
+
|
38
|
+
for i in 4..(fields.length-1)
|
39
|
+
field=@fields[i-4]
|
40
|
+
@h[field]=fields[i]
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
def basic_alert(recipient,pid)
|
47
|
+
@h={:adc=>recipient, :pid=>pid}
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
class Ucp::Pdu::Ucp31Result < Ucp::Pdu::UCP31
|
22
|
+
|
23
|
+
def initialize(fields=nil)
|
24
|
+
super()
|
25
|
+
@operation_type="R"
|
26
|
+
if fields.nil?
|
27
|
+
return
|
28
|
+
end
|
29
|
+
|
30
|
+
@trn=fields[0]
|
31
|
+
if fields[4].eql?("A")
|
32
|
+
# 04/00024/R/31/A/0003/5D
|
33
|
+
ack(fields[5])
|
34
|
+
elsif fields[4].eql?("N")
|
35
|
+
# 00/00022/R/31/N/06//07
|
36
|
+
nack(fields[5],fields[6])
|
37
|
+
else
|
38
|
+
raise "invalid result in UCP31"
|
39
|
+
end
|
40
|
+
|
41
|
+
# TODO: verificar len e checksum
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
def ack(sm="")
|
47
|
+
@fields=[:ack,:sm]
|
48
|
+
@h[:ack]="A"
|
49
|
+
@h[:sm]=sm
|
50
|
+
end
|
51
|
+
|
52
|
+
def nack(ec,sm="")
|
53
|
+
@fields=[:nack,:ec,:sm]
|
54
|
+
@h[:nack]="N"
|
55
|
+
@h[:ec]=ec
|
56
|
+
@h[:sm]=sm
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
class Ucp::Pdu::Ucp51Operation < Ucp::Pdu::UCP5x
|
22
|
+
|
23
|
+
def initialize(fields=nil)
|
24
|
+
super()
|
25
|
+
@operation="51"
|
26
|
+
@operation_type="O"
|
27
|
+
#@fields=[:adc,:oadc,:ac,:nrq,:nadc,:nt,:npid,:lrq,:lrad,:lpid,:dd,:ddt,:vp,:rpid,:scts,:dst,:rsn,:dscts,:mt,:nb,:msg,:mms,:pr,:dcs,:mcls,:rpi,:cpg,:rply,:otoa,:hplmn,:xser,:res4,:res5]
|
28
|
+
|
29
|
+
if fields.nil?
|
30
|
+
return
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
@trn=fields[0]
|
35
|
+
@operation_type=fields[2]
|
36
|
+
@operation=fields[3]
|
37
|
+
# *00/00352/O/51/961234567/1234/////////////////4/1072/31D98C56B3DD7039584C36A3D56C375C0E1693CD6835DB0D9783C564335ACD76C3E56031D98C56B3DD7039584C36A3D56C375C0E1693CD6835DB0D9783C564335ACD76C3E56031D98C56B3DD7039584C36A3D56C375C0E1693CD6835DB0D9783C564335ACD76C3E56031D98C56B3DD7039584C36A3D56C375C0E1693CD6835DB0D9783C56433//////////0106050003450201///44#
|
38
|
+
|
39
|
+
for i in 4..(fields.length-1)
|
40
|
+
field=@fields[i-4]
|
41
|
+
if field.eql?(:xser)
|
42
|
+
add_xser_raw(fields[i])
|
43
|
+
else
|
44
|
+
@h[field]=fields[i]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
parse_xser
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
def parse_xser
|
59
|
+
@xservices.each { |xser|
|
60
|
+
|
61
|
+
puts "xser_id: #{xser[0,2]}"
|
62
|
+
|
63
|
+
if xser[0,2].eql?("01")
|
64
|
+
header=xser[4,xser[2,2].to_i(16)*2]
|
65
|
+
header_len=xser[4,2].to_i(16)
|
66
|
+
#puts "header: #{header}; hlen: #{header_len}"
|
67
|
+
|
68
|
+
i=2
|
69
|
+
while i<header.length
|
70
|
+
ie=header[i, header[i+2,2].to_i(16)*2+4]
|
71
|
+
iei=header[i,2]
|
72
|
+
iel=header[i+2,2].to_i(16)
|
73
|
+
#puts "ie: #{ie}"
|
74
|
+
|
75
|
+
if iei.eql?("00")
|
76
|
+
@message_ref=ie[4,2].to_i(16)
|
77
|
+
@total_parts=ie[6,2].to_i(16)
|
78
|
+
@part_nr=ie[8,2].to_i(16)
|
79
|
+
#puts "part_info: MR=#{@message_ref}; PN=#{@part_nr} PT=#{@total_parts}"
|
80
|
+
break
|
81
|
+
end
|
82
|
+
i+=iel*2
|
83
|
+
end
|
84
|
+
elsif xser[0,2].eql?("02")
|
85
|
+
@dcs=xser[4,2]
|
86
|
+
end
|
87
|
+
}
|
88
|
+
|
89
|
+
# no parts info
|
90
|
+
return nil
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
def add_xser_raw(xser)
|
95
|
+
|
96
|
+
# nao faz parsing/decode do xser
|
97
|
+
#@xservices << xser
|
98
|
+
|
99
|
+
# partir os xservices, por form a fazer parsing dos mesmos e adiciona-los um a um
|
100
|
+
idx=0
|
101
|
+
while idx<xser.length
|
102
|
+
xser_id=xser[idx,2]
|
103
|
+
xser_len=xser[idx+2,2].to_i(16)
|
104
|
+
xser_data=xser[idx+4,xser_len*2]
|
105
|
+
|
106
|
+
#puts "xxx_serid: #{xser_id} ; #{xser_data}"
|
107
|
+
add_xser(xser_id,xser_data)
|
108
|
+
idx+=(xser_len+2)*2
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
def add_xser(xser_id,xser_data)
|
114
|
+
xser=xser_id+UCP.int2hex(xser_data.length/2)+xser_data
|
115
|
+
@xservices << xser
|
116
|
+
|
117
|
+
if xser_id.eql?("02")
|
118
|
+
@dcs=xser_data
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
def basic_submit(originator,recipient,message=nil,ucpfields={})
|
123
|
+
# super()
|
124
|
+
# @operation="51"
|
125
|
+
# @operation_type="O"
|
126
|
+
# @fields=[:adc,:oadc,:ac,:nrq,:nadc,:nt,:npid,:lrq,:lrad,:lpid,:dd,:ddt,:vp,:rpid,:scts,:dst,:rsn,:dscts,:mt,:nb,:msg,:mms,:pr,:dcs,:mcls,:rpi,:cpg,:rply,:otoa,:hplmn,:xser,:res4,:res5]
|
127
|
+
|
128
|
+
# UCP51 supports IRA encoded SMS and 16 bits UCS2
|
129
|
+
# for now assume IRA
|
130
|
+
if !message.nil?
|
131
|
+
msg=UCP.ascii2ira(message)
|
132
|
+
end
|
133
|
+
mt=3
|
134
|
+
|
135
|
+
|
136
|
+
otoa=""
|
137
|
+
|
138
|
+
# UCP51 supports alphanumeric oadc
|
139
|
+
if originator.to_s !~ /^[0-9]+$/
|
140
|
+
oadc=UCP.packoadc(originator.to_s)
|
141
|
+
otoa="5039"
|
142
|
+
else
|
143
|
+
oadc=originator
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
@h={:otoa=>otoa,:oadc=>oadc, :adc=>recipient, :msg=>msg,:mt=>mt}
|
149
|
+
|
150
|
+
@h=@h.merge ucpfields
|
151
|
+
end
|
152
|
+
|
153
|
+
def to_s
|
154
|
+
|
155
|
+
xserstr=""
|
156
|
+
if !@xservices.empty?
|
157
|
+
@xservices.each { |xser|
|
158
|
+
xserstr+=xser
|
159
|
+
}
|
160
|
+
@h[:xser]=xserstr
|
161
|
+
end
|
162
|
+
|
163
|
+
super()
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
class Ucp::Pdu::Ucp51Result < Ucp::Pdu::UCP5x
|
22
|
+
|
23
|
+
def initialize(fields=nil)
|
24
|
+
super()
|
25
|
+
@operation="51"
|
26
|
+
@operation_type="R"
|
27
|
+
if fields.nil?
|
28
|
+
return
|
29
|
+
end
|
30
|
+
|
31
|
+
@trn=fields[0]
|
32
|
+
if fields[4].eql?("A")
|
33
|
+
# 00/00039/R/51/A//012234:090996101010/68
|
34
|
+
ack(fields[5],fields[6])
|
35
|
+
elsif fields[4].eql?("N")
|
36
|
+
# 00/00022/R/51/N/31//07
|
37
|
+
nack(fields[5],fields[6])
|
38
|
+
else
|
39
|
+
raise "invalid result in UCP51"
|
40
|
+
end
|
41
|
+
|
42
|
+
# TODO: verificar len e checksum
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
def ack(mvp="",sm="")
|
48
|
+
@fields=[:ack,:sm]
|
49
|
+
@h[:ack]="A"
|
50
|
+
@h[:mvp]=mvp
|
51
|
+
@h[:sm]=sm
|
52
|
+
end
|
53
|
+
|
54
|
+
def nack(ec,sm="")
|
55
|
+
@fields=[:nack,:ec,:sm]
|
56
|
+
@h[:nack]="N"
|
57
|
+
@h[:ec]=ec
|
58
|
+
@h[:sm]=sm
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
end
|
64
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_operation.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp52Operation < Ucp::Pdu::Ucp51Operation
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="52"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_result.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp52Result < Ucp::Pdu::Ucp51Result
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="52"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_operation.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp53Operation < Ucp::Pdu::Ucp51Operation
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="53"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_result.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp53Result < Ucp::Pdu::Ucp51Result
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="53"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_operation.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp54Operation < Ucp::Pdu::Ucp51Operation
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="54"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_result.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp54Result < Ucp::Pdu::Ucp51Result
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="54"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_operation.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp55Operation < Ucp::Pdu::Ucp51Operation
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="55"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_result.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp55Result < Ucp::Pdu::Ucp51Result
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="55"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_operation.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp56Operation < Ucp::Pdu::Ucp51Operation
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="56"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_result.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp56Result < Ucp::Pdu::Ucp51Result
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="56"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
=begin
|
2
|
+
Ruby library implementation of EMI/UCP protocol v4.6 for SMS
|
3
|
+
Copyright (C) 2011, Sergio Freire <sergio.freire@gmail.com>
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License as published by the Free Software Foundation; either
|
8
|
+
version 2.1 of the License, or (at your option) any later version.
|
9
|
+
|
10
|
+
This library is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
Lesser General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
16
|
+
License along with this library; if not, write to the Free Software
|
17
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
=end
|
19
|
+
|
20
|
+
|
21
|
+
require "ucp/pdu/ucp51_operation.rb"
|
22
|
+
|
23
|
+
class Ucp::Pdu::Ucp57Operation < Ucp::Pdu::Ucp51Operation
|
24
|
+
|
25
|
+
def initialize(fields=nil)
|
26
|
+
super(fields)
|
27
|
+
@operation="57"
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|