1
0
Fork 0

category: Categorize the classes correctly for the OsmoNetwork package

Prefix all with OsmoNetwork, use *OsmoNetwork in extensions
This commit is contained in:
Holger Hans Peter Freyther 2013-02-23 14:00:54 +01:00
parent cf820ff25b
commit f66abe8824
10 changed files with 35 additions and 24 deletions

View File

@ -19,7 +19,7 @@
Integer extend [
swap16 [
| tmp |
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
tmp := self bitAnd: 16rFFFF.
^ (tmp bitShift: -8) bitOr: ((tmp bitAnd: 16rFF) bitShift: 8)
@ -28,7 +28,7 @@ Integer extend [
swap32 [
| tmp |
"Certainly not the most effective way"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
tmp := 0.
tmp := tmp bitOr: ((self bitAnd: 16rFF000000) bitShift: -24).
@ -43,21 +43,21 @@ Integer extend [
Object extend [
toMessage [
| msg |
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-message'>
msg := Osmo.MessageBuffer new.
self writeOn: msg.
^ msg
]
toMessageOrByteArray [
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
^ self toMessage
]
]
ByteArray extend [
toMessageOrByteArray [
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
^ self
]
]
@ -67,14 +67,14 @@ ByteArray extend [
Sockets.Socket extend [
nextUshort [
"Return the next 2 bytes in the byte array, interpreted as a 16 bit unsigned int"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
^self nextBytes: 2 signed: false
]
nextBytes: n signed: signed [
"Private - Get an integer out of the next anInteger bytes in the stream"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
| int msb |
int := 0.
0 to: n * 8 - 16
@ -88,7 +88,7 @@ Sockets.Socket extend [
nextByte [
"Return the next byte in the file, or nil at eof"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
| a |
a := self next.
^a isNil ifTrue: [a] ifFalse: [a asInteger]
@ -98,14 +98,14 @@ Sockets.Socket extend [
Sockets.StreamSocket extend [
nextUshort [
"Return the next 2 bytes in the byte array, interpreted as a 16 bit unsigned int"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
^self nextBytes: 2 signed: false
]
nextBytes: n signed: signed [
"Private - Get an integer out of the next anInteger bytes in the stream"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
| int msb |
int := 0.
0 to: n * 8 - 16
@ -119,7 +119,7 @@ Sockets.StreamSocket extend [
nextByte [
"Return the next byte in the file, or nil at eof"
<category: '*-OsmoCore-message'>
<category: '*OsmoNetwork-Message'>
| a |
a := self next.
^a isNil ifTrue: [a] ifFalse: [a asInteger]

View File

@ -19,6 +19,8 @@
TestCase subclass: IPATests [
| called |
<category: 'OsmoNetwork-Tests'>
IPATests class >> packageNamesUnderTest [
<category: 'accessing'>
^ #('OsmoNetwork')
@ -69,7 +71,7 @@ TestCase subclass: IPATests [
]
TestCase subclass: IPAMsgTests [
<category: 'OsmoNetwork-IPA'>
<category: 'OsmoNetwork-Tests'>
IPAMsgTests class >> parseOnlyData [
^ Array

View File

@ -17,6 +17,7 @@
"
TestCase subclass: ISUPGeneratedTest [
<category: 'OsmoNetwork-Tests'>
<comment: 'I was written on a flight to Taipei. I will try to
instantiate all generated class and walk the hierachy to see if
there are any DNUs'>

View File

@ -18,7 +18,7 @@
Object subclass: OsmoAppConnection [
| socket writeQueue demuxer muxer dispatcher ctrlBlock |
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
<comment: 'I connect to a OpenBSC App on the Control Port and wait for
TRAPS coming from the server and will act on these.'>

View File

@ -17,7 +17,7 @@
"
PP.PPCompositeParser subclass: CtrlGrammar [
<category: 'Osmo-Control-Grammar'>
<category: 'OsmoNetwork-Control'>
<comment: 'I can parse the control interface'>
start [
@ -62,7 +62,7 @@ PP.PPCompositeParser subclass: CtrlGrammar [
Object subclass: CtrlCmd [
| msg |
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
<comment: 'I am a base class without any functions'>
CtrlCmd class >> with: aMsg [
@ -84,7 +84,7 @@ Object subclass: CtrlCmd [
]
CtrlCmd subclass: CtrlTrap [
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
<comment: 'I am a trap'>
CtrlTrap class >> isFor: aPath [
@ -103,7 +103,7 @@ CtrlCmd subclass: CtrlTrap [
CtrlTrap subclass: CtrlLocationTrap [
| net_nr bsc_nr bts_nr location |
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
<comment: 'I handle location traps'>
CtrlLocationTrap class >> isFor: aPath [
@ -220,7 +220,7 @@ CtrlTrap subclass: CtrlLocationTrap [
CtrlTrap subclass: CtrlCallStatTrap [
| dict |
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
<comment: 'I can parse the callstats generated by the NAT'>
CtrlCallStatTrap class >> isFor: aPath [
@ -265,7 +265,7 @@ CtrlTrap subclass: CtrlCallStatTrap [
]
CtrlGrammar subclass: CtrlParser [
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
<comment: 'I parse the tokens from the Ctrl grammar'>
trapMessage [

View File

@ -1,7 +1,7 @@
"All rights reserved"
PP.PPCompositeParserTest subclass: CtrlGrammarTest [
<category: 'Osmo-Control-Test'>
<category: 'OsmoNetwork-Control-Tests'>
<comment: 'I test some parts of the grammar'>
CtrlGrammarTest class >> packageNamesUnderTest [
@ -25,7 +25,7 @@ PP.PPCompositeParserTest subclass: CtrlGrammarTest [
]
PP.PPCompositeParserTest subclass: CtrlParserTest [
<category: 'Osmo-Control-Test'>
<category: 'OsmoNetwork-Control-Tests'>
<comment: 'I test some parts of the grammar'>
CtrlParserTest class >> packageNamesUnderTest [

View File

@ -1,7 +1,7 @@
"I represent the logging areas"
Osmo.LogArea subclass: LogAreaCTRL [
<category: 'Osmo-Control'>
<category: 'OsmoNetwork-Control'>
LogAreaCTRL class >> areaName [ ^ #ctrl ]
LogAreaCTRL class >> areaDescription [ ^ 'Osmo CTRL handling' ]
LogAreaCTRL class >> default [

View File

@ -18,7 +18,7 @@
Object subclass: OsmoUDPSocket [
| socket queue rx tx net_exit name on_data |
<category: 'Osmo-Socket'>
<category: 'OsmoNetwork-Socket'>
<comment: 'I help in sending and dispatching UDP messages. I will
start two processes for socket handling.'>

View File

@ -17,7 +17,7 @@
"
TestCase subclass: TLVDescriptionTest [
<category: 'BTS-OML-Tests'>
<category: 'OsmoNetwork-Tests'>
<comment: 'I try to test the TLV Description'>
testTLVCreation [

View File

@ -18,6 +18,8 @@
"Test Case for Osmo-Network"
TestCase subclass: SCCPTests [
<category: 'OsmoNetwork-Tests'>
SCCPTests class >> packageNamesUnderTest [
<category: 'accessing'>
^ #('OsmoNetwork')
@ -200,6 +202,8 @@ TestCase subclass: SCCPTests [
]
TestCase subclass: MessageBufferTest [
<category: 'OsmoNetwork-Tests'>
testAdd [
| msg1 msg2 msg3 msg_master |
msg1 := MessageBuffer new.
@ -230,6 +234,8 @@ TestCase subclass: MessageBufferTest [
]
TestCase subclass: M2UATests [
<category: 'OsmoNetwork-Tests'>
testUnique [
"This should have some sanity checks on the enum"
]
@ -298,6 +304,8 @@ TestCase subclass: M2UATests [
]
TestCase subclass: OsmoUDPSocketTest [
<category: 'OsmoNetwork-Tests'>
testSocketCreation [
| socket rx tx |
socket := OsmoUDPSocket new