Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
raspberry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
af3
raspberry
Commits
3cd5ff88
Commit
3cd5ff88
authored
8 years ago
by
Thomas Böhm
Browse files
Options
Downloads
Patches
Plain Diff
Protobuf-c compilers creates code only with lower case variable names.
parent
76530b03
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CoreExecutable.java
+9
-8
9 additions, 8 deletions
...atform/raspberry/generator/executable/CoreExecutable.java
with
9 additions
and
8 deletions
org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/generator/executable/CoreExecutable.java
+
9
−
8
View file @
3cd5ff88
...
...
@@ -458,10 +458,10 @@ public class CoreExecutable extends ExecutionUnitExecutableBase<Core, CSourcePac
/** Create read code for the given {@link BusMasterPortExecutable} and analyze message fields. */
private
void
readMessageFromBus
(
IReadExecutable
exec
,
InputPort
p
,
List
<
IStatementTerm
>
body
)
{
Port
sourcePort
=
p
.
getIncomingChannels
().
get
(
0
).
getSource
();
String
noValGuard
=
" if (msg.has_"
+
sourcePort
.
getName
()
+
"==
0
) {\n"
;
String
thenBlock
=
"noval_"
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"= true;\n}\n"
;
String
elseBlock
=
"else { \n noval_"
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"= false;\n"
;
String
valueAssignRHS
=
" msg."
+
sourcePort
.
getName
();
String
noValGuard
=
" if (msg.has_"
+
sourcePort
.
getName
()
.
toLowerCase
()
+
"
==
false
) {\n"
;
String
thenBlock
=
"noval_"
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"
= true;\n}\n"
;
String
elseBlock
=
"else { \n noval_"
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"
= false;\n"
;
String
valueAssignRHS
=
" msg."
+
sourcePort
.
getName
()
.
toLowerCase
()
;
String
valueAssign
=
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"="
+
valueAssignRHS
+
"; \n} \n"
;
String
content
=
noValGuard
+
thenBlock
+
elseBlock
+
valueAssign
;
if
(
exec
instanceof
IReadExecutableWithNoValSupport
)
{
...
...
@@ -477,11 +477,12 @@ public class CoreExecutable extends ExecutionUnitExecutableBase<Core, CSourcePac
/** Create write code for the given {@link BusMasterPortExecutable}, update message fields. */
private
void
writeMessageToBus
(
IWriteExecutable
exec
,
OutputPort
p
,
List
<
IStatementTerm
>
body
)
{
String
noValGuard
=
" if (noval_"
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"==true) {\n"
;
String
thenBlock
=
"msg.has_"
+
p
.
getName
()
+
"= 0;\n}\n"
;
String
elseBlock
=
"else { \n msg.has_"
+
p
.
getName
()
+
"=
1
;\n"
;
String
noValGuard
=
" if (noval_"
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"
==
true) {\n"
;
String
thenBlock
=
"msg.has_"
+
p
.
getName
()
.
toLowerCase
()
+
"= 0;\n}\n"
;
String
elseBlock
=
"else { \n msg.has_"
+
p
.
getName
()
.
toLowerCase
()
+
"
=
true
;\n"
;
String
valueAssign
=
" msg."
+
p
.
getName
()
+
" = "
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"; \n} \n"
;
" msg."
+
p
.
getName
().
toLowerCase
()
+
" = "
+
p
.
getName
()
+
"_ID_"
+
p
.
getId
()
+
"; \n} \n"
;
String
content
=
noValGuard
+
thenBlock
+
elseBlock
+
valueAssign
;
if
(
exec
instanceof
IWriteExecutableWithNoValSupport
)
{
Assignment
sampleProto
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment