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

#include <redac.h>

Inheritance diagram for platform::REDAC:
Collaboration diagram for platform::REDAC:

Public Member Functions

 REDAC (REDAC_HAL *hardware)
 
 REDAC ()
 
bool init () override
 returns true in case of success
 
void reset (entities::ResetAction action) override
 
status write_to_hardware () override
 returns true in case of success
 
std::vector< blocks::TBlock * > get_all_tblocks () const
 
BackPanelIdentifier get_backpanel_identifier () const
 
std::vector< Entity * > get_child_entities () override
 
Entityget_child_entity (const std::string &child_id) override
 
- Public Member Functions inherited from carrier::Carrier
 Carrier (std::vector< Cluster > clusters, Carrier_HAL *hardware)
 
metadata::eui_t get_entity_eui () const final
 
virtual bool calibrate_offset ()
 
virtual bool calibrate_routes_in_cluster (Cluster &cluster)
 
virtual bool calibrate_routes ()
 
virtual bool calibrate_mblock (Cluster &cluster, blocks::MBlock &mblock)
 
virtual bool calibrate_m_blocks ()
 
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.
 
const std::array< int8_t, 8 > & get_adc_channels () const
 
bool set_adc_channels (const std::array< int8_t, 8 > &channels)
 
bool set_adc_channel (uint8_t adc_channel, int8_t src_idx)
 
void reset_adc_channels ()
 
utils::status user_set_extended_config (JsonObjectConst msg_in, JsonObject &msg_out)
 
utils::status user_get_overload_status (JsonObjectConst msg_in, JsonObject &msg_out)
 
- 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.
 

Public Attributes

REDACBackPanelback_panel = nullptr
 
blocks::TBlockcarrier_t_block = nullptr
 
blocks::TBlockstack_t0_block = nullptr
 
blocks::TBlockstack_t1_block = nullptr
 
blocks::TBlockstack_taux_block = nullptr
 
blocks::Router f_routing
 
- Public Attributes inherited from carrier::Carrier
std::vector< Clusterclusters
 
blocks::CTRLBlockctrl_block = nullptr
 

Protected Member Functions

blocks::TBlockinit_backpanel_tblock (uint8_t baddr, const char *name)
 
- 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.
 
void config_children_to_json (JsonObject &cfg)
 Serialize the configuration of the child entities of this entity to a JsonObject.
 

Protected Attributes

REDAC_HALhardware
 
- Protected Attributes inherited from carrier::Carrier
Carrier_HALhardware
 
std::array< int8_t, 8 > adc_channels
 
- Protected Attributes inherited from entities::Entity
std::string entity_id
 
EntityClassifier classifier
 

Static Protected Attributes

static constexpr const char * STACK_T0_NAME = "ST0"
 
static constexpr const char * STACK_T1_NAME = "ST1"
 
static constexpr const char * STACK_TAUX_NAME = "ST2"
 

Additional Inherited Members

- Static Public Member Functions inherited from utils::HeapSingleton< REDAC >
static REDAC & get ()
 
- Static Public Attributes inherited from carrier::Carrier
static constexpr int8_t ADC_CHANNEL_DISABLED = -1
 
static constexpr auto CLASS_ = entities::EntityClass::CARRIER
 
static constexpr uint8_t CARRIER_MADDR = 5
 

Detailed Description

Definition at line 47 of file redac.h.

Constructor & Destructor Documentation

◆ REDAC() [1/2]

FLASHMEM REDAC::REDAC ( REDAC_HAL * hardware)
explicit

Definition at line 148 of file redac.cpp.

◆ REDAC() [2/2]

FLASHMEM REDAC::REDAC ( )

Definition at line 151 of file redac.cpp.

Member Function Documentation

◆ get_all_tblocks()

std::vector< blocks::TBlock * > platform::REDAC::get_all_tblocks ( ) const
inline

Definition at line 77 of file redac.h.

References carrier_t_block, stack_t0_block, stack_t1_block, and stack_taux_block.

Referenced by reset(), and write_to_hardware().

◆ get_backpanel_identifier()

FLASHMEM BackPanelIdentifier platform::REDAC::get_backpanel_identifier ( ) const

◆ get_child_entities()

FLASHMEM std::vector< entities::Entity * > platform::REDAC::get_child_entities ( )
overridevirtual

Reimplemented from carrier::Carrier.

Definition at line 179 of file redac.cpp.

References carrier::Carrier::get_child_entities().

◆ get_child_entity()

FLASHMEM entities::Entity * platform::REDAC::get_child_entity ( const std::string & child_id)
overridevirtual

Reimplemented from carrier::Carrier.

Definition at line 190 of file redac.cpp.

References carrier::Carrier::get_child_entity(), STACK_T0_NAME, STACK_T1_NAME, and STACK_TAUX_NAME.

◆ init()

FLASHMEM bool platform::REDAC::init ( )
overridevirtual

◆ init_backpanel_tblock()

FLASHMEM blocks::TBlock * platform::REDAC::init_backpanel_tblock ( uint8_t baddr,
const char * name )
protected

◆ reset()

FLASHMEM void REDAC::reset ( entities::ResetAction action)
overridevirtual

Reimplemented from carrier::Carrier.

Definition at line 153 of file redac.cpp.

References get_all_tblocks(), hardware, and platform::REDAC_HAL::reset_adc_bus_mux().

◆ write_to_hardware()

FLASHMEM status REDAC::write_to_hardware ( )
overridevirtual

returns true in case of success

Reimplemented from carrier::Carrier.

Definition at line 163 of file redac.cpp.

References get_all_tblocks(), RETURN_IF_FAILED, and utils::status::success().

Member Data Documentation

◆ back_panel

REDACBackPanel* platform::REDAC::back_panel = nullptr

Definition at line 67 of file redac.h.

◆ carrier_t_block

blocks::TBlock* platform::REDAC::carrier_t_block = nullptr

Definition at line 70 of file redac.h.

Referenced by get_all_tblocks().

◆ f_routing

blocks::Router platform::REDAC::f_routing

Definition at line 75 of file redac.h.

◆ hardware

REDAC_HAL* platform::REDAC::hardware
protected

Definition at line 54 of file redac.h.

Referenced by reset().

◆ stack_t0_block

blocks::TBlock * platform::REDAC::stack_t0_block = nullptr

Definition at line 71 of file redac.h.

Referenced by get_all_tblocks().

◆ STACK_T0_NAME

const char* platform::REDAC::STACK_T0_NAME = "ST0"
staticconstexprprotected

Definition at line 50 of file redac.h.

Referenced by get_child_entity(), and init().

◆ stack_t1_block

blocks::TBlock * platform::REDAC::stack_t1_block = nullptr

Definition at line 72 of file redac.h.

Referenced by get_all_tblocks().

◆ STACK_T1_NAME

const char* platform::REDAC::STACK_T1_NAME = "ST1"
staticconstexprprotected

Definition at line 51 of file redac.h.

Referenced by get_child_entity(), and init().

◆ stack_taux_block

blocks::TBlock * platform::REDAC::stack_taux_block = nullptr

Definition at line 73 of file redac.h.

Referenced by get_all_tblocks().

◆ STACK_TAUX_NAME

const char* platform::REDAC::STACK_TAUX_NAME = "ST2"
staticconstexprprotected

Definition at line 52 of file redac.h.

Referenced by get_child_entity(), and init().


The documentation for this class was generated from the following files:
  • lib/platform-lucidac/src/redac/redac.h
  • lib/platform-lucidac/src/redac/redac.cpp