# Path: beacontools/const.py
# EDDYSTONE_URL_SCHEMES = {
#     0x00: "http://www.",
#     0x01: "https://www.",
#     0x02: "http://",
#     0x03: "https://",
# }
# 
# EDDYSTONE_TLD_ENCODINGS = {
#     0x00: ".com/",
#     0x01: ".org/",
#     0x02: ".edu/",
#     0x03: ".net/",
#     0x04: ".info/",
#     0x05: ".biz/",
#     0x06: ".gov/",
#     0x07: ".com",
#     0x08: ".org",
#     0x09: ".edu",
#     0x0a: ".net",
#     0x0b: ".info",
#     0x0c: ".biz",
#     0x0d: ".gov",
# }
# 
# Path: beacontools/utils.py
# def data_to_hexstring(data):
#     """Convert an array of binary data to the hex representation as a string."""
#     return hexlify(data_to_binstring(data)).decode('ascii')
# 
# def data_to_binstring(data):
#     """Convert an array of binary data to a binary string."""
#     return array.array('B', data).tobytes()


from binascii import hexlify
from ..const import EDDYSTONE_URL_SCHEMES, EDDYSTONE_TLD_ENCODINGS
from ..utils import data_to_hexstring, data_to_binstring
    @property
    def voltage(self):
        """Battery voltage measured in mV."""
        return self._voltage

    @property
    def temperature(self):
        """Temperature in degree Celsius."""
        return self._temperature

    @property
    def advertising_count(self):
        """Advertising PDU count."""
        return self._advertising_count

    @property
    def seconds_since_boot(self):
        """Time since power-on or reboot."""
        return self._seconds_since_boot

    def __str__(self):
        return "EddystoneTLMFrame<voltage: %d mV, temperature: %d Celsius, advertising count: %d,"\
               " seconds since boot: %d>" % (self.voltage, self.temperature, \
                self.advertising_count, self.seconds_since_boot)

class EddystoneEIDFrame(object):
    """Eddystone EID frame."""

    def __init__(self, data):
        self._tx_power = data['tx_power']

# Path: beacontools/const.py
# EDDYSTONE_URL_SCHEMES = {
#     0x00: "http://www.",
#     0x01: "https://www.",
#     0x02: "http://",
#     0x03: "https://",
# }
# 
# EDDYSTONE_TLD_ENCODINGS = {
#     0x00: ".com/",
#     0x01: ".org/",
#     0x02: ".edu/",
#     0x03: ".net/",
#     0x04: ".info/",
#     0x05: ".biz/",
#     0x06: ".gov/",
#     0x07: ".com",
#     0x08: ".org",
#     0x09: ".edu",
#     0x0a: ".net",
#     0x0b: ".info",
#     0x0c: ".biz",
#     0x0d: ".gov",
# }
# 
# Path: beacontools/utils.py
# def data_to_hexstring(data):
#     """Convert an array of binary data to the hex representation as a string."""
#     return hexlify(data_to_binstring(data)).decode('ascii')
# 
# def data_to_binstring(data):
#     """Convert an array of binary data to a binary string."""
#     return array.array('B', data).tobytes()


# Path: beacontools/packet_types/eddystone.py
from binascii import hexlify
from ..const import EDDYSTONE_URL_SCHEMES, EDDYSTONE_TLD_ENCODINGS
from ..utils import data_to_hexstring, data_to_binstring

    @property
    def voltage(self):
        """Battery voltage measured in mV."""
        return self._voltage

    @property
    def temperature(self):
        """Temperature in degree Celsius."""
        return self._temperature

    @property
    def advertising_count(self):
        """Advertising PDU count."""
        return self._advertising_count

    @property
    def seconds_since_boot(self):
        """Time since power-on or reboot."""
        return self._seconds_since_boot

    def __str__(self):
        return "EddystoneTLMFrame<voltage: %d mV, temperature: %d Celsius, advertising count: %d,"\
               " seconds since boot: %d>" % (self.voltage, self.temperature, \
                self.advertising_count, self.seconds_since_boot)

class EddystoneEIDFrame(object):
    """Eddystone EID frame."""

    def __init__(self, data):
        self._tx_power = data['tx_power']

        self._eid = data_to_binstring(data['eid'])