Commit 6bccc883d82a8d5948d6c6f63419ec77b4b74e23
1 parent
07706691
Exists in
master
Envio do json gerado pelo Gercols, e alteração do path de getTest() e getConfig().
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
cacic-daemon/cacicD/cacictimer.cpp
| ... | ... | @@ -47,6 +47,11 @@ void CacicTimer::mslot(){ |
| 47 | 47 | if( nome == "gercols" ) { |
| 48 | 48 | definirDirGercols(getApplicationDirPath()); |
| 49 | 49 | iniciarModulo(); |
| 50 | + | |
| 51 | + //Envio do json gerado na coleta | |
| 52 | + bool ok; | |
| 53 | + QJsonObject jsonColeta = ccacic->getJsonFromFile("coleta.json"); | |
| 54 | + OCacicComm->comm("/ws/neo/coleta", &ok, jsonColeta ); | |
| 50 | 55 | } else if( nome == "mapas" ) { |
| 51 | 56 | definirDirMapas(getApplicationDirPath()); |
| 52 | 57 | iniciarModulo(); |
| ... | ... | @@ -75,7 +80,7 @@ bool CacicTimer::getTest(){ |
| 75 | 80 | bool ok; |
| 76 | 81 | QJsonObject as; |
| 77 | 82 | as["computador"] = OCacic_Computer.toJsonObject(); |
| 78 | - QJsonObject jsonresult = OCacicComm->comm("/ws/neo/login", &ok, as); | |
| 83 | + QJsonObject jsonresult = OCacicComm->comm("/ws/neo/test", &ok, as); | |
| 79 | 84 | // if(jsonresult.contains("error")){ |
| 80 | 85 | // return false; |
| 81 | 86 | // } |
| ... | ... | @@ -97,7 +102,7 @@ bool CacicTimer::getConfig(){ |
| 97 | 102 | bool ok; |
| 98 | 103 | QJsonObject as; |
| 99 | 104 | as["computador"] = OCacic_Computer.toJsonObject(); |
| 100 | - QJsonObject jsonresult = OCacicComm->comm("/ws/neo/login", &ok, as); | |
| 105 | + QJsonObject jsonresult = OCacicComm->comm("/ws/neo/config", &ok, as); | |
| 101 | 106 | // if(jsonresult.contains("error")){ |
| 102 | 107 | // return false; |
| 103 | 108 | // } | ... | ... |
cacic-daemon/cacicD/cacictimer.h
| ... | ... | @@ -36,17 +36,18 @@ public: |
| 36 | 36 | private: |
| 37 | 37 | void registraFimColeta(QString msg); |
| 38 | 38 | void registraInicioColeta(); |
| 39 | - void verificarModulos(); | |
| 39 | + QStringList verificarModulos(); | |
| 40 | 40 | void reiniciarTimer(); |
| 41 | 41 | QLogger::QLoggerManager *logManager; |
| 42 | 42 | QString dirProgram; |
| 43 | 43 | QString applicationDirPath; |
| 44 | 44 | QString getDirProgram() const; |
| 45 | - void iniciarGercols(); | |
| 45 | + void iniciarModulo(); | |
| 46 | 46 | void iniciarInstancias(); |
| 47 | 47 | void verificarPeriodicidadeJson(); |
| 48 | 48 | void lerArquivoConfig( const QJsonObject &jsonConfig); |
| 49 | 49 | void definirDirGercols(QString appDirPath); |
| 50 | + void definirDirMapas(QString appDirPath); | |
| 50 | 51 | QJsonObject jsonConfig; |
| 51 | 52 | int periodicidadeExecucao; |
| 52 | 53 | int getPeriodicidadeExecucao() const; | ... | ... |