run_meteo.py 425 Bytes


import json, os
from simulators.plc.meteo_worker import WorkerState, WorkerThread

print(os.path.abspath("."))
# Load PLC status in colibri-new-fixed-2.json
colibri_json = open("colibri-new-fixed-2.json")
colibri_struct = json.load(colibri_json)
plc_status = colibri_struct["statuses"][1]["entities"][0]


my_state = WorkerState()
my_worker = WorkerThread(my_state, plc_status)

my_worker.start()
my_state.status = 'init'