smpp: Be able to parse the SMPP Enquire Link
This commit is contained in:
parent
c2968fbc7e
commit
ccdb0f5207
|
@ -0,0 +1,28 @@
|
|||
"
|
||||
(C) 2014 by Holger Hans Peter Freyther
|
||||
All Rights Reserved
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"
|
||||
|
||||
SMPPBodyBase subclass: SMPPEnquireLink [
|
||||
|
||||
SMPPEnquireLink class >> messageType [
|
||||
^self enquireLink
|
||||
]
|
||||
|
||||
SMPPEnquireLink class >> tlvDescription [
|
||||
^OrderedCollection new
|
||||
]
|
||||
]
|
|
@ -8,6 +8,7 @@
|
|||
<filein>codec/SMPPBodyBase.st</filein>
|
||||
<filein>codec/SMPPBindTransmitterBody.st</filein>
|
||||
<filein>codec/SMPPBindTransceiver.st</filein>
|
||||
<filein>codec/SMPPEnquireLink.st</filein>
|
||||
|
||||
<filein>codec/attributes/SMPPOctetString.st</filein>
|
||||
<filein>codec/attributes/SMPPInteger.st</filein>
|
||||
|
|
|
@ -37,6 +37,11 @@ TestCase subclass: SMPPMessageTest [
|
|||
16r00]
|
||||
]
|
||||
|
||||
exampleEnquire [
|
||||
^#[16r00 16r00 16r00 16r10 16r00 16r00 16r00 16r15
|
||||
16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r03]
|
||||
]
|
||||
|
||||
testReadMessage [
|
||||
| msg |
|
||||
msg := SMPPMessage readFrom: self examplePdu readStream.
|
||||
|
@ -79,4 +84,10 @@ TestCase subclass: SMPPMessageTest [
|
|||
self assert: msg body class equals: SMPPBindTransceiver.
|
||||
self assert: msg body systemdId equals: 'AAAAAAAAAA'.
|
||||
]
|
||||
|
||||
testEnquireLink [
|
||||
| msg |
|
||||
msg := SMPPMessage readFrom: self exampleEnquire readStream.
|
||||
self assert: msg body class equals: SMPPEnquireLink.
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue