diff options
Diffstat (limited to 'lib/gras_impl')
-rw-r--r-- | lib/gras_impl/block_actor.hpp | 7 | ||||
-rw-r--r-- | lib/gras_impl/messages.hpp | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 935c87d..d7429f1 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -19,6 +19,7 @@ #include <Theron/Detail/Threading/Atomic.h> #include <vector> #include <set> +#include <map> namespace gras { @@ -61,6 +62,7 @@ struct BlockActor : Apology::Worker this->RegisterHandler(this, &BlockActor::handle_output_alloc); this->RegisterHandler(this, &BlockActor::handle_output_update); + this->RegisterHandler(this, &BlockActor::handle_prop_access); this->RegisterHandler(this, &BlockActor::handle_self_kick); this->RegisterHandler(this, &BlockActor::handle_get_stats); } @@ -90,6 +92,7 @@ struct BlockActor : Apology::Worker void handle_output_alloc(const OutputAllocMessage &, const Theron::Address); void handle_output_update(const OutputUpdateMessage &, const Theron::Address); + void handle_prop_access(const PropAccessMessage &, const Theron::Address); void handle_self_kick(const SelfKickMessage &, const Theron::Address); void handle_get_stats(const GetStatsMessage &, const Theron::Address); @@ -180,6 +183,10 @@ struct BlockActor : Apology::Worker std::vector<std::vector<OutputHintMessage> > output_allocation_hints; + //property stuff + PMCC prop_access_dispatcher(const std::string &key, const PMCC &value, const bool set); + std::map<std::string, PropertyRegistrySptr> prop_registry; + BlockStats stats; }; diff --git a/lib/gras_impl/messages.hpp b/lib/gras_impl/messages.hpp index 6cc685b..15a7c2e 100644 --- a/lib/gras_impl/messages.hpp +++ b/lib/gras_impl/messages.hpp @@ -131,6 +131,14 @@ struct OutputUpdateMessage //-- do not ack //---------------------------------------------------------------------- +struct PropAccessMessage +{ + bool set; + std::string key; + PMCC value; + std::string error; +}; + struct SelfKickMessage { //empty @@ -172,6 +180,7 @@ THERON_DECLARE_REGISTERED_MESSAGE(gras::OutputHintMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::OutputAllocMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::OutputUpdateMessage); +THERON_DECLARE_REGISTERED_MESSAGE(gras::PropAccessMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::SelfKickMessage); THERON_DECLARE_REGISTERED_MESSAGE(gras::GetStatsMessage); |