Exemplo n.º 1
0
 def getTunerStatus(self, allocation_id):
     tuner_id = self.getTunerMapping(allocation_id)
     if tuner_id < 0:
         raise FRONTEND.FrontendException(
             ("ERROR: ID: " + str(allocation_id) +
              " IS NOT ASSOCIATED WITH ANY TUNER!"))
     return [
         CF.DataType(id=self.frontend_tuner_status[tuner_id].getId(),
                     value=self.frontend_tuner_status[tuner_id]._toAny())
     ]
Exemplo n.º 2
0
    def getTunerStatus(self, allocation_id):
        self._baseLog.info("--> getTunerStatus()")

        tuner_id = self.getTunerMapping(allocation_id)

        if tuner_id < 0:
            self._baseLog.info("<-- getTunerStatus()")

            raise FRONTEND.FrontendException(
                ("ERROR: ID: " + str(allocation_id) +
                 " IS NOT ASSOCIATED WITH ANY TUNER!"))

        _props = self.query([
            CF.DataType(id='FRONTEND::tuner_status', value=_any.to_any(None))
        ])

        self._baseLog.info("<-- getTunerStatus()")

        return _props[0].value._v[tuner_id]._v