Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gm_telemetry_server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christopher Reis
gm_telemetry_server
Commits
dc197c58
Commit
dc197c58
authored
Apr 26, 2017
by
Christopher Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for use in Docker
parent
33d3594f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
dataset.hpp
dataset.hpp
+3
-3
gm_telemetry_server.cpp
gm_telemetry_server.cpp
+3
-2
No files found.
dataset.hpp
100644 → 100755
View file @
dc197c58
...
...
@@ -64,7 +64,7 @@ struct subsystem {
measurement
getMeasurement
(
std
::
string
m
){
measurement
ret
;
for
(
std
::
vector
<
measurement
>::
iterator
it
=
v
.
begin
();
it
!=
v
.
end
();
++
it
){
std
::
cout
<<
"Searching...."
<<
it
->
name
<<
m
<<
'\n'
;
//
std::cout << "Searching...." << it->name << m << '\n';
if
(
it
->
name
==
m
){
ret
.
name
=
it
->
name
;
ret
.
v
=
it
->
v
;
...
...
@@ -85,8 +85,8 @@ struct subsystem {
}
};
std
::
string
load_dictionary
(){
std
::
string
filename
=
"dictionary.json"
;
std
::
string
load_dictionary
(
std
::
string
input
){
std
::
string
filename
=
input
;
std
::
ifstream
file
;
file
.
open
(
filename
.
c_str
(),
std
::
ios
::
in
);
if
(
!
file
){
...
...
gm_telemetry_server.cpp
100644 → 100755
View file @
dc197c58
...
...
@@ -337,7 +337,7 @@ class telemetry_server {
void
update_msg_queue
(){
for
(
std
::
vector
<
std
::
string
>::
iterator
it
=
topics
.
begin
();
it
!=
topics
.
end
();
it
++
){
measurement
meas
=
systemdata
.
getMeasurement
(
*
it
);
std
::
cout
<<
"FOUND: "
<<
meas
.
name
<<
'\n'
;
//
std::cout << "FOUND: " << meas.name << '\n';
jtopics
.
push_back
(
json_pack
(
meas
.
name
,
meas
.
timestamp
,
meas
.
v
));
}
}
...
...
@@ -465,7 +465,8 @@ int main(int argc, char* argv[])
gmsub
g
=
gmsub
(
config
);
//load dictionary
dictionary
=
load_dictionary
();
std
::
string
filename
=
example
::
get
(
config
,
"dictionary"
,
"/GMSEC_API/bin/dictionary.json"
);
dictionary
=
load_dictionary
(
filename
);
//Threads
std
::
thread
gmsec
(
&
gmsub
::
run
,
&
g
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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