DSPatch  v.3.00
C++ Cross-Platform, Object-Oriented, Flow-Based Programming Library
Public Types | Public Member Functions | Static Public Member Functions | List of all members
DspThread Class Referenceabstract

Cross-platform, object-oriented thread. More...

#include <DspThreadNull.h>

Inheritance diagram for DspThread:
DspCircuitThread DspComponentThread

Public Types

enum  Priority {
  IdlePriority = -15, LowestPriority = -2, LowPriority = -1, NormalPriority = 0,
  HighPriority = 1, HighestPriority = 2, TimeCriticalPriority = 15, IdlePriority = -15,
  LowestPriority = -2, LowPriority = -1, NormalPriority = 0, HighPriority = 1,
  HighestPriority = 2, TimeCriticalPriority = 15, IdlePriority = -15, LowestPriority = -2,
  LowPriority = -1, NormalPriority = 0, HighPriority = 1, HighestPriority = 2,
  TimeCriticalPriority = 15
}
 
enum  Priority {
  IdlePriority = -15, LowestPriority = -2, LowPriority = -1, NormalPriority = 0,
  HighPriority = 1, HighestPriority = 2, TimeCriticalPriority = 15, IdlePriority = -15,
  LowestPriority = -2, LowPriority = -1, NormalPriority = 0, HighPriority = 1,
  HighestPriority = 2, TimeCriticalPriority = 15, IdlePriority = -15, LowestPriority = -2,
  LowPriority = -1, NormalPriority = 0, HighPriority = 1, HighestPriority = 2,
  TimeCriticalPriority = 15
}
 
enum  Priority {
  IdlePriority = -15, LowestPriority = -2, LowPriority = -1, NormalPriority = 0,
  HighPriority = 1, HighestPriority = 2, TimeCriticalPriority = 15, IdlePriority = -15,
  LowestPriority = -2, LowPriority = -1, NormalPriority = 0, HighPriority = 1,
  HighestPriority = 2, TimeCriticalPriority = 15, IdlePriority = -15, LowestPriority = -2,
  LowPriority = -1, NormalPriority = 0, HighPriority = 1, HighestPriority = 2,
  TimeCriticalPriority = 15
}
 

Public Member Functions

virtual void Start (Priority priority)
 
virtual void Stop ()
 
virtual void Start (Priority priority=NormalPriority)
 
virtual void Stop ()
 
 DspThread (DspThread const &)
 
virtual void Start (Priority priority=NormalPriority)
 
virtual void Stop ()
 

Static Public Member Functions

static void SetPriority (Priority priority)
 
static void MsSleep (int milliseconds)
 
static void SetPriority (Priority priority)
 
static void MsSleep (int milliseconds)
 
static void SetPriority (Priority priority)
 
static void MsSleep (int milliseconds)
 

Detailed Description

Cross-platform, object-oriented thread.

An class that is required to run actions in a parallel thread can be derived from DspThread in order to inherit multi-threading abilities. The Start() method initiates a parallel thread and executes the private virtual _Run() method in that thread. The derived class must override this _Run() method with one that executes the required parallel actions. Other threads may use the static MsSleep() and SetPriority() methods without having to derive from, or create an instance of DspThread. Priority for the created thread, or calling threads (via SetPriority()), may be selected from the public enumeration: Priority.

Definition at line 41 of file DspThreadNull.h.


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