Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
deca1f05
Commit
deca1f05
authored
Aug 31, 2020
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dmt/asn2aadlPlus.py
View file @
deca1f05
...
...
@@ -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
(
asn
Files
)
asnParser
.
ParseAsnFileList
(
input
Files
)
autosrc
=
tempfile
.
mkdtemp
(
".asn1c"
)
inform
(
"Created temporary directory (%s) for auto-generated files..."
,
autosrc
)
absPathOfAADLfile
=
os
.
path
.
abspath
(
aadlFile
)
...
...
dmt/commonPy/asnParser.py
View file @
deca1f05
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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