<
From version < 10.1 >
edited by aas2
on 2017/10/25 13:43
To version < 8.1 >
edited by aas2
on 2017/10/23 16:34
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -171,7 +171,7 @@
171 171  String, the shell command that is used to start the process
172 172  )))|(% colspan="1" %)(% colspan="1" %)
173 173  (((
174 -python -i "${executable_path}"
174 +python "${executable_path}"
175 175  )))|(% colspan="1" %)(% colspan="1" %)
176 176  (((
177 177  The shell command to start the executable
... ... @@ -592,7 +592,6 @@
592 592  
593 593  There are also additional fields for variables than their value. However these only need to be communicated once after the initialization of the model and are explained in the table below.
594 594  
595 -(% class="wrapped" %)
596 596  |=(((
597 597  Field Name
598 598  )))|=(((
... ... @@ -639,7 +639,6 @@
639 639  Bitmask, that determines how the variable is used in the source model's interface (e.g. input, output, internal, other).
640 640  A bitmask has been choosen because a mixture of a variables interface types is possible (e.g. input, output, input output)
641 641  
642 -(% class="wrapped" %)
643 643  |=(((
644 644  Interface Type
645 645  )))|=(((
... ... @@ -695,36 +695,10 @@
695 695  6
696 696  )))
697 697  
698 -Note that internal is intended for variables that are neither input nor output but still part of the source model, in contrast to variables that are created in the compilation (e.g. register flags).
696 +Not that internal is intended for variables that are neither input nor output but still part of the source model, in contrast to variables that are created in the compilation (e.g. register flags).
699 699  Anyway an input and output is also a internal variable normally.
700 700  )))
701 701  
702 702  === Python Example ===
703 703  
704 -The following shows a tiny python script, that will write a Data Pool containing an output variable x to stdout.
705 -
706 -{{code title="prog.py"}}
707 -import sys
708 -
709 -x = 0
710 -while True:
711 - json = """{"x":{"value":""" + str(x) + ""","interface":2}}"""
712 - print(json) # Send output to simulation
713 - raw_input("") # Wait for input from simulation
714 - x = x + 1
715 -
716 -
717 -{{/code}}
718 -
719 -This script can be executed from within KIELER to start a simulation because it uses the JSON communication on stdin and stdout. Note however that the input coming from the simulation is not handled in the script. An example kisim configuration to start such a scipt is given below.
720 -
721 -{{code}}
722 -configure sim A {
723 - executable: prog.py
724 - command: "python -i ${executable_path}"
725 -}
726 -
727 -execution {
728 - write sim A
729 -}
730 -{{/code}}
702 +\\
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -33260106
1 +33260063
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/33260106/V2 Simulation
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/33260063/V2 Simulation