SeekDAS S100M4X C++ SDK 0.2.0
seekdas.hpp: C++17 interface over the Rust SDK
Loading...
Searching...
No Matches
seekdas::Config Class Reference

Configuration of a run: decimation and kernel, edge detectors, internal generator, the two groups, point count, packet size. More...

#include <seekdas.hpp>

Public Member Functions

 Config ()
Config & decimation (int r)
 decimation by R = 2^r (0..4) in front of the resampling filter
Config & bandwidth (double hz)
 decimation and kernel for a signal bandwidth (up to 20 MHz)
Config & raw ()
 raw samples: r = 0 and the identity kernel (use with an integer generator period)
Config & kernel_identity ()
Config & kernel_cubic ()
Config & kernel_sinc (int taps, double fc, double beta)
Config & kernel_average (int taps, double width)
Config & kernel_least_squares (int taps, double fp, double fs, int r)
Config & kernel_rows (const std::vector< std::int32_t > &coef, int taps)
 own coefficients: 64 rows of taps values, coef[phase * taps + tap], Q1.16, each row summing to 65536
Config & time_calibration (int ticks)
Config & detector (int d, Channel input, Edge edge, int threshold, int hysteresis=200, std::uint32_t min_interval=0)
 edge detector d (0..3) on an input; takes effect once a group lists it (source_detector(d))
Config & generator_period (double samples)
Config & generator_rate (double points_per_second)
Config & group (int g, std::uint32_t sources, ChannelMask channels, bool timestamps)
 group 0 or 1: sources (source_detector(d) | kSourceGenerator), inputs, time word per point
Config & points (std::uint32_t n)
 points of both groups together after which the run stops; 0 = until stopped
Config & packet_beats (int beats)
Config & standard_mtu ()
Config & jumbo_packets ()
Config & flush (std::chrono::microseconds t)
Config & merge_delay (int samples)
void validate () const
const seekdas_config * native () const noexcept
seekdas_config * native () noexcept

Detailed Description

Configuration of a run: decimation and kernel, edge detectors, internal generator, the two groups, point count, packet size.

See the Rust documentation (docs/S100M4X_SDK_API.pdf) for the concepts. Setters throw ArgumentError and leave the configuration unchanged if a value is out of range.

Definition at line 323 of file seekdas.hpp.

Constructor & Destructor Documentation

◆ Config()

seekdas::Config::Config ( )
inline

Definition at line 325 of file seekdas.hpp.

Member Function Documentation

◆ decimation()

Config & seekdas::Config::decimation ( int r)
inline

decimation by R = 2^r (0..4) in front of the resampling filter

Definition at line 329 of file seekdas.hpp.

◆ bandwidth()

Config & seekdas::Config::bandwidth ( double hz)
inline

decimation and kernel for a signal bandwidth (up to 20 MHz)

Definition at line 331 of file seekdas.hpp.

◆ raw()

Config & seekdas::Config::raw ( )
inline

raw samples: r = 0 and the identity kernel (use with an integer generator period)

Definition at line 333 of file seekdas.hpp.

◆ kernel_identity()

Config & seekdas::Config::kernel_identity ( )
inline

Definition at line 334 of file seekdas.hpp.

◆ kernel_cubic()

Config & seekdas::Config::kernel_cubic ( )
inline

Definition at line 335 of file seekdas.hpp.

◆ kernel_sinc()

Config & seekdas::Config::kernel_sinc ( int taps,
double fc,
double beta )
inline

Definition at line 336 of file seekdas.hpp.

◆ kernel_average()

Config & seekdas::Config::kernel_average ( int taps,
double width )
inline

Definition at line 337 of file seekdas.hpp.

◆ kernel_least_squares()

Config & seekdas::Config::kernel_least_squares ( int taps,
double fp,
double fs,
int r )
inline

Definition at line 338 of file seekdas.hpp.

◆ kernel_rows()

Config & seekdas::Config::kernel_rows ( const std::vector< std::int32_t > & coef,
int taps )
inline

own coefficients: 64 rows of taps values, coef[phase * taps + tap], Q1.16, each row summing to 65536

Definition at line 343 of file seekdas.hpp.

◆ time_calibration()

Config & seekdas::Config::time_calibration ( int ticks)
inline

Definition at line 348 of file seekdas.hpp.

◆ detector()

Config & seekdas::Config::detector ( int d,
Channel input,
Edge edge,
int threshold,
int hysteresis = 200,
std::uint32_t min_interval = 0 )
inline

edge detector d (0..3) on an input; takes effect once a group lists it (source_detector(d))

Definition at line 350 of file seekdas.hpp.

◆ generator_period()

Config & seekdas::Config::generator_period ( double samples)
inline

Definition at line 354 of file seekdas.hpp.

◆ generator_rate()

Config & seekdas::Config::generator_rate ( double points_per_second)
inline

Definition at line 355 of file seekdas.hpp.

◆ group()

Config & seekdas::Config::group ( int g,
std::uint32_t sources,
ChannelMask channels,
bool timestamps )
inline

group 0 or 1: sources (source_detector(d) | kSourceGenerator), inputs, time word per point

Definition at line 357 of file seekdas.hpp.

◆ points()

Config & seekdas::Config::points ( std::uint32_t n)
inline

points of both groups together after which the run stops; 0 = until stopped

Definition at line 362 of file seekdas.hpp.

◆ packet_beats()

Config & seekdas::Config::packet_beats ( int beats)
inline

Definition at line 363 of file seekdas.hpp.

◆ standard_mtu()

Config & seekdas::Config::standard_mtu ( )
inline

Definition at line 364 of file seekdas.hpp.

◆ jumbo_packets()

Config & seekdas::Config::jumbo_packets ( )
inline

Definition at line 365 of file seekdas.hpp.

◆ flush()

Config & seekdas::Config::flush ( std::chrono::microseconds t)
inline

Definition at line 366 of file seekdas.hpp.

◆ merge_delay()

Config & seekdas::Config::merge_delay ( int samples)
inline

Definition at line 367 of file seekdas.hpp.

◆ validate()

void seekdas::Config::validate ( ) const
inline

Definition at line 368 of file seekdas.hpp.

◆ native() [1/2]

const seekdas_config * seekdas::Config::native ( ) const
inlinenoexcept

Definition at line 370 of file seekdas.hpp.

◆ native() [2/2]

seekdas_config * seekdas::Config::native ( )
inlinenoexcept

Definition at line 371 of file seekdas.hpp.


The documentation for this class was generated from the following file: