diff options
author | Josh Blum | 2013-05-05 16:57:57 -0700 |
---|---|---|
committer | Josh Blum | 2013-05-05 16:57:57 -0700 |
commit | 1b84453cc51b07eb9106bcd6731a321ff1924d74 (patch) | |
tree | d3b045f4132061a4d6e2b4b4359210973eca40a3 /lib | |
parent | fc196183ad8ac826fbc0b45f6570e68ef7fc669f (diff) | |
download | sandhi-1b84453cc51b07eb9106bcd6731a321ff1924d74.tar.gz sandhi-1b84453cc51b07eb9106bcd6731a321ff1924d74.tar.bz2 sandhi-1b84453cc51b07eb9106bcd6731a321ff1924d74.zip |
gras: added post input buffer/message/tag api calls
This allows the user to post stuff to the input port
from an external entity aka outside of the scheduler.
resolves #86
Diffstat (limited to 'lib')
-rw-r--r-- | lib/block_message.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/block_message.cpp b/lib/block_message.cpp index 43dc7b4..eae0c68 100644 --- a/lib/block_message.cpp +++ b/lib/block_message.cpp @@ -47,3 +47,28 @@ void Block::propagate_tags(const size_t i, const TagIter &iter) } } } + +void Block::post_input_tag(const size_t which_input, const Tag &tag) +{ + InputTagMessage message(tag); + message.index = which_input; + Theron::Actor &actor = *((*this)->block); + actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress()); +} + +void Block::post_input_msg(const size_t which_input, const PMCC &msg) +{ + InputMsgMessage message(msg); + message.index = which_input; + Theron::Actor &actor = *((*this)->block); + actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress()); +} + +void Block::post_input_buffer(const size_t which_input, const SBuffer &buffer) +{ + InputBufferMessage message; + message.index = which_input; + message.buffer = buffer; + Theron::Actor &actor = *((*this)->block); + actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress()); +} |