# Path: lib/devices.py
# def get_supported_metrics():
#   metrics = []
#   for device_name in get_supported_devices():
#     metrics.extend(get_metrics_names(device_name))
#   return metrics
# 
# def get_supported_devices():
#   return [device['device_name'] for device in DEVICE_METADATA]
# 
# RABBITMQ_ADDRESS = 'localhost'
# 
# MOCK_DEVICE_ID = "mock"
# 
# Path: lib/constants.py
# class colors:
#     ENDC = '\033[0m'
#     UNDERLINE = '\033[4m'
#     BLINK = '\033[5m'
# 
#     HEADER = '\033[95m'
#     OKBLUE = '\033[94m'
#     OKGREEN = '\033[92m'
#     FAIL = '\033[91m'
# 
#     BG_RASPBERRY = '\033[46m'
# 
#     DARK_RED = '\033[0;31m'
#     RED = '\033[91m'
#     ORANGE = '\033[1m'
#     YELLOW = '\033[93m'
#     GREEN = '\033[92m'
#     DARK_GREEN = '\033[0;32m'
#     CYAN = '\033[96m'
#     MAGENTA = '\033[0;35m'
#     RASPBERRY = '\033[0;36m'
#     DARK_PURPLE = '\033[0;34m'
# 
#     GOLD = '\033[0;33m'
#     SILVER = '\033[0;37m'
#     GRAY = '\033[90m'
# 
#     BOLD_RED = '\033[1;31m'
#     BOLD_ORANGE = '\033[1m'
#     BOLD_YELLOW = '\033[1;33m'
#     BOLD_GREEN = '\033[1;32m'
#     BOLD_CYAN = '\033[1;36m'
#     BOLD_BLUE  = '\033[1;34m'
#     BOLD_PURPLE = '\033[1;35m'
#     BOLD_GRAY  = '\033[1;30m'
# 
#     CYCLE = [YELLOW, GREEN, ORANGE,  RASPBERRY, DARK_RED, CYAN, RED, DARK_GREEN, MAGENTA, DARK_PURPLE]


from lib.devices import get_supported_metrics, get_supported_devices, RABBITMQ_ADDRESS, MOCK_DEVICE_ID
from lib.constants import colors
import argparse
import imp
import os
import yaml
import time
import threading
        self.device_id = device_id
        self.rabbitmq_address = rabbitmq_address
        self.conf_path = conf_path
        self.debug = False

        # local relative filepath, used to load config file and to dynamically load classes
        self.location = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__)) )

        # this will hold the config yaml info as an array
        self.conf = None

        # an intenral registry of all module threads running
        self.modules = {}

        # setup more vars
        self.setup()

    def setup(self):

        # get config from yaml file (default = ./conf.yml)
        # config file path is relative to root folder
        settings_file_path = os.path.realpath( os.path.join( os.getcwdu(), self.conf_path) )
        stream = file(settings_file_path, 'r')

        # set local conf property from the yaml config file
        self.conf = yaml.load(stream)


    def start(self):


# Path: lib/devices.py
# def get_supported_metrics():
#   metrics = []
#   for device_name in get_supported_devices():
#     metrics.extend(get_metrics_names(device_name))
#   return metrics
# 
# def get_supported_devices():
#   return [device['device_name'] for device in DEVICE_METADATA]
# 
# RABBITMQ_ADDRESS = 'localhost'
# 
# MOCK_DEVICE_ID = "mock"
# 
# Path: lib/constants.py
# class colors:
#     ENDC = '\033[0m'
#     UNDERLINE = '\033[4m'
#     BLINK = '\033[5m'
# 
#     HEADER = '\033[95m'
#     OKBLUE = '\033[94m'
#     OKGREEN = '\033[92m'
#     FAIL = '\033[91m'
# 
#     BG_RASPBERRY = '\033[46m'
# 
#     DARK_RED = '\033[0;31m'
#     RED = '\033[91m'
#     ORANGE = '\033[1m'
#     YELLOW = '\033[93m'
#     GREEN = '\033[92m'
#     DARK_GREEN = '\033[0;32m'
#     CYAN = '\033[96m'
#     MAGENTA = '\033[0;35m'
#     RASPBERRY = '\033[0;36m'
#     DARK_PURPLE = '\033[0;34m'
# 
#     GOLD = '\033[0;33m'
#     SILVER = '\033[0;37m'
#     GRAY = '\033[90m'
# 
#     BOLD_RED = '\033[1;31m'
#     BOLD_ORANGE = '\033[1m'
#     BOLD_YELLOW = '\033[1;33m'
#     BOLD_GREEN = '\033[1;32m'
#     BOLD_CYAN = '\033[1;36m'
#     BOLD_BLUE  = '\033[1;34m'
#     BOLD_PURPLE = '\033[1;35m'
#     BOLD_GRAY  = '\033[1;30m'
# 
#     CYCLE = [YELLOW, GREEN, ORANGE,  RASPBERRY, DARK_RED, CYAN, RED, DARK_GREEN, MAGENTA, DARK_PURPLE]


# Path: Analysis/AnalysisService.py
from lib.devices import get_supported_metrics, get_supported_devices, RABBITMQ_ADDRESS, MOCK_DEVICE_ID
from lib.constants import colors
import argparse
import imp
import os
import yaml
import time
import threading

        self.device_id = device_id
        self.rabbitmq_address = rabbitmq_address
        self.conf_path = conf_path
        self.debug = False

        # local relative filepath, used to load config file and to dynamically load classes
        self.location = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__)) )

        # this will hold the config yaml info as an array
        self.conf = None

        # an intenral registry of all module threads running
        self.modules = {}

        # setup more vars
        self.setup()

    def setup(self):

        # get config from yaml file (default = ./conf.yml)
        # config file path is relative to root folder
        settings_file_path = os.path.realpath( os.path.join( os.getcwdu(), self.conf_path) )
        stream = file(settings_file_path, 'r')

        # set local conf property from the yaml config file
        self.conf = yaml.load(stream)


    def start(self):


        print colors.SILVER + self.LOGNAME + "Collecting data ... Ctl-C to stop." + colors.ENDC