Isle
Loading...
Searching...
No Matches
MxTickleThread Class Reference

MxTickleThread periodically calls Tickle() on a target MxCore object in a separate thread. More...

#include <mxticklethread.h>

Inheritance diagram for MxTickleThread:
Collaboration diagram for MxTickleThread:

Public Member Functions

 MxTickleThread (MxCore *p_target, MxS32 p_frequencyMS)
 [AI] Constructs a MxTickleThread to tickle a target MxCore object at a fixed interval. More...
 
MxResult Run () override
 [AI] Thread entry point. More...
 
- Public Member Functions inherited from MxThread
virtual MxResult Run ()
 [AI] Virtual function executed when the thread runs. More...
 
MxResult Start (MxS32 p_stackSize, MxS32 p_flag)
 [AI] Starts the thread with a given stack size and creation flags. More...
 
void Terminate ()
 [AI] Signals the thread to terminate. More...
 
void Sleep (MxS32 p_milliseconds)
 [AI] Sleeps the current thread for the given duration in milliseconds. More...
 
MxBool IsRunning ()
 [AI] Returns whether the thread is currently running. More...
 
virtual ~MxThread ()
 [AI] Virtual destructor for MxThread. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MxThread
 MxThread ()
 [AI] Protected constructor for MxThread. More...
 
- Protected Attributes inherited from MxThread
MxCorem_target
 [AI] Pointer to the target object (optional, typically the object being processed by the thread). Offset 0x18 More...
 

Detailed Description

MxTickleThread periodically calls Tickle() on a target MxCore object in a separate thread.

[AI]

[AI] This thread class is used to 'tickle' (update/poll) a target MxCore object at a fixed interval (specified in milliseconds). The Tickle mechanism is central to frame updating and ticking logic in LEGO Island's event loop. The thread executes until IsRunning() is false, after which it delegates to the base MxThread::Run(). [AI]

Definition at line 15 of file mxticklethread.h.

Constructor & Destructor Documentation

◆ MxTickleThread()

MxTickleThread::MxTickleThread ( MxCore p_target,
MxS32  p_frequencyMS 
)

[AI] Constructs a MxTickleThread to tickle a target MxCore object at a fixed interval.

Parameters
p_target[AI] Pointer to the MxCore object that should be tickled periodically.
p_frequencyMS[AI] The tickling frequency in milliseconds, i.e., the interval between calls to Tickle().

Definition at line 10 of file mxticklethread.cpp.

Member Function Documentation

◆ Run()

MxResult MxTickleThread::Run ( )
overridevirtual

[AI] Thread entry point.

Starts the tickling loop, calling Tickle() on m_target at the specified interval.

[AI] Repeatedly calculates elapsed time and sleeps as needed to maintain the requested tickle frequency. Handles clock wrap-around. Exits when IsRunning() returns false and then calls the base class Run(). [AI]

Reimplemented from MxThread.

Definition at line 18 of file mxticklethread.cpp.


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