|
CPN
Computational Process Networks
|
#include <PseudoNode.h>
Inheritance diagram for CPN::PseudoNode:
Collaboration diagram for CPN::PseudoNode:Public Member Functions | |
| PseudoNode (const std::string &name_, Key_t k, shared_ptr< Context > ctx) | |
| virtual | ~PseudoNode () |
| const std::string & | GetName () const |
| Key_t | GetKey () const |
| shared_ptr< QueueReader > | GetIQueue (const std::string &portname) |
| This method is for use by the user to aquire a reader endpoint. This function blocks until the CPN::Kernel hands this node the queue associated with the endpoint. More... | |
| shared_ptr< QueueWriter > | GetOQueue (const std::string &portname) |
| This method is for use by the user to aquire a writer endpoint. This function blocks until the CPN::Kernel hands this node the queue associated with the endpoint. More... | |
| void | CreateReader (shared_ptr< QueueBase > q) |
| for use by the CPN::Kernel to create a new read endpoint. More... | |
| void | CreateWriter (shared_ptr< QueueBase > q) |
| for use by the CPN::Kernel to create a new writer endpoint. More... | |
| void | NotifyTerminate () |
| Called by the kernel when it is shutting down. More... | |
| virtual void | Shutdown () |
| Perform actions (like joining a thread) before destruction. More... | |
| virtual bool | IsPurePseudo () |
| virtual void | LogState () |
| For debugging ONLY! More... | |
Protected Attributes | |
| Logger | logger |
Private Types | |
| typedef std::map< Key_t, shared_ptr< QueueReader > > | ReaderMap |
| typedef std::map< Key_t, shared_ptr< QueueWriter > > | WriterMap |
Private Member Functions | |
| PseudoNode (const PseudoNode &) | |
| void | ReleaseReader (Key_t ekey) |
| void | ReleaseWriter (Key_t ekey) |
| shared_ptr< QueueReader > | GetReader (Key_t ekey) |
| shared_ptr< QueueWriter > | GetWriter (Key_t ekey) |
Private Attributes | |
| Sync::ReentrantLock | lock |
| Sync::ReentrantCondition | cond |
| const std::string | name |
| const Key_t | nodekey |
| shared_ptr< D4R::Node > | d4rnode |
| ReaderMap | readermap |
| WriterMap | writermap |
| shared_ptr< Context > | context |
Definition at line 34 of file PseudoNode.h.
|
private |
Definition at line 91 of file PseudoNode.h.
|
private |
Definition at line 92 of file PseudoNode.h.
Definition at line 31 of file PseudoNode.cc.
|
virtual |
Definition at line 40 of file PseudoNode.cc.
|
private |
| void CPN::PseudoNode::CreateReader | ( | shared_ptr< QueueBase > | q | ) |
for use by the CPN::Kernel to create a new read endpoint.
Definition at line 55 of file PseudoNode.cc.
References ASSERT, cond, d4rnode, lock, readermap, and Sync::ReentrantCondition::Signal().
Here is the call graph for this function:| void CPN::PseudoNode::CreateWriter | ( | shared_ptr< QueueBase > | q | ) |
for use by the CPN::Kernel to create a new writer endpoint.
Definition at line 68 of file PseudoNode.cc.
References ASSERT, cond, d4rnode, lock, Sync::ReentrantCondition::Signal(), and writermap.
Here is the call graph for this function:| shared_ptr< QueueReader > CPN::PseudoNode::GetIQueue | ( | const std::string & | portname | ) |
This method is for use by the user to aquire a reader endpoint. This function blocks until the CPN::Kernel hands this node the queue associated with the endpoint.
| portname | the port name of the reader to get. |
Definition at line 43 of file PseudoNode.cc.
References context, GetReader(), and nodekey.
Here is the call graph for this function:
|
inline |
Definition at line 43 of file PseudoNode.h.
Referenced by CPN::NodeBase::EntryPoint().
Here is the caller graph for this function:
|
inline |
Definition at line 40 of file PseudoNode.h.
Referenced by CPN::NodeBase::EntryPoint(), and CPN::NodeBase::GetParam().
Here is the caller graph for this function:| shared_ptr< QueueWriter > CPN::PseudoNode::GetOQueue | ( | const std::string & | portname | ) |
This method is for use by the user to aquire a writer endpoint. This function blocks until the CPN::Kernel hands this node the queue associated with the endpoint.
| portname | the port name fo the writer to get. |
Definition at line 49 of file PseudoNode.cc.
References context, GetWriter(), and nodekey.
Here is the call graph for this function:
|
private |
Definition at line 132 of file PseudoNode.cc.
References cond, context, lock, readermap, and Sync::ReentrantCondition::Wait().
Referenced by GetIQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 147 of file PseudoNode.cc.
References cond, context, lock, Sync::ReentrantCondition::Wait(), and writermap.
Referenced by GetOQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented in CPN::NodeBase.
Definition at line 163 of file PseudoNode.cc.
|
virtual |
For debugging ONLY!
Reimplemented in CPN::NodeBase.
Definition at line 167 of file PseudoNode.cc.
References D4R::Tag::Count(), d4rnode, Logger::Error(), D4R::Tag::Key(), logger, nodekey, D4R::Tag::QueueKey(), D4R::Tag::QueueSize(), readermap, and writermap.
Referenced by CPN::NodeBase::LogState().
Here is the call graph for this function:
Here is the caller graph for this function:| void CPN::PseudoNode::NotifyTerminate | ( | ) |
Called by the kernel when it is shutting down.
Definition at line 123 of file PseudoNode.cc.
References cond, lock, readermap, Sync::ReentrantCondition::Signal(), and writermap.
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::QueueReleaser.
Definition at line 99 of file PseudoNode.cc.
References lock, readermap, and AutoLock< Lockable >::Unlock().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::QueueReleaser.
Definition at line 111 of file PseudoNode.cc.
References lock, AutoLock< Lockable >::Unlock(), and writermap.
Here is the call graph for this function:
|
virtual |
Perform actions (like joining a thread) before destruction.
Reimplemented in CPN::NodeBase.
Definition at line 81 of file PseudoNode.cc.
References lock, readermap, AutoLock< Lockable >::Unlock(), and writermap.
Referenced by CPN::NodeBase::Shutdown().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 86 of file PseudoNode.h.
Referenced by CreateReader(), CreateWriter(), GetReader(), GetWriter(), and NotifyTerminate().
|
private |
Definition at line 96 of file PseudoNode.h.
Referenced by GetIQueue(), GetOQueue(), GetReader(), and GetWriter().
|
private |
Definition at line 89 of file PseudoNode.h.
Referenced by CreateReader(), CreateWriter(), and LogState().
|
private |
Definition at line 85 of file PseudoNode.h.
Referenced by CreateReader(), CreateWriter(), GetReader(), GetWriter(), NotifyTerminate(), ReleaseReader(), ReleaseWriter(), and Shutdown().
|
protected |
Definition at line 76 of file PseudoNode.h.
Referenced by CPN::NodeBase::EntryPoint(), LogState(), and CPN::NodeBase::LogState().
|
private |
Definition at line 87 of file PseudoNode.h.
|
private |
Definition at line 88 of file PseudoNode.h.
Referenced by GetIQueue(), GetOQueue(), and LogState().
|
private |
Definition at line 93 of file PseudoNode.h.
Referenced by CreateReader(), GetReader(), LogState(), NotifyTerminate(), ReleaseReader(), and Shutdown().
|
private |
Definition at line 94 of file PseudoNode.h.
Referenced by CreateWriter(), GetWriter(), LogState(), NotifyTerminate(), ReleaseWriter(), and Shutdown().
1.8.5