# 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
"""Packet classes for Eddystone beacons."""

class EddystoneUIDFrame(object):
    """Eddystone UID frame."""

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

# 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

"""Packet classes for Eddystone beacons."""

class EddystoneUIDFrame(object):
    """Eddystone UID frame."""

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

        self._instance = data_to_hexstring(data['instance'])