Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
ec14f3d0
Commit
ec14f3d0
authored
Jan 30, 2019
by
nilsfreyer
Browse files
added Datapath parser
parent
c1a5dd3d
Pipeline
#101418
failed with stages
in 1 minute and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java
View file @
ec14f3d0
...
...
@@ -252,6 +252,35 @@ public class EMADLGenerator {
}
}
private
String
getDataPath
(
String
modelName
){
BufferedReader
reader
;
try
{
reader
=
new
BufferedReader
(
new
FileReader
(
getModelsPath
()
+
"config.txt"
));
String
line
=
reader
.
readLine
();
List
<
String
>
lineList
;
while
(
line
!=
null
){
lineList
=
Splitter
.
on
(
' '
).
splitToList
(
line
);
if
((
lineList
.
get
(
0
)).
equals
(
modelName
)){
List
<
String
>
subList
=
lineList
.
subList
(
1
,
lineList
.
size
());
String
path
=
String
.
join
(
" "
,
subList
);
reader
.
close
();
return
path
;
}
line
=
reader
.
readLine
();
}
reader
.
close
();
}
catch
(
IOException
e
){
e
.
printStackTrace
();
}
return
"Path not found"
;
}
private
static
String
convertByteArrayToHexString
(
byte
[]
arrayBytes
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
...
...
@@ -354,6 +383,8 @@ public class EMADLGenerator {
EMADLCocos
.
checkAll
(
componentInstanceSymbol
);
if
(
architecture
.
isPresent
()){
String
dPath
=
getDataPath
(
componentSymbol
.
getFullName
());
System
.
out
.
println
(
"flag: "
+
dPath
);
generateCNN
(
fileContents
,
taggingResolver
,
componentInstanceSymbol
,
architecture
.
get
());
}
else
if
(
mathStatements
.
isPresent
()){
...
...
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