# Path: braubuddy/thermometer/base.py
# class DeviceError(Exception):
#     """
#     Raised if there is a problem communicating with a thermometer device.
#     """
#     pass
# 
# Path: braubuddy/thermometer/base.py
# class ReadError(Exception):
#     """
#     Raised if there is a problem reading temperature.
#     """
#     pass
# 
# Path: braubuddy/thermometer/base.py
# class IThermometer(object):
#     """
#     Interface for creating a thermometer for use with :mod:`braudbuddy`.
#     """
#     __metaclass__ = abc.ABCMeta
# 
#     def __init__(self):
#         pass
# 
#     @abc.abstractmethod
#     def get_temperature(self, units='celsius'):
#         """
#         Get thermometer temperature in celsius or farenheit.
# 
#         :param units: Temperature units, 'celsius' (default) or 'farenheit.'
#         :type units: :class:`str`
#         :returns: Thermometer temperature reading
#         :rtype: :class:`float`
#         :raises: :class:`braubuddy.thermometer.ReadError` if temperature can
#             not be read.
#         """
#         pass


import ds18b20
from braubuddy.thermometer import DeviceError
from braubuddy.thermometer import ReadError
from braubuddy.thermometer import IThermometer

UNIT_MAP = {
    'celsius':      1,
    'fahrenheit':   2
}



# Path: braubuddy/thermometer/base.py
# class DeviceError(Exception):
#     """
#     Raised if there is a problem communicating with a thermometer device.
#     """
#     pass
# 
# Path: braubuddy/thermometer/base.py
# class ReadError(Exception):
#     """
#     Raised if there is a problem reading temperature.
#     """
#     pass
# 
# Path: braubuddy/thermometer/base.py
# class IThermometer(object):
#     """
#     Interface for creating a thermometer for use with :mod:`braudbuddy`.
#     """
#     __metaclass__ = abc.ABCMeta
# 
#     def __init__(self):
#         pass
# 
#     @abc.abstractmethod
#     def get_temperature(self, units='celsius'):
#         """
#         Get thermometer temperature in celsius or farenheit.
# 
#         :param units: Temperature units, 'celsius' (default) or 'farenheit.'
#         :type units: :class:`str`
#         :returns: Thermometer temperature reading
#         :rtype: :class:`float`
#         :raises: :class:`braubuddy.thermometer.ReadError` if temperature can
#             not be read.
#         """
#         pass


# Path: braubuddy/thermometer/ds18b20_gpio.py
import ds18b20
from braubuddy.thermometer import DeviceError
from braubuddy.thermometer import ReadError
from braubuddy.thermometer import IThermometer


UNIT_MAP = {
    'celsius':      1,
    'fahrenheit':   2
}



class DS18B20Thermometer(IThermometer):