Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
fa528745
Commit
fa528745
authored
6 years ago
by
TSC21
Committed by
Nuno Marques
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
IDL generation: add constants fields for IDL's
parent
02c34763
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
msg/templates/urtps/msg.idl.template
+12
-0
12 additions, 0 deletions
msg/templates/urtps/msg.idl.template
msg/tools/generate_microRTPS_bridge.py
+2
-2
2 additions, 2 deletions
msg/tools/generate_microRTPS_bridge.py
with
14 additions
and
2 deletions
msg/templates/urtps/msg.idl.template
+
12
−
0
View file @
fa528745
...
...
@@ -83,6 +83,15 @@ def add_msg_fields():
key=sizeof_field_type, reverse=True)
for field in sorted_fields:
add_msg_field(field)
def add_msg_constants():
sorted_constants = sorted(spec.constants,
key=sizeof_field_type, reverse=True)
for constant in sorted_constants:
constant_value = '%d' % constant.val
print("const " + get_idl_type_name(constant.type) + " " + constant.name + " = " + constant_value + ";")
}@
#ifndef __@(spec.short_name)__idl__
#define __@(spec.short_name)__idl__
...
...
@@ -94,6 +103,9 @@ def add_msg_fields():
@(line)
@[end for]@
@# Constants
@add_msg_constants()
@[for type in builtin_types]@
typedef @(type + '_') @(type);
@[end for]@
...
...
This diff is collapsed.
Click to expand it.
msg/tools/generate_microRTPS_bridge.py
+
2
−
2
View file @
fa528745
...
...
@@ -221,11 +221,11 @@ else:
if
args
.
fastrtpsgen
is
None
or
args
.
fastrtpsgen
==
""
:
# Assume fastrtpsgen is in PATH
fastrtpsgen_path
=
"
fastrtpsgen
"
fastrtpsgen_path
=
'
fastrtpsgen
'
else
:
# Path to fastrtpsgen is explicitly specified
fastrtpsgen_path
=
os
.
path
.
join
(
get_absolute_path
(
args
.
fastrtpsgen
),
"
/
fastrtpsgen
"
)
get_absolute_path
(
args
.
fastrtpsgen
),
'
fastrtpsgen
'
)
fastrtpsgen_include
=
args
.
fastrtpsgen_include
if
fastrtpsgen_include
is
not
None
and
fastrtpsgen_include
!=
''
:
fastrtpsgen_include
=
"
-I
"
+
\
...
...
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