Coverage for janitoo.component : 77%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
An I2C device, ... """
This file is part of Janitoo.
Janitoo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Janitoo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Janitoo. If not, see <http://www.gnu.org/licenses/>.
"""
"""Initialise the component
:param oid: The oid implemented by the component. :type oid: str """ else:
def uuid(self): """Return an uuid for the component
"""
"""Retrieve data
""" raise NotImplementedError()
"""Check that the component is 'available'
""" raise NotImplementedError()
"""Start the component. Can be used to start a thread to acquire data.
"""
"""Stop the component.
"""
"""Create a node associated to this component """ name=self.name, product_name=self.product_name, product_type=self.product_type, product_manufacturer=self.product_manufacturer, check_hearbeat_cb=cb_check_hearbeat, **kwargs)
""" """ temp_poll = self._bus.nodeman.options.get_option("%s"%node_uuid, value_id) if temp_poll is not None: try: self.node.values[value_id].poll_delay = int(temp_poll) except ValueError: logger.exception('Exception when retrieving poll temperature') #~ print "%s" % self.node.values return self.node.values[value_id].poll_delay
""" """ value_id = '%s_%s'%(prefix,'poll') self.node.values[value_id].poll_delay = int(value) self._bus.nodeman.add_poll(self.node.values[value_id]) self._bus.nodeman.options.set_option("%s"%node_uuid, value_id, '%s'%self.node.values[value_id].poll_delay) except ValueError: pass
"""Needed to publish static files """
"""Return the name of the package. Needed to publish static files
**MUST** be copy paste in every extension that publish statics files """ return __package__ |