REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
#include <base.h>


Public Member Functions | |
Entity ()=default | |
Entity (std::string entityId) | |
const std::string & | get_entity_id () const |
void | rename_entity (const std::string entityId) |
EntityClassifier | get_entity_classifier () const |
EntityClass | get_entity_class () const |
uint8_t | get_entity_type () const |
Version | get_entity_version () const |
uint8_t | get_entity_variant () const |
virtual metadata::eui_t | get_entity_eui () const =0 |
bool | is_entity_class (EntityClass class_) const |
bool | is_entity_type (uint8_t type_) const |
bool | is_entity_version (Version version_) const |
bool | is_entity_variant (uint8_t variant_) const |
virtual std::vector< Entity * > | get_child_entities ()=0 |
virtual Entity * | get_child_entity (const std::string &child_id)=0 |
Entity * | resolve_child_entity (std::string paths[], size_t len) |
Entity * | resolve_child_entity (JsonArrayConstIterator begin, JsonArrayConstIterator end) |
Entity * | resolve_child_entity (JsonArrayConst path) |
virtual bool | init () |
returns true in case of success | |
virtual void | reset (ResetAction action) |
virtual utils::status | write_to_hardware () |
returns true in case of success | |
utils::status | config_from_json (JsonObjectConst cfg) |
Deserialize a new configuration for this entity and all its children from a JsonObject. | |
void | config_to_json (JsonObject &cfg, bool recursive=true) |
Serialize the configuration for this entity to a JsonObject. | |
utils::status | user_set_config (JsonObjectConst msg_in, JsonObject &msg_out) |
utils::status | user_get_config (JsonObjectConst msg_in, JsonObject &msg_out) |
utils::status | user_reset_config (JsonObjectConst msg_in, JsonObject &msg_out) |
void | classifier_to_json (JsonObject &out) |
Provide recursive entity information in a tree. | |
Protected Member Functions | |
virtual utils::status | config_self_from_json (JsonObjectConst cfg)=0 |
Deserialize a new configuration for this entity from a JsonObject. | |
utils::status | config_children_from_json (JsonObjectConst &cfg) |
Deserialize a new configuration for all child entities from a JsonObject. | |
virtual void | config_self_to_json (JsonObject &cfg) |
Serialize the configuration of this entity to a JsonObject. | |
void | config_children_to_json (JsonObject &cfg) |
Serialize the configuration of the child entities of this entity to a JsonObject. | |
Protected Attributes | |
std::string | entity_id |
EntityClassifier | classifier |
Detailed Description
Constructor & Destructor Documentation
◆ Entity() [1/2]
|
default |
◆ Entity() [2/2]
|
inlineexplicit |
Member Function Documentation
◆ classifier_to_json()
FLASHMEM void entities::Entity::classifier_to_json | ( | JsonObject & | out | ) |
Provide recursive entity information in a tree.
Definition at line 125 of file base.cpp.
References utils::toString().
◆ config_children_from_json()
|
protected |
Deserialize a new configuration for all child entities from a JsonObject.
Does not include own configuration,
- See also
- config_self_from_json() instead.
- Returns
- true in case of success, else false
Definition at line 72 of file base.cpp.
References utils::status::success().
◆ config_children_to_json()
|
protected |
Serialize the configuration of the child entities of this entity to a JsonObject.
Does not include own configuration,
- See also
- config_self_to_json() instead.
Definition at line 89 of file base.cpp.
Referenced by config_to_json().
◆ config_from_json()
FLASHMEM utils::status entities::Entity::config_from_json | ( | JsonObjectConst | cfg | ) |
Deserialize a new configuration for this entity and all its children from a JsonObject.
- Returns
- true in case of success, else false
Definition at line 56 of file base.cpp.
References utils::status::success().
◆ config_self_from_json()
|
protectedpure virtual |
Deserialize a new configuration for this entity from a JsonObject.
Implementations shall not traverse to children,
- See also
- config_children_from_json() instead.
- Returns
- true in case of success, else false
Implemented in blocks::CBlock, blocks::CTRLBlock, blocks::EmptyMBlock, blocks::IBlock, blocks::MIntBlock, blocks::SHBlock, blocks::TBlock, blocks::UBlock, carrier::Carrier, platform::Cluster, platform::LUCIDAC, platform::LUCIDACFrontPanel, and platform::REDACBackPanel.
◆ config_self_to_json()
|
inlineprotectedvirtual |
Serialize the configuration of this entity to a JsonObject.
Implementations shall not traverse to children,
- See also
- config_children_to_json() instead.
Reimplemented in blocks::CBlock, blocks::IBlock, blocks::MIntBlock, blocks::TBlock, blocks::UBlock, carrier::Carrier, platform::LUCIDAC, and platform::LUCIDACFrontPanel.
Definition at line 205 of file base.h.
Referenced by config_to_json().
◆ config_to_json()
|
inline |
Serialize the configuration for this entity to a JsonObject.
- recursive If given, includes self configuration and all children.
Definition at line 170 of file base.h.
References config_children_to_json(), and config_self_to_json().
Referenced by user_get_config().
◆ get_child_entities()
|
pure virtual |
◆ get_child_entity()
|
pure virtual |
◆ get_entity_class()
FLASHMEM entities::EntityClass entities::Entity::get_entity_class | ( | ) | const |
Definition at line 21 of file base.cpp.
Referenced by is_entity_class().
◆ get_entity_classifier()
FLASHMEM entities::EntityClassifier entities::Entity::get_entity_classifier | ( | ) | const |
Definition at line 19 of file base.cpp.
References classifier.
◆ get_entity_eui()
|
pure virtual |
◆ get_entity_id()
|
inline |
◆ get_entity_type()
FLASHMEM uint8_t entities::Entity::get_entity_type | ( | ) | const |
Definition at line 23 of file base.cpp.
Referenced by is_entity_type().
◆ get_entity_variant()
FLASHMEM uint8_t entities::Entity::get_entity_variant | ( | ) | const |
Definition at line 27 of file base.cpp.
Referenced by is_entity_variant().
◆ get_entity_version()
FLASHMEM entities::Version entities::Entity::get_entity_version | ( | ) | const |
Definition at line 25 of file base.cpp.
Referenced by is_entity_version().
◆ init()
|
inlinevirtual |
returns true in case of success
Reimplemented in blocks::CTRLBlock, blocks::IBlock, blocks::MIntBlock, carrier::Carrier, platform::Cluster, platform::LUCIDAC, platform::LUCIDACFrontPanel, and platform::REDAC.
Definition at line 153 of file base.h.
Referenced by blocks::CTRLBlock::init(), blocks::IBlock::init(), blocks::MIntBlock::init(), blocks::MMulBlock::init(), and platform::REDAC::init_backpanel_tblock().
◆ is_entity_class()
|
inline |
Definition at line 135 of file base.h.
References get_entity_class().
◆ is_entity_type()
|
inline |
Definition at line 137 of file base.h.
References get_entity_type().
Referenced by blocks::MBlock::is_entity_type().
◆ is_entity_variant()
|
inline |
Definition at line 141 of file base.h.
References get_entity_variant().
◆ is_entity_version()
|
inline |
Definition at line 139 of file base.h.
References get_entity_version().
◆ rename_entity()
|
inline |
Definition at line 125 of file base.h.
References entity_id.
Referenced by platform::REDAC::init_backpanel_tblock().
◆ reset()
|
inlinevirtual |
Reimplemented in blocks::CBlock, blocks::CTRLBlock, blocks::IBlock, blocks::MIntBlock, blocks::MIntBlock_V_1_1_X, blocks::SHBlock, blocks::TBlock, blocks::UBlock, carrier::Carrier, platform::Cluster, platform::LUCIDAC, platform::LUCIDACFrontPanel, and platform::REDAC.
Definition at line 155 of file base.h.
Referenced by blocks::CBlock::reset(), blocks::CTRLBlock::reset(), blocks::IBlock::reset(), blocks::MIntBlock::reset(), blocks::MMulBlock::reset(), and blocks::UBlock::reset().
◆ resolve_child_entity() [1/3]
|
inline |
Definition at line 150 of file base.h.
References resolve_child_entity().
Referenced by resolve_child_entity().
◆ resolve_child_entity() [2/3]
FLASHMEM entities::Entity * entities::Entity::resolve_child_entity | ( | JsonArrayConstIterator | begin, |
JsonArrayConstIterator | end ) |
◆ resolve_child_entity() [3/3]
FLASHMEM entities::Entity * entities::Entity::resolve_child_entity | ( | std::string | paths[], |
size_t | len ) |
◆ write_to_hardware()
|
inlinenodiscardvirtual |
returns true in case of success
Reimplemented in blocks::CBlock, blocks::CTRLBlock, blocks::EmptyMBlock, blocks::IBlock, blocks::MIntBlock, blocks::MIntBlock_V_1_1_X, blocks::SHBlock, blocks::TBlock, blocks::UBlock, carrier::Carrier, platform::Cluster, platform::LUCIDAC, platform::LUCIDACFrontPanel, and platform::REDAC.
Definition at line 158 of file base.h.
References utils::status::success().
Member Data Documentation
◆ classifier
|
protected |
Definition at line 217 of file base.h.
Referenced by carrier::Carrier::Carrier(), blocks::CBlock::CBlock(), platform::Cluster::Cluster(), blocks::CTRLBlock::CTRLBlock(), blocks::TBlock::from_entity_classifier(), platform::LUCIDACFrontPanel::from_entity_classifier(), get_entity_classifier(), blocks::IBlock::IBlock(), platform::LUCIDACFrontPanel::LUCIDACFrontPanel(), blocks::MBlock::MBlock(), blocks::MIntBlock::MIntBlock(), platform::REDACBackPanel::REDACBackPanel(), blocks::SHBlock::SHBlock(), blocks::TBlock::TBlock(), and blocks::UBlock::UBlock().
◆ entity_id
|
protected |
Definition at line 116 of file base.h.
Referenced by get_entity_id(), and rename_entity().
The documentation for this class was generated from the following files: