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

#include <lucidac.h>

Inheritance diagram for platform::LUCIDAC:
Collaboration diagram for platform::LUCIDAC:

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
 
Entityget_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
 
- 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_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)
 
- 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

LUCIDACFrontPanelfront_panel = nullptr
 
- Public Attributes inherited from carrier::Carrier
std::vector< Clusterclusters
 
blocks::CTRLBlockctrl_block = nullptr
 

Protected Member Functions

bool _config_acl_from_json (const JsonVariantConst &cfg)
 
- 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

LUCIDAC_HALhardware {}
 
std::array< ACL, 8 > acl_select
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from utils::HeapSingleton< LUCIDAC >
static LUCIDAC & 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 63 of file lucidac.h.

Member Typedef Documentation

◆ ACL

Definition at line 65 of file lucidac.h.

Constructor & Destructor Documentation

◆ LUCIDAC() [1/2]

FLASHMEM LUCIDAC::LUCIDAC ( LUCIDAC_HAL * hardware)
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()

FLASHMEM bool platform::LUCIDAC::_config_acl_from_json ( const JsonVariantConst & cfg)
protected

◆ calibrate_routes()

FLASHMEM bool LUCIDAC::calibrate_routes ( )
overridevirtual

◆ config_self_from_json()

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

FLASHMEM void platform::LUCIDAC::config_self_to_json ( JsonObject & cfg)
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()

FLASHMEM const std::array< LUCIDAC::ACL, 8 > & LUCIDAC::get_acl_select ( ) const
nodiscard

Definition at line 118 of file lucidac.cpp.

References acl_select.

Referenced by calibrate_routes().

◆ get_child_entities()

FLASHMEM std::vector< entities::Entity * > LUCIDAC::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()

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

Reimplemented from carrier::Carrier.

Definition at line 103 of file lucidac.cpp.

References front_panel, and carrier::Carrier::get_child_entity().

◆ init()

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

◆ 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]

FLASHMEM bool LUCIDAC::set_acl_select ( uint8_t idx,
LUCIDAC::ACL acl )
nodiscard

Definition at line 122 of file lucidac.cpp.

References acl_select.

◆ write_to_hardware()

FLASHMEM utils::status LUCIDAC::write_to_hardware ( )
nodiscardoverridevirtual

Member Data Documentation

◆ acl_select

std::array<ACL, 8> platform::LUCIDAC::acl_select
protected
Initial value:
{ACL::INTERNAL_, ACL::INTERNAL_, ACL::INTERNAL_, ACL::INTERNAL_,
ACL::INTERNAL_, ACL::INTERNAL_, ACL::INTERNAL_, ACL::INTERNAL_}

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

LUCIDAC_HAL* platform::LUCIDAC::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: