Buisness Code

Blocks

namespace blocks

Typedefs

using CBlockHAL_Parent = entities::EntitySharedHardware<CBlockHAL>
using CTRLBlockHAL_Parent = entities::EntitySharedHardware<CTRLBlockHALBase>
using IBlockHAL_Parent = entities::EntitySharedHardware<IBlockHAL>
using MIntBlockHAL_Parent = entities::EntitySharedHardware<MIntBlockHAL>
using MMDRBlockHAL_Parent = entities::EntitySharedHardware<MMDRBlockHAL>
using MMulBlockHAL_Parent = entities::EntitySharedHardware<MMulBlockHAL>
using SHBlockHAL_Parent = entities::EntitySharedHardware<SHBlockHAL>
using UBlockHAL_Parent = entities::EntitySharedHardware<UBlockHAL>
using TBlockHAL_Parent = entities::EntitySharedHardware<TBlockHAL>
using TBlockBackplaneHAL_Parent = entities::EntitySharedHardware<TBlockBackplaneHAL>
class CBlockHAL_Common : public entities::EntitySharedHardware<CBlockHAL>
#include <cblock.h>

Subclassed by blocks::CBlockHAL_V_1_0_X, blocks::CBlockHAL_V_1_1_X, blocks::CBlockHAL_V_1_2_X

Public Functions

CBlockHAL_Common(bus::addr_t block_address, bus::addr_t temperature_sensor_address, std::array<const uint8_t, 32> f_coeffs_cs, uint8_t alt_function_idx)
bool write_factor(uint8_t idx, float value) override

Public Static Functions

static std::array<functions::AD5452, 32> make_f_coeffs(bus::addr_t block_address, std::array<const uint8_t, 32> f_coeffs_cs, uint8_t alt_function_idx)
class CBlockHAL_V_1_0_X : public blocks::CBlockHAL_Common
#include <cblock.h>

Public Functions

explicit CBlockHAL_V_1_0_X(bus::addr_t block_address)
class CBlockHAL_V_1_1_X : public blocks::CBlockHAL_Common
#include <cblock.h>

Public Functions

explicit CBlockHAL_V_1_1_X(bus::addr_t block_address)
class CBlockHAL_V_1_2_X : public blocks::CBlockHAL_Common
#include <cblock.h>

Public Functions

explicit CBlockHAL_V_1_2_X(bus::addr_t block_address)
class CTRLBlockHAL_V_1_0_2 : public entities::EntitySharedHardware<CTRLBlockHALBase>
#include <ctrlblock.h>

Public Functions

explicit CTRLBlockHAL_V_1_0_2(bus::addr_t block_address)
bool write_adc_bus_muxers(ADCBus adc_bus) override
bool write_sync_id(uint8_t id) override
class DummyCBlockHAL : public CBlockHAL
#include <cblock.h>

Public Functions

inline DummyCBlockHAL(std::array<const uint8_t, 32> f_coeffs_cs)
bool write_factor(uint8_t idx, float value) override
inline metadata::eui_t get_entity_eui() const override
class DummyCTRLBlockHAL : public CTRLBlockHALBase
#include <ctrlblock.h>

Public Functions

inline DummyCTRLBlockHAL()
bool write_adc_bus_muxers(ADCBus adc_bus) override
bool write_sync_id(uint8_t id) override
inline metadata::eui_t get_entity_eui() const override
class DummyIBlockHAL : public IBlockHAL
#include <iblock.h>

Public Functions

inline explicit DummyIBlockHAL()
bool write_outputs(const std::array<uint32_t, 16> &outputs) override
bool write_upscaling(std::bitset<32> upscaling) override
inline metadata::eui_t get_entity_eui() const override
class DummyMIntBlockHAL : public MIntBlockHAL
#include <mblock_int.h>

Public Functions

inline explicit DummyMIntBlockHAL()
inline bool init() override
inline bool write_ic(uint8_t idx, float ic) override
inline bool write_time_factor_switches(std::bitset<8> switches) override
inline std::bitset<8> read_overload_flags() override
inline void reset_overload_flags() override
inline metadata::eui_t get_entity_eui() const override
class DummyMMulBlockHAL : public MMulBlockHAL
#include <mblock_mul.h>

Public Functions

inline explicit DummyMMulBlockHAL()
inline metadata::eui_t get_entity_eui() const override
bool init() override
bool write_calibration_input_offsets(uint8_t idx, uint16_t offset_x, uint16_t offset_y) override
bool write_calibration_output_offset(uint8_t idx, uint16_t offset_z) override
std::bitset<8> read_overload_flags() override
void reset_overload_flags() override

Public Static Functions

static inline float raw_to_float_calibration(uint16_t raw)

Takes in DAC raw value, returns voltage recieved by multiplier.

Public Static Attributes

static float MIN_OFFSET = -0.1f
static float MAX_OFFSET = +0.1f
class DummySHBlockHAL : public SHBlockHAL
#include <shblock.h>

Public Functions

inline explicit DummySHBlockHAL()
inline metadata::eui_t get_entity_eui() const override
inline utils::status set_state(SHState state) override
void compensate_hardware_offsets(uint32_t track_time, uint32_t inject_time)
void set_state(SHState state) const
class DummyUBlockHAL : public UBlockHAL
#include <ublock.h>

Public Functions

inline explicit DummyUBlockHAL()
bool write_outputs(std::array<int8_t, 32> outputs) override
bool write_transmission_modes_and_ref(std::pair<Transmission_Mode, Transmission_Mode> modes, Reference_Magnitude ref) override
void reset_transmission_modes_and_ref() override
inline metadata::eui_t get_entity_eui() const override
class IBlockHAL_V_1_2_X : public entities::EntitySharedHardware<IBlockHAL>
#include <iblock.h>

Subclassed by blocks::IBlockHAL_V_1_3_X

Public Functions

explicit IBlockHAL_V_1_2_X(bus::addr_t block_address)
bool write_outputs(const std::array<uint32_t, 16> &outputs) override
bool write_upscaling(std::bitset<32> upscaling) override
class IBlockHAL_V_1_3_X : public blocks::IBlockHAL_V_1_2_X
#include <iblock.h>

Public Functions

explicit IBlockHAL_V_1_3_X(bus::addr_t block_address)
class MIntBlock_V_1_1_X : public MIntBlock
#include <mblock_int.h>

Public Functions

MIntBlock_V_1_1_X(SLOT slot, MIntBlockHAL_V_1_1_X *hardware)
utils::status write_to_hardware() override
void reset(entities::ResetAction action) override
const std::array<IntegratorCalibration, NUM_INTEGRATORS> &get_calibration() const
blocks::IntegratorCalibration get_calibration(uint8_t int_idx) const
utils::status write_calibration_to_hardware()
status calibrate(platform::Cluster *cluster, carrier::Carrier *carrier) override
ConfigResult config(const pb_Config &cfg) override
class MIntBlockHAL_V_1_0_X : public entities::EntitySharedHardware<MIntBlockHAL>
#include <mblock_int.h>

Subclassed by blocks::MIntBlockHAL_V_1_1_X

Public Functions

explicit MIntBlockHAL_V_1_0_X(bus::addr_t block_address)
bool init() override
bool write_ic(uint8_t idx, float ic) override
bool write_time_factor_switches(std::bitset<8> switches) override
std::bitset<8> read_overload_flags() override
void reset_overload_flags() override
class MIntBlockHAL_V_1_1_X : public blocks::MIntBlockHAL_V_1_0_X
#include <mblock_int.h>

Public Functions

explicit MIntBlockHAL_V_1_1_X(bus::addr_t block_address)
bool write_ic(uint8_t idx, float ic) override
inline bool write_time_factor_switches(std::bitset<8> switches) override
virtual bool write_time_factor_switches_and_limiters_enable(std::bitset<8> switches, std::bitset<8> limiters)
virtual bool write_time_factor_gain(uint8_t idx, uint8_t gain)
class MMDRBlockHAL_V_1_0_X : public entities::EntitySharedHardware<MMDRBlockHAL>
#include <mblock_mdr.h>

Public Functions

explicit MMDRBlockHAL_V_1_0_X(bus::addr_t block_address)
std::bitset<8> read_overload_flags() override
void reset_overload_flags() override
bool write_modes(MMDRBlock::CellMode m0, MMDRBlock::CellMode m1, MMDRBlock::CellMode m2, MMDRBlock::CellMode m3) override
bool write_calibration_input_offsets(uint8_t idx, uint16_t offset_x, uint16_t offset_y) override
bool write_calibration_output_offset(uint8_t idx, uint16_t offset_z) override
bool write_calibration_gain(uint8_t idx, uint8_t gain) override

Public Static Functions

static inline float raw_to_float_calibration(uint16_t raw)

Takes in DAC raw value, returns voltage recieved by multiplier.

static inline uint16_t float_to_raw_calibration(float value)

Takes in voltage recieved by multiplier, returns DAC raw value.

Public Static Attributes

static float MIN_OFFSET = -0.1f
static float MAX_OFFSET = +0.1f
static uint16_t RAW_ZERO = functions::DAC60508::RAW_ZERO
static uint16_t RAW_MAX = functions::DAC60508::RAW_MAX
class MMulBlock_FullAutoCalibration : public MMulBlock
#include <mblock_mul.h>

Public Functions

MMulBlock_FullAutoCalibration(SLOT slot, blocks::MMulBlockHAL_FullAutoCalibration *hardware)
status calibrate(platform::Cluster *cluster, carrier::Carrier *carrier) override
status write_calibration_to_hardware() override
class MMulBlockHAL_FullAutoCalibration : public MMulBlockHAL
#include <mblock_mul.h>

Subclassed by blocks::MMulBlockHAL_V_1_1_X, blocks::MMulBlockHAL_V_1_M1_X

Public Functions

virtual bool write_calibration_gain(uint8_t idx, uint8_t gain) = 0
class MMulBlockHAL_V_1_0_X : public entities::EntitySharedHardware<MMulBlockHAL>
#include <mblock_mul.h>

Subclassed by blocks::MMulBlockHAL_V_1_1_X, blocks::MMulBlockHAL_V_1_M1_X

Public Functions

explicit MMulBlockHAL_V_1_0_X(bus::addr_t block_address)
bool init() override
bool write_calibration_input_offsets(uint8_t idx, uint16_t offset_x, uint16_t offset_y) override
bool write_calibration_output_offset(uint8_t idx, uint16_t offset_z) override
std::bitset<8> read_overload_flags() override
void reset_overload_flags() override

Public Static Functions

static inline float raw_to_float_calibration(uint16_t raw)

Takes in DAC raw value, returns voltage recieved by multiplier.

static inline uint16_t float_to_raw_calibration(float value)

Takes in voltage recieved by multiplier, returns DAC raw value.

Public Static Attributes

static float MIN_OFFSET = -0.1f
static float MAX_OFFSET = +0.1f
static uint16_t RAW_ZERO = functions::DAC60508::RAW_ZERO
static uint16_t RAW_MAX = functions::DAC60508::RAW_MAX
class MMulBlockHAL_V_1_1_X : public blocks::MMulBlockHAL_V_1_0_X, public blocks::MMulBlockHAL_FullAutoCalibration
#include <mblock_mul.h>

Public Functions

explicit MMulBlockHAL_V_1_1_X(bus::addr_t block_address)
virtual bool write_calibration_gain(uint8_t idx, uint8_t gain) override
inline std::bitset<8> read_overload_flags() override
inline void reset_overload_flags() override
inline bool write_calibration_input_offsets(uint8_t idx, uint16_t offset_x, uint16_t offset_y) override
inline bool write_calibration_output_offset(uint8_t idx, uint16_t offset_z) override
inline float read_temperature() const override
class MMulBlockHAL_V_1_M1_X : public blocks::MMulBlockHAL_V_1_0_X, public blocks::MMulBlockHAL_FullAutoCalibration
#include <mblock_mul.h>

Public Functions

explicit MMulBlockHAL_V_1_M1_X(bus::addr_t block_address)
virtual bool write_calibration_gain(uint8_t idx, uint8_t gain) override
inline std::bitset<8> read_overload_flags() override
inline void reset_overload_flags() override
inline bool write_calibration_input_offsets(uint8_t idx, uint16_t offset_x, uint16_t offset_y) override
inline bool write_calibration_output_offset(uint8_t idx, uint16_t offset_z) override
inline float read_temperature() const override
class SHBlockHAL_V_0_1_X : public entities::EntitySharedHardware<SHBlockHAL>
#include <shblock.h>

Public Functions

explicit SHBlockHAL_V_0_1_X(bus::addr_t block_address)
utils::status set_state(SHState state)
class SHBlockHAL_V_1_2_X : public entities::EntitySharedHardware<SHBlockHAL>
#include <shblock.h>

Public Functions

explicit SHBlockHAL_V_1_2_X(bus::addr_t block_address)
utils::status set_state(SHState state)
class TBlockBackplaneHAL_V_1_0_X : public entities::EntitySharedHardware<TBlockBackplaneHAL>
#include <tblock.h>

HAL class for TBlockBackplane version 1.0.1.

Public Functions

explicit TBlockBackplaneHAL_V_1_0_X(bus::addr_t block_address)
inline std::array<uint8_t, 8> get_entity_eui() const override
bool write_muxes(std::array<uint8_t, NUM_SWITCHES> muxes) override
bool reset_muxes() override
void set_mux_disable() override
void reset_mux_disable() override
class TBlockHAL_V_1_0_X : public entities::EntitySharedHardware<TBlockHAL>
#include <tblock.h>

HAL class for TBlock version 1.0.1.

Public Functions

explicit TBlockHAL_V_1_0_X(bus::addr_t block_address)
inline std::array<uint8_t, 8> get_entity_eui() const override
bool write_muxes(std::array<uint8_t, NUM_SWITCHES> muxes) override
bool reset_muxes() override
void set_mux_disable() override
void reset_mux_disable() override
class UBlockHAL_Common : public entities::EntitySharedHardware<UBlockHAL>
#include <ublock.h>

Subclassed by blocks::UBlockHAL_V_1_2_X

Public Functions

explicit UBlockHAL_Common(bus::addr_t block_address, uint8_t f_umatrix_cs, uint8_t f_umatrix_sync_cs, uint8_t f_transmission_mode_register_cs, uint8_t f_transmission_mode_sync_cs, uint8_t f_transmission_mode_reset_cs)
bool write_outputs(std::array<int8_t, 32> outputs) override
bool write_transmission_modes_and_ref(std::pair<Transmission_Mode, Transmission_Mode> modes, Reference_Magnitude ref) override
void reset_transmission_modes_and_ref() override
class UBlockHAL_V_1_2_X : public blocks::UBlockHAL_Common
#include <ublock.h>

Public Functions

inline explicit UBlockHAL_V_1_2_X(const bus::addr_t block_address)

Platform

namespace platform

Typedefs

using LUCIDAC_HAL_Parent = entities::EntitySharedHardware<LUCIDAC_HAL>
using BackPanelHAL_Parent = entities::EntitySharedHardware<BackPanelHAL>
using REDAC_HAL_Parent = entities::EntitySharedHardware<REDAC_HAL>

Functions

IPAddress get_ip_of_external_device(uint32_t entity_id)
void set_ip_of_external_device(uint32_t entity_id, IPAddress ip_address)

Variables

std::map<uint32_t, IPAddress> _external_entity_map = {}
class BackPanelHAL_Dummy : public BackPanelHAL
#include <back_panel.h>

Public Functions

inline metadata::eui_t get_entity_eui() const override
class BackPanelHAL_V_1_0_X : public entities::EntitySharedHardware<BackPanelHAL>
#include <back_panel.h>

Public Functions

explicit BackPanelHAL_V_1_0_X(bus::addr_t block_address)
class BackPanelHAL_V_2_0_X : public entities::EntitySharedHardware<BackPanelHAL>
#include <back_panel.h>

Public Functions

explicit BackPanelHAL_V_2_0_X(bus::addr_t block_address)
class Dummy_LUCIDAC_HAL : public LUCIDAC_HAL
#include <lucidac.h>

Public Functions

inline Dummy_LUCIDAC_HAL()
inline bool write_acl(std::array<ACL, 8> acl) override

Write bits to ACL shift register, from I-block input 24 (first element) to 31 (last element)

inline void reset_acl() override
inline void reset_adc_bus_mux() override
inline bool write_adc_bus_mux(const std::array<int8_t, 8> &channels) override
inline float read_temperature() const override
class NativeLEDs : public LEDs
#include <leds.h>

Public Functions

NativeLEDs()
bool set(const uint8_t led, bool on) override

Sets specified front led to the specified value.

void set_all(const uint8_t states) override

Sets all eight front leds at once.

void reset() override

Disables all eight front leds.

uint8_t get_all() const override

Returns the current state of the front leds.

utils::status write_to_hardware() const override
class NativeSignalGenerator : public interfaces::SignalGenerator
#include <signal_generator.h>

Public Functions

NativeSignalGenerator()
bool init() override

Initializes the signal generator and puts it to sleep.

inline bool is_installed() const override

Returns wether an signal generator module is actually installed and active.

Writing to an uninstalled generator will result in fauilure

void set_frequency(float frequency) override

Sets the frequency of the sine / triangle output in Hz.

Note that the square output will always operate on half of the specified frequency. Returns the actually set frequency.

void set_phase(float phase) override

Sets the phase of the frequency outputs synchronised to the reset pin.

Possible values are [0, 2 PI]. Returns the actually set phase.

void set_wave_form(WaveForm wave_form) override

Sets the wave form of the function generator output.

bool set_amplitude(float amplitude) override

Sets the amplitude of the sine or triangle wave in machine units.

Possible values are: [0, 1]. The amplitude of the square output is not affected by this function.

bool set_square_voltage_levels(float low, float high) override

Sets the lower and upper value of the square output in machine units.

Possible values are: [-1, 1]. The amplitude of the sine / triangle output is not affected by this function.

bool set_square_voltage_low(float low) override

Sets the lower value of the square output in machine units.

Possible values are: [-1, 1]. The amplitude of the sine / triangle output is not affected by this function.

bool set_square_voltage_high(float high) override

Sets the upper value of the square output in machine units.

Possible values are: [-1, 1]. The amplitude of the sine / triangle output is not affected by this function.

bool set_offset(float offset) override

Sets the constant offset of the sine or triangle output in machine units.

The levels of the square output are not affected by this function.

float get_real_frequency() const override

Returns the actually set frequency of the function generator, containing rounding errors.

float get_real_phase() const override

Returns the actually set phase of the function generator, containing rounding errors.

Possible values are mapped to [0, 2PI].

float get_frequency() const override
float get_phase() const override
WaveForm get_wave_form() const override
float get_amplitude() const override
float get_square_voltage_low() const override
float get_square_voltage_high() const override
float get_offset() const override
bool get_sleep() const override
float get_dac_out0() const override
float get_dac_out1() const override
void sleep() override

Sets the sine / triangle output of the function generator to zero.

The square output will stay at high or low level.

void awake() override

Resumes outputs of the function generator to regular operation, according to the previously specified frequencies.

bool set_dac_out0(float value) override

Writes the DACout0 constant voltage output. Possible values are: [-2V, 2V].

bool set_dac_out1(float value) override

Writes the DACout1 constant voltage output. Possible values are: [-2V, 2V].

utils::status write_to_hardware() override
class REDAC_HAL_Dummy : public REDAC_HAL
#include <redac.h>

Public Functions

inline explicit REDAC_HAL_Dummy()
inline uint16_t read_backplane_and_slot_id() const override
inline bool write_adc_bus_mux(const std::array<int8_t, 8> &channels) override
inline void reset_adc_bus_mux() override
inline float read_temperature() const override
inline void set_standby(bool enabled) override
class REDAC_HAL_V_1_0_X : public entities::EntitySharedHardware<REDAC_HAL>
#include <redac.h>

Subclassed by platform::REDAC_HAL_V_1_1_X

Public Functions

REDAC_HAL_V_1_0_X()
uint16_t read_backplane_and_slot_id() const override
bool write_adc_bus_mux(const std::array<int8_t, 8> &channels) override
void reset_adc_bus_mux() override

Public Static Attributes

static uint8_t METADATA_FADDR = bus::METADATA_FUNC_IDX
static uint8_t TEMPERATURE_FADDR = 1
static uint8_t ADC_PRG_FADDR = 0
static uint8_t ADC_RESET_FADDR = 1
static uint8_t ADC_STROBE_FADDR = 2
static uint8_t STANDBY_SET_FADDR = 3
static uint8_t STANDBY_UNSET_FADDR = 2
static const SPISettings BP_REDAC_ID_SPI_SETTINGS{4'000'000, LSBFIRST, SPI_MODE2}
static uint8_t BP_REDAC_ID_FADDR = 2
class REDAC_HAL_V_1_1_X : public platform::REDAC_HAL_V_1_0_X
#include <redac.h>

Public Functions

REDAC_HAL_V_1_1_X()
bool write_fp_control_register(uint16_t state)

Public Static Attributes

static uint8_t FP_SR_CLR = 4
static uint8_t FP_SR_STO = 5
static uint8_t FP_SR = 6
class REDAC_V_1_1_X : public REDAC
#include <redac.h>

Public Types

enum FrontPanelIOMode

Values:

enumerator ANALOG_OUT
enumerator ANALOG_IN
enumerator DIGITAL_OUT
enumerator DIGITAL_IN

Public Functions

explicit REDAC_V_1_1_X(REDAC_HAL_V_1_1_X *hardware)
bool set_io_mode(uint8_t io_number, FrontPanelIOMode mode)
FrontPanelIOMode get_io_mode(uint8_t io_number) const
bool set_DIO_direction(uint8_t dio_number, bool input_from_ctrl_block)
bool get_DIO_direction(uint8_t dio_number) const
status write_to_hardware() override
class Teensy_LUCIDAC_HAL : public entities::EntitySharedHardware<LUCIDAC_HAL>
#include <lucidac.h>

Public Functions

Teensy_LUCIDAC_HAL()
bool write_acl(std::array<ACL, 8> acl) override

Write bits to ACL shift register, from I-block input 24 (first element) to 31 (last element)

void reset_acl() override
bool write_adc_bus_mux(const std::array<int8_t, 8> &channels) override

Write channel selection to ADC bus muxer.

Each element in channels selects the input index for the n-th ADC bus output (-1 disables).

void reset_adc_bus_mux() override

Public Static Attributes

static uint8_t CARRIER_MADDR = 5
static uint8_t METADATA_FADDR = bus::METADATA_FUNC_IDX
static uint8_t TEMPERATURE_FADDR = 1
static uint8_t ADC_PRG_FADDR = 2
static uint8_t ADC_RESET_8816_FADDR = 3
static uint8_t ADC_RESET_SR_FADDR = 4
static uint8_t ADC_STROBE_FADDR = 5
static uint8_t ACL_PRG_FADDR = 6
static uint8_t ACL_UPD_FADDR = 7
static uint8_t ACL_CRL_FADDR = 8
class TeensyLEDs : public LEDs
#include <leds.h>

Public Functions

TeensyLEDs()
bool set(const uint8_t led, bool on) override

Sets specified front led to the specified value.

void set_all(const uint8_t states) override

Sets all eight front leds at once.

void reset() override

Disables all eight front leds.

uint8_t get_all() const override

Returns the current state of the front leds.

utils::status write_to_hardware() const override
namespace interfaces
class FrontPlaneSignalGenerator : public SignalGenerator
#include <signal_generator.h>

Public Functions

FrontPlaneSignalGenerator(SignalGeneratorHAL *hardware)

FrontPlaneSignalGenerator.

bool init() override

Initializes the signal generator and puts it to sleep.

inline bool is_installed() const override

Returns wether an signal generator module is actually installed and active.

Writing to an uninstalled generator will result in fauilure

void set_frequency(float frequency) override

Sets the frequency of the sine / triangle output in Hz.

Note that the square output will always operate on half of the specified frequency. Returns the actually set frequency.

void set_phase(float phase) override

Sets the phase of the frequency outputs synchronised to the reset pin.

Possible values are [0, 2 PI]. Returns the actually set phase.

void set_wave_form(WaveForm wave_form) override

Sets the wave form of the function generator output.

bool set_amplitude(float amplitude) override

Sets the amplitude of the sine or triangle wave in machine units.

Possible values are: [0, 1]. The amplitude of the square output is not affected by this function.

bool set_square_voltage_levels(float low, float high) override

Sets the lower and upper value of the square output in machine units.

Possible values are: [-1, 1]. The amplitude of the sine / triangle output is not affected by this function.

bool set_square_voltage_low(float low) override

Sets the lower value of the square output in machine units.

Possible values are: [-1, 1]. The amplitude of the sine / triangle output is not affected by this function.

bool set_square_voltage_high(float high) override

Sets the upper value of the square output in machine units.

Possible values are: [-1, 1]. The amplitude of the sine / triangle output is not affected by this function.

bool set_offset(float offset) override

Sets the constant offset of the sine or triangle output in machine units.

The levels of the square output are not affected by this function.

float get_real_frequency() const override

Returns the actually set frequency of the function generator, containing rounding errors.

float get_real_phase() const override

Returns the actually set phase of the function generator, containing rounding errors.

Possible values are mapped to [0, 2PI].

float get_frequency() const override
float get_phase() const override
WaveForm get_wave_form() const override
float get_amplitude() const override
float get_square_voltage_low() const override
float get_square_voltage_high() const override
float get_offset() const override
bool get_sleep() const override
float get_dac_out0() const override
float get_dac_out1() const override
void sleep() override

Sets the sine / triangle output of the function generator to zero.

The square output will stay at high or low level.

void awake() override

Resumes outputs of the function generator to regular operation, according to the previously specified frequencies.

bool set_dac_out0(float value) override

Writes the DACout0 constant voltage output. Possible values are: [-2V, 2V].

bool set_dac_out1(float value) override

Writes the DACout1 constant voltage output. Possible values are: [-2V, 2V].

utils::status write_to_hardware() override
class FrontPlaneSignalGeneratorHAL_Common : public SignalGeneratorHAL
#include <signal_generator.h>

Subclassed by platform::interfaces::FrontPlaneSignalgeneratorHAL_V_1_1_X, platform::interfaces::FrontPlaneSignalgeneratorHAL_V_1_2_X

Public Functions

FrontPlaneSignalGeneratorHAL_Common()

SignalGeneratorHAL.

virtual bool init()
virtual bool set_parameter(WaveForm form, uint8_t index, Parameter param, float value)
virtual float get_parameter(WaveForm form, Parameter param)
virtual bool toggle(bool enable, WaveForm form)
inline utils::status status()
class FrontPlaneSignalgeneratorHAL_V_1_1_X : public platform::interfaces::FrontPlaneSignalGeneratorHAL_Common
#include <signal_generator.h>

Public Functions

inline virtual bool set_sine_param(Parameter param, float value) override
class FrontPlaneSignalgeneratorHAL_V_1_2_X : public platform::interfaces::FrontPlaneSignalGeneratorHAL_Common
#include <signal_generator.h>

With version 1.2.X, the pin arrangement betweenthe DAC and all connected chips has changed, but none of the functionality.

Public Functions

inline virtual bool set_sine_param(Parameter param, float value) override

Entity structure

namespace entities

Variables

EntityManager_ EntityManager
class EntityManager_
#include <entity_manager.h>

Public Functions

inline EntityClassifier read_classifier(bus::addr_t address)
inline void addEntity(bus::addr_t address, EntityClassifier classifier)
inline void addClassifier(bus::addr_t address, EntityClassifier classifier)
template<class Parent>
class EntitySharedHardware : public Parent
#include <hardware.h>

Public Functions

inline metadata::eui_t get_entity_eui() const
inline float read_temperature() const
namespace metadata
class MetadataEditor : public functions::EEPROM25AA02
#include <meta.h>

Public Functions

inline explicit MetadataEditor(bus::addr_t address, uint8_t alt_function_idx)
inline entities::EntityClassifier read_entity_classifier() const
inline eui_t read_eui() const
inline bool write_entity_classifier(const entities::EntityClassifier &classifier) const
template<std::size_t dataSize>
class MetadataMemory : public functions::DataFunction
#include <metadata.h>

The abstract metadata memory class allows to represent different EEPROM sizes, for instance does the 25AA02E64 hold 256 bytes while 25AA02E32 holds only 128 bytes.

However, the extension rather looks into bigger then smaller EEPROMs.

Public Functions

inline explicit MetadataMemory(const unsigned short address, const SPISettings &spi_settings)
virtual size_t read_from_hardware(size_t byte_offset, size_t length, uint8_t *buffer) const = 0
inline size_t read_from_hardware()
template<class Layout_>
inline const Layout_ &as() const