1
0
Fork 0

sccp: Do not use abbreviation for variable names

It can help users to understand what we are talking about. This
request was expressed by noha.
This commit is contained in:
Holger Hans Peter Freyther 2013-04-02 16:59:35 +02:00
parent 247205d803
commit 7ccefaa16e
1 changed files with 36 additions and 16 deletions

View File

@ -17,7 +17,7 @@
"
Object subclass: SCCPAddress [
| route_ssn ssn poi gti gti_ind |
| subSystemNumber globalTitle routedOnSsn poi gti_ind |
<category: 'OsmoNetwork-SCCP'>
<comment: 'I represent the SCCP Address including the
@ -92,18 +92,28 @@ Object subclass: SCCPAddress [
]
routedOnSSN: aFlag [
<category: 'deprecated'>
self routedOnSubSystenNumber: aFlag
]
routedOnSubSystenNumber: aFlag [
<category: 'ssn'>
route_ssn := aFlag
routedOnSsn := aFlag
]
routedOnSSN [
<category: 'ssn'>
^ route_ssn ifNil: [false]
^ routedOnSsn ifNil: [false]
]
gti [
<category: 'deprecated'>
^ self globalTitle
]
globalTitle [
<category: 'gti'>
^ gti
^ globalTitle
]
gtiInd [
@ -111,9 +121,9 @@ Object subclass: SCCPAddress [
^ gti_ind
]
gti: aGti indicator: aGtiInd [
gti: aGlobalTitle indicator: aGtiInd [
<category: 'gti'>
gti := aGti.
globalTitle := aGlobalTitle.
gti_ind := aGtiInd bitAnd: 16rF.
]
@ -121,13 +131,13 @@ Object subclass: SCCPAddress [
<category: 'gti'>
^ gti_ind = 0
ifTrue: [nil]
ifFalse: [SCCPGTI initWith: gti_ind data: gti].
ifFalse: [SCCPGTI initWith: gti_ind data: globalTitle].
]
gtiFromAddr: aGti [
gtiFromAddr: aGlobalTitle [
<category: 'gti'>
gti_ind := aGti class subType.
gti := aGti asByteArray.
gti_ind := aGlobalTitle class subType.
globalTitle := aGlobalTitle asByteArray.
]
poi: aPoi [
@ -140,14 +150,24 @@ Object subclass: SCCPAddress [
^ poi
]
ssn: assn [
<category: 'ssn'>
ssn := assn
ssn: aSubSystemNumber [
<category: 'deprecated'>
"deprecated"
self subSystemNumber: aSubSystemNumber
]
subSystemNumber: aSubSystemNumber [
subSystemNumber := aSubSystemNumber
]
ssn [
<category: 'deprecated'>
^ self subSystemNumber
]
subSystemNumber [
<category: 'accessing'>
^ ssn.
^ subSystemNumber
]
asByteArray [
@ -185,11 +205,11 @@ Object subclass: SCCPAddress [
].
"SSN"
data add: ssn.
data add: subSystemNumber.
"GTI"
gti_ind ifNotNil: [
gti do: [:each | data add: each ].
globalTitle do: [:each | data add: each ].
].
data addFirst: data size.