Commit deca1f05 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Ticket #873: Not all types have ACN encoding (e.g. generics/ACN combinations)

parent 9cf44ed3
Pipeline #2264 failed with stage
in 1 minute and 24 seconds
......@@ -121,7 +121,7 @@ def calculateForNativeAndASN1SCC(absASN1SCCpath, autosrc, names, inputFiles):
cleaned = cleanNameAsAsn1cWants(asnTypename)
msgEncoderFile.write('static asn1Scc%s sizeof_%s;\n' % (cleaned, cleaned))
msgEncoderFile.write('char bytesEncoding_%s[asn1Scc%s_REQUIRED_BYTES_FOR_ENCODING];\n' % (cleaned, cleaned))
if acn != "":
if acn != "" and node.hasAcnEncDec:
msgEncoderFile.write('char bytesAcnEncoding_%s[asn1Scc%s_REQUIRED_BYTES_FOR_ACN_ENCODING];\n' % (cleaned, cleaned))
msgEncoderFile.close()
......@@ -333,7 +333,7 @@ def main():
# Parse the ASN.1 files (skip the ACN ones)
asnFiles = [x for x in inputFiles if not x.lower().endswith('.acn')]
asnParser.ParseAsnFileList(asnFiles)
asnParser.ParseAsnFileList(inputFiles)
autosrc = tempfile.mkdtemp(".asn1c")
inform("Created temporary directory (%s) for auto-generated files...", autosrc)
absPathOfAADLfile = os.path.abspath(aadlFile)
......
......@@ -812,6 +812,8 @@ def VisitTypeAssignment(newModule: Module, xmlTypeAssignment: Element) -> Tuple[
newNode._isArtificial = isArtificial == "True"
name = GetAttr(xmlTypeAssignment, "Name")
g_adaUses.setdefault(newModule._id, set()).add(name)
hasAcnEncDec = GetAttr(xmlType, "HasAcnEncDecFunction") or "False"
newNode.hasAcnEncDec = hasAcnEncDec != "False"
return (name, newNode)
......
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