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


Public Member Functions | |
TBlock (TBlockHAL *hardware) | |
TBlock () | |
std::array< uint8_t, 8 > | get_entity_eui () const override |
void | reset (entities::ResetAction action) override |
virtual void | reset_connections () |
status | write_to_hardware () override |
returns true in case of success | |
utils::status | connect (uint8_t src_sector, uint8_t dst_sector, uint8_t idx) |
bool | is_enabled () const |
void | set_enabled (bool enabled_=true) |
utils::status | config_self_from_json (JsonObjectConst cfg) override |
Deserialize a new configuration for this entity from a JsonObject. | |
void | config_self_to_json (JsonObject &cfg) override |
Serialize the configuration of this entity to a JsonObject. | |
virtual | ~TBlock () |
![]() | |
FunctionBlock (std::string entity_id) | |
std::vector< Entity * > | get_child_entities () override |
Entity * | get_child_entity (const std::string &child_id) override |
![]() | |
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 |
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 |
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 | |
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. | |
Static Public Member Functions | |
static TBlock * | from_entity_classifier (entities::EntityClassifier classifier, bus::addr_t block_address) |
static constexpr std::array< uint8_t, NUM_OF_INPUTS/4 > | SIGNAL_IDX_RANGE () |
Static Public Attributes | |
static constexpr auto | CLASS_ = entities::EntityClass::T_BLOCK |
static constexpr uint8_t | TYPE = 1 |
static constexpr uint8_t | BLOCK_IDX = bus::U_BLOCK_IDX |
static constexpr uint8_t | NUM_OF_INPUTS = 96 |
static constexpr uint8_t | NUM_OF_OUTPUTS = 96 |
Protected Attributes | |
TBlockHAL * | hardware |
![]() | |
std::string | entity_id |
EntityClassifier | classifier |
Additional Inherited Members | |
![]() | |
utils::status | config_children_from_json (JsonObjectConst &cfg) |
Deserialize a new configuration for all child entities from a JsonObject. | |
void | config_children_to_json (JsonObject &cfg) |
Serialize the configuration of the child entities of this entity to a JsonObject. | |
Detailed Description
Constructor & Destructor Documentation
◆ TBlock() [1/2]
|
explicit |
Definition at line 49 of file tblock.cpp.
References CLASS_, and entities::Entity::classifier.
◆ TBlock() [2/2]
FLASHMEM TBlock::TBlock | ( | ) |
Definition at line 53 of file tblock.cpp.
Referenced by from_entity_classifier().
◆ ~TBlock()
Member Function Documentation
◆ config_self_from_json()
|
overridevirtual |
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
Implements entities::Entity.
Definition at line 68 of file tblock.cpp.
References utils::status::success().
◆ config_self_to_json()
|
overridevirtual |
Serialize the configuration of this entity to a JsonObject.
Implementations shall not traverse to children,
- See also
- config_children_to_json() instead.
Reimplemented from entities::Entity.
Definition at line 98 of file tblock.cpp.
◆ connect()
FLASHMEM status TBlock::connect | ( | uint8_t | src_sector, |
uint8_t | dst_sector, | ||
uint8_t | idx ) |
Definition at line 106 of file tblock.cpp.
References blocks::Mux::from(), and utils::status::success().
◆ from_entity_classifier()
|
static |
Definition at line 56 of file tblock.cpp.
References CLASS_, entities::Entity::classifier, TBlock(), and TYPE.
◆ get_entity_eui()
|
inlineoverridevirtual |
Implements entities::Entity.
Definition at line 143 of file tblock.h.
References blocks::FunctionBlockHAL::get_entity_eui(), and hardware.
◆ is_enabled()
FLASHMEM bool TBlock::is_enabled | ( | ) | const |
Definition at line 152 of file tblock.cpp.
◆ reset()
|
overridevirtual |
Reimplemented from entities::Entity.
Definition at line 119 of file tblock.cpp.
References entities::ResetAction::CIRCUIT_RESET, entities::ResetAction::EVERYTHING, entities::ResetAction::has(), and reset_connections().
◆ reset_connections()
|
virtual |
Definition at line 127 of file tblock.cpp.
References blocks::Mux::A, blocks::Mux::B, blocks::Mux::C, and blocks::Mux::D.
Referenced by reset().
◆ set_enabled()
FLASHMEM void TBlock::set_enabled | ( | bool | enabled_ = true | ) |
Definition at line 154 of file tblock.cpp.
◆ SIGNAL_IDX_RANGE()
|
inlinestaticconstexpr |
◆ write_to_hardware()
|
overridevirtual |
returns true in case of success
Reimplemented from entities::Entity.
Definition at line 141 of file tblock.cpp.
References hardware, blocks::TBlockHAL::reset_mux_disable(), RETURN_IF_FAILED, blocks::TBlockHAL::set_mux_disable(), utils::status::success(), and blocks::TBlockHAL::write_muxes().
Member Data Documentation
◆ BLOCK_IDX
|
staticconstexpr |
◆ CLASS_
|
staticconstexpr |
Definition at line 124 of file tblock.h.
Referenced by from_entity_classifier(), and TBlock().
◆ hardware
|
protected |
Definition at line 146 of file tblock.h.
Referenced by get_entity_eui(), and write_to_hardware().
◆ NUM_OF_INPUTS
◆ NUM_OF_OUTPUTS
|
staticconstexpr |
◆ TYPE
|
staticconstexpr |
Definition at line 125 of file tblock.h.
Referenced by from_entity_classifier().
The documentation for this class was generated from the following files:
- lib/platform-lucidac/src/redac/tblock.h
- lib/platform-lucidac/src/redac/tblock.cpp