Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
Pothos::Block Class Reference

#include <Block.hpp>

Inheritance diagram for Pothos::Block:
Inheritance graph
[legend]

Public Member Functions

 Block (void)
 Default constructor. More...
 
virtual ~Block (void)
 Virtual destructor. More...
 
void setThreadPool (const ThreadPool &threadPool)
 Set the thread pool used by this block. More...
 
const ThreadPoolgetThreadPool (void) const
 Get the thread pool used by this block. More...
 
std::vector< PortInfoinputPortInfo (void)
 
std::vector< PortInfooutputPortInfo (void)
 
InputPortinput (const std::string &name) const
 
InputPortinput (const size_t index) const
 
OutputPortoutput (const std::string &name) const
 
OutputPortoutput (const size_t index) const
 
const std::vector< InputPort * > & inputs (void) const
 
const std::vector< OutputPort * > & outputs (void) const
 
const std::map< std::string,
InputPort * > & 
allInputs (void) const
 
const std::map< std::string,
OutputPort * > & 
allOutputs (void) const
 
const WorkInfoworkInfo (void) const
 
bool isActive (void) const
 
void setupInput (const std::string &name, const DType &dtype="", const std::string &domain="")
 
void setupInput (const size_t index, const DType &dtype="", const std::string &domain="")
 
void setupOutput (const std::string &name, const DType &dtype="", const std::string &domain="")
 
void setupOutput (const size_t index, const DType &dtype="", const std::string &domain="")
 
void registerCallable (const std::string &name, const Callable &call)
 
void registerSignal (const std::string &name)
 
void registerSlot (const std::string &name)
 
void registerProbe (const std::string &name, const std::string &signalName="", const std::string &slotName="")
 
void yield (void)
 
Object opaqueCallMethod (const std::string &name, const Object *inputArgs, const size_t numArgs) const
 
- Public Member Functions inherited from Pothos::Connectable
virtual ~Connectable (void)
 virtual destructor for inheritance More...
 
void setName (const std::string &name)
 
const std::string & getName (void) const
 
std::vector< std::string > inputPortNames (void)
 
std::vector< std::string > outputPortNames (void)
 
- Public Member Functions inherited from Pothos::CallInterface
virtual ~CallInterface (void)
 
template<typename ReturnType , $>
ReturnType call ($expand('A%d &&a%d', $NARGS)) const
 Call a bound method/function with a return type and $NARGS args. More...
 
template< $>
Object callObject ($expand('A%d &&a%d', $NARGS)) const
 Call a bound method/function with an Object return and $NARGS args. More...
 
template< $>
void callVoid ($expand('A%d &&a%d', $NARGS)) const
 Call a bound method/function with a void return and $NARGS args. More...
 
virtual ~CallInterface (void)
 
template<typename ReturnType >
ReturnType call () const
 Call a bound method/function with a return type and 0 args. More...
 
Object callObject () const
 Call a bound method/function with an Object return and 0 args. More...
 
void callVoid () const
 Call a bound method/function with a void return and 0 args. More...
 
template<typename ReturnType , typename A0 >
ReturnType call (A0 &&a0) const
 Call a bound method/function with a return type and 1 args. More...
 
template<typename A0 >
Object callObject (A0 &&a0) const
 Call a bound method/function with an Object return and 1 args. More...
 
template<typename A0 >
void callVoid (A0 &&a0) const
 Call a bound method/function with a void return and 1 args. More...
 
template<typename ReturnType , typename A0 , typename A1 >
ReturnType call (A0 &&a0, A1 &&a1) const
 Call a bound method/function with a return type and 2 args. More...
 
template<typename A0 , typename A1 >
Object callObject (A0 &&a0, A1 &&a1) const
 Call a bound method/function with an Object return and 2 args. More...
 
template<typename A0 , typename A1 >
void callVoid (A0 &&a0, A1 &&a1) const
 Call a bound method/function with a void return and 2 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2) const
 Call a bound method/function with a return type and 3 args. More...
 
template<typename A0 , typename A1 , typename A2 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2) const
 Call a bound method/function with an Object return and 3 args. More...
 
template<typename A0 , typename A1 , typename A2 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2) const
 Call a bound method/function with a void return and 3 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3) const
 Call a bound method/function with a return type and 4 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3) const
 Call a bound method/function with an Object return and 4 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3) const
 Call a bound method/function with a void return and 4 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4) const
 Call a bound method/function with a return type and 5 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4) const
 Call a bound method/function with an Object return and 5 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4) const
 Call a bound method/function with a void return and 5 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5) const
 Call a bound method/function with a return type and 6 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5) const
 Call a bound method/function with an Object return and 6 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5) const
 Call a bound method/function with a void return and 6 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6) const
 Call a bound method/function with a return type and 7 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6) const
 Call a bound method/function with an Object return and 7 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6) const
 Call a bound method/function with a void return and 7 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7) const
 Call a bound method/function with a return type and 8 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7) const
 Call a bound method/function with an Object return and 8 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7) const
 Call a bound method/function with a void return and 8 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7, A8 &&a8) const
 Call a bound method/function with a return type and 9 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7, A8 &&a8) const
 Call a bound method/function with an Object return and 9 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7, A8 &&a8) const
 Call a bound method/function with a void return and 9 args. More...
 
- Public Member Functions inherited from Pothos::Util::UID
 UID (void)
 Default constructor. More...
 
const std::string & uid (void) const
 Get the UID as a string. More...
 
- Public Member Functions inherited from Pothos::Util::RefHolder
virtual ~RefHolder (void)
 Virtual destructor for derived classes. More...
 
void holdRef (const Object &container)
 Store a copy of this object container. More...
 
void dropRef (const Object &container)
 Drop a copy of this object container. More...
 

Public Attributes

std::shared_ptr< WorkerActor_actor
 

Protected Member Functions

virtual void work (void)
 
virtual void activate (void)
 
virtual void deactivate (void)
 
virtual void propagateLabels (const InputPort *input)
 
virtual Object opaqueCallHandler (const std::string &name, const Object *inputArgs, const size_t numArgs)
 
virtual std::shared_ptr
< BufferManager
getInputBufferManager (const std::string &name, const std::string &domain)
 
virtual std::shared_ptr
< BufferManager
getOutputBufferManager (const std::string &name, const std::string &domain)
 
- Protected Member Functions inherited from Pothos::CallRegistry
virtual ~CallRegistry (void)
 Virtual destructor for subclassing. More...
 
template< $, typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)($expand('A%d', $NARGS)))
 
template< $, typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)($expand('A%d', $NARGS)) const)
 
virtual ~CallRegistry (void)
 Virtual destructor for subclassing. More...
 
template<typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)())
 
template<typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)() const)
 
template<typename A0 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0))
 
template<typename A0 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0) const)
 
template<typename A0 , typename A1 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1))
 
template<typename A0 , typename A1 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1) const)
 
template<typename A0 , typename A1 , typename A2 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2))
 
template<typename A0 , typename A1 , typename A2 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2) const)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3) const)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4) const)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5) const)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6) const)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7) const)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7, A8))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType , typename ClassType , typename InstanceType >
void registerCall (InstanceType *instance, const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7, A8) const)
 
virtual ~CallInterface (void)
 
template<typename ReturnType , $>
ReturnType call ($expand('A%d &&a%d', $NARGS)) const
 Call a bound method/function with a return type and $NARGS args. More...
 
template< $>
Object callObject ($expand('A%d &&a%d', $NARGS)) const
 Call a bound method/function with an Object return and $NARGS args. More...
 
template< $>
void callVoid ($expand('A%d &&a%d', $NARGS)) const
 Call a bound method/function with a void return and $NARGS args. More...
 
virtual ~CallInterface (void)
 
template<typename ReturnType >
ReturnType call () const
 Call a bound method/function with a return type and 0 args. More...
 
Object callObject () const
 Call a bound method/function with an Object return and 0 args. More...
 
void callVoid () const
 Call a bound method/function with a void return and 0 args. More...
 
template<typename ReturnType , typename A0 >
ReturnType call (A0 &&a0) const
 Call a bound method/function with a return type and 1 args. More...
 
template<typename A0 >
Object callObject (A0 &&a0) const
 Call a bound method/function with an Object return and 1 args. More...
 
template<typename A0 >
void callVoid (A0 &&a0) const
 Call a bound method/function with a void return and 1 args. More...
 
template<typename ReturnType , typename A0 , typename A1 >
ReturnType call (A0 &&a0, A1 &&a1) const
 Call a bound method/function with a return type and 2 args. More...
 
template<typename A0 , typename A1 >
Object callObject (A0 &&a0, A1 &&a1) const
 Call a bound method/function with an Object return and 2 args. More...
 
template<typename A0 , typename A1 >
void callVoid (A0 &&a0, A1 &&a1) const
 Call a bound method/function with a void return and 2 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2) const
 Call a bound method/function with a return type and 3 args. More...
 
template<typename A0 , typename A1 , typename A2 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2) const
 Call a bound method/function with an Object return and 3 args. More...
 
template<typename A0 , typename A1 , typename A2 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2) const
 Call a bound method/function with a void return and 3 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3) const
 Call a bound method/function with a return type and 4 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3) const
 Call a bound method/function with an Object return and 4 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3) const
 Call a bound method/function with a void return and 4 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4) const
 Call a bound method/function with a return type and 5 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4) const
 Call a bound method/function with an Object return and 5 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4) const
 Call a bound method/function with a void return and 5 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5) const
 Call a bound method/function with a return type and 6 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5) const
 Call a bound method/function with an Object return and 6 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5) const
 Call a bound method/function with a void return and 6 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6) const
 Call a bound method/function with a return type and 7 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6) const
 Call a bound method/function with an Object return and 7 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6) const
 Call a bound method/function with a void return and 7 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7) const
 Call a bound method/function with a return type and 8 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7) const
 Call a bound method/function with an Object return and 8 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7) const
 Call a bound method/function with a void return and 8 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
ReturnType call (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7, A8 &&a8) const
 Call a bound method/function with a return type and 9 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
Object callObject (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7, A8 &&a8) const
 Call a bound method/function with an Object return and 9 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
void callVoid (A0 &&a0, A1 &&a1, A2 &&a2, A3 &&a3, A4 &&a4, A5 &&a5, A6 &&a6, A7 &&a7, A8 &&a8) const
 Call a bound method/function with a void return and 9 args. More...
 
- Protected Member Functions inherited from Pothos::Util::UID
 UID (void)
 Default constructor. More...
 
const std::string & uid (void) const
 Get the UID as a string. More...
 
- Protected Member Functions inherited from Pothos::Util::RefHolder
virtual ~RefHolder (void)
 Virtual destructor for derived classes. More...
 
void holdRef (const Object &container)
 Store a copy of this object container. More...
 
void dropRef (const Object &container)
 Drop a copy of this object container. More...
 

Friends

class WorkerActor
 

Detailed Description

Block is an interface for creating custom computational processing. Users should subclass Block, setup the input and output ports, and overload the work() method for a custom computational task.

The outputs of a Block can be connected to the inputs of another. Any resources produced at the Block's output ports will be make available to the other Block's connected input ports.

Constructor & Destructor Documentation

Pothos::Block::Block ( void  )
explicit

Default constructor.

virtual Pothos::Block::~Block ( void  )
virtual

Virtual destructor.

Member Function Documentation

virtual void Pothos::Block::activate ( void  )
protectedvirtual

The activate() method, called when the topology execution begins. Override this call to implement a custom topology activation hook.

const std::map< std::string, Pothos::InputPort * > & Pothos::Block::allInputs ( void  ) const
inline

Get all input ports. These ports can be accessed with the port name string.

Returns
a map of pointers to input port objects
const std::map< std::string, Pothos::OutputPort * > & Pothos::Block::allOutputs ( void  ) const
inline

Get all output ports. These ports can be accessed with the port name string.

Returns
a map of pointers to output port objects
virtual void Pothos::Block::deactivate ( void  )
protectedvirtual

The deactivate() method, called when the topology execution ends. Override this call to implement a custom topology deactivation hook.

virtual std::shared_ptr<BufferManager> Pothos::Block::getInputBufferManager ( const std::string &  name,
const std::string &  domain 
)
protectedvirtual

Get a buffer manager for this input port. The user may overload this call to install a custom buffer manager.

The domain parameter describes the memory used by the upstream blocks. Knowing the domain allows the implementer of getInputBufferManager to

  • abdicate to the upstream's buffer managers (null return)
  • provide a replacement upstream buffer manager (return manager)
  • protest the ability to interact with the domain (throw exception)
Exceptions
PortDomainErrorwhen the domain is incompatible
Parameters
namethe name of an input port on this block
domainthe domain of the upstream blocks
Returns
a new buffer manager for this port or null sptr
virtual std::shared_ptr<BufferManager> Pothos::Block::getOutputBufferManager ( const std::string &  name,
const std::string &  domain 
)
protectedvirtual

Get a buffer manager for this output port. The user may overload this call to install a custom buffer manager.

The domain parameter describes the memory used by the downstream blocks. Knowing the domain allows the implementer of getOutputBufferManager to

  • abdicate to the downstream's buffer managers (null return)
  • provide a replacement downstream buffer manager (return manager)
  • protest the ability to interact with the domain (throw exception)
Exceptions
PortDomainErrorwhen the domain is incompatible
Parameters
namethe name of an output port on this block
domainthe domain of the downstream blocks
Returns
a new buffer manager for this port or null sptr
const ThreadPool& Pothos::Block::getThreadPool ( void  ) const

Get the thread pool used by this block.

Pothos::InputPort * Pothos::Block::input ( const std::string &  name) const
inline

Get the input port at the specified port name.

Pothos::InputPort * Pothos::Block::input ( const size_t  index) const
inline

Get the input port at the specified port index.

std::vector<PortInfo> Pothos::Block::inputPortInfo ( void  )
virtual

Get a vector of info about all of the input ports available.

Implements Pothos::Connectable.

const std::vector< Pothos::InputPort * > & Pothos::Block::inputs ( void  ) const
inline

Get the indexable input ports. These ports have a port name which is an integer. Indexable ports can be accessed with O(1) access time.

Returns
a vector of pointers to input port objects
bool Pothos::Block::isActive ( void  ) const

Is the block in an active state? This is a thread-safe way for a block's methods to determine if the processing is currently active.

Returns
true when the topology is executing
virtual Object Pothos::Block::opaqueCallHandler ( const std::string &  name,
const Object inputArgs,
const size_t  numArgs 
)
protectedvirtual

The opaque call handler handles dispatching calls to registered methods. The user may overload this call to install their own custom handler.

Exceptions
BlockCallNotFoundwhen no call registered for the provided name
Exceptionwhen the registered call itself throws an exception
Parameters
namethe name of a call registered to this Block with registerCall()
inputArgsan array of input arguments wrapped in type Object
numArgsthe number of arguments in the array inputArgs
Returns
the result of making the registered call, wrapped in type Object
Object Pothos::Block::opaqueCallMethod ( const std::string &  name,
const Object inputArgs,
const size_t  numArgs 
) const
virtual

Call a method on a derived instance with opaque input and return types.

Parameters
namethe name of the method as a string
inputArgsan array of input arguments
numArgsthe size of the input array
Returns
the return value as type Object

Implements Pothos::Connectable.

Pothos::OutputPort * Pothos::Block::output ( const std::string &  name) const
inline

Get the output port at the specified port name.

Pothos::OutputPort * Pothos::Block::output ( const size_t  index) const
inline

Get the output port at the specified port index.

std::vector<PortInfo> Pothos::Block::outputPortInfo ( void  )
virtual

Get a vector of info about all of the output ports available.

Implements Pothos::Connectable.

const std::vector< Pothos::OutputPort * > & Pothos::Block::outputs ( void  ) const
inline

Get the indexable output ports. These ports have a port name which is an integer. Indexable ports can be accessed with O(1) access time.

Returns
a vector of pointers to output port objects
virtual void Pothos::Block::propagateLabels ( const InputPort input)
protectedvirtual

The work() thread calls the propagateLabels() method after work() when labels are available to propagate to downstream consumers.

Default behavior: All labels with an index less than the number of consumed elements will be propagated to all output ports. Subclasses may override this call to customize its behavior.

Only the work() thread is allowed to call this method, therefore users should never directly invoke this method.

Access the labels iterator with the call to input->labels(). This iterator will contain only labels from the consumed elements. Forward labels to the output ports using postLabel() on an output port object.

Parameters
inputa pointer to the input port with labels
void Pothos::Block::registerCallable ( const std::string &  name,
const Callable call 
)
virtual

Export a function call on this block to set/get parameters. This call will automatically register a slot of the same name.

Parameters
namethe name of the callable
callthe bound callable method

Implements Pothos::CallRegistry.

void Pothos::Block::registerProbe ( const std::string &  name,
const std::string &  signalName = "",
const std::string &  slotName = "" 
)

Register a probe given the name of a registered call. A probe creates a special slot that will probe the registered call, and creates a triggered signal that will emit the return value of that call.

  • Arguments passed into the probe slot will be forwarded into the registered call.
  • The return value of the registered call will be passed into the first argument of the triggered signal.
  • If the return value of the registered call is void, then the triggered signal will have no arguments.
  • When not specified, the slot's name will be probe[Name], and the signal's name will be [name]Triggered.
Parameters
namethe name of a registered call
signalNamethe name of the triggered signal or empty for automatic
slotNamethe name of the probe slot or empty for automatic
void Pothos::Block::registerSignal ( const std::string &  name)

Register that this block has a signal of the given name. A signal is capable of emitting messages to a slot. The name should not overlap with the name of an output port.

Parameters
namethe name of the signal
void Pothos::Block::registerSlot ( const std::string &  name)

Register that this block has a slot of the given name. A slot is capable of accepting messages from a signal. The name should not overlap with the name of an input port. Note: do not call the registerSlot function in C++, as registerCallable() automatically registers a slot.

Parameters
namethe name of the slot
void Pothos::Block::setThreadPool ( const ThreadPool threadPool)

Set the thread pool used by this block.

void Pothos::Block::setupInput ( const std::string &  name,
const DType dtype = "",
const std::string &  domain = "" 
)

Configure an input port with the given data type. The data type parameter specifies the size in bytes per input element. The data type is only relevant when the port is used for streaming data. The domain parameter is used to specify the type of memory consumed. The domain will be passed into another block's getOutputBufferManager() call.

Parameters
namethe name of this input port
dtypethe data type for elements
domainthe expected memory domain
void Pothos::Block::setupInput ( const size_t  index,
const DType dtype = "",
const std::string &  domain = "" 
)

Configure an input port with the given data type. This call is equivalent to setupInput(std::to_string(index), ...);

Parameters
indexthe index number of this input port
dtypethe data type for elements
domainthe expected memory domain
void Pothos::Block::setupOutput ( const std::string &  name,
const DType dtype = "",
const std::string &  domain = "" 
)

Configure an output port with the given data type. The data type parameter specifies the size in bytes per output element. The data type is only relevant when the port is used for streaming data. The domain parameter is used to specify the type of memory produced. The domain will be passed into another block's getInputBufferManager() call.

Parameters
namethe name of this output port
dtypethe data type for elements
domainthe expected memory domain
void Pothos::Block::setupOutput ( const size_t  index,
const DType dtype = "",
const std::string &  domain = "" 
)

Configure an output port with the given data type. This call is equivalent to setupOutput(std::to_string(index), ...);

Parameters
indexthe index number of this output port
dtypethe data type for elements
domainthe expected memory domain
virtual void Pothos::Block::work ( void  )
protectedvirtual

The work() method, called when resources are available. Subclasses must override this call when creating a worker.

When work() is invoked, the user's code can access the port, consume input resources, and produce output resources.

Only the work() thread is allowed to call this method, therefore users should never directly invoke this method.

const Pothos::WorkInfo & Pothos::Block::workInfo ( void  ) const
inline

Get information about a work session that is not port-specific. The info is valid during calls to work() and propagateLabels().

void Pothos::Block::yield ( void  )

Notify the scheduler that the work() method will yeild the thread context. Call this method when the work() function will not produce or consume, so that the scheduler will call work() again without an external stimulus. Only call this method from within a call to the work() function. A typical use case for calling yield are blocks that must wait on a resource. Such blocks cannot hold the thread context for more than the allowed time, and must therefore return from the work() call without producing output.

Friends And Related Function Documentation

friend class WorkerActor
friend

Member Data Documentation

std::shared_ptr<WorkerActor> Pothos::Block::_actor

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