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 MMulBlockHAL_Parent = entities::EntitySharedHardware<MMulBlockHAL>
-
using SHBlockHAL_Parent = entities::EntitySharedHardware<SHBlockHAL>
-
using UBlockHAL_Parent = entities::EntitySharedHardware<UBlockHAL>
-
class CBlockHAL_Common : public entities::EntitySharedHardware<CBlockHAL>
- #include <cblock.h>
Subclassed by blocks::CBlockHAL_V_1_0_X, blocks::CBlockHAL_V_1_1_X
-
class CBlockHAL_V_1_0_X : public blocks::CBlockHAL_Common
- #include <cblock.h>
-
class CBlockHAL_V_1_1_X : public blocks::CBlockHAL_Common
- #include <cblock.h>
-
class CTRLBlockHAL_V_1_0_2 : public entities::EntitySharedHardware<CTRLBlockHALBase>
- #include <ctrlblock.h>
-
class DummyCBlockHAL : public CBlockHAL
- #include <cblock.h>
-
class DummyCTRLBlockHAL : public CTRLBlockHALBase
- #include <ctrlblock.h>
-
class DummyIBlockHAL : public IBlockHAL
- #include <iblock.h>
-
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 explicit DummyMIntBlockHAL()
-
class DummyMMulBlockHAL : public MMulBlockHAL
- #include <mblock_mul.h>
Public Functions
-
inline explicit DummyMMulBlockHAL()
-
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.
-
inline explicit DummyMMulBlockHAL()
-
class DummySHBlockHAL : public SHBlockHAL
- #include <shblock.h>
-
class DummyUBlockHAL : public UBlockHAL
- #include <ublock.h>
-
class IBlockHAL_V_1_2_X : public entities::EntitySharedHardware<IBlockHAL>
- #include <iblock.h>
-
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)
-
const std::array<IntegratorCalibration, NUM_INTEGRATORS> &get_calibration() const
-
MIntBlock_V_1_1_X(SLOT slot, MIntBlockHAL_V_1_1_X *hardware)
-
class MIntBlockHAL_V_1_0_X : public entities::EntitySharedHardware<MIntBlockHAL>
- #include <mblock_int.h>
Subclassed by blocks::MIntBlockHAL_V_1_1_X
-
class MIntBlockHAL_V_1_1_X : public blocks::MIntBlockHAL_V_1_0_X
- #include <mblock_int.h>
Public Functions
-
bool write_ic(uint8_t idx, float ic) override
-
bool write_time_factor_switches(std::bitset<8> switches) override
-
virtual bool write_limiters_enable(std::bitset<8> limiters)
-
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)
-
bool write_ic(uint8_t idx, float ic) override
-
class MMulBlock_FullAutoCalibration : public MMulBlock
- #include <mblock_mul.h>
-
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
-
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
-
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
-
bool init() override
-
class MMulBlockHAL_V_1_1_X : public blocks::MMulBlockHAL_V_1_0_X, public blocks::MMulBlockHAL_FullAutoCalibration
- #include <mblock_mul.h>
Public Functions
-
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
-
virtual bool write_calibration_gain(uint8_t idx, uint8_t gain) override
-
class MMulBlockHAL_V_1_M1_X : public blocks::MMulBlockHAL_V_1_0_X, public blocks::MMulBlockHAL_FullAutoCalibration
- #include <mblock_mul.h>
Public Functions
-
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
-
virtual bool write_calibration_gain(uint8_t idx, uint8_t gain) override
-
class SHBlockHAL_V_0_1_X : public entities::EntitySharedHardware<SHBlockHAL>
- #include <shblock.h>
-
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
-
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)
-
class UBlockHAL_V_1_2_X : public blocks::UBlockHAL_Common
- #include <ublock.h>
-
using CBlockHAL_Parent = entities::EntitySharedHardware<CBlockHAL>
Platform
-
namespace platform
-
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 bool write_adc_bus_mux(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).
-
inline void reset_adc_bus_mux() override
-
inline Dummy_LUCIDAC_HAL()
-
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.
-
NativeLEDs()
-
class NativeSignalGenerator : public 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].
-
NativeSignalGenerator()
-
class Teensy_LUCIDAC_HAL : public 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(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
-
inline float read_temperature() const override
Public Static Attributes
-
static uint8_t CARRIER_MADDR = 5
-
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
-
Teensy_LUCIDAC_HAL()
-
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.
-
TeensyLEDs()
-
class TeensySignalGenerator : public SignalGenerator
- #include <signal_generator.h>
Public Functions
-
TeensySignalGenerator()
-
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].
-
TeensySignalGenerator()
-
class Dummy_LUCIDAC_HAL : public LUCIDAC_HAL
Entity structure
-
namespace entities
Variables
-
EntityManager_ EntityManager
-
class EntityManager_
- #include <entity_manager.h>
- #include <hardware.h>
Subclassed by blocks::CBlockHAL_Common, blocks::CTRLBlockHAL_V_1_0_2, blocks::IBlockHAL_V_1_2_X, blocks::MIntBlockHAL_V_1_0_X, blocks::MMulBlockHAL_V_1_0_X, blocks::SHBlockHAL_V_0_1_X, blocks::UBlockHAL_Common
Public Functions
-
EntityManager_ EntityManager
-
namespace metadata
-
class MetadataEditor : public functions::EEPROM25AA02
- #include <meta.h>
-
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.
-
class MetadataEditor : public functions::EEPROM25AA02