diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-03 01:33:22 +0200 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2010-10-03 01:33:22 +0200 |
| commit | 006e3497641164df7a413c8730d9b8914d67e2d8 (patch) | |
| tree | 053e82951425df6dd5f9586382cadea6b16e3790 /lib/python/Components/NimManager.py | |
| parent | 970cdaf1f5137645fad5f1404d29fdd90127f5fb (diff) | |
| download | enigma2-006e3497641164df7a413c8730d9b8914d67e2d8.tar.gz enigma2-006e3497641164df7a413c8730d9b8914d67e2d8.zip | |
refs bug #587
internally linking is now done via /proc/stb/frontend/X/rf_switch instead of /proc/stb/tsmux and moved to the python part of enigma2
Diffstat (limited to 'lib/python/Components/NimManager.py')
| -rw-r--r-- | lib/python/Components/NimManager.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index cb832e41..4d562b95 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -110,9 +110,16 @@ class SecConfigure: def setSatposDepends(self, sec, nim1, nim2): print "tuner", nim1, "depends on satpos of", nim2 sec.setTunerDepends(nim1, nim2) + + def linkInternally(self, slotid): + nim = self.NimManager.getNim(slotid) + if nim.internallyConnectableTo is not None: + nim.setInternalLink() def linkNIMs(self, sec, nim1, nim2): print "link tuner", nim1, "to tuner", nim2 + if nim2 == (nim1 - 1): + self.linkInternally(nim1) sec.setTunerLinked(nim1, nim2) def getRoot(self, slotid, connto): @@ -127,6 +134,9 @@ class SecConfigure: def update(self): sec = secClass.getInstance() self.configuredSatellites = set() + for slotid in self.NimManager.getNimListOfType("DVB-S"): + if self.NimManager.nimInternallyConnectableTo(slotid) is not None: + self.NimManager.nimRemoveInternalLink(slotid) sec.clear() ## this do unlinking NIMs too !! print "sec config cleared" @@ -526,6 +536,16 @@ class NIM(object): def internallyConnectableTo(self): return self.internally_connectable + def setInternalLink(self): + if self.internally_connectable is not None: + print "setting internal link on frontend id", self.frontend_id + open("/proc/stb/frontend/%d/rf_switch" % self.frontend_id, "w").write("internal") + + def removeInternalLink(self): + if self.internally_connectable is not None: + print "removing internal link on frontend id", self.frontend_id + open("/proc/stb/frontend/%d/rf_switch" % self.frontend_id, "w").write("external") + def isMultiType(self): return (len(self.multi_type) > 0) @@ -735,6 +755,9 @@ class NimManager: def getNimName(self, slotid): return self.nim_slots[slotid].description + + def getNim(self, slotid): + return self.nim_slots[slotid] def getNimListOfType(self, type, exception = -1): # returns a list of indexes for NIMs compatible to the given type, except for 'exception' @@ -765,6 +788,12 @@ class NimManager: def hasOutputs(self, slotid): return self.nim_slots[slotid].hasOutputs() + def nimInternallyConnectableTo(self, slotid): + return self.nim_slots[slotid].internallyConnectableTo() + + def nimRemoveInternalLink(self, slotid): + self.nim_slots[slotid].removeInternalLink() + def canConnectTo(self, slotid): slots = [] if self.nim_slots[slotid].internallyConnectableTo() is not None: |
