aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-10-21 15:53:12 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-10-21 15:53:12 +0200
commit150dfba9c03374baf1a18f8a8af9d5b5653518fb (patch)
tree0d4d4ba3ef50a6e0d1c9a5765c128996ab4311eb
parent27b2de5c7669b30d3ad603e0a608a09428743a5e (diff)
imsi detach: Implement the IMSI detach procedure
-rw-r--r--GSMDriver.st23
-rw-r--r--TestPhone.st11
2 files changed, 34 insertions, 0 deletions
diff --git a/GSMDriver.st b/GSMDriver.st
index 72bc091..eda967f 100644
--- a/GSMDriver.st
+++ b/GSMDriver.st
@@ -252,6 +252,29 @@ Object subclass: ProcedureBase [
]
]
+ProcedureBase subclass: IMSIDetachProcedure [
+ initialMessage [
+ | detach |
+
+ detach := GSM48IMSIDetachInd new.
+ detach mi imsi: conn phone imsi.
+ ^ detach
+ ]
+
+ name [
+ ^ 'IMSI Detach Procedure'
+ ]
+
+ status [
+ ^ self success
+ ifTrue: ['IMSI Detach succeeded']
+ ifFalse: ['IMSI Detach failed'].
+ ]
+
+ connectionConfirmed [
+ "Nothing. No classmark change needed here."
+ ]
+]
ProcedureBase subclass: LUProcedure [
initialMessage [
diff --git a/TestPhone.st b/TestPhone.st
index ffdc00a..b65dc44 100644
--- a/TestPhone.st
+++ b/TestPhone.st
@@ -135,6 +135,17 @@ Object subclass: IPAConfig [
semaphore [ ^ sem ]
+ doIMSIDetach: aPhone [
+ ^ (GSMConnection on: connection sccpHandler withPhone: aPhone)
+ setProc: IMSIDetachProcedure new;
+ yourself
+ ]
+
+ sendIMSIDetach: aPhone [
+ ^ (self doIMSIDetach: aPhone)
+ openConnection; waitForTermination; yourself
+ ]
+
doLU: aPhone [
^ (GSMConnection on: connection sccpHandler withPhone: aPhone)
setProc: LUProcedure new;