mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-24 21:19:46 -06:00
Restructure parsers, send label parser information to GUI application
This commit is contained in:
@@ -40,7 +40,7 @@ namespace {
|
||||
const std::string _loggerCat = "HongKangParser";
|
||||
const std::string keyTranslation = "DataInputTranslation";
|
||||
|
||||
const std::string PlaybookIdentifierName = "Playbook";
|
||||
const std::string PlaybookIdentifierName = "HongKang";
|
||||
}
|
||||
|
||||
namespace openspace {
|
||||
@@ -251,7 +251,7 @@ void HongKangParser::create(){
|
||||
}
|
||||
}
|
||||
|
||||
sendPlaybookInformation();
|
||||
sendPlaybookInformation(PlaybookIdentifierName);
|
||||
|
||||
//std::ofstream myfile;
|
||||
//myfile.open("HongKangOutput.txt");
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <ghoul/filesystem/directory.h>
|
||||
#include <openspace/util/time.h>
|
||||
#include <ghoul/filesystem/cachemanager.h>
|
||||
#include <openspace/util/decoder.h>
|
||||
|
||||
#include <openspace/util/spicemanager.h>
|
||||
#include <fstream>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <ghoul/filesystem/directory.h>
|
||||
#include <openspace/util/time.h>
|
||||
#include <openspace/util/spicemanager.h>
|
||||
#include <openspace/util/decoder.h>
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
#include <iomanip>
|
||||
@@ -38,6 +39,8 @@ namespace {
|
||||
const std::string _loggerCat = "LabelParser";
|
||||
const std::string keySpecs = "Read";
|
||||
const std::string keyConvert = "Convert";
|
||||
|
||||
const std::string PlaybookIdentifierName = "LabelParser";
|
||||
}
|
||||
|
||||
namespace openspace {
|
||||
@@ -272,6 +275,7 @@ void LabelParser::create(){
|
||||
}
|
||||
//myfile.close();
|
||||
|
||||
sendPlaybookInformation(PlaybookIdentifierName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <openspace/util/sequenceparser.h>
|
||||
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/network/networkengine.h>
|
||||
#include <openspace/util/spicemanager.h>
|
||||
#include <openspace/util/decoder.h>
|
||||
|
||||
namespace {
|
||||
const std::string _loggerCat = "SequenceParser";
|
||||
@@ -73,8 +73,9 @@ void writeToBuffer<std::string>(std::vector<char>& buffer, size_t& currentWriteL
|
||||
currentWriteLocation += length;
|
||||
}
|
||||
|
||||
void SequenceParser::sendPlaybookInformation() {
|
||||
static const NetworkEngine::MessageIdentifier PlaybookIdentifier = OsEng.networkEngine()->identifier(PlaybookIdentifierName);
|
||||
void SequenceParser::sendPlaybookInformation(const std::string& name) {
|
||||
std::string fullName = PlaybookIdentifierName + "_" + name;
|
||||
_messageIdentifier = OsEng.networkEngine()->identifier(fullName);
|
||||
|
||||
std::vector<char> buffer(1024);
|
||||
size_t currentWriteLocation = 0;
|
||||
@@ -164,7 +165,7 @@ void SequenceParser::sendPlaybookInformation() {
|
||||
buffer.resize(currentWriteLocation);
|
||||
|
||||
//OsEng.networkEngine()->publishMessage(PlaybookIdentifier, buffer);
|
||||
OsEng.networkEngine()->setInitialConnectionMessage(PlaybookIdentifier, buffer);
|
||||
OsEng.networkEngine()->setInitialConnectionMessage(_messageIdentifier, buffer);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user