cmlabs::JThread Class Reference

#include <JThread.h>

Inheritance diagram for cmlabs::JThread:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::JThread:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 JThread (bool start=false, int pri=0)
virtual ~JThread ()
virtual void run ()
bool start ()
bool join ()
bool terminate ()
bool terminateWait (int timeout)
bool suspend ()
bool resume ()
bool waitThread (long ms)
bool isRunning ()
bool isThread ()
JString printThreadStatistics (ThreadStat newStat)
ThreadStat getLocalThreadStatistics ()
 get stat on local thread
bool resetLocalThreadStatistics ()
 reset stat on local thread
JString printLocalThreadStatistics ()
 print stat on local thread
ThreadStat getCallingThreadStatistics ()
 get stat on own (calling) thread
bool resetCallingThreadStatistics ()
 reset stat on own (calling) thread
JString printCallingThreadStatistics ()
 print stat on own (calling) thread
ThreadStat getCurrentCPUUsage ()
ThreadStat getAverageCPUUsage ()
ThreadStat getCPUUsage (HANDLE aThread)
int getPriority ()
bool setPriority (int pri)
bool signalThread (int signo)
bool waitSignal (int signo)
void yield ()
bool unitTest ()
bool priorityTest ()
JString osGetNameVersion ()
JString osGetName ()
JString osGetVersion ()
JString osGetMachineArch ()
JString osGetMachineName ()
JString osGetMachineAddress ()
JString osGetType ()
double osGetTotalMemory ()
double osGetCPUSpeed ()
int osGetCPUCount ()
JTime getStartTime ()
JTime getEndTime ()
ThreadStat procAverageCPUUsage ()
ThreadStat procCurrentCPUUsage ()
JString getComputerName ()
int procMemUsage ()
bool addToAllThreadsStats (HANDLE aThread)
bool addToAllThreadsStats (HANDLE aThread, ThreadStat *stat)
ThreadStat getAllThreadsStats ()
bool removeFromAllThreadsStats (HANDLE aThread)
JString runOSTextCommand (JString cmd)

Static Public Member Functions

static Collection getProgramTrace ()

Public Attributes

JString unitTestString
JString name
JSemaphorepublicSemaphore
JSemaphoretestSemaphore
JMutextestMutex
JMutex resetMutex
bool linuxThreadHasFinished
JString localhostName
JTime threadStartTime
JTime threadEndTime
HANDLE hThread

Protected Member Functions

int convPriorityToOS (int pri)
int convPriorityToInternal (int pri)
ThreadStat getCPUUsageOnThread (HANDLE aThread)
bool resetCPUUsageOnThread (HANDLE aThread)
ThreadStat getStoredCPUUsageOnThread (HANDLE aThread)
HANDLE getCallingThreadID ()

Protected Attributes

double usecFreq
int priority
ThreadStat stat
ThreadStat procLastStat
ThreadStat procStartStat
ObjectDictionary statDict


Detailed Description

Definition at line 209 of file JThread.h.


Constructor & Destructor Documentation

cmlabs::JThread::JThread ( bool  start = false,
int  pri = 0 
)

Definition at line 50 of file JThread_Linux.cpp.

cmlabs::JThread::~JThread (  )  [virtual]

Definition at line 64 of file JThread_Linux.cpp.


Member Function Documentation

void cmlabs::JThread::run (  )  [virtual]

bool cmlabs::JThread::start (  ) 

Definition at line 94 of file JThread_Linux.cpp.

bool cmlabs::JThread::join (  ) 

Definition at line 141 of file JThread_Linux.cpp.

bool cmlabs::JThread::terminate (  ) 

Reimplemented in cmlabs::NetworkConnection.

Definition at line 152 of file JThread_Linux.cpp.

bool cmlabs::JThread::terminateWait ( int  timeout  ) 

Definition at line 1119 of file JThread.cpp.

bool cmlabs::JThread::suspend (  ) 

Definition at line 180 of file JThread_Linux.cpp.

bool cmlabs::JThread::resume (  ) 

Definition at line 189 of file JThread_Linux.cpp.

bool cmlabs::JThread::waitThread ( long  ms  ) 

Definition at line 408 of file JThread_Linux.cpp.

bool cmlabs::JThread::isRunning (  ) 

Definition at line 208 of file JThread_Linux.cpp.

bool cmlabs::JThread::isThread (  ) 

Definition at line 274 of file JThread_Linux.cpp.

JString cmlabs::JThread::printThreadStatistics ( ThreadStat  newStat  ) 

Definition at line 1090 of file JThread.cpp.

ThreadStat cmlabs::JThread::getLocalThreadStatistics (  ) 

get stat on local thread

Definition at line 824 of file JThread.cpp.

bool cmlabs::JThread::resetLocalThreadStatistics (  ) 

reset stat on local thread

Definition at line 828 of file JThread.cpp.

JString cmlabs::JThread::printLocalThreadStatistics (  ) 

print stat on local thread

Definition at line 832 of file JThread.cpp.

ThreadStat cmlabs::JThread::getCallingThreadStatistics (  ) 

get stat on own (calling) thread

Definition at line 841 of file JThread.cpp.

bool cmlabs::JThread::resetCallingThreadStatistics (  ) 

reset stat on own (calling) thread

Definition at line 852 of file JThread.cpp.

JString cmlabs::JThread::printCallingThreadStatistics (  ) 

print stat on own (calling) thread

Definition at line 863 of file JThread.cpp.

ThreadStat cmlabs::JThread::getCurrentCPUUsage (  ) 

Definition at line 872 of file JThread.cpp.

ThreadStat cmlabs::JThread::getAverageCPUUsage (  ) 

Definition at line 901 of file JThread.cpp.

ThreadStat cmlabs::JThread::getCPUUsage ( HANDLE  aThread  ) 

Definition at line 216 of file JThread_Linux.cpp.

int cmlabs::JThread::getPriority (  ) 

Definition at line 284 of file JThread_Linux.cpp.

bool cmlabs::JThread::setPriority ( int  pri  ) 

Definition at line 309 of file JThread_Linux.cpp.

bool cmlabs::JThread::signalThread ( int  signo  ) 

bool cmlabs::JThread::waitSignal ( int  signo  ) 

void cmlabs::JThread::yield (  ) 

Definition at line 198 of file JThread_Linux.cpp.

bool cmlabs::JThread::unitTest (  ) 

bool cmlabs::JThread::priorityTest (  ) 

Definition at line 1383 of file JThread.cpp.

JString cmlabs::JThread::osGetNameVersion (  ) 

Definition at line 498 of file JThread_Linux.cpp.

JString cmlabs::JThread::osGetName (  ) 

Definition at line 507 of file JThread_Linux.cpp.

JString cmlabs::JThread::osGetVersion (  ) 

Definition at line 526 of file JThread_Linux.cpp.

JString cmlabs::JThread::osGetMachineArch (  ) 

Definition at line 545 of file JThread_Linux.cpp.

JString cmlabs::JThread::osGetMachineName (  ) 

Definition at line 1018 of file JThread.cpp.

JString cmlabs::JThread::osGetMachineAddress (  ) 

Definition at line 1058 of file JThread.cpp.

JString cmlabs::JThread::osGetType (  ) 

Definition at line 1065 of file JThread.cpp.

double cmlabs::JThread::osGetTotalMemory (  ) 

Definition at line 565 of file JThread_Linux.cpp.

double cmlabs::JThread::osGetCPUSpeed (  ) 

Definition at line 581 of file JThread_Linux.cpp.

int cmlabs::JThread::osGetCPUCount (  ) 

Definition at line 597 of file JThread_Linux.cpp.

JTime cmlabs::JThread::getStartTime (  ) 

Reimplemented in cmlabs::CommunicationRecorder.

Definition at line 1112 of file JThread.cpp.

JTime cmlabs::JThread::getEndTime (  ) 

Definition at line 1115 of file JThread.cpp.

ThreadStat cmlabs::JThread::procAverageCPUUsage (  ) 

Definition at line 1364 of file JThread.cpp.

ThreadStat cmlabs::JThread::procCurrentCPUUsage (  ) 

Definition at line 1369 of file JThread.cpp.

JString cmlabs::JThread::getComputerName (  ) 

Definition at line 713 of file JThread_Linux.cpp.

int cmlabs::JThread::procMemUsage (  ) 

Definition at line 640 of file JThread_Linux.cpp.

bool cmlabs::JThread::addToAllThreadsStats ( HANDLE  aThread  ) 

Definition at line 86 of file JThread.cpp.

bool cmlabs::JThread::addToAllThreadsStats ( HANDLE  aThread,
ThreadStat stat 
)

Definition at line 80 of file JThread.cpp.

ThreadStat cmlabs::JThread::getAllThreadsStats (  ) 

Definition at line 105 of file JThread.cpp.

bool cmlabs::JThread::removeFromAllThreadsStats ( HANDLE  aThread  ) 

Definition at line 92 of file JThread.cpp.

JString cmlabs::JThread::runOSTextCommand ( JString  cmd  ) 

Definition at line 615 of file JThread_Linux.cpp.

Collection cmlabs::JThread::getProgramTrace (  )  [static]

Definition at line 724 of file JThread_Linux.cpp.

int cmlabs::JThread::convPriorityToOS ( int  pri  )  [protected]

Definition at line 363 of file JThread_Linux.cpp.

int cmlabs::JThread::convPriorityToInternal ( int  pri  )  [protected]

Definition at line 390 of file JThread_Linux.cpp.

ThreadStat cmlabs::JThread::getCPUUsageOnThread ( HANDLE  aThread  )  [protected]

Definition at line 928 of file JThread.cpp.

bool cmlabs::JThread::resetCPUUsageOnThread ( HANDLE  aThread  )  [protected]

Definition at line 964 of file JThread.cpp.

ThreadStat cmlabs::JThread::getStoredCPUUsageOnThread ( HANDLE  aThread  )  [protected]

Definition at line 984 of file JThread.cpp.

HANDLE cmlabs::JThread::getCallingThreadID (  )  [protected]

Definition at line 82 of file JThread_Linux.cpp.


Member Data Documentation

Definition at line 262 of file JThread.h.

Reimplemented in cmlabs::MediaServer.

Definition at line 265 of file JThread.h.

Definition at line 266 of file JThread.h.

Definition at line 267 of file JThread.h.

Definition at line 268 of file JThread.h.

Definition at line 270 of file JThread.h.

Definition at line 272 of file JThread.h.

Definition at line 303 of file JThread.h.

Definition at line 304 of file JThread.h.

Definition at line 304 of file JThread.h.

Definition at line 305 of file JThread.h.

double cmlabs::JThread::usecFreq [protected]

Definition at line 314 of file JThread.h.

int cmlabs::JThread::priority [protected]

Definition at line 318 of file JThread.h.

Definition at line 319 of file JThread.h.

Definition at line 320 of file JThread.h.

Definition at line 321 of file JThread.h.

Definition at line 326 of file JThread.h.


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

Generated on Tue Jul 7 16:22:56 2009 for CoreLibrary by  doxygen 1.5.6