summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTriatmoko2011-11-19 00:10:15 +0100
committerTriatmoko2011-11-19 00:10:15 +0100
commit39ba81554f82a99cd85a1889e34ec67207af0d6a (patch)
treec81c3cc701ab41e8ef1a664cc7a99274c597bb76
parentedit truth table for manual command (diff)
downloadgsm-selftest-39ba81554f82a99cd85a1889e34ec67207af0d6a.tar.gz
gsm-selftest-39ba81554f82a99cd85a1889e34ec67207af0d6a.tar.xz
gsm-selftest-39ba81554f82a99cd85a1889e34ec67207af0d6a.zip
modify truth message for manual testing
-rw-r--r--Code/Server-Code/truthtableClass.py41
1 files changed, 29 insertions, 12 deletions
diff --git a/Code/Server-Code/truthtableClass.py b/Code/Server-Code/truthtableClass.py
index df6738b..85fd5c6 100644
--- a/Code/Server-Code/truthtableClass.py
+++ b/Code/Server-Code/truthtableClass.py
@@ -25,7 +25,7 @@ class trueTable:
if self.nanoBts == '':
self.found = False
else:
- found = False
+ self.found = False
for y in self.nanoBts: #find the existing nanoBts result
name = y[0]
if name == btsName:
@@ -182,15 +182,32 @@ class trueTable:
if found != True:
self.nanoBts.append([btsName,False])
- elif (str(result) == '801' or str(result) == '999') and key == call:
- #self.lookingBTSname(key)
- if self.lookingBTSname(key) != True:
- self.nanoBts.append([key,result])
+ elif (str(result) == '801' or str(result) == '999') and key == call:
+ exist = False
+ if self.nanoBts != '':
+ for device in self.nanoBts:
+ if device[0]== key:
+ exist = True
+ if exist!= True:
+ self.nanoBts.append([key,result])
+
+ elif (str(result) == '802' or str(result) == '998') and key == dest:
+ exist = False
+ if self.nanoBts != '':
+ for device in self.nanoBts:
+ if device[0]== key:
+ exist = True
+ if exist!= True:
+ self.nanoBts.append([key,result])
- elif (str(result) == '802' or str(result) == '998') and key == dest:
- #self.lookingBTSname(key)
- if self.lookingBTSname(key) != True:
- self.nanoBts.append([key,result])
+ elif (key == call or key == dest ) and str(result) == '402':
+ exist = False
+ if self.nanoBts != '':
+ for device in self.nanoBts:
+ if device[0]== key:
+ exist = True
+ if exist!= True:
+ self.nanoBts.append([key,result])
j = j+1
elif j == i:
@@ -205,7 +222,7 @@ class trueTable:
for y in self.nanoBts: #find the existing result for GSM external in the list
name = y[0]
if name == call:
- if int(result) == 200:
+ if int(result) == 200 or int(y[1]) == 402:
if int(y[1]) == 486 or int(y[1]) == 999 or int(y[1]) == 998 or int(y[1]) == 801 or int(y[1]) == 802 or int(y[1]) == 402:
self.nanoBts.remove(y)
else:
@@ -223,8 +240,8 @@ class trueTable:
for y in self.nanoBts:
name = y[0]
if name == dest:
- if int(result) == 200:
- if int(y[1]) == 486 or int(y[1]) == 999 or int(y[1]) == 998 or int(y[1]) == 402 or int(y[1]) == 802 or int(y[1]) == 801:
+ if int(result) == 200 or int(y[1]) == 402:
+ if int(y[1]) == 486 or int(y[1]) == 999 or int(y[1]) == 998 or int(y[1]) == 802 or int(y[1]) == 801:
self.nanoBts.remove(y)
else:
found = True