[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:51:51 UTC 2009
The following commit has been merged in the master branch:
commit 41985fee51535918e92c55e64eb811ffe063991f
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date: Wed Jan 7 20:37:02 2009 +0100
ogsmd: Implemented org.freesmartphone.GSM.Monitoring.* as stub
erroring out with org.freesmartphone.GSM.UnsupportedCommand.
ogsmd: [TI CALPYSO] Implemented the new monitoring API:
org.freesmartphone.GSM.Monitoring.Get{Serving|Neighbour}CellInformation
diff --git a/ChangeLog b/ChangeLog
index c5025a1..abfeb9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-07 Michael Lauer <mlauer at vanille-media.de>
+
+ * [ogsmd] Implemented org.freesmartphone.GSM.Monitoring.* as stub
+ erroring out with org.freesmartphone.GSM.UnsupportedCommand.
+ * [ogsmd] [TI CALYPSO] Implemented the new monitoring API:
+ org.freesmartphone.GSM.Monitoring.Get{Serving|Neighbour}CellInformation
+
2009-01-06 Michael Lauer <mlauer at vanille-media.de>
* We now register one dbus connection per subsystem to prevent objects
diff --git a/framework/subsystems/ogsmd/device.py b/framework/subsystems/ogsmd/device.py
index 6451de6..bf7812f 100644
--- a/framework/subsystems/ogsmd/device.py
+++ b/framework/subsystems/ogsmd/device.py
@@ -623,7 +623,7 @@ class Device( resource.Resource ):
def GetServingCellInformation( self, dbus_ok, dbus_error ):
mediator.MonitorGetServingCellInformation( self, dbus_ok, dbus_error )
- @dbus.service.method( DBUS_INTERFACE_MONITOR, "", "a(a{sv})",
+ @dbus.service.method( DBUS_INTERFACE_MONITOR, "", "aa{sv}",
async_callbacks=( "dbus_ok", "dbus_error" ) )
@resource.checkedmethod
def GetNeighbourCellInformation( self, dbus_ok, dbus_error ):
diff --git a/framework/subsystems/ogsmd/modems/ti_calypso/mediator.py b/framework/subsystems/ogsmd/modems/ti_calypso/mediator.py
index 93888f0..97b5884 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.0.0"
+__version__ = "1.1.0"
from ogsmd.modems.abstract.mediator import *
@@ -50,6 +50,96 @@ class CbSetCellBroadcastSubscriptions( CbSetCellBroadcastSubscriptions ): # s
self._ok()
#=========================================================================#
+class MonitorGetServingCellInformation( MonitorMediator ):
+#=========================================================================#
+ """
+ 1 arfcn Current Channel Number
+ 2 c1 Path Loss Criterion C1
+ 3 c2 Cell-reselection Criterion C2
+ 4 rxlev Received Field Strength (rxlev/2)+2= AT+CSQ response value
+ 5 bsic Base Station ID Code
+ 6 cell_id Cell Indentifier
+ 7 dsc Downlink Signaling Counter actual value
+ 8 txlev Transmit Power Level
+ 9 tn Timeslot Number
+ 10 rlt Radio Link Timeout Counter
+ 11 tav Timing Advance
+ 12 rxlev_f Received Field Strength full
+ 13 rxlev_s Received Field Strength sub
+ 14 rxqual_f Received Quality full
+ 15 rxqual_s Received Quality sub
+ 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
+ 20 vocoder Vocoder Sig/speech/efr/amr/14.4/9.6/4.8/2.4
+ """
+ def trigger( self ):
+ self._commchannel.enqueue( "%EM=2,1", self.responseFromChannel, self.errorFromChannel )
+
+ def responseFromChannel( self, request, response ):
+ if response[-1] != "OK":
+ MonitorMediator.responseFromChannel( self, request, response )
+ 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()
+ for value in values:
+ param = params.pop()
+ if param in ["cid", "lac"]:
+ result[param] = "%04X" % int( value )
+ else:
+ result[param] = int( value )
+ self._ok( result )
+
+#=========================================================================#
+class MonitorGetNeighbourCellInformation( MonitorMediator ):
+#=========================================================================#
+ """
+ 1 no_ncells Number of neighbor cells
+ 2 arfcn_nc BCCH channel Channel no 0 - 5
+ 3 c1_nc Path Loss Criterion C1 Channel no 0 - 5
+ 4 c2_nc Cell-Reselection Criterion C2 Channel no 0 - 5
+ 5 rxlev_nc Receive Field Strength Channel no 0 - 5
+ 6 bsic_nc Base Station ID Code Channel no 0 - 5
+ 7 cell_id_nc Cell Identity Channel no 0 - 5
+ 8 lac_nc Location Area Code Channel no 0 - 5
+ 9 frame_offset Frame Offset Channel no 0 - 5
+ 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
+ 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
+ """
+ def trigger( self ):
+ self._commchannel.enqueue( "%EM=2,3", self.responseFromChannel, self.errorFromChannel )
+
+ def responseFromChannel( self, request, response ):
+ if response[-1] != "OK":
+ MonitorMediator.responseFromChannel( self, request, response )
+ else:
+ result = []
+ count = int( self._rightHandSide( response[0] ) )
+ 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()
+ for line in response[1:-1]:
+ param = params.pop()
+ for index, value in enumerate( line.split( ',' ) ):
+ if index < count:
+ if param in ["cid", "lac"]:
+ result[index][param] = "%04X" % int( value )
+ else:
+ result[index][param] = int( value )
+ self._ok( result )
+
+#=========================================================================#
if __name__ == "__main__":
#=========================================================================#
pass
diff --git a/framework/subsystems/testing/testing.py b/framework/subsystems/testing/testing.py
index f342497..12b7440 100644
--- a/framework/subsystems/testing/testing.py
+++ b/framework/subsystems/testing/testing.py
@@ -86,6 +86,12 @@ class Resource( resource.Resource ):
self.catmap[category] = str( behaviour )
dbus_ok()
+ @dbus.service.method( DBUS_INTERFACE, "", "aa{sv}",
+ async_callbacks=( "dbus_ok", "dbus_error" ) )
+ def ReturnTest( self, dbus_ok, dbus_error ):
+ d = {"foo":"bar"}
+ dbus_ok( [d,d] )
+
#============================================================================#
def factory(prefix, controller):
#============================================================================#
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list