REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Top-level hierarchy controlled by a single microcontroller. More...
#include <carrier.h>


Public Member Functions | |
Carrier (std::vector< Cluster > clusters, Carrier_HAL *hardware) | |
metadata::eui_t | get_entity_eui () const final |
virtual bool | init () |
returns true in case of success | |
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 () |
virtual void | reset (entities::ResetAction action) |
std::vector< Entity * > | get_child_entities () override |
Entity * | get_child_entity (const std::string &child_id) override |
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. | |
utils::status | write_to_hardware () override |
returns true in case of success | |
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) |
![]() | |
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. | |
Public Attributes | |
std::vector< Cluster > | clusters |
blocks::CTRLBlock * | ctrl_block = nullptr |
Static Public Attributes | |
static constexpr int8_t | ADC_CHANNEL_DISABLED = -1 |
static constexpr auto | CLASS_ = entities::EntityClass::CARRIER |
static constexpr uint8_t | CARRIER_MADDR = 5 |
Protected Attributes | |
Carrier_HAL * | hardware |
std::array< int8_t, 8 > | adc_channels |
![]() | |
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
Top-level hierarchy controlled by a single microcontroller.
A Carrier (also refered to as module holder, base board or mother board) contains one microcontroller and multiple clusters, where the clusers hold the actual analog computing hardware.
Constructor & Destructor Documentation
◆ Carrier()
|
explicit |
Definition at line 13 of file carrier.cpp.
References CLASS_, and entities::Entity::classifier.
Member Function Documentation
◆ calibrate_m_blocks()
|
virtual |
Definition at line 199 of file carrier.cpp.
References success.
◆ calibrate_mblock()
|
virtual |
Definition at line 159 of file carrier.cpp.
References blocks::MBlock::calibrate(), entities::ResetAction::CIRCUIT_RESET, LOG, blocks::MBlock::SLOT_OUTPUT_IDX_RANGE(), blocks::MBlock::slot_to_global_io_index(), and success.
◆ calibrate_offset()
|
virtual |
Definition at line 123 of file carrier.cpp.
◆ calibrate_routes()
|
virtual |
Reimplemented in platform::LUCIDAC.
Definition at line 151 of file carrier.cpp.
◆ calibrate_routes_in_cluster()
|
virtual |
Definition at line 130 of file carrier.cpp.
References platform::Cluster::calibrate_routes(), platform::Cluster::get_cluster_idx(), and LOG_ANABRID_DEBUG_CALIBRATION.
◆ 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.
Reimplemented in platform::LUCIDAC.
Definition at line 67 of file carrier.cpp.
References utils::status::success().
Referenced by platform::LUCIDAC::config_self_from_json().
◆ 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.
Reimplemented in platform::LUCIDAC.
Definition at line 89 of file carrier.cpp.
Referenced by platform::LUCIDAC::config_self_to_json().
◆ get_adc_channels()
|
nodiscard |
Definition at line 219 of file carrier.cpp.
◆ get_child_entities()
|
overridevirtual |
Implements entities::Entity.
Reimplemented in platform::LUCIDAC, and platform::REDAC.
Definition at line 45 of file carrier.cpp.
Referenced by platform::LUCIDAC::get_child_entities(), and platform::REDAC::get_child_entities().
◆ get_child_entity()
|
overridevirtual |
Implements entities::Entity.
Reimplemented in platform::LUCIDAC, and platform::REDAC.
Definition at line 55 of file carrier.cpp.
References utils::is_number().
Referenced by platform::LUCIDAC::get_child_entity(), and platform::REDAC::get_child_entity().
◆ get_entity_eui()
|
finalvirtual |
Implements entities::Entity.
Definition at line 11 of file carrier.cpp.
◆ init()
|
virtual |
returns true in case of success
Reimplemented from entities::Entity.
Reimplemented in platform::LUCIDAC, and platform::REDAC.
Definition at line 18 of file carrier.cpp.
References bus::address_from_tuple(), bus::CTRL_BLOCK_BADDR, entities::detect(), entities::ResetAction::EVERYTHING, utils::HeapSingleton< StartupConfig >::get(), and LOG.
◆ reset()
|
virtual |
Reimplemented from entities::Entity.
Reimplemented in platform::LUCIDAC, and platform::REDAC.
Definition at line 210 of file carrier.cpp.
◆ reset_adc_channels()
FLASHMEM void carrier::Carrier::reset_adc_channels | ( | ) |
Definition at line 261 of file carrier.cpp.
Referenced by platform::LUCIDAC::reset().
◆ set_adc_channel()
|
nodiscard |
Definition at line 244 of file carrier.cpp.
◆ set_adc_channels()
|
nodiscard |
Definition at line 221 of file carrier.cpp.
◆ write_to_hardware()
|
nodiscardoverridevirtual |
returns true in case of success
Reimplemented from entities::Entity.
Reimplemented in platform::LUCIDAC, and platform::REDAC.
Definition at line 102 of file carrier.cpp.
References utils::status::code, and utils::status::msg.
Member Data Documentation
◆ ADC_CHANNEL_DISABLED
|
staticconstexpr |
◆ adc_channels
|
protected |
◆ CARRIER_MADDR
|
staticconstexpr |
◆ CLASS_
|
staticconstexpr |
◆ clusters
◆ ctrl_block
blocks::CTRLBlock* carrier::Carrier::ctrl_block = nullptr |
◆ hardware
|
protected |
The documentation for this class was generated from the following files:
- lib/platform-lucidac/src/carrier/carrier.h
- lib/platform-lucidac/src/carrier/carrier.cpp