summaryrefslogtreecommitdiff
path: root/lib/block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/block.cpp')
-rw-r--r--lib/block.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/block.cpp b/lib/block.cpp
index 85f7654..c806063 100644
--- a/lib/block.cpp
+++ b/lib/block.cpp
@@ -34,7 +34,6 @@ Block::Block(const std::string &name):
(*this)->block->name = name; //for debug purposes
//setup some state variables
- (*this)->block->topology_init = false;
(*this)->block->block_ptr = this;
(*this)->block->block_state = BlockActor::BLOCK_STATE_INIT;
@@ -89,8 +88,11 @@ InputPortConfig Block::get_input_config(const size_t which_input) const
void Block::set_input_config(const size_t which_input, const InputPortConfig &config)
{
vector_set((*this)->block->input_configs, config, which_input);
- if ((*this)->block->topology_init)
- (*this)->block->Push(UpdateInputsMessage(), Theron::Address());
+ {
+ InputUpdateMessage message;
+ message.index = which_input;
+ (*this)->block->Push(message, Theron::Address());
+ }
}
OutputPortConfig Block::get_output_config(const size_t which_output) const
@@ -101,8 +103,11 @@ OutputPortConfig Block::get_output_config(const size_t which_output) const
void Block::set_output_config(const size_t which_output, const OutputPortConfig &config)
{
vector_set((*this)->block->output_configs, config, which_output);
- if ((*this)->block->topology_init)
- (*this)->block->Push(UpdateInputsMessage(), Theron::Address());
+ {
+ OutputUpdateMessage message;
+ message.index = which_output;
+ (*this)->block->Push(message, Theron::Address());
+ }
}
void Block::consume(const size_t which_input, const size_t num_items)