REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches

#include <ctrlblock.h>

Inheritance diagram for blocks::CTRLBlock:
Collaboration diagram for blocks::CTRLBlock:

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)
 
- Public Member Functions inherited from blocks::FunctionBlock
 FunctionBlock (std::string entity_id)
 
std::vector< Entity * > get_child_entities () override
 
Entityget_child_entity (const std::string &child_id) override
 
- Public Member Functions inherited from entities::Entity
 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
 
Entityresolve_child_entity (std::string paths[], size_t len)
 
Entityresolve_child_entity (JsonArrayConstIterator begin, JsonArrayConstIterator end)
 
Entityresolve_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 CTRLBlockfrom_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.
 
- Protected Member Functions inherited from entities::Entity
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
 
CTRLBlockHALBasehardware
 
- Protected Attributes inherited from entities::Entity
std::string entity_id
 
EntityClassifier classifier
 

Detailed Description

Definition at line 60 of file ctrlblock.h.

Member Typedef Documentation

◆ ADCBus

Constructor & Destructor Documentation

◆ CTRLBlock()

FLASHMEM blocks::CTRLBlock::CTRLBlock ( CTRLBlockHALBase * hardware)
explicit

Definition at line 36 of file ctrlblock.cpp.

References CLASS_, and entities::Entity::classifier.

Member Function Documentation

◆ config_self_from_json()

FLASHMEM utils::status blocks::CTRLBlock::config_self_from_json ( JsonObjectConst cfg)
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()

FLASHMEM blocks::CTRLBlock * blocks::CTRLBlock::from_entity_classifier ( entities::EntityClassifier classifier,
bus::addr_t block_address )
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()

FLASHMEM metadata::eui_t blocks::CTRLBlock::get_entity_eui ( ) const
overridevirtual

Implements entities::Entity.

Definition at line 56 of file ctrlblock.cpp.

◆ init()

FLASHMEM bool blocks::CTRLBlock::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()

FLASHMEM void blocks::CTRLBlock::reset ( entities::ResetAction action)
overridevirtual

◆ 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()

FLASHMEM utils::status blocks::CTRLBlock::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

ADCBus blocks::CTRLBlock::adc_bus = ADCBus::ADC
protected

Definition at line 71 of file ctrlblock.h.

◆ CLASS_

auto blocks::CTRLBlock::CLASS_ = entities::EntityClass::CTRL_BLOCK
staticconstexpr

Definition at line 65 of file ctrlblock.h.

Referenced by CTRLBlock().

◆ hardware

CTRLBlockHALBase* blocks::CTRLBlock::hardware
protected

Definition at line 72 of file ctrlblock.h.

◆ TYPE

uint8_t blocks::CTRLBlock::TYPE = 1
staticconstexpr

Definition at line 66 of file ctrlblock.h.


The documentation for this class was generated from the following files: