Просмотр исходного кода

Updated documentation about HTTP interface

Yentl Van Tendeloo 7 лет назад
Родитель
Сommit
5bfb0db854
2 измененных файлов с 9 добавлено и 8 удалено
  1. 8 7
      doc/http.rst
  2. 1 1
      wrappers/modelverse_SCCD.py

+ 8 - 7
doc/http.rst

@@ -67,16 +67,17 @@ Startup
 -------
 
 When starting up the Modelverse, only a simple task manager is running.
-To startup a new task, the task manager should be informed of the new name of the task, by sending it input.
-This is done using the following request::
+A new task can be created by querying this task manager for a new taskname.
+This is done by fetching the output of the task manager as follows::
 
-    op=set_input&value="name_of_new_task"&taskname=task_manager
+    op=get_output&taskname=task_manager
 
-There is no reply from the task manager, and it is assumed that the task can now be used for communication.
-From this point on, communication with the created task can commence, following the operations specified next.
+The reply to this query contains the taskname that can be used in subsequent requests.
 
-.. warning::
-   This behaviour is likely to change in the near future, where the task manager will output the name of a new task, thereby preventing conflicting tasknames.
+For legacy purposes, it is also possible to send a new taskname to the task manager directly, which will subsequently be generated.
+This approach is deprecated, as it is easy to run into problems when two users request the same taskname.
+These problems are avoided when using the new approach.
+Additionally, the new approach allows the task manager to cache new tasks, such that they are available much sooner.
 
 Operations
 ----------

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Wed Jun  6 14:51:29 2018
+Date:   Wed Jun  6 14:55:24 2018
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server