34#include <NDEVR/Model.h>
35#include <NDEVR/DesignObjectUpdateTarget.h>
36#include <NDEVR/TimeSpan.h>
37#include <NDEVR/String.h>
39#if NDEVR_SUPPORTS_THREADING
44 class DesignObjectLookup;
46 class DeviceUpdateThread;
75#if NDEVR_SUPPORTS_THREADING
79#if NDEVR_SUPPORTS_THREADING
93 virtual void run()
override;
A core class where all Design Objects including models, materials, and geometries are stored....
Definition DesignObjectLookup.h:65
An object that will be call update, each time the lookup is updated.
Definition DesignObjectUpdateTarget.h:10
A root class which describes some physical object, such as a Motor, Sensor, or Connection....
Definition Device.h:52
void startAutoUpdate(DesignObjectLookup *lookup=nullptr)
static void SetDefaultDeviceLookup(DesignObjectLookup *lookup)
virtual void showWarning(const Exception &warning) const
std::function< void(const Exception &warning, ProgressInfo *log)> m_warning_callback
Definition Device.h:73
void stopAutoUpdate(DesignObjectLookup *lookup=nullptr)
virtual void setLog(ProgressInfo *log)
Definition Device.h:56
virtual void endUpdates()
Definition Device.h:60
ProgressInfo * m_log
Definition Device.h:72
virtual void showWarning(const TranslatedString &warning) const
virtual TimeSpan updateInterval() const
Definition Device.h:59
Device(const Model &model, ProgressInfo *log, QObject *parent=nullptr)
virtual void update()
Definition Device.h:58
ProgressInfo * deviceLog() const
Definition Device.h:61
static DesignObjectLookup * s_default_lookup
Definition Device.h:74
virtual void update(DesignObjectLookup *lookup, Time time) override
void setWarningCallback(const std::function< void(const Exception &warning, ProgressInfo *log)> &warning_callback)
A class that updates a device by repeatedly calling update() until stop() is called.
Definition Device.h:87
DeviceUpdateThread(const DeviceUpdateThread &)=delete
virtual void run() override
virtual ~DeviceUpdateThread() override
DeviceUpdateThread(DeviceUpdateThread &&)=delete
volatile bool m_is_running
Definition Device.h:99
DeviceUpdateThread(DesignObjectLookup *lookup, Device *sensor)
Device * m_sensor
Definition Device.h:98
Provides consistent interface to handle errors through the throw expression. All exceptions generated...
Definition Exception.hpp:47
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13