GSM: Check if the LU is accepted and change the return type
This commit is contained in:
parent
7bf1e7e038
commit
fcc2e50854
27
GSMDriver.st
27
GSMDriver.st
|
@ -1,5 +1,5 @@
|
|||
Object subclass: GSMDriver [
|
||||
| sccp proc sapis completeSem result phoneConfig |
|
||||
| sccp proc sapis completeSem phoneConfig |
|
||||
<category: 'osmo-gsm-operation'>
|
||||
<comment: 'I create a SCCP connection and handle stuff on it. In the base class
|
||||
I am just capable of handling BSSMAP Management and need to dispatch it to other
|
||||
|
@ -25,10 +25,6 @@ classes.'>
|
|||
sapis := Dictionary new.
|
||||
]
|
||||
|
||||
result [
|
||||
^ result
|
||||
]
|
||||
|
||||
waitForCompletion [
|
||||
<category: 'accessing'>
|
||||
^ completeSem wait
|
||||
|
@ -135,6 +131,7 @@ classes.'>
|
|||
].
|
||||
|
||||
sapis at: aSapi ifPresent: [:handler |
|
||||
handler handleData: aMsg sapi: aSapi.
|
||||
].
|
||||
|
||||
'Unhandled DTAP message' printNl.
|
||||
|
@ -184,6 +181,11 @@ Object subclass: ProcedureBase [
|
|||
|
||||
|
||||
ProcedureBase subclass: LUProcedure [
|
||||
| success |
|
||||
|
||||
success [
|
||||
^ success ifNil: [false]
|
||||
]
|
||||
|
||||
createConnection: aHandler phone: aPhone [
|
||||
| lu |
|
||||
|
@ -197,7 +199,20 @@ ProcedureBase subclass: LUProcedure [
|
|||
|
||||
execute [
|
||||
super execute.
|
||||
'LUProcedure is completed' printNl.
|
||||
|
||||
self success
|
||||
ifTrue: [
|
||||
'LUAccept nicely succeeded.' printNl.
|
||||
]
|
||||
ifFalse: [
|
||||
'LURejected.' printNl.
|
||||
]
|
||||
]
|
||||
|
||||
handleData: aMsg sapi: aSapi [
|
||||
aMsg class messageType = GSM48MMMessage msgLUAcc ifTrue: [
|
||||
success := true.
|
||||
].
|
||||
]
|
||||
]
|
||||
|
||||
|
|
Reference in New Issue