-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
executable file
·70 lines (54 loc) · 1.55 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/python3
class DIR:
import os.path as path
# Directory path variables
BASE = path.dirname(path.realpath(__file__))
FRAMEWORK = BASE + "/Framework"
LOGS = BASE + "/Logs"
MODS = BASE + "/Modules"
RGB = MODS + "/RGB"
TEST = BASE + "/UnitTests"
TEST_FRAMEWORK = TEST + "/Framework"
class LOG:
@staticmethod
def getFrameworkLogLocation():
return DIR.LOGS + "/framework.log"
@staticmethod
def getTestLogLocation():
return DIR.LOGS + "/test.log"
@staticmethod
def getLogLevel():
import logging
return logging.DEBUG
# To print to screen AS WELL AS logs
@staticmethod
def printToScreen():
return True
# Delete this //maybe dont delete this? -sideway 1/2/17
class PI:
# IP Addresses
ADDR = "10.0.0.98"
# Delete this //maybe dont delete this? -sideway 1/2/17
class SERVER:
ADDR = "10.0.0.99"
PORT = ""
class NAMES:
FRAMEWORK = "FRAMEWORK"
TEST = "TEST"
# Delete this //maybe dont delete this? -sideway 1/2/17
class GLOBAL:
class NETWORK:
PIPORT = 15555
class MODULES:
@classmethod
def getClass(cls, inputID):
if inputID == MODULES.NETWORK_CONTROLLER.ID:
return MODULES.NETWORK_CONTROLLER.NAME
if inputID == MODULES.RGB.ID:
return MODULES.RGB.NAME
class NETWORK_CONTROLLER:
ID = 0
NAME = "network_controller"
class RGB:
ID = 1
NAME = "RGB"