[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82

Michael 'Mickey' Lauer mickey at vanille-media.de
Mon Feb 2 18:52:02 UTC 2009


The following commit has been merged in the master branch:
commit 2492089e161d8ff17d311b6b147e7d2678b38ba6
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date:   Wed Jan 21 07:23:53 2009 +0100

    ogsmd: [TI CALYPSO] convert signal strenghts to percentage in
    org.freesmartphone.GSM.Monitor.Get{Serving|Neighbour}CellInformation
    rename cell_type_ind to ctype

diff --git a/framework/subsystems/ogsmd/modems/ti_calypso/mediator.py b/framework/subsystems/ogsmd/modems/ti_calypso/mediator.py
index 97b5884..8a9b5f6 100644
--- a/framework/subsystems/ogsmd/modems/ti_calypso/mediator.py
+++ b/framework/subsystems/ogsmd/modems/ti_calypso/mediator.py
@@ -10,7 +10,7 @@ Package: ogsmd.modems.ti_calypso
 Module: mediator
 """
 
-__version__ = "1.1.0"
+__version__ = "1.1.1"
 
 from ogsmd.modems.abstract.mediator import *
 
@@ -71,9 +71,15 @@ class MonitorGetServingCellInformation( MonitorMediator ):
     16        lac           Location Area Code
     17        cba           Cell Bar Access
     18        cbq           Cell Bar Qualifier
-    19        Cell_type_ind Cell Type Indicator           NA/GSM/GPRS
+    19        ctype         Cell Type Indicator           NA/GSM/GPRS
     20        vocoder       Vocoder                       Sig/speech/efr/amr/14.4/9.6/4.8/2.4
     """
+    params = "arfcn c1 c2 rxlev bsic cid dsc txlev tn rlt tav rxlev_f rxlev_s rxqual_f rxqual_s lac cba cbq ctype vocoder".split()
+    params.reverse()
+
+    stringparams = "cid lac"
+    strengthparams = "c1 c2 rxlev txlev rxlev_f rxlev_s".split()
+
     def trigger( self ):
         self._commchannel.enqueue( "%EM=2,1", self.responseFromChannel, self.errorFromChannel )
 
@@ -83,12 +89,13 @@ class MonitorGetServingCellInformation( MonitorMediator ):
         else:
             result = {}
             values = self._rightHandSide( response[0] ).split( ',' )
-            params = "arfcn c1 c2 rxlev bsic cid dsc txlev tn rlt tav rxlev_f rxlev_s rxqual_f rxqual_s lac cba cbq cell_type_ind vocoder ".split()
-            params.reverse()
+            params = self.params[:]
             for value in values:
                 param = params.pop()
-                if param in ["cid", "lac"]:
+                if param in self.stringparams:
                     result[param] = "%04X" % int( value )
+                elif param in self.strengthparams:
+                    result[param] = const.signalQualityToPercentage( int(value)/2+2 )
                 else:
                     result[param] = int( value )
             self._ok( result )
@@ -109,12 +116,19 @@ class MonitorGetNeighbourCellInformation( MonitorMediator ):
     10 time-alignmnt     Time Alignment                Channel no 0 - 5
     11 cba_nc            Cell Bar Access               Channel no 0 - 5
     12 cbq_nc            Cell Bar Qualifier            Channel no 0 - 5
-    13 cell_type_ind     Cell Type Indicator           Channel no 0 - 5
+    13 ctype             Cell Type Indicator           Channel no 0 - 5
     14 rac               Routing Area Code             Channel no 0 - 5
     15 cell_resel_offset Cell resection Offset         Channel no 0 - 5
     16 temp_offset       Temporary Offset              Channel no 0 - 5
     17 rxlev_acc_min     Rxlev access min              Channel no 0 - 5
     """
+
+    params = "arfcn c1 c2 rxlev bsic cid lac foffset timea cba cbq ctype rac roffset toffset rxlevam".split()
+    params.reverse()
+
+    stringparams = "cid lac".split()
+    levelparams = "c1 c2 rxlev rxlevam".split()
+
     def trigger( self ):
         self._commchannel.enqueue( "%EM=2,3", self.responseFromChannel, self.errorFromChannel )
 
@@ -127,14 +141,15 @@ class MonitorGetNeighbourCellInformation( MonitorMediator ):
             if count > 0:
                 for cell in xrange( count ):
                     result.append( {} )
-                params = "arfcn c1 c2 rxlev bsic cid lac foffset timea cba cbq ctype rac roffset toffset rxlevam".split()
-                params.reverse()
+                params = self.params[:]
                 for line in response[1:-1]:
                     param = params.pop()
                     for index, value in enumerate( line.split( ',' ) ):
                         if index < count:
-                            if param in ["cid", "lac"]:
+                            if param in self.stringparams:
                                 result[index][param] = "%04X" % int( value )
+                            elif param in self.levelparams:
+                                result[index][param] = const.signalQualityToPercentage( int(value)/2+2 )
                             else:
                                 result[index][param] = int( value )
             self._ok( result )

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list