summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJosh Blum2013-04-23 21:04:05 -0700
committerJosh Blum2013-04-23 21:04:05 -0700
commitcf930158eabb585552c9b2691370c5ceb7fc6d76 (patch)
tree40cf52b909acbb3e303105c70652c6446beeb832 /lib
parentcd9fd46b1483e30f8f559c46ce2a244f93f2b438 (diff)
downloadsandhi-cf930158eabb585552c9b2691370c5ceb7fc6d76.tar.gz
sandhi-cf930158eabb585552c9b2691370c5ceb7fc6d76.tar.bz2
sandhi-cf930158eabb585552c9b2691370c5ceb7fc6d76.zip
gras: use framework send, prepare for theron v6
Diffstat (limited to 'lib')
-rw-r--r--lib/block.cpp5
-rw-r--r--lib/block_props.cpp2
-rw-r--r--lib/element_impl.hpp2
-rw-r--r--lib/top_block_query.cpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/lib/block.cpp b/lib/block.cpp
index 82c0535..0015f10 100644
--- a/lib/block.cpp
+++ b/lib/block.cpp
@@ -153,17 +153,18 @@ const OutputPortConfig &Block::output_config(const size_t which_output) const
void Block::commit_config(void)
{
+ Theron::Actor &actor = *((*this)->block);
for (size_t i = 0; i < (*this)->block->get_num_inputs(); i++)
{
InputUpdateMessage message;
message.index = i;
- (*this)->block->Push(message, Theron::Address());
+ actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress());
}
for (size_t i = 0; i < (*this)->block->get_num_outputs(); i++)
{
OutputUpdateMessage message;
message.index = i;
- (*this)->block->Push(message, Theron::Address());
+ actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress());
}
}
diff --git a/lib/block_props.cpp b/lib/block_props.cpp
index 8e68434..d799805 100644
--- a/lib/block_props.cpp
+++ b/lib/block_props.cpp
@@ -88,7 +88,7 @@ static PMCC prop_access_dispatcher(ActorType &actor, const std::string &key, con
message.set = set;
message.key = key;
message.value = value;
- actor->Push(message, receiver.GetAddress());
+ actor->GetFramework().Send(message, receiver.GetAddress(), actor->GetAddress());
receiver.Wait();
if (not receiver.message.error.empty())
{
diff --git a/lib/element_impl.hpp b/lib/element_impl.hpp
index 727e756..89097b4 100644
--- a/lib/element_impl.hpp
+++ b/lib/element_impl.hpp
@@ -59,7 +59,7 @@ struct ElementImpl
{
MessageType message = msg;
message.prio_token = dynamic_cast<BlockActor *>(worker)->prio_token;
- worker->Push(message, receiver.GetAddress());
+ worker->GetFramework().Send(message, receiver.GetAddress(), worker->GetAddress());
}
size_t outstandingCount(this->executor->get_workers().size());
while (outstandingCount != 0)
diff --git a/lib/top_block_query.cpp b/lib/top_block_query.cpp
index 09a3d10..b000a2d 100644
--- a/lib/top_block_query.cpp
+++ b/lib/top_block_query.cpp
@@ -77,7 +77,7 @@ static std::string query_stats(ElementImpl *self, const boost::property_tree::pt
//send a message to the block's actor to query stats
GetStatsMessage message;
message.prio_token = dynamic_cast<BlockActor *>(worker)->prio_token;
- worker->Push(message, receiver.GetAddress());
+ worker->GetFramework().Send(message, receiver.GetAddress(), worker->GetAddress());
outstandingCount++;
}
while (outstandingCount) outstandingCount -= receiver.Wait(outstandingCount);