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


Public Types | |
using | ADCBus = CTRLBlockHALBase::ADCBus |
Public Member Functions | |
CTRLBlock (CTRLBlockHALBase *hardware) | |
metadata::eui_t | get_entity_eui () const override |
bool | init () override |
returns true in case of success | |
void | reset (entities::ResetAction action) override |
utils::status | write_to_hardware () override |
returns true in case of success | |
ADCBus | get_adc_bus () const |
void | set_adc_bus (ADCBus adc_bus_) |
void | reset_adc_bus () |
bool | set_adc_bus_to_cluster_gain (uint8_t cluster_idx) |
![]() | |
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) |
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 CTRLBlock * | from_entity_classifier (entities::EntityClassifier classifier, bus::addr_t block_address) |
Static Public Attributes | |
static constexpr auto | CLASS_ = entities::EntityClass::CTRL_BLOCK |
static constexpr uint8_t | TYPE = 1 |
Protected Member Functions | |
utils::status | config_self_from_json (JsonObjectConst cfg) override |
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 | |
ADCBus | adc_bus = ADCBus::ADC |
CTRLBlockHALBase * | hardware |
![]() | |
std::string | entity_id |
EntityClassifier | classifier |
Detailed Description
Definition at line 60 of file ctrlblock.h.
Member Typedef Documentation
◆ ADCBus
Definition at line 62 of file ctrlblock.h.
Constructor & Destructor Documentation
◆ CTRLBlock()
|
explicit |
Definition at line 36 of file ctrlblock.cpp.
References CLASS_, and entities::Entity::classifier.
Member Function Documentation
◆ config_self_from_json()
|
overrideprotectedvirtual |
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 62 of file ctrlblock.cpp.
References utils::status::success().
◆ from_entity_classifier()
|
static |
Definition at line 40 of file ctrlblock.cpp.
◆ get_adc_bus()
FLASHMEM blocks::CTRLBlock::ADCBus blocks::CTRLBlock::get_adc_bus | ( | ) | const |
Definition at line 76 of file ctrlblock.cpp.
◆ get_entity_eui()
|
overridevirtual |
Implements entities::Entity.
Definition at line 56 of file ctrlblock.cpp.
◆ init()
|
overridevirtual |
returns true in case of success
Reimplemented from entities::Entity.
Definition at line 70 of file ctrlblock.cpp.
References entities::Entity::init().
◆ reset()
|
overridevirtual |
Reimplemented from entities::Entity.
Definition at line 89 of file ctrlblock.cpp.
References entities::ResetAction::CIRCUIT_RESET, entities::ResetAction::has(), and entities::Entity::reset().
◆ reset_adc_bus()
FLASHMEM void blocks::CTRLBlock::reset_adc_bus | ( | ) |
Definition at line 80 of file ctrlblock.cpp.
◆ set_adc_bus()
FLASHMEM void blocks::CTRLBlock::set_adc_bus | ( | ADCBus | adc_bus_ | ) |
Definition at line 78 of file ctrlblock.cpp.
◆ set_adc_bus_to_cluster_gain()
FLASHMEM bool blocks::CTRLBlock::set_adc_bus_to_cluster_gain | ( | uint8_t | cluster_idx | ) |
Definition at line 82 of file ctrlblock.cpp.
◆ write_to_hardware()
|
nodiscardoverridevirtual |
returns true in case of success
Reimplemented from entities::Entity.
Definition at line 66 of file ctrlblock.cpp.
Member Data Documentation
◆ adc_bus
|
protected |
Definition at line 71 of file ctrlblock.h.
◆ CLASS_
|
staticconstexpr |
Definition at line 65 of file ctrlblock.h.
Referenced by CTRLBlock().
◆ hardware
|
protected |
Definition at line 72 of file ctrlblock.h.
◆ TYPE
|
staticconstexpr |
Definition at line 66 of file ctrlblock.h.
The documentation for this class was generated from the following files:
- lib/platform-lucidac/src/block/ctrlblock.h
- lib/platform-lucidac/src/block/ctrlblock.cpp