#ifndef TARGETSWITCH_H #define TARGETSWITCH_H #ifdef WIN32 #include #include #include #include #include #else #include #include #endif #include #include #include #include "boost/lexical_cast.hpp" #include #include #include #include class targetSwitch { presetHandler presetHandle; CLIHandler * cliHandle; outputHandler * outputHandle; connectionHandler * connectionHandle; outputHandler* commonOutputHandle; int connectionPort; bool configJustOnce; string switchName; string switchIP; string switchType; string username; string password; int iterationNum; time_t statsStartTime; bool connectionStatus; vector longerRuntimeCmd; bool statConnectionStatus; string statsDataBuffer; controller* seqController; ofstream* tempFilePtr; bool bciscoSwitch; void sleepBtwIter(int); string generateFullCommand(presetMetaData); string processDateCommand(boost::barrier *); void processDateCommand(string, boost::barrier *); void generateHeader(boost::barrier*); string printHeader(string, string, string); bool checkSignal(); void checkCommandOutput(string, string); string tokenizeString(string , int); string generateDateString(); //Need this function for the switches who does not support date command for example CISCO nexus 5000 public: targetSwitch() {}; targetSwitch(presetHandler, CLIHandler*, outputHandler*, string); string getSwitchIP(); void processCommands(boost::barrier*); bool processPrestatsCommands(boost::barrier*); bool processPoststatsCommands(boost::barrier*); void processOneCommand(presetMetaData); }; #endif