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


Public Types | |
using | ACL = LUCIDAC_HAL::ACL |
Public Member Functions | |
LUCIDAC (LUCIDAC_HAL *hardware) | |
LUCIDAC () | |
bool | init () override |
returns true in case of success | |
void | reset (entities::ResetAction action) override |
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< ACL, 8 > & | get_acl_select () const |
void | set_acl_select (const std::array< ACL, 8 > &acl_select_) |
bool | set_acl_select (uint8_t idx, ACL acl) |
void | reset_acl_select () |
bool | calibrate_routes () override |
![]() | |
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_mblock (Cluster &cluster, blocks::MBlock &mblock) |
virtual bool | calibrate_m_blocks () |
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 | |
LUCIDACFrontPanel * | front_panel = nullptr |
![]() | |
std::vector< Cluster > | clusters |
blocks::CTRLBlock * | ctrl_block = nullptr |
Protected Member Functions | |
bool | _config_acl_from_json (const JsonVariantConst &cfg) |
![]() | |
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 | |
LUCIDAC_HAL * | hardware {} |
std::array< ACL, 8 > | acl_select |
![]() | |
Carrier_HAL * | hardware |
std::array< int8_t, 8 > | adc_channels |
![]() | |
std::string | entity_id |
EntityClassifier | classifier |
Additional Inherited Members | |
![]() | |
static LUCIDAC & | get () |
![]() | |
static constexpr int8_t | ADC_CHANNEL_DISABLED = -1 |
static constexpr auto | CLASS_ = entities::EntityClass::CARRIER |
static constexpr uint8_t | CARRIER_MADDR = 5 |
Detailed Description
Member Typedef Documentation
◆ ACL
Constructor & Destructor Documentation
◆ LUCIDAC() [1/2]
|
explicit |
Definition at line 12 of file lucidac.cpp.
◆ LUCIDAC() [2/2]
FLASHMEM LUCIDAC::LUCIDAC | ( | ) |
Definition at line 14 of file lucidac.cpp.
Member Function Documentation
◆ _config_acl_from_json()
|
protected |
Definition at line 163 of file lucidac.cpp.
References platform::LUCIDAC_HAL::EXTERNAL_, platform::LUCIDAC_HAL::INTERNAL_, and LOG_ALWAYS.
◆ calibrate_routes()
|
overridevirtual |
Reimplemented from carrier::Carrier.
Definition at line 131 of file lucidac.cpp.
References acl_select, get_acl_select(), hardware, reset_acl_select(), set_acl_select(), and platform::LUCIDAC_HAL::write_acl().
◆ 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
Reimplemented from carrier::Carrier.
Definition at line 144 of file lucidac.cpp.
References carrier::Carrier::config_self_from_json(), and 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 carrier::Carrier.
Definition at line 182 of file lucidac.cpp.
References carrier::Carrier::config_self_to_json(), and platform::LUCIDAC_HAL::INTERNAL_.
◆ get_acl_select()
|
nodiscard |
Definition at line 118 of file lucidac.cpp.
References acl_select.
Referenced by calibrate_routes().
◆ get_child_entities()
|
overridevirtual |
Reimplemented from carrier::Carrier.
Definition at line 96 of file lucidac.cpp.
References front_panel, and carrier::Carrier::get_child_entities().
◆ get_child_entity()
|
overridevirtual |
Reimplemented from carrier::Carrier.
Definition at line 103 of file lucidac.cpp.
References front_panel, and carrier::Carrier::get_child_entity().
◆ init()
|
overridevirtual |
returns true in case of success
Reimplemented from carrier::Carrier.
Definition at line 65 of file lucidac.cpp.
References bus::address_from_tuple(), entities::detect(), front_panel, platform::LUCIDACFrontPanel::init(), and LOG.
◆ reset()
|
overridevirtual |
Reimplemented from carrier::Carrier.
Definition at line 85 of file lucidac.cpp.
References entities::ResetAction::CIRCUIT_RESET, front_panel, entities::ResetAction::has(), platform::LUCIDACFrontPanel::reset(), reset_acl_select(), and carrier::Carrier::reset_adc_channels().
◆ reset_acl_select()
FLASHMEM void LUCIDAC::reset_acl_select | ( | ) |
Definition at line 129 of file lucidac.cpp.
References acl_select.
Referenced by calibrate_routes(), and reset().
◆ set_acl_select() [1/2]
FLASHMEM void LUCIDAC::set_acl_select | ( | const std::array< ACL, 8 > & | acl_select_ | ) |
Definition at line 120 of file lucidac.cpp.
References acl_select.
Referenced by calibrate_routes().
◆ set_acl_select() [2/2]
|
nodiscard |
Definition at line 122 of file lucidac.cpp.
References acl_select.
◆ write_to_hardware()
|
nodiscardoverridevirtual |
returns true in case of success
Reimplemented from carrier::Carrier.
Definition at line 109 of file lucidac.cpp.
References acl_select, utils::status::attach(), utils::status::attach_to(), front_panel, hardware, platform::LUCIDAC_HAL::write_acl(), and platform::LUCIDACFrontPanel::write_to_hardware().
Member Data Documentation
◆ acl_select
|
protected |
Definition at line 70 of file lucidac.h.
Referenced by calibrate_routes(), get_acl_select(), reset_acl_select(), set_acl_select(), set_acl_select(), and write_to_hardware().
◆ front_panel
LUCIDACFrontPanel* platform::LUCIDAC::front_panel = nullptr |
Definition at line 76 of file lucidac.h.
Referenced by get_child_entities(), get_child_entity(), init(), reset(), and write_to_hardware().
◆ hardware
|
protected |
Definition at line 68 of file lucidac.h.
Referenced by calibrate_routes(), and write_to_hardware().
The documentation for this class was generated from the following files:
- lib/platform-lucidac/src/lucidac/lucidac.h
- lib/platform-lucidac/src/lucidac/lucidac.cpp