-
Notifications
You must be signed in to change notification settings - Fork 0
/
OGT_PeripherialManagement.py
81 lines (63 loc) · 2.02 KB
/
OGT_PeripherialManagement.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
71
72
73
74
75
76
77
78
79
80
81
from pandas import DataFrame as pDF
import OGT_FileIO as FIO
""" Peripherial Management
A) UsedPeripherials
** The setup and configuration of the devices used in the project
B) PeripherialInput
** Getting the input data
C) PeripherialOutput
** Setting the state of the peripherial
D) PeripherialStatus
** Get informaiton to decipher what the peripherial is doing
E) PeripherialLogging
** Logging Issues that would need to be addressed
"""
class Peripherial:
PName:str
PType:str
PPin:int
PFunction:str
PFilePath:str
PData:pDF
PToggle:bool
PStatus:str
PScheduleInfo:str
def __init__(self, Periphrial_name, userModSoil="Normal" ):
self.PName = Periphrial_name
self.PType = userModSoil + " Soil"
@staticmethod
def Test_Data():
return{
"PName":"GDP_Mother_1",
"PType":"Sensor",
"PPin":4,
"PFunction":"Humidity",
"PFilePath":FIO.homePath,
"PData":FIO.homePath,
"PToggle":False,
"PStatus":"Active",
"PScheduleInfo":"Standard",
}
@staticmethod
def Peripherial_As_Header():
return[
"PName",
"PType",
"PPin",
"PFunction",
"PFilePath",
"PData",
"PToggle",
"PStatus",
"PScheduleInfo",
]
class PeripherialConstraints(Peripherial):
Pminimum:int
Pmaximum:int
def __init__(self, Periphrial_name, userModSoil="Normal"):
super().__init__(Periphrial_name, userModSoil)
if __name__ == "__main__":
piph=Peripherial("Grand Daddy Purple")
piph.PType="Weed"
piph.PPin=4
piph.PToggle =True