diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-03-31 12:34:17 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-03-31 12:34:17 +0200 |
commit | 129f45c8798df779526701fbfbf8bc304f908a68 (patch) | |
tree | df447e7090275f8cf416051638d08a8b90bda0d5 | |
parent | ba5a8bc54e56beff4181ca33b98d80859da08cd5 (diff) |
misc: Fix the categories to ease porting to Pharo
-rw-r--r-- | GSM411.st | 19 | ||||
-rw-r--r-- | GSMEncoding.st | 12 | ||||
-rw-r--r-- | SCCPHandler.st | 18 | ||||
-rw-r--r-- | SMSTests.st | 2 | ||||
-rw-r--r-- | Tests.st | 18 |
5 files changed, 52 insertions, 17 deletions
@@ -19,6 +19,7 @@ GSM48DataHolder subclass: GSM411CpUserData [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.1.4.1'> <gsmElementId: 2r01> <gsmMinValueSize: 0 max: 248> @@ -26,6 +27,7 @@ GSM48DataHolder subclass: GSM411CpUserData [ ] GSM48SimpleTag subclass: GSM411CpCause [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.1.4.2'> <gsmElementId: 2r10> <gsmName: 'cause'> @@ -44,28 +46,34 @@ GSM48SimpleTag subclass: GSM411CpCause [ ] GSM48SimpleTag subclass: GSM411RpMessageType [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.2.2'> ] GSM48FixedSizeIE subclass: GSM411RpMessageReference [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.2.3'> <gsmValueLength: 1> ] GSM48DataHolder subclass: GSM411RpOriginatorAddress [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.2.5.1'> ] GSM48DataHolder subclass: GSM411RpDestinationAddress [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.2.5.2'> ] GSM48DataHolder subclass: GSM411RpUserData [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.2.5.3'> <gsmElementId: 2r1000001> ] GSM48DataHolder subclass: GSM411RpCause [ + <category: 'OsmoGSM-SMS-Types'> <comment: '8.2.5.4'> <gsmElementId: 2r1000010> @@ -123,7 +131,7 @@ GSM48DataHolder subclass: GSM411RpCause [ GSM48MSG subclass: GSMCpMessage [ - <category: 'OsmoGSM-04.11'> + <category: 'OsmoGSM-SMS-Message'> GSMCpMessage class >> msgCpData [ <category: 'type'> ^ 2r00000001 ] GSMCpMessage class >> msgCpAck [ <category: 'type'> ^ 2r00000100 ] @@ -138,6 +146,7 @@ GSM48MSG subclass: GSMCpMessage [ ] GSMCpMessage subclass: GSMCpData [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.2.1'> GSMCpData class >> messageType [ <category: 'gsm'> ^ self msgCpData ] @@ -150,6 +159,7 @@ GSMCpMessage subclass: GSMCpData [ ] GSMCpMessage subclass: GSMCpAck [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.2.2'> GSMCpAck class >> messageType [ <category: 'gsm'> ^ self msgCpAck ] @@ -160,6 +170,7 @@ GSMCpMessage subclass: GSMCpAck [ ] GSMCpMessage subclass: GSMCpError [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.2.3'> GSMCpError class >> messageType [ <category: 'gsm'> ^ self msgCpError ] @@ -172,24 +183,28 @@ GSMCpMessage subclass: GSMCpError [ ] Osmo.TLVParserBase subclass: GSMRpMessage [ - <category: 'OsmoGSM-04.11'> + <category: 'OsmoGSM-SMS-Message'> ] GSMRpMessage subclass: GSMRpData [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.3.1'> "Depending on the direction the Originator address is short." ] GSMRpMessage subclass: GSMRpSmma [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.3.2'> ] GSMRpMessage subclass: GSMRpAck [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.3.3'> ] GSMRpMessage subclass: GSMRpError [ + <category: 'OsmoGSM-SMS-Message'> <comment: '7.3.4'> ] diff --git a/GSMEncoding.st b/GSMEncoding.st index 6d03a33..33da4fa 100644 --- a/GSMEncoding.st +++ b/GSMEncoding.st @@ -18,24 +18,24 @@ Array extend [ decodeGSM7Bit [ - <category: '*-OsmoGSM-coding'> + <category: '*OsmoGSM-coding'> ^ (OsmoGSM at: #GSMDecoding) decode: self. ] decodeUSSD7Bit [ - <category: '*-OsmoGSM-coding'> + <category: '*OsmoGSM-coding'> ^ (OsmoGSM at: #GSMUSSDDecoding) decode: self. ] ] ByteArray extend [ decodeGSM7Bit [ - <category: '*-OsmoGSM-coding'> + <category: '*OsmoGSM-coding'> ^ (OsmoGSM at: #GSMDecoding) decode: self. ] decodeUSSD7Bit [ - <category: '*-OsmoGSM-coding'> + <category: '*OsmoGSM-coding'> ^ (OsmoGSM at: #GSMUSSDDecoding) decode: self. ] ] @@ -45,14 +45,14 @@ String extend [ "I convert a string into a 7bit encoded string. I should also be in UnicodeString but I am not. This impl. is just basic and does not deal with difficult bits." - <category: '*-OsmoGSM-coding'> + <category: '*OsmoGSM-coding'> ^ (OsmoGSM at: #GSMEncoding) encode: self. ] asUSSD7Bit [ "I convert a string into a 7bit encoded string. I know about padding rules for USSD messages." - <category: '*-OsmoGSM-coding'> + <category: '*OsmoGSM-coding'> ^ (OsmoGSM at: #GSMUSSDEncoding) encode: self. ] ] diff --git a/SCCPHandler.st b/SCCPHandler.st index eda9e73..526c495 100644 --- a/SCCPHandler.st +++ b/SCCPHandler.st @@ -376,12 +376,12 @@ Object subclass: MSGParser [ Osmo.SCCPMessage extend [ sccpInitialDispatch: aHandler [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> ^ aHandler dispatchMessage: self. ] sccpHandlerDispatchOn: aCon [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> "Message is not handled here" self logError: 'Unhandled SCCP packet %1' % {self class} area: #sccp. ^ false @@ -390,7 +390,7 @@ Osmo.SCCPMessage extend [ Osmo.SCCPUDT extend [ sccpInitialDispatch: aHandler [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> aHandler handleUDT: self. ^ true ] @@ -398,7 +398,7 @@ Osmo.SCCPUDT extend [ Osmo.SCCPConnectionRequest extend [ sccpInitialDispatch: aHandler [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> self logNotice: 'New incoming connection' area: #sccp. aHandler confirmConnection: self. ^ true @@ -407,7 +407,7 @@ Osmo.SCCPConnectionRequest extend [ Osmo.SCCPConnectionConfirm extend [ sccpHandlerDispatchOn: aCon [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> aCon confirm: self. ^ true ] @@ -415,7 +415,7 @@ Osmo.SCCPConnectionConfirm extend [ Osmo.SCCPConnectionData extend [ sccpHandlerDispatchOn: aCon [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> aCon critical: [aCon startTiar]. aCon data: self. ^ true @@ -424,7 +424,7 @@ Osmo.SCCPConnectionData extend [ Osmo.SCCPConnectionReleased extend [ sccpHandlerDispatchOn: aCon [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> aCon released: self. aCon conManager removeConnection: aCon. ^ true @@ -433,7 +433,7 @@ Osmo.SCCPConnectionReleased extend [ Osmo.SCCPConnectionReleaseComplete extend [ sccpHandlerDispatchOn: aCon [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> aCon releaseComplete: self. aCon conManager removeConnection: aCon. ^ true @@ -442,7 +442,7 @@ Osmo.SCCPConnectionReleaseComplete extend [ Osmo.SCCPInactivityTest extend [ sccpHandlerDispatchOn: aCon [ - <category: '*-OsmoGSM-SCCP'> + <category: '*OsmoGSM-SCCP'> aCon critical: [aCon startTiar]. ] ] diff --git a/SMSTests.st b/SMSTests.st index fcb2291..c09c00d 100644 --- a/SMSTests.st +++ b/SMSTests.st @@ -17,6 +17,8 @@ " TestCase subclass: GSM411Test [ + <category: 'OsmoGSM-SMS-Tests'> + testCPData [ | inp dec | inp := #(16r09 16r01 16r35 16r01 16r2A 16r07 16r91 16r44 @@ -17,6 +17,7 @@ " TestCase subclass: GSM0808Test [ + <category: 'OsmoGSM-Tests'> testLAI [ | lai res | res := #(16r72 16rF4 16r80) asByteArray. @@ -125,6 +126,8 @@ TestCase subclass: GSM0808Test [ ] TestCase subclass: BSSAPTest [ + <category: 'OsmoGSM-Tests'> + testPrependManagment [ | msg | msg := Osmo.MessageBuffer new. @@ -160,6 +163,8 @@ TestCase subclass: BSSAPTest [ ] TestCase subclass: GSM48Test [ + <category: 'OsmoGSM-Tests'> + testFactoryClass [ self assert: GSM48CCMessage isGSMBaseclass; @@ -448,12 +453,15 @@ TestCase subclass: GSM48Test [ ] SCCPHandler subclass: TestSCCPHandler [ + <category: 'OsmoGSM-Tests'> assignSrcRef [ ^ 666 ] ] TestCase subclass: TestMessages [ + <category: 'OsmoGSM-Tests'> + testMsgParser [ | msg bssap bssmap ies l3 gsm48 inp | @@ -680,6 +688,8 @@ TestCase subclass: TestMessages [ ] Object subclass: DummyConnection [ + <category: 'OsmoGSM-Tests'> + send: aMsg with: aProto [ "NOP" ] @@ -687,6 +697,7 @@ Object subclass: DummyConnection [ Object subclass: DirectConnection [ | handler | + <category: 'OsmoGSM-Tests'> DirectConnection class >> initWith: aHandler [ ^ self new @@ -700,6 +711,7 @@ Object subclass: DirectConnection [ SCCPConnection subclass: SCCPMockConnection [ | queue | + <category: 'OsmoGSM-Tests'> readQueue [ ^ queue ifNil: [queue := SharedQueue new]] @@ -724,6 +736,8 @@ SCCPConnection subclass: SCCPMockConnection [ ] SCCPHandler subclass: SCCPHandlerNonRec [ + <category: 'OsmoGSM-Tests'> + SCCPHandlerNonRec class >> dissectMSG: aMsg [ ^ Osmo.SCCPMessage decode: aMsg asByteArray. ] @@ -734,6 +748,7 @@ SCCPHandler subclass: SCCPHandlerNonRec [ ] TestCase subclass: SCCPHandlerTest [ + <category: 'OsmoGSM-Tests'> <comment: 'Test that one can do easy connection handling'> testDisconnectWithMSG [ @@ -800,6 +815,7 @@ TestCase subclass: SCCPHandlerTest [ ] TestCase subclass: GSMEncodingTest [ + <category: 'OsmoGSM-Tests'> <comment: 'I test the classic 7bit GSM encoding'> test7BitEncode [ @@ -851,6 +867,7 @@ TestCase subclass: GSMEncodingTest [ ] TestCase subclass: BitfieldTest [ + <category: 'OsmoGSM-Tests'> <comment: 'I test the Bitfield class'> testFromByte [ @@ -878,6 +895,7 @@ TestCase subclass: BitfieldTest [ ] TestCase subclass: TestGSM48ProgressIE [ + <category: 'OsmoGSM-Tests'> testDefault [ | prog | prog := GSMProgress createDefault. |