Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions CommonLib/ConfigHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,16 @@ int ConfigHelper::getConfig(string configName) {
// READ Simulation Setup section
// ===========================================================================
node = config["SimulationSetup"];
if (node["EnableRealSim"]) {
SimulationSetup.EnableRealSim = parserFlag(node, "EnableRealSim");
if (node["EnableFIXS"]) {
SimulationSetup.EnableFIXS = parserFlag(node, "EnableFIXS");
}
else if (node["EnableRealSim"]) {
// Legacy key: accept "EnableRealSim" for backward compatibility
SimulationSetup.EnableFIXS = parserFlag(node, "EnableRealSim");
}
else {
SimulationSetup.EnableRealSim = true;
if (!SuppressDefaultMessages) printf("\nWill enable real sim as default!\n");
SimulationSetup.EnableFIXS = true;
if (!SuppressDefaultMessages) printf("\nWill enable FIXS as default!\n");
}
if (node["EnableVerboseLog"]) {
SimulationSetup.EnableVerboseLog = parserFlag(node, "EnableVerboseLog");
Expand Down Expand Up @@ -951,7 +955,7 @@ void ConfigHelper::getVehSubscriptionList(Subscription_t VehSub, std::unordered_
//int len = (int) pointSubscribeId_v.size();
ss << pointSubscribeId_v.size();
//string poiName = "RealSimPOI_" + to_string(pointSubscribeId_v.size());
string poiName = "RealSimPOI_" + ss.str();
string poiName = "FIXS_POI_" + ss.str();

pointSubscribeId_v[poiName] = make_tuple(strtod(xlist[i].c_str(), NULL), strtod(ylist[i].c_str(), NULL), strtod(zlist[i].c_str(), NULL), strtod(rlist[i].c_str(), NULL));
}
Expand All @@ -967,7 +971,7 @@ void ConfigHelper::getVehSubscriptionList(Subscription_t VehSub, std::unordered_
//int len = (int) pointSubscribeId_v.size();
ss << pointSubscribeId_v.size();
//string poiName = "RealSimPOI_" + to_string(pointSubscribeId_v.size());
string poiName = "RealSimPOI_" + ss.str();
string poiName = "FIXS_POI_" + ss.str();

SocketPort2SubscriptionList_um[it].VehicleList.pointSubscribeId_v[poiName] = make_tuple(strtod(xlist[i].c_str(), NULL), strtod(ylist[i].c_str(), NULL), strtod(zlist[i].c_str(), NULL), strtod(rlist[i].c_str(), NULL));
}
Expand Down
2 changes: 1 addition & 1 deletion CommonLib/ConfigHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ typedef typename std::vector <std::tuple < std::string, SubAttMap_t, std::vector


struct SimulationSetup_t {
bool EnableRealSim;
bool EnableFIXS;

bool EnableVerboseLog;

Expand Down
2 changes: 1 addition & 1 deletion CommonLib/PerformanceTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PerformanceTimer {

public:
// Initialize performance logging (call once at startup)
static void init(const std::string& logPath = "RealSimPerf.log") {
static void init(const std::string& logPath = "FIXSPerf.log") {
if (!perfLogFile.is_open()) {
perfLogPath = logPath;
// Use std::ios::out to truncate file (reset on each init)
Expand Down
27 changes: 18 additions & 9 deletions CommonLib/RealSimVersion.h.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
#ifndef REALSIM_VERSION_H
#define REALSIM_VERSION_H
#ifndef FIXS_VERSION_H
#define FIXS_VERSION_H

// Auto-generated from git tags - DO NOT EDIT MANUALLY
// Generated at: @GENERATION_TIME@

#define REALSIM_VERSION_MAJOR @VERSION_MAJOR@
#define REALSIM_VERSION_MINOR @VERSION_MINOR@
#define REALSIM_VERSION_PATCH @VERSION_PATCH@
#define FIXS_VERSION_MAJOR @VERSION_MAJOR@
#define FIXS_VERSION_MINOR @VERSION_MINOR@
#define FIXS_VERSION_PATCH @VERSION_PATCH@

#define REALSIM_VERSION_NUMBER 0x@VERSION_HEX@
#define REALSIM_VERSION_STRING "@VERSION_STRING@"
#define REALSIM_GIT_COMMIT "@GIT_COMMIT@"
#define REALSIM_GIT_TAG "@GIT_TAG@"
#define FIXS_VERSION_NUMBER 0x@VERSION_HEX@
#define FIXS_VERSION_STRING "@VERSION_STRING@"
#define FIXS_GIT_COMMIT "@GIT_COMMIT@"
#define FIXS_GIT_TAG "@GIT_TAG@"

// Backward-compatibility aliases (deprecated: use FIXS_* macros instead)
#define REALSIM_VERSION_MAJOR FIXS_VERSION_MAJOR
#define REALSIM_VERSION_MINOR FIXS_VERSION_MINOR
#define REALSIM_VERSION_PATCH FIXS_VERSION_PATCH
#define REALSIM_VERSION_NUMBER FIXS_VERSION_NUMBER
#define REALSIM_VERSION_STRING FIXS_VERSION_STRING
#define REALSIM_GIT_COMMIT FIXS_GIT_COMMIT
#define REALSIM_GIT_TAG FIXS_GIT_TAG

#endif
12 changes: 6 additions & 6 deletions CommonLib/SocketHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ int SocketHelper::initConnection(std::string errorLogName) {
==============================*/
if (ENABLE_SERVER) {
#ifdef RS_DEBUG
Log("RealSim start server task\n");
Log("FIXS start server task\n");
#endif
for (int iS = 0; iS < NSERVER; iS++) {
memset(&serverAddr[iS], 0, sizeof(serverAddr[iS])); /* Zero out structure */
Expand Down Expand Up @@ -381,7 +381,7 @@ int SocketHelper::initConnection(std::string errorLogName) {
// placeholder
}
#ifdef RS_DEBUG
Log("RealSim start server connection\n");
Log("FIXS start server connection\n");
#endif
// Connect to server.
if (connect(serverSock[iS], (struct sockaddr*)&serverAddr[iS], sizeof(serverAddr[iS])) < 0) {
Expand All @@ -408,7 +408,7 @@ int SocketHelper::initConnection(std::string errorLogName) {
return -1;
}
#ifdef RS_DEBUG
Log("RealSim server connected\n");
Log("FIXS server connected\n");
#endif

}
Expand Down Expand Up @@ -806,10 +806,10 @@ int SocketHelper::initConnection(std::string errorLogName) {
}
}

cout << "RealSim Initialized" << endl;
cout << "FIXS Initialized" << endl;
#ifdef RS_DEBUG
Log("RealSim Initialized\n");
#endif
Log("FIXS Initialized\n");
#endif

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion CommonLib/SocketHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

#define MAXPENDING 5 /* Maximum outstanding connection requests */

// RealSim header size and each message header size
// FIXS header size and each message header size
#define MSG_HEADER_SIZE 9
#define MSG_EACH_HEADER_SIZE 3

Expand Down
2 changes: 1 addition & 1 deletion CommonLib/TrafficHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ int TrafficHelper::recvFromSUMO(double* simTime, MsgHelper& Msg_c) {
int b,
int a = 255*/
libsumo::TraCIColor color(255,0,255); // use magenta as color
string type = "RealSim";
string type = "FIXS";
int layer = 999; // put it as a very high layer
string imgFile = ""; // no image file
double width = 0; // width float width of rendered image in meters
Expand Down
Loading