Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hochautomatisiertes-Fahren
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philipp Badenhoop
Hochautomatisiertes-Fahren
Commits
590fbdbd
There was an error fetching the commit references. Please try again later.
Commit
590fbdbd
authored
6 years ago
by
Hoop77
Browse files
Options
Downloads
Patches
Plain Diff
-
parent
b2417f04
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/catkin_ws/src/car/include/mainNode/MainNode.h
+2
-0
2 additions, 0 deletions
modules/catkin_ws/src/car/include/mainNode/MainNode.h
modules/catkin_ws/src/car/src/mainNode/MainNode.cpp
+12
-2
12 additions, 2 deletions
modules/catkin_ws/src/car/src/mainNode/MainNode.cpp
with
14 additions
and
2 deletions
modules/catkin_ws/src/car/include/mainNode/MainNode.h
+
2
−
0
View file @
590fbdbd
...
...
@@ -49,6 +49,8 @@ private:
std
::
function
<
void
()
>
cruiseControllerNotify
=
[
this
]
{
cruiseControllerThread
.
notify
();
};
platoonProtocol
::
VehicleId
readVehicleId
();
platoonProtocol
::
Vehicle
::
VehicleEndpoints
readVehicleEndpoints
();
};
}
#endif
This diff is collapsed.
Click to expand it.
modules/catkin_ws/src/car/src/mainNode/MainNode.cpp
+
12
−
2
View file @
590fbdbd
...
...
@@ -18,7 +18,8 @@ namespace car
// TODO: ConfigReader!
platoonProtocol
::
VehicleId
readVehicleId
()
{
platoonProtocol
::
VehicleId
MainNode
::
readVehicleId
()
{
// open config file
std
::
string
userHome
=
getenv
(
"HOME"
);
std
::
ifstream
configFile
;
...
...
@@ -55,10 +56,12 @@ platoonProtocol::VehicleId readVehicleId() {
configFile
.
close
();
messageOStream
.
write
(
"vehicleId"
,
vehicleId
);
return
vehicleId
;
}
platoonProtocol
::
Vehicle
::
VehicleEndpoints
readVehicleEndpoints
()
{
platoonProtocol
::
Vehicle
::
VehicleEndpoints
MainNode
::
readVehicleEndpoints
()
{
// open config file
std
::
string
userHome
=
getenv
(
"HOME"
);
std
::
ifstream
configFile
;
...
...
@@ -91,6 +94,13 @@ platoonProtocol::Vehicle::VehicleEndpoints readVehicleEndpoints() {
configFile
.
close
();
for
(
const
auto
&
endpoint
:
endpoints
)
{
messageOStream
<<
MessageOStream
::
key
<<
"VehicleEndpoint"
<<
MessageOStream
::
value
<<
endpoint
.
getVehicleId
()
<<
" "
<<
endpoint
.
getHost
()
<<
MessageOStream
::
flush
;
}
return
endpoints
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment