Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asn1-value-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
asn1-value-editor
Commits
73996439
Commit
73996439
authored
Sep 12, 2018
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the skeleton for the MSC-generated Python scripts.
parent
35382cc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
MSCtoPython.stg
MSCtoPython.stg
+4
-3
No files found.
MSCtoPython.stg
View file @
73996439
...
...
@@ -101,7 +101,7 @@ def runScenario(pipe_in=None, pipe_out=None, udpController=None):
# Queue for getting scenario status
log = Queue.Queue()
if udpController:
<inst.CleanName> = Exercise_<inst.CleanName>(log, name='
Scenario
')
<inst.CleanName> = Exercise_<inst.CleanName>(log, name='
Exercise_<inst.CleanName>
')
udpController.slots.append(<inst.CleanName>.msq_q)
<inst.CleanName>.wait()
udpController.slots.remove(<inst.CleanName>.msg_q)
...
...
@@ -109,12 +109,13 @@ def runScenario(pipe_in=None, pipe_out=None, udpController=None):
else:
# Use old-style message queue
poller = PollerThread()
<inst.CleanName> = Exercise_<inst.CleanName>(log, name='
Scenario
')
<inst.CleanName> = Exercise_<inst.CleanName>(log, name='
Exercise_<inst.CleanName>
')
poller.slots.append(<inst.CleanName>.msg_q)
poller.start()
<inst.CleanName>.start()
# Wait and log messages from both scenarii
while True:
time.sleep(0.001)
try:
scenario, severity, msg = log.get(block=False)
except Queue.Empty:
...
...
@@ -165,7 +166,7 @@ poller.slots.append(<inst.CleanName>.msg_q)}>}>}>
PrintMscInstance(inst) ::= <<
@Scenario
def Exercise_<inst.CleanName>(queue):
def Exercise_<inst.CleanName>(queue):
# queue is actually an instance of the Scenario class
'''<inst.CleanName> processing'''
<inst.events:{evt|<PrintEvent(evt)>}; separator="\n">
return 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment