15 #include <SDKDDKVer.h>
17 #include <boost/asio.hpp>
35 #include "FlowTester.hpp"
38#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2 * !!(condition)]))
59 for ([[maybe_unused]]
const auto& configFile : failedConfigFiles)
61 LOG_ERROR(
"Could not open the config file: {}", configFile);
72 util::time::SetCurrentTimeToComputerTime();
74 if (
sizeof(
long double) != 16)
76 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.");
88 bool loadSuccessful =
false;
101 flow::ApplyWatcherCallbacks();
109 auto interruptThread = std::thread([]() {
123 interruptThread.join();
131 TESTS::runGeneralFlowCleanupChecks();
132 flow::CallCleanupCallback();
145 LOG_CRITICAL(
"When running in No-GUI Mode you have to specify a flow file to load (-l)");
151 gui::NodeEditorApplication app(
"INSTINCT - INS Toolkit for Integrated Navigation Concepts and Training",
"INSTINCT.ini", argc, argv);
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.
Application class providing all relevant GUI callbacks.
static bool showFlowWhenInvokingCallbacks
Flag if invokeCallbacks triggers a GUI Flow event.
static bool showFlowWhenNotifyingValueChange
Flag if notifyOutputValueChanged & notifyInputValueChanged triggers a GUI Flow event.
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.
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.
void DisableAllCallbacks()
Disables all Node callbacks.
std::filesystem::path GetOutputPath()
Get the path where logs and outputs are stored.
void DeleteAllNodes()
Delete all nodes.
void DiscardChanges()
Discards the unsaved changes flag. Does not really discard the changes.
void SetOutputPath()
Set the path where logs and outputs are stored.