diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-19 09:02:26 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-19 20:27:26 +0100 |
commit | 55971af370bfcc9c74038fab9cf81498e671c054 (patch) | |
tree | 9f71cd58be328bc88667549586c8b0441c274886 /BSSMAP.st | |
parent | b3181b1eff68b863400a9a9b8e0a7c1e67266bf9 (diff) |
misc: First round of categories and things for the code
Diffstat (limited to 'BSSMAP.st')
-rw-r--r-- | BSSMAP.st | 33 |
1 files changed, 26 insertions, 7 deletions
@@ -1,17 +1,21 @@ Object subclass: GSM0808IE [ + <category: 'osmo-message'> <comment: 'Base class of IEs for GSM0808'> ] Object subclass: GSM0808Helper [ - GSM0808Helper class >> msgComplL3 [ ^ 16r57 ] - GSM0808Helper class >> msgReset [ ^ 16r30 ] - GSM0808Helper class >> msgResetAck [ ^ 16r31 ] - GSM0808Helper class >> msgClear [ ^ 16r20 ] - GSM0808Helper class >> msgClearComp [ ^ 16r21 ] + GSM0808Helper class >> msgComplL3 [ <category: 'spec'> ^ 16r57 ] + GSM0808Helper class >> msgReset [ <category: 'spec'> ^ 16r30 ] + GSM0808Helper class >> msgResetAck [ <category: 'spec'> ^ 16r31 ] + GSM0808Helper class >> msgClear [ <category: 'spec'> ^ 16r20 ] + GSM0808Helper class >> msgClearComp [ <category: 'spec'> ^ 16r21 ] ] Object subclass: BCD [ + <category: 'osmo-message'> + <comment: 'Class to deal with Binary Coded Decimals'> BCD class >> encode: aNumber [ + <category: 'access'> | col num | col := OrderedCollection new. @@ -26,7 +30,11 @@ Object subclass: BCD [ ] Object subclass: LAI [ + <category: 'osmo-message'> + <comment: 'Generate a Location Area Identifier'> + LAI class >> generateLAI: mcc mnc: mnc [ + <category: 'creation'> | mcc_bcd mnc_bcd lai_0 lai_1 lai_2 | mcc_bcd := BCD encode: mcc. mnc_bcd := BCD encode: mnc. @@ -49,15 +57,20 @@ Object subclass: LAI [ ] GSM0808IE subclass: GSMCellIdentifier [ + <category: 'osmo-message'> + <comment: 'Generate a GSM0808 Cell Identifier'> + | mcc mnc lac ci | - GSMCellIdentifier class >> elementId [ ^ 5 ] + GSMCellIdentifier class >> elementId [ <category: 'spec'> ^ 5 ] GSMCellIdentifier class >> initWith: mcc mnc: mnc lac: lac ci: ci [ + <category: 'creation'> ^ (self new) mcc: mcc mnc: mnc lac: lac ci: ci; yourself ] mcc: aMcc mnc: aMnc lac: aLac ci: aCi [ + <category: 'creation'> mcc := aMcc. mnc := aMnc. lac := aLac. @@ -65,6 +78,7 @@ GSM0808IE subclass: GSMCellIdentifier [ ] storeOn: aMsg [ + <category: 'creation'> | lai | lai := LAI generateLAI: mcc mnc: mnc. @@ -78,19 +92,24 @@ GSM0808IE subclass: GSMCellIdentifier [ ] GSM0808IE subclass: GSMLayer3Info [ + <category: 'osmo-message'> + <comment: 'Generate a Layer3 IE'> | data | - GSMLayer3Info class >> elementId [ ^ 23 ] + GSMLayer3Info class >> elementId [ <category: 'spec'> ^ 23 ] GSMLayer3Info class >> initWith: data [ + <category: 'creation'> ^ (self new) data: data; yourself ] data: aData [ + <category: 'creation'> data := aData ] storeOn: aMsg [ + <category: 'creation'> aMsg putByte: self class elementId. aMsg putByte: data size. aMsg putByteArray: data. |