X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.hpp;h=2d5b3a714da8efe2ac21eb4fc43561b4828a35ca;hb=d723d5bf571eb48c641b092058eaa38bb6c4fcc8;hp=af8a07a75417826526f399d6e09754aa2540792d;hpb=5bf5055ab79aaf464e2491cfbab173ba37ba3419;p=anna.git diff --git a/example/diameter/launcher/Launcher.hpp b/example/diameter/launcher/Launcher.hpp index af8a07a..2d5b3a7 100644 --- a/example/diameter/launcher/Launcher.hpp +++ b/example/diameter/launcher/Launcher.hpp @@ -23,12 +23,7 @@ // Process #include #include -#include - - -#define SH_COMMAND_TAG_FOR_REPLACE__CYCLE_ID "##cycleid##" -#define SH_COMMAND_TAG_FOR_REPLACE__TESTCASE_ID "##testcaseid##" -#define SH_COMMAND_TAG_FOR_REPLACE__TESTSTEP_ID "##teststepid##" +#include namespace anna { @@ -39,26 +34,28 @@ namespace anna { namespace codec { class Engine; } + namespace comm { + class OriginHost; + } } } class TestManager; -class OriginHost; class MyDiameterEntity; class MyLocalServer; class MyDiameterEngine; // OriginHost resources -class OriginHost; -typedef std::map origin_hosts_t; -typedef std::map::const_iterator origin_hosts_it; -typedef std::map::iterator origin_hosts_nc_it; +typedef std::map origin_hosts_t; +typedef std::map::const_iterator origin_hosts_it; +typedef std::map::iterator origin_hosts_nc_it; class Launcher : public anna::comm::Application { // Start time: anna::time::Date a_start_time; + std::string a_initialWorkingDirectory; // Core engines: MyCommunicator *a_communicator; @@ -69,19 +66,22 @@ class Launcher : public anna::comm::Application { // Nodes deployment: origin_hosts_t a_originHosts; - OriginHost *a_workingNode; - OriginHost *a_operatedHost; // auxiliary for eventOperation + anna::diameter::comm::OriginHost *a_workingNode; + anna::diameter::comm::OriginHost *a_operatedHost; // auxiliary for eventOperation // comm resources: anna::comm::ServerSocket* a_httpServerSocket; // HTTP - const anna::Millisecond &getADMLMinResolution() const throw() { return a_admlMinResolution; } + std::string getSignalUSR2InputFile() const throw(); + std::string getSignalUSR2OutputFile() const throw(); void servicesFromXML(const anna::xml::Node* servicesNode, bool eventOperation) throw(anna::RuntimeException); anna::Millisecond checkTimeMeasure(const std::string ¶meter, const std::string &value) throw(anna::RuntimeException); void initialize() throw(anna::RuntimeException); // HTTP void run() throw(anna::RuntimeException); + + public: Launcher(); //~Launcher(); TODO @@ -90,13 +90,14 @@ public: void startServices() throw(anna::RuntimeException); bool setWorkingNode(const std::string &name) throw(); - OriginHost *getOriginHost(const std::string &oh) const throw(anna::RuntimeException); - OriginHost *getOriginHost(const anna::diameter::codec::Message &message) const throw(anna::RuntimeException); + anna::diameter::comm::OriginHost *getOriginHost(const std::string &oh) const throw(anna::RuntimeException); + anna::diameter::comm::OriginHost *getOriginHost(const anna::diameter::codec::Message &message) const throw(anna::RuntimeException); bool uniqueOriginHost() const throw() { return (a_originHosts.size() == 1); } // Operated host for communication resources smart assignment //////////////////////////////////////////////////////////// void updateOperatedOriginHostWithMessage(const anna::diameter::codec::Message &message) throw(anna::RuntimeException); - OriginHost *getOperatedHost() const throw(anna::RuntimeException); + anna::diameter::comm::OriginHost *getWorkingNode() const throw(anna::RuntimeException); + anna::diameter::comm::OriginHost *getOperatedHost() const throw(anna::RuntimeException); MyDiameterEntity *getOperatedEntity() const throw(anna::RuntimeException); MyLocalServer *getOperatedServer() const throw(anna::RuntimeException); MyDiameterEngine *getOperatedEngine() const throw(anna::RuntimeException); @@ -106,6 +107,8 @@ public: MyCommunicator *getCommunicator() throw() { return a_communicator; } void eventOperation(const std::string &, std::string &) throw(anna::RuntimeException); void forceCountersRecord() throw(anna::RuntimeException) { if (a_counterRecorderClock) a_counterRecorderClock->tick(); } + void logStatisticsSamples(const std::string &conceptsList) throw(); + anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); void resetStatistics() throw();