UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
dcf::ThreadManager Class Reference

#include <thread_manager.hpp>

Inheritance diagram for dcf::ThreadManager:
dcf::Manager

Public Member Functions

 ThreadManager ()
 
virtual ~ThreadManager ()
 
virtual dcf::Managerclone () const
 
virtual size_t getUnitsCount () const
 
virtual dcf::error_t unitAlloc (int unit_id)
 
dcf::error_t nextUnitAlloc (int &id)
 
virtual dcf::error_t unitFree (int unit_id)
 
virtual dcf::error_t unitsFree ()
 
virtual dcf::error_t isAllocatedUnit (int unit_id, bool &is_allocated) const
 
virtual dcf::error_t unitPower (int unit_id, double &power) const
 
- Public Member Functions inherited from dcf::Manager
 Manager ()
 
virtual ~Manager ()
 
dcf::mantype_t type () const
 

Protected Attributes

dcf::IPCMsgMan m_msg_man
 
- Protected Attributes inherited from dcf::Manager
dcf::mantype_t m_type
 

Detailed Description

Manager for threads.

Constructor & Destructor Documentation

dcf::ThreadManager::ThreadManager ( )

Default constructor.

virtual dcf::ThreadManager::~ThreadManager ( )
virtual

Destructs object

Member Function Documentation

virtual dcf::Manager* dcf::ThreadManager::clone ( ) const
virtual

Clones this object and returns pointer of copy.

Implements dcf::Manager.

virtual size_t dcf::ThreadManager::getUnitsCount ( ) const
virtual

Returns number of CPUs

Implements dcf::Manager.

virtual dcf::error_t dcf::ThreadManager::isAllocatedUnit ( int  unit_id,
bool &  is_allocated 
) const
virtual

Is CPU with provided id allocated. Returns ErrSuccess if all good.

Implements dcf::Manager.

dcf::error_t dcf::ThreadManager::nextUnitAlloc ( int &  id)
Tries to allocate next unit in system. Gets allocated unit id.

Returns ErrSuccess if all good.

virtual dcf::error_t dcf::ThreadManager::unitAlloc ( int  unit_id)
virtual
Only sends message that CPU with provided id is allocated.

Returns ErrSuccess if all good.

Implements dcf::Manager.

virtual dcf::error_t dcf::ThreadManager::unitFree ( int  unit_id)
virtual
Only removes message about allocated CPU with provided id and 

from own PID. Returns ErrSuccess if all good.

Implements dcf::Manager.

virtual dcf::error_t dcf::ThreadManager::unitPower ( int  unit_id,
double &  power 
) const
virtual

Gets power of CPU with provided id. Returns ErrSuccess if all good.

Implements dcf::Manager.

virtual dcf::error_t dcf::ThreadManager::unitsFree ( )
virtual
Removes messages about all allocated CPUs from own PID.

Returns ErrSuccess if all good.

Implements dcf::Manager.

Member Data Documentation

dcf::IPCMsgMan dcf::ThreadManager::m_msg_man
protected

IPC Queue manager


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