15 #include <SDKDDKVer.h>
17 #include <boost/asio.hpp>
38 #include "FlowTester.hpp"
41#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2 * !!(condition)]))
62 for ([[maybe_unused]]
const auto& configFile : failedConfigFiles)
64 LOG_ERROR(
"Could not open the config file: {}", configFile);
75 util::time::SetCurrentTimeToComputerTime();
77 if (
sizeof(
long double) != 16)
79 LOG_WARN(
"You are running INSTINCT on a platform without quadruple-precision floating-point support. Functionality concerning time measurements and ranging could be affected by the precision loss.");
91 bool loadSuccessful =
false;
104 nm::ApplyWatcherCallbacks();
112 auto interruptThread = std::thread([]() {
126 interruptThread.join();
134 TESTS::runGeneralFlowCleanupChecks();
135 nm::CallCleanupCallback();
148 LOG_CRITICAL(
"When running in No-GUI Mode you have to specify a flow file to load (-l)");
Config management for the Project.
Utility class for logging to console and file.
#define LOG_CRITICAL(...)
Critical Event, which causes the program to work entirely and throws an exception.
#define LOG_ERROR
Error occurred, which stops part of the program to work, but not everything.
#define LOG_WARN
Error occurred, but a fallback option exists and program continues to work normally.
#define LOG_INFO
Info to the user on the state of the program.
Utility class which specifies available nodes.
Class to catch system signals and sleep.
Keeps track of the current real/simulation time.
Utility class for logging.
static AntexReader & Get()
Get the static Instance of the reader.
void initialize()
Initialize from ANTEX file.
Application class providing all relevant GUI callbacks.
int frameCountNavigate
Frame counter to block the navigate to content function till nodes are correctly loaded.
int processCommandLineArguments(int argc, const char *argv[])
Processes the command line arguments.
void CheckOptions(const int argc, const char *argv[])
Writes all command line options into the log.
const T & Get(const std::string &key, const T &&defaultValue)
Retrieves the value of a corresponding key from the configuration, if one exists.
bool HasKey(const std::string &key)
Checks if a corresponding key exists in the configuration.
std::vector< std::string > FetchConfigs(const int argc, const char *argv[])
Fetches the configs from the command line parameters.
void start()
Starts the Thread.
void waitForFinish()
Waits for a thread to finish its execution.
void stop()
Stops the Thread.
bool showFlowWhenNotifyingValueChange
Flag if notifyOutputValueChanged & notifyInputValueChanged triggers a GUI Flow event.
void DisableAllCallbacks()
Disables all Node callbacks.
void DeleteAllNodes()
Delete all nodes.
bool showFlowWhenInvokingCallbacks
Flag if invokeCallbacks triggers a GUI Flow event.
void RegisterNodeDataTypes()
Register all available NodeData types for the program.
void RegisterNodeTypes()
Register all available Node types for the program.
void countDownSeconds(size_t seconds)
Wait the thread till time passes.
void waitForSignal(bool showText=false)
Wait the thread till sigusr signal is send.
void SetProgramRootPath(const std::filesystem::path &newRootPath)
Set the program root path.
void SetCurrentFilename(const std::string &newFilename)
Set the current filename of the open flow.
bool LoadFlow(const std::string &filepath)
Loads the flow from the specified file.
std::filesystem::path GetOutputPath()
Get the path where logs and outputs are stored.
void DiscardChanges()
Discards the unsaved changes flag. Does not really discard the changes.
void SetOutputPath()
Set the path where logs and outputs are stored.