Commit 333a0407 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Get external procedure language

parent 332eec20
......@@ -720,6 +720,23 @@ class sdlHandler(QObject):
for each in self.proc.procedures:
if not each.external:
continue
if each.comment:
cmt = each.comment.inputString.lower()
else:
print(u"Unspecified language for procedure {} - default is C"
.format(each.inputString))
cmt = '#c'
# external procedure code has to be provided. Supported options
# are VDM (Overture tool), and C/Ada (in .so)
if "#vdm" in cmt:
print(u'Procedure {} in VDM... Connecting to Overture'
.format(each.inputString))
elif "#c" in cmt:
print(u'Procedure {} in C... Loading DLL'
.format(each.inputString))
elif "#ada" in cmt:
print(u'Procedure {} in Ada... Loading DLL'
.format(each.inputString))
# Variable number of parameters of type (void *, size)
params = (ctypes.c_char_p,) + \
(ctypes.c_void_p, ctypes.c_long) * len(each.fpar)
......
Markdown is supported
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