diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2018-06-07 15:05:53 +0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@iot.bzh> | 2018-06-12 16:23:44 +0200 |
commit | 9a631c30c9c8792865ce2aa0ec06a1bb5fd16751 (patch) | |
tree | e1bd8c4ce3cc408144aedcf0f26fd873d8db8634 /ahl-binding/role.cpp | |
parent | 322f8932476eda944c7d3ac65eafde12c69b2ae9 (diff) |
Add some policy emulation
Add a very simplistic policy emulation just for demo.
The real policy engine will be brought back soon.
Change-Id: I6f77c8dc58ba335eabd1a1d858354a84559d9e7f
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/role.cpp')
-rw-r--r-- | ahl-binding/role.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ahl-binding/role.cpp b/ahl-binding/role.cpp index f0f744f..9338436 100644 --- a/ahl-binding/role.cpp +++ b/ahl-binding/role.cpp @@ -34,6 +34,7 @@ role_t::role_t(json_object* j) jcast(description_, j, "description"); jcast(priority_, j, "priority"); jcast(stream_, j, "stream"); + jcast_array(interrupts_, j, "interrupts"); } role_t& role_t::operator<<(json_object* j) @@ -43,6 +44,7 @@ role_t& role_t::operator<<(json_object* j) jcast(description_, j, "description"); jcast(priority_, j, "priority"); jcast(stream_, j, "stream"); + jcast_array(interrupts_, j, "interrupts"); return *this; } @@ -105,3 +107,8 @@ void role_t::device_uri(std::string v) { device_uri_ = v; } + +const std::vector<interrupt_t>& role_t::interrupts() const +{ + return interrupts_; +} |