Commit dc197c58 authored by Christopher Reis's avatar Christopher Reis

Updated for use in Docker

parent 33d3594f
......@@ -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){
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment