summaryrefslogtreecommitdiff
path: root/lib/top_block.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-10-04 21:15:11 -0700
committerJosh Blum2012-10-04 21:15:11 -0700
commit709f8e97cc642e446d357612a6d6512d5a4c5330 (patch)
tree203a53e63fca96fe9e9a72d3fe386102d817b8d2 /lib/top_block.cpp
parent3600e927bf31ca46bb99ef2df83512112fa6a8b2 (diff)
downloadsandhi-709f8e97cc642e446d357612a6d6512d5a4c5330.tar.gz
sandhi-709f8e97cc642e446d357612a6d6512d5a4c5330.tar.bz2
sandhi-709f8e97cc642e446d357612a6d6512d5a4c5330.zip
implementation for the top block global config
Diffstat (limited to 'lib/top_block.cpp')
-rw-r--r--lib/top_block.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/top_block.cpp b/lib/top_block.cpp
index c93bda5..4973b59 100644
--- a/lib/top_block.cpp
+++ b/lib/top_block.cpp
@@ -53,6 +53,16 @@ void ElementImpl::top_block_cleanup(void)
<< std::flush;
}
+GlobalBlockConfig TopBlock::global_config(void) const
+{
+ return (*this)->top_config;
+}
+
+void TopBlock::set_global_config(const GlobalBlockConfig &config)
+{
+ (*this)->top_config = config;
+}
+
void TopBlock::commit(void)
{
this->start(); //ok to re-start, means update
@@ -70,6 +80,10 @@ void TopBlock::start(void)
(*this)->executor->post_all(message);
}
{
+ //send the global block config before alloc
+ (*this)->executor->post_all((*this)->top_config);
+ }
+ {
(*this)->executor->post_all(TopAllocMessage());
}
{