# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# -----------------------------------------------------------------------------
"""Driver for the ADQ14 digitizer card.

"""
import os
import time
import atexit
import ctypes
import numpy as np

from pyclibrary import CLibrary

from ..dll_tools import DllInstrument


class ADQControlUnit(object):
    """Control unit for the ADQ devices.

    """

    _instance = None

    def __new__(cls, library):
        if cls._instance is not None:
            return cls._instance

        self = super(ADQControlUnit, cls).__new__(cls)
        self.library = library
        self.id = library.CreateADQControlUnit()()