X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.hpp;h=dcc684d5e451169371e7e89bde77ad7eb4537773;hb=61f1340da3cae5159d2e3bc14fc47c6d4bf9453e;hp=2101948ec1d979e90ea877511d33391273f025e0;hpb=56afb5fb4f4985e5529e7491b78a6214e455f95a;p=anna.git diff --git a/example/diameter/launcher/Launcher.hpp b/example/diameter/launcher/Launcher.hpp index 2101948..dcc684d 100644 --- a/example/diameter/launcher/Launcher.hpp +++ b/example/diameter/launcher/Launcher.hpp @@ -43,22 +43,23 @@ namespace anna { } class TestManager; -class RealmNode; +class OriginHost; class MyDiameterEntity; class MyLocalServer; class MyDiameterEngine; -// RealmNode resources -class RealmNode; -typedef std::map realm_nodes_t; -typedef std::map::const_iterator realm_nodes_it; -typedef std::map::iterator realm_nodes_nc_it; +// 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; class Launcher : public anna::comm::Application { // Start time: anna::time::Date a_start_time; + std::string a_initialWorkingDirectory; // Core engines: MyCommunicator *a_communicator; @@ -68,20 +69,25 @@ class Launcher : public anna::comm::Application { MyCounterRecorderClock *a_counterRecorderClock; // Nodes deployment: - realm_nodes_t a_nodes; - RealmNode *a_workingNode; - RealmNode *a_operatedRealm; // auxiliary for eventOperation + origin_hosts_t a_originHosts; + OriginHost *a_workingNode; + 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 +96,13 @@ public: void startServices() throw(anna::RuntimeException); bool setWorkingNode(const std::string &name) throw(); - RealmNode *getRealmNode(const std::string &realmName) const throw(anna::RuntimeException); - RealmNode *getRealmNode(const anna::diameter::codec::Message &message) const throw(anna::RuntimeException); - bool uniqueRealm() const throw() { return (a_nodes.size() == 1); } + OriginHost *getOriginHost(const std::string &oh) const throw(anna::RuntimeException); + OriginHost *getOriginHost(const anna::diameter::codec::Message &message) const throw(anna::RuntimeException); + bool uniqueOriginHost() const throw() { return (a_originHosts.size() == 1); } - // Operated realm for communication resources smart assignment //////////////////////////////////////////////////////////// - void updateOperatedRealmNodeWithMessage(const anna::diameter::codec::Message &message) throw(anna::RuntimeException); - RealmNode *getOperatedRealm() const throw(anna::RuntimeException); + // Operated host for communication resources smart assignment //////////////////////////////////////////////////////////// + void updateOperatedOriginHostWithMessage(const anna::diameter::codec::Message &message) throw(anna::RuntimeException); + 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 +112,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();