The private implementation details of the mblock system.
More...
#include <mb_mblock_impl.h>
List of all members.
Public Member Functions |
| mb_mblock_impl (mb_runtime_base *runtime, mb_mblock *mb, const std::string &instance_name) |
| ~mb_mblock_impl () |
mb_port_sptr | define_port (const std::string &port_name, const std::string &protocol_class_name, bool conjugated, mb_port::port_type_t port_type) |
| Define a port.
|
void | define_component (const std::string &component_name, const std::string &class_name, pmt_t user_arg) |
| Define a subcomponent by name.
|
void | connect (const std::string &comp_name1, const std::string &port_name1, const std::string &comp_name2, const std::string &port_name2) |
| connect endpoint_1 to endpoint_2
|
void | disconnect (const std::string &comp_name1, const std::string &port_name1, const std::string &comp_name2, const std::string &port_name2) |
| disconnect endpoint_1 from endpoint_2
|
void | disconnect_component (const std::string component_name) |
| disconnect all connections to specified component
|
void | disconnect_all () |
| disconnect all connections to all components
|
int | nconnections () |
| Return number of connections (QA mostly)
|
bool | walk_tree (mb_visitor *visitor) |
mb_msg_accepter_sptr | make_accepter (pmt_t port_name) |
mb_msg_queue & | msgq () |
std::string | instance_name () const |
| Return instance name of this block.
|
void | set_instance_name (const std::string &name) |
| Set the instance name of this block.
|
std::string | class_name () const |
| Return the class name of this block.
|
void | set_class_name (const std::string &name) |
| Set the class name.
|
bool | lookup_other_endpoint (const mb_port *port, mb_endpoint *ep) |
| If bound, store endpoint from the other end of the connection.
|
mb_mblock * | mblock () const |
| Return point to associated mblock.
|
mb_mblock * | mblock_parent () const |
| Return pointer to the parent of our mblock.
|
mb_mblock_sptr | component (const std::string &comp_name) |
| Lookup a component by name.
|
mb_runtime_base * | runtime () |
| Return the runtime instance.
|
void | set_runtime (mb_runtime_base *runtime) |
| Set the runtime instance.
|
Detailed Description
The private implementation details of the mblock system.
Constructor & Destructor Documentation
mb_mblock_impl::~mb_mblock_impl |
( |
| ) |
|
Member Function Documentation
std::string mb_mblock_impl::class_name |
( |
| ) |
const [inline] |
Return the class name of this block.
mb_mblock_sptr mb_mblock_impl::component |
( |
const std::string & |
comp_name | ) |
|
Lookup a component by name.
void mb_mblock_impl::connect |
( |
const std::string & |
comp_name1, |
|
|
const std::string & |
port_name1, |
|
|
const std::string & |
comp_name2, |
|
|
const std::string & |
port_name2 |
|
) |
| |
connect endpoint_1 to endpoint_2
- Parameters:
-
comp_name1 | component on one end of the connection |
port_name1 | the name of the port on comp1 |
comp_name2 | component on the other end of the connection |
port_name2 | the name of the port on comp2 |
An endpoint is specified by the component's local name (given as component_name in the call to register_component) and the name of the port on that component.
To connect an internal or relay port, use "self" as the component name.
void mb_mblock_impl::define_component |
( |
const std::string & |
component_name, |
|
|
const std::string & |
class_name, |
|
|
pmt_t |
user_arg |
|
) |
| |
Define a subcomponent by name.
Called within the constructor to tell the system the names and identities of our sub-component mblocks.
- Parameters:
-
component_name | The name of the sub-component (must be unique with this mblock). |
class_name | The class of the instance that is to be created. |
user_arg | The argument to pass to the constructor of the component. |
Define a port.
EXTERNAL and RELAY ports are part of our peer interface. INTERNAL ports are used to talk to sub-components.
- Parameters:
-
port_name | The name of the port (must be unique within this mblock). |
protocol_class_name | The name of the protocol class associated with this port. It must already be defined. |
conjugated | Are the incoming and outgoing message sets swapped? |
port_type | INTERNAL, EXTERNAL or RELAY. |
void mb_mblock_impl::disconnect |
( |
const std::string & |
comp_name1, |
|
|
const std::string & |
port_name1, |
|
|
const std::string & |
comp_name2, |
|
|
const std::string & |
port_name2 |
|
) |
| |
disconnect endpoint_1 from endpoint_2
- Parameters:
-
comp_name1 | component on one end of the connection |
port_name1 | the name of the port on comp1 |
comp_name2 | component on the other end of the connection |
port_name2 | the name of the port on comp2 |
An endpoint is specified by the component's local name (given as component_name in the call to register_component) and the name of the port on that component.
To disconnect an internal or relay port, use "self" as the component name.
void mb_mblock_impl::disconnect_all |
( |
| ) |
|
disconnect all connections to all components
void mb_mblock_impl::disconnect_component |
( |
const std::string |
component_name | ) |
|
disconnect all connections to specified component
- Parameters:
-
component_name | component to disconnect |
std::string mb_mblock_impl::instance_name |
( |
| ) |
const [inline] |
Return instance name of this block.
If bound, store endpoint from the other end of the connection.
- Parameters:
-
port | [in] port the port that we're searching for. |
ep | [out] the other end point from the matching connection. |
- Returns:
- true iff there's a matching connection.
mb_mblock* mb_mblock_impl::mblock |
( |
| ) |
const [inline] |
Return point to associated mblock.
mb_mblock* mb_mblock_impl::mblock_parent |
( |
| ) |
const [inline] |
Return pointer to the parent of our mblock.
int mb_mblock_impl::nconnections |
( |
| ) |
|
Return number of connections (QA mostly)
void mb_mblock_impl::set_class_name |
( |
const std::string & |
name | ) |
|
void mb_mblock_impl::set_instance_name |
( |
const std::string & |
name | ) |
|
Set the instance name of this block.
Set the runtime instance.
References runtime().
The documentation for this class was generated from the following file: