-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.py
31 lines (25 loc) · 883 Bytes
/
start.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
import sys
from app.loader import EnergyReader
# MAIN: Setup of the project
if __name__ == "__main__":
if(len(sys.argv)>1):
CONFIG_PATH = sys.argv[1]
else:
CONFIG_PATH = './config'
EnergyReader(CONFIG_PATH)
# schema = {
# "type" : "object",
# "properties": {
# "tag": { "type": "string" },
# "address": { "type": "number" },
# "port": { "type": "string" },
# "mode": { "type": "string" },
# "baudrate": { "type": "number" },
# "timeout": { "type": "number" },
# "sleep-response": { "type": "number" },
# "commands": { "type": "object" }
# }
# }
# parser = ArgumentParser()
# parser.add_argument('--op', action=ActionJsonSchema(schema=schema))
# parser.parse_args(['--op', 'config/meters/config_SDM120.json'])