Commit 73d8acbf authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Merge branch 'CoRA' of https://gitrepos.estec.esa.int/taste/dmt into CoRA

parents 29448e32 b873aa82
......@@ -46,9 +46,11 @@ def OnStartup(unused_modelingLanguage: str, asnFiles: List[str], outputDir: str,
asn1SccPath = spawn.find_executable('asn1.exe')
if not asn1SccPath:
panic("ASN1SCC seems to be missing from your system (asn1.exe not found in PATH).\n") # pragma: no cover
# allow externally-defined flags when calling the asn1 compiler (e.g. to set word size based on target)
extraFlags = os.getenv ("ASN1SCC_FLAGS") or ""
os.system(
("mono " if sys.platform.startswith('linux') else "") +
"\"{}\" -typePrefix asn1Scc -Ada -uPER -o \"".format(asn1SccPath) +
"\"{}\" -typePrefix asn1Scc -Ada {} -uPER -o \"".format(asn1SccPath, extraFlags) +
outputDir + "\" \"" + "\" \"".join(asnFiles) + "\"")
os.system("rm -f \"" + outputDir + "\"/*.adb")
......
......@@ -204,11 +204,13 @@ the scope of individual parameters (e.g. it needs access to all ASN.1
types). This used to cover Dumpable C/Ada Types and OG headers.'''
outputDir = commonPy.configMT.outputDir
asn1SccPath = spawn.find_executable('asn1.exe')
# allow externally-defined flags when calling the asn1 compiler (e.g. to set word size based on target)
extraFlags = os.getenv ("ASN1SCC_FLAGS") or ""
if asnFile is not None:
if not asn1SccPath:
panic("ASN1SCC seems not installed on your system (asn1.exe not found in PATH).\n") # pragma: no cover
os.system('mono "{}" -typePrefix asn1Scc -Ada -equal -o "{}" "{}"'
.format(asn1SccPath, outputDir, '" "'.join([asnFile])))
os.system('mono "{}" -typePrefix asn1Scc {} -Ada -equal -o "{}" "{}"'
.format(asn1SccPath, extraFlags, outputDir, '" "'.join([asnFile])))
def getSyncBackend(modelingLanguage: str) -> Sync_B_Mapper:
......
......@@ -242,6 +242,8 @@ def main():
C_HeaderFile.write('void Print%s(const char *paramName, const asn1Scc%s *pData);\n' % (cleanNodeTypename, cleanNodeTypename))
C_SourceFile.write('void Print%s(const char *paramName, const asn1Scc%s *pData)\n{\n' % (cleanNodeTypename, cleanNodeTypename))
C_SourceFile.write(' (void)paramName;\n')
C_SourceFile.write(' (void)pData;\n')
C_SourceFile.write('#ifdef __linux__\n')
C_SourceFile.write(' pthread_mutex_lock(&g_printing_mutex);\n')
C_SourceFile.write('#endif\n')
......
......@@ -261,6 +261,8 @@ def main():
C_HeaderFile.write('void PrintASN1%s(const char *paramName, const asn1Scc%s *pData);\n' % (cleanNodeTypename, cleanNodeTypename))
C_SourceFile.write('void PrintASN1%s(const char *paramName, const asn1Scc%s *pData)\n{\n' % (cleanNodeTypename, cleanNodeTypename))
C_SourceFile.write(' (void)paramName;\n')
C_SourceFile.write(' (void)pData;\n')
C_SourceFile.write('#ifdef __linux__\n')
C_SourceFile.write(' pthread_mutex_lock(&g_printing_mutex);\n')
C_SourceFile.write('#endif\n')
......
......@@ -11,7 +11,7 @@ from setuptools import setup, find_packages
setup(
name='dmt',
version="2.1.18",
version="2.1.19",
packages=find_packages(),
author='Thanassis Tsiodras',
author_email='Thanassis.Tsiodras@esa.int',
......
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