View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
vistle::StateTracker Class Reference

#include <core/statetracker.h>

Collaboration diagram for vistle::StateTracker:
Collaboration graph
[legend]

Classes

struct  MessageWithPayload
 
struct  Module
 

Public Types

typedef std::recursive_mutex mutex
 
typedef std::unique_lock< mutexmutex_locker
 
typedef std::vector< MessageWithPayloadVistleState
 

Public Member Functions

 StateTracker (const std::string &name, std::shared_ptr< PortTracker > portTracker=std::shared_ptr< PortTracker >())
 
 ~StateTracker ()
 
mutexgetMutex ()
 
bool dispatch (bool &received)
 
int getMasterHub () const
 
std::vector< int > getHubs () const
 
std::vector< int > getSlaveHubs () const
 
const std::string & hubName (int id) const
 
std::vector< int > getRunningList () const
 
std::vector< int > getBusyList () const
 
int getHub (int id) const
 
const HubDatagetHubData (int id) const
 
std::string getModuleName (int id) const
 
int getModuleState (int id) const
 
int getMirrorId (int id) const
 
const std::set< int > & getMirrors (int id) const
 
std::vector< std::string > getParameters (int id) const
 
std::shared_ptr< ParametergetParameter (int id, const std::string &name) const
 
ParameterSet getConnectedParameters (const Parameter &param) const
 
bool handle (const message::Message &msg, const buffer *payload, bool track=true)
 
bool handle (const message::Message &msg, const char *payload, size_t payloadSize, bool track=true)
 
bool handleConnect (const message::Connect &conn)
 
bool handleDisconnect (const message::Disconnect &disc)
 
std::shared_ptr< PortTrackerportTracker () const
 
VistleState getState () const
 
const std::map< AvailableModule::Key, AvailableModule > & availableModules () const
 
void registerObserver (StateObserver *observer)
 
bool registerRequest (const message::uuid_t &uuid)
 
std::shared_ptr< message::BufferwaitForReply (const message::uuid_t &uuid)
 
std::vector< int > waitForSlaveHubs (size_t count)
 
std::vector< int > waitForSlaveHubs (const std::vector< std::string > &names)
 
int graphChangeCount () const
 
std::string loadedWorkflowFile () const
 
std::string sessionUrl () const
 

Protected Types

typedef std::map< std::string, std::shared_ptr< Parameter > > ParameterMap
 
typedef std::map< int, std::string > ParameterOrder
 
typedef std::map< int, ModuleRunningMap
 
typedef std::set< int > ModuleSet
 

Protected Member Functions

std::shared_ptr< message::BufferremoveRequest (const message::uuid_t &uuid)
 
bool registerReply (const message::uuid_t &uuid, const message::Message &msg)
 
void computeHeights ()
 
void processQueue ()
 
void cleanQueue (int moduleId)
 
std::string statusText () const
 

Protected Attributes

RunningMap runningMap
 
RunningMap quitMap
 
ModuleSet busySet
 
int m_graphChangeCount = 0
 
std::map< AvailableModule::Key, AvailableModulem_availableModules
 
std::set< StateObserver * > m_observers
 
VistleState m_queue
 
bool m_processingQueue = false
 

Friends

class ClusterManager
 
class Hub
 
class DataProxy
 
class PortTracker
 

Member Typedef Documentation

◆ ModuleSet

typedef std::set<int> vistle::StateTracker::ModuleSet
protected

◆ mutex

typedef std::recursive_mutex vistle::StateTracker::mutex

◆ mutex_locker

typedef std::unique_lock<mutex> vistle::StateTracker::mutex_locker

◆ ParameterMap

typedef std::map<std::string, std::shared_ptr<Parameter> > vistle::StateTracker::ParameterMap
protected

◆ ParameterOrder

typedef std::map<int, std::string> vistle::StateTracker::ParameterOrder
protected

◆ RunningMap

typedef std::map<int, Module> vistle::StateTracker::RunningMap
protected

◆ VistleState

Constructor & Destructor Documentation

◆ StateTracker()

vistle::StateTracker::StateTracker ( const std::string &  name,
std::shared_ptr< PortTracker portTracker = std::shared_ptr<PortTracker>() 
)

◆ ~StateTracker()

vistle::StateTracker::~StateTracker ( )

Member Function Documentation

◆ availableModules()

const std::map< AvailableModule::Key, AvailableModule > & vistle::StateTracker::availableModules ( ) const

◆ cleanQueue()

void vistle::StateTracker::cleanQueue ( int  moduleId)
protected

◆ computeHeights()

void vistle::StateTracker::computeHeights ( )
protected

◆ dispatch()

bool vistle::StateTracker::dispatch ( bool &  received)

◆ getBusyList()

std::vector< int > vistle::StateTracker::getBusyList ( ) const

◆ getConnectedParameters()

ParameterSet vistle::StateTracker::getConnectedParameters ( const Parameter param) const

◆ getHub()

int vistle::StateTracker::getHub ( int  id) const

◆ getHubData()

const HubData & vistle::StateTracker::getHubData ( int  id) const

◆ getHubs()

std::vector< int > vistle::StateTracker::getHubs ( ) const

◆ getMasterHub()

int vistle::StateTracker::getMasterHub ( ) const

◆ getMirrorId()

int vistle::StateTracker::getMirrorId ( int  id) const

◆ getMirrors()

const std::set< int > & vistle::StateTracker::getMirrors ( int  id) const

◆ getModuleName()

std::string vistle::StateTracker::getModuleName ( int  id) const

◆ getModuleState()

int vistle::StateTracker::getModuleState ( int  id) const

◆ getMutex()

StateTracker::mutex & vistle::StateTracker::getMutex ( )

◆ getParameter()

std::shared_ptr< Parameter > vistle::StateTracker::getParameter ( int  id,
const std::string &  name 
) const

◆ getParameters()

std::vector< std::string > vistle::StateTracker::getParameters ( int  id) const

◆ getRunningList()

std::vector< int > vistle::StateTracker::getRunningList ( ) const

◆ getSlaveHubs()

std::vector< int > vistle::StateTracker::getSlaveHubs ( ) const

◆ getState()

StateTracker::VistleState vistle::StateTracker::getState ( ) const

◆ graphChangeCount()

int vistle::StateTracker::graphChangeCount ( ) const

◆ handle() [1/2]

bool vistle::StateTracker::handle ( const message::Message msg,
const buffer payload,
bool  track = true 
)

◆ handle() [2/2]

bool vistle::StateTracker::handle ( const message::Message msg,
const char *  payload,
size_t  payloadSize,
bool  track = true 
)

◆ handleConnect()

bool vistle::StateTracker::handleConnect ( const message::Connect conn)

◆ handleDisconnect()

bool vistle::StateTracker::handleDisconnect ( const message::Disconnect disc)

◆ hubName()

const std::string & vistle::StateTracker::hubName ( int  id) const

◆ loadedWorkflowFile()

std::string vistle::StateTracker::loadedWorkflowFile ( ) const

◆ portTracker()

std::shared_ptr< PortTracker > vistle::StateTracker::portTracker ( ) const

◆ processQueue()

void vistle::StateTracker::processQueue ( )
protected

◆ registerObserver()

void vistle::StateTracker::registerObserver ( StateObserver observer)

◆ registerReply()

bool vistle::StateTracker::registerReply ( const message::uuid_t uuid,
const message::Message msg 
)
protected

◆ registerRequest()

bool vistle::StateTracker::registerRequest ( const message::uuid_t uuid)

◆ removeRequest()

std::shared_ptr< message::Buffer > vistle::StateTracker::removeRequest ( const message::uuid_t uuid)
protected

◆ sessionUrl()

std::string vistle::StateTracker::sessionUrl ( ) const

◆ statusText()

std::string vistle::StateTracker::statusText ( ) const
protected

◆ waitForReply()

std::shared_ptr< message::Buffer > vistle::StateTracker::waitForReply ( const message::uuid_t uuid)

◆ waitForSlaveHubs() [1/2]

std::vector< int > vistle::StateTracker::waitForSlaveHubs ( const std::vector< std::string > &  names)

◆ waitForSlaveHubs() [2/2]

std::vector< int > vistle::StateTracker::waitForSlaveHubs ( size_t  count)

Friends And Related Function Documentation

◆ ClusterManager

friend class ClusterManager
friend

◆ DataProxy

friend class DataProxy
friend

◆ Hub

friend class Hub
friend

◆ PortTracker

friend class PortTracker
friend

Member Data Documentation

◆ busySet

ModuleSet vistle::StateTracker::busySet
protected

◆ m_availableModules

std::map<AvailableModule::Key, AvailableModule> vistle::StateTracker::m_availableModules
protected

◆ m_graphChangeCount

int vistle::StateTracker::m_graphChangeCount = 0
protected

◆ m_observers

std::set<StateObserver *> vistle::StateTracker::m_observers
protected

◆ m_processingQueue

bool vistle::StateTracker::m_processingQueue = false
protected

◆ m_queue

VistleState vistle::StateTracker::m_queue
protected

◆ quitMap

RunningMap vistle::StateTracker::quitMap
protected

◆ runningMap

RunningMap vistle::StateTracker::runningMap
protected

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