From b535d36cd4e8394e7b07002ac7184c00951faa27 Mon Sep 17 00:00:00 2001 From: xAzigo <22547713+xAzigo@users.noreply.github.com> Date: Fri, 2 Sep 2022 21:33:35 +0100 Subject: [PATCH 1/3] Update main.cpp --- src/main.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c6d5b9e..5cb7d00 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -53,6 +53,30 @@ void RequestListener::run(GNet::GServer* serverInstance) printf("%c", ch); } - //printf("Server Output: %s\n", newStr.c_str()); + //XBTUSD ENUM false 100010 100020 true false + const vector input= newStr.split(" "); + + + // Run an offline historical simulation +// shmea::GList wData; + //ticker +// wData.addString(input[0]); + //newAgg +// wData.addInt(input[1]); + //guiEnabled +// wData.addBoolean(false); + //startTs +// wData.addLong(input[3]); + //endTs +// wData.addLong(input[4]); + //tradingActivated +// wData.addBoolean(input[5]); +// wData.addBoolean(input[6]); + +// shmea::ServiceData* cSrvc = new shmea::ServiceData(destination, "HistEngine"); +// cSrvc->set("mainSim"+shmea::GString::intTOstring(simCount), wData); +// serverInstance->send(cSrvc); + + pclose(p); } From f3c637ec47a465bbd21ed01c56dd69f3a6903bf9 Mon Sep 17 00:00:00 2001 From: xAzigo <22547713+xAzigo@users.noreply.github.com> Date: Fri, 2 Sep 2022 21:35:31 +0100 Subject: [PATCH 2/3] Update main.cpp --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 5cb7d00..50ebb67 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,13 @@ */ void RequestListener::run(GNet::GServer* serverInstance) { + + // if input from web API.. + + // if input from discord.. + + // blah + shmea::GString command = "python3 python/server.py"; printf("Service Command: %s\n", command.c_str()); FILE* p = popen(command.c_str(), "r"); From 3568de4627a18850111af7e740664bf798ca7130 Mon Sep 17 00:00:00 2001 From: lerring <22547713+xAzigo@users.noreply.github.com> Date: Tue, 25 Oct 2022 19:37:35 +0100 Subject: [PATCH 3/3] applying splitting of string and handing to histengine --- src/main.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 50ebb67..4349609 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -63,27 +63,25 @@ void RequestListener::run(GNet::GServer* serverInstance) //XBTUSD ENUM false 100010 100020 true false const vector input= newStr.split(" "); - // Run an offline historical simulation -// shmea::GList wData; + shmea::GList wData; //ticker -// wData.addString(input[0]); + wData.addString(input[0]); //newAgg -// wData.addInt(input[1]); + wData.addInt(input[1]); //guiEnabled -// wData.addBoolean(false); + wData.addBoolean(false); //startTs -// wData.addLong(input[3]); + wData.addLong(input[3]); //endTs -// wData.addLong(input[4]); + wData.addLong(input[4]); //tradingActivated -// wData.addBoolean(input[5]); -// wData.addBoolean(input[6]); - -// shmea::ServiceData* cSrvc = new shmea::ServiceData(destination, "HistEngine"); -// cSrvc->set("mainSim"+shmea::GString::intTOstring(simCount), wData); -// serverInstance->send(cSrvc); + wData.addBoolean(input[5]); + wData.addBoolean(input[6]); + shmea::ServiceData* cSrvc = new shmea::ServiceData(destination, "HistEngine"); + cSrvc->set("mainSim"+shmea::GString::intTOstring(simCount), wData); + serverInstance->send(cSrvc); pclose(p); }