functionalities
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -184,6 +184,21 @@ def release(obj):
|
||||
PROCESS_BASE.cmd_q().put({'cmd': "release", "args": obj})
|
||||
return "OK"
|
||||
|
||||
@app.route('/pause/<obj>')
|
||||
def pause_simulation(obj):
|
||||
if not PROCESS_BASE.known():
|
||||
return "Unknown", 401
|
||||
|
||||
PROCESS_BASE.cmd_q.put({'cmd': "pause", "arg": obj})
|
||||
return "Simulation paused"
|
||||
|
||||
@app.route('/resume/<obj>')
|
||||
def resume_simulation(obj):
|
||||
if not PROCESS_BASE.known():
|
||||
return "Unknown", 401
|
||||
|
||||
PROCESS_BASE.cmd_q.put({'cmd': "resume", "arg": obj})
|
||||
return "Simulation resumed"
|
||||
|
||||
def just_run():
|
||||
"""
|
||||
|
||||
@@ -3,7 +3,11 @@ import json
|
||||
|
||||
class State(object):
|
||||
IGNORE = frozenset(['Coude', 'Noeud', 'P24', 'P0', 'Pulse'])
|
||||
# these components do not have any states (value/ true or flase...)
|
||||
|
||||
Breakpoints = ['Relais']
|
||||
#possibility to add other breakpoints in the future ;)
|
||||
|
||||
def __init__(self, cocosim_server):
|
||||
self.cocosim_server = cocosim_server
|
||||
self.conf = self.cocosim_server.conf["ui"]
|
||||
@@ -38,4 +42,5 @@ class State(object):
|
||||
self._exception = e
|
||||
|
||||
def reset_exception(self):
|
||||
self._exception = None
|
||||
self._exception = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user