/**
* SIMULATION shell
*
*
* Sanjay Jaiman
*/
#include "lte-ffr-soft-algorithm.h"
#include <ostream>
#include <sstream>
#include <stdio.h>
#include <string>
#include <ctime>
#include <ns3/log.h>
#include <ns3/integer.h>
using namespace ns3;
// Logging keyword
NS_LOG_COMPONENT_DEFINE ("lte-ffr_simulation.cc");
void simRunUpdates();
int main(int argc, char *argv[]) {
Ptr<LteFfrSoftAlgorithm> lte_ffr_alg = CreateObject<LteFfrSoftAlgorithm> ();
lte_ffr_alg->SetAttribute("UlCommonSubBandwidth", IntegerValue(7));
//---------------------------------------------------------------------------
std::cout << "Starting Simulation..." << std::endl;
Simulator::Stop(Seconds(15));
Simulator::Schedule(Seconds(1), &simRunUpdates);
Simulator::Run();
//---------------------------------------------------------------------------
Simulator::Destroy();
}
/**
* Simulation Run Update
*/
void simRunUpdates() {
time_t rawtime;
struct tm* timeinfo;
char buffer[80];
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S %Z", timeinfo);
std::string str(buffer);
std::cout << str << ": " << Simulator::Now().GetSeconds() << "1 seconds completed" << std::endl;
Simulator::Schedule(Seconds(1), &simRunUpdates);
}