NDEVR
API Documentation
DeviceUpdateThread

A class that updates a device by repeatedly calling update() until stop() is called. More...

Collaboration diagram for DeviceUpdateThread:
[legend]

Public Member Functions

 DeviceUpdateThread (DesignObjectLookup *lookup, Device *sensor)
 Constructs an update thread for the given device.
virtual void run () override
 The main thread loop that repeatedly calls the device's update method.
void stop ()
 Signals the update loop to stop and waits for the thread to finish.

Protected Attributes

volatile bool m_is_running
 Flag controlling the update loop execution.
DesignObjectLookupm_lookup = nullptr
 Design object lookup for update context.
Devicem_sensor
 The device being updated by this thread.

Detailed Description

A class that updates a device by repeatedly calling update() until stop() is called.


Warning
Should not be called or created directly and instead will be generated by calling Device().startAutoUpdate and Device().stopAutoUpdate

Definition at line 146 of file Device.h.

Constructor & Destructor Documentation

◆ DeviceUpdateThread()

DeviceUpdateThread::DeviceUpdateThread ( DesignObjectLookup * lookup,
Device * sensor )

Constructs an update thread for the given device.

Parameters
[in]lookupThe design object lookup for resolving references.
[in]sensorThe device to update periodically.

References DeviceUpdateThread().

Referenced by DeviceUpdateThread().


The documentation for this class was generated from the following file: