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
T
taste-MSC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
taste-MSC
Commits
506a7f86
Commit
506a7f86
authored
Sep 13, 2018
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation in generated Python test code
parent
3dfe225c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
MSC-Antlr3/MSCtoPython.stg
MSC-Antlr3/MSCtoPython.stg
+25
-4
No files found.
MSC-Antlr3/MSCtoPython.stg
View file @
506a7f86
...
...
@@ -54,14 +54,16 @@ main(files) ::= <<
import os
import sys
import time
import signal
import Queue
taste_inst = os.popen('taste-config --prefix').readlines()[0].strip()
sys.path.append(taste_inst+'/share/asn1-editor')
# The following two lines are not needed as the tool is now installed with pip
#taste_inst = os.popen('taste-config --prefix').readlines()[0].strip()
#sys.path.append(taste_inst+'/share/asn1-editor')
from asn1_value_editor.Scenario import Scenario, PollerThread
from PySide.QtCore import QCoreApplication, Qt
from asn1_value_editor.Scenario
import Scenario, PollerThread
from PySide.QtCore
import QCoreApplication, Qt
from asn1_value_editor.udpcontroller import tasteUDP
<files:{file|<PrintFile(file)>}; separator="\n">
...
...
@@ -165,6 +167,25 @@ poller.slots.append(<inst.CleanName>.msg_q)}>}>}>
>>
PrintMscInstance(inst) ::= <<
# You may edit the scenario below or create new ones (use the @Scenario decorator)
# When you add new scenarios, they will all run in parallel.
#
# You can use these three API functions to communicate with the main binary:
# (1) queue.sendMsg('Name of your Provided Interface', 'Parameter value in ASN.1 format')
# The parameters are expressed textually in ASN.1 Value Notation
# (also called GSER). For example a record's syntax is:
# { fieldName1 value1, fieldName2 value2 }
# (2) queue.expectMsg ('Name of RI',
# 'Parameter value in Extended ASN.1 format',
# lineNo=optional line reference,
# ignoreOther=True/False)
# Extended ASN.1 format lets you replace a field value with a star (*)
# meaning that you do not want the tool to check it against any specific value
# ignoreOther: set to True if you want the tool to ignore other messages
# and want to trigger an error only when you get this message with the wrong parameters
# (3) (msgId, val) = queue.getNextMsg(timeout=10)
# if msgId == 'Name of an interface':
# print 'The value is', val.fieldName.Get()
@Scenario
def Exercise_<inst.CleanName>(queue): # queue is actually an instance of the Scenario class
'''<inst.CleanName> processing'''
...
...
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