from abc import ABCMeta
from logging import Logger
from typing import Dict, List, Union

from nperipherals_core.model.device import Device


class FileDevice(Device):
    __metaclass__ = ABCMeta

    def __init__(
            self,
            logger,                 # type: Logger
            device_configurations   # type: Dict[unicode, unicode]
    ):
        # type: (...) -> None

        self.logger = logger
        self.names = device_configurations["Name"]

    def get_name(
            self
    ):
        # type: (...) -> unicode

        if isinstance(self.names, list):
            return ','.join(self.names)

        return self.names

    def initialize(
            self
    ):
        # type: (...) -> None

        pass

    def connect(
            self
    ):
        # type: (...) -> None

        pass

    def disconnect(
            self
    ):
        # type: (...) -> None

        pass
