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


Public Member Functions | |
SHBlock () | |
SHBlock (SHBlockHAL *hardware) | |
metadata::eui_t | get_entity_eui () const override |
void | set_state (SHState state_) |
Sets the state the SHBlock currently is in. | |
SHState | get_state () const |
void | reset (entities::ResetAction action) override |
Resets all internal states. Block is left in inject mode afterwards. Requires write_to_hardware() | |
utils::status | write_to_hardware () override |
Applies current class state to actually hardware. | |
void | compensate_hardware_offsets (uint32_t track_time=10000, uint32_t inject_time=5000) |
![]() | |
FunctionBlock (std::string entity_id) | |
std::vector< Entity * > | get_child_entities () override |
Entity * | get_child_entity (const std::string &child_id) override |
![]() | |
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) |
virtual bool | init () |
returns true in case of success | |
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 SHBlock * | from_entity_classifier (entities::EntityClassifier classifier, bus::addr_t block_address) |
Static Public Attributes | |
static constexpr auto | CLASS_ = entities::EntityClass::SH_BLOCK |
static constexpr uint8_t | BLOCK_IDX = bus::SH_BLOCK_IDX |
Protected Member Functions | |
utils::status | config_self_from_json (JsonObjectConst cfg) override |
Deserialize a new configuration for this entity from a JsonObject. | |
![]() | |
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 | |
SHState | state = SHState::INJECT |
SHBlockHAL * | hardware |
![]() | |
std::string | entity_id |
EntityClassifier | classifier |
Detailed Description
Constructor & Destructor Documentation
◆ SHBlock() [1/2]
blocks::SHBlock::SHBlock | ( | ) |
◆ SHBlock() [2/2]
|
explicit |
Definition at line 51 of file shblock.cpp.
References CLASS_, and entities::Entity::classifier.
Member Function Documentation
◆ compensate_hardware_offsets()
FLASHMEM void blocks::SHBlock::compensate_hardware_offsets | ( | uint32_t | track_time = 10000, |
uint32_t | inject_time = 5000 ) |
Definition at line 69 of file shblock.cpp.
References blocks::INJECT.
◆ config_self_from_json()
|
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 74 of file shblock.cpp.
References blocks::GAIN_EIGHT_TO_FIFTEEN, blocks::GAIN_ZERO_TO_SEVEN, blocks::INJECT, blocks::TRACK, and blocks::TRACK_AT_IC.
◆ from_entity_classifier()
|
static |
Definition at line 96 of file shblock.cpp.
◆ get_entity_eui()
|
overridevirtual |
Implements entities::Entity.
Definition at line 16 of file shblock.cpp.
◆ get_state()
FLASHMEM blocks::SHState blocks::SHBlock::get_state | ( | ) | const |
Definition at line 57 of file shblock.cpp.
◆ reset()
|
overridevirtual |
Resets all internal states. Block is left in inject mode afterwards. Requires write_to_hardware()
Reimplemented from entities::Entity.
Definition at line 59 of file shblock.cpp.
References entities::ResetAction::CIRCUIT_RESET, entities::ResetAction::has(), and blocks::INJECT.
◆ set_state()
FLASHMEM void blocks::SHBlock::set_state | ( | SHState | state_ | ) |
Sets the state the SHBlock currently is in.
Call write_to_hardware() to actually apply changes to hardware
Definition at line 55 of file shblock.cpp.
◆ write_to_hardware()
|
nodiscardoverridevirtual |
Applies current class state to actually hardware.
Reimplemented from entities::Entity.
Definition at line 64 of file shblock.cpp.
References utils::status::success().
Member Data Documentation
◆ BLOCK_IDX
|
staticconstexpr |
◆ CLASS_
|
staticconstexpr |
◆ hardware
|
protected |
◆ state
|
protected |
The documentation for this class was generated from the following files:
- lib/platform-lucidac/src/block/shblock.h
- lib/platform-lucidac/src/block/shblock.cpp