Commit 7fb9298d authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix random TCs

parent 74362e90
...@@ -677,7 +677,7 @@ class asn1Editor(QTreeView): ...@@ -677,7 +677,7 @@ class asn1Editor(QTreeView):
self.backend.sendTC(self.asn1Instance) self.backend.sendTC(self.asn1Instance)
def loadTC(self): def loadTC(self):
''' Load/Decode a TC and populate the values in the model ''' ''' Load/Decode a TC and populate the values in the model XXX fix this with ctypes'''
filename = QFileDialog.getOpenFileName(self, "Open TC", ".", "ASN.1 Variable (*.tc)")[0] filename = QFileDialog.getOpenFileName(self, "Open TC", ".", "ASN.1 Variable (*.tc)")[0]
if len(filename) == 0: if len(filename) == 0:
return return
...@@ -703,12 +703,18 @@ class sdlHandler(QObject): ...@@ -703,12 +703,18 @@ class sdlHandler(QObject):
# tc with a param, use the Send button # tc with a param, use the Send button
for vals in self.param_tc_editors: for vals in self.param_tc_editors:
if vals['name'] == name: if vals['name'] == name:
argpy = vn.fromValueNotationToPySide(name, arg) asn1Instance = vals['editor'].asn1Instance
vals['editor'].updateVariable(argpy) ASN1_AST=self.proc.dataview
# Can't call click from this here, must send a signal sort=ASN1_AST[vals['editor'].item['nodeTypename']].type
# Send a signal to click on the button
self.clicker.connect(vals['send_btn'].click) self.clicker.connect(vals['send_btn'].click)
self.clicker.emit() self.clicker.emit()
def random_step(self): def random_step(self):
''' One step of random simulation ''' ''' One step of random simulation '''
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment