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

#include <seekdas.hpp>

Public Member Functions

 At (const std::string &port)
 "/dev/ttyACM0", "COM5"
std::string command (const std::string &cmd, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 any command (without line end); returns the lines before OK, joined by '
'; AtError on ERROR
void ping ()
AtVersion version ()
AtStatus status ()
SelftestResult selftest_result ()
SelftestResult run_selftest ()
 runs the self-test again (about 10 s; interrupts the data plane)
void set_lasers (bool sfp0, bool sfp1=false)
void set_adc_power (bool on)
void set_range (RangeTarget target, Range r)
std::array< Range, kChannels > ranges ()
std::optional< WindowStats > read (Channel input, Window w=Window::Ms1)
 newest statistics window of one input; nothing if the data plane has no data
std::array< std::optional< WindowStats >, kChannels > read_all (Window w=Window::Ms1)
std::chrono::milliseconds uptime ()
std::string host_ip ()
void set_host_ip (const std::string &ip)
std::vector< ConvSource > conv_sources ()
 CONV sources configured in the device (AT+CONV?).
void set_conv_sources (const std::vector< Channel > &inputs)
 AT+CONV=: replace the list (group 0, rising edge, threshold 1400, hysteresis 200); AtError while a run is active.
void add_conv_source (const ConvSource &c)
void remove_conv_source (Channel c)
std::uint32_t read_reg (std::uint16_t addr)
 register access over the serial port (about 10 ms per register)
std::uint32_t write_reg (std::uint16_t addr, std::uint32_t value)
seekdas_at * native () noexcept

Detailed Description

Definition at line 736 of file seekdas.hpp.

Constructor & Destructor Documentation

◆ At()

seekdas::At::At ( const std::string & port)
inlineexplicit

"/dev/ttyACM0", "COM5"

Definition at line 739 of file seekdas.hpp.

Member Function Documentation

◆ command()

std::string seekdas::At::command ( const std::string & cmd,
std::chrono::milliseconds timeout = std::chrono::milliseconds(0) )
inline

any command (without line end); returns the lines before OK, joined by '
'; AtError on ERROR

Definition at line 745 of file seekdas.hpp.

◆ ping()

void seekdas::At::ping ( )
inline

Definition at line 751 of file seekdas.hpp.

◆ version()

AtVersion seekdas::At::version ( )
inline

Definition at line 752 of file seekdas.hpp.

◆ status()

AtStatus seekdas::At::status ( )
inline

Definition at line 763 of file seekdas.hpp.

◆ selftest_result()

SelftestResult seekdas::At::selftest_result ( )
inline

Definition at line 776 of file seekdas.hpp.

◆ run_selftest()

SelftestResult seekdas::At::run_selftest ( )
inline

runs the self-test again (about 10 s; interrupts the data plane)

Definition at line 784 of file seekdas.hpp.

◆ set_lasers()

void seekdas::At::set_lasers ( bool sfp0,
bool sfp1 = false )
inline

Definition at line 793 of file seekdas.hpp.

◆ set_adc_power()

void seekdas::At::set_adc_power ( bool on)
inline

Definition at line 794 of file seekdas.hpp.

◆ set_range()

void seekdas::At::set_range ( RangeTarget target,
Range r )
inline

Definition at line 795 of file seekdas.hpp.

◆ ranges()

std::array< Range, kChannels > seekdas::At::ranges ( )
inline

Definition at line 796 of file seekdas.hpp.

◆ read()

std::optional< WindowStats > seekdas::At::read ( Channel input,
Window w = Window::Ms1 )
inline

newest statistics window of one input; nothing if the data plane has no data

Definition at line 804 of file seekdas.hpp.

◆ read_all()

std::array< std::optional< WindowStats >, kChannels > seekdas::At::read_all ( Window w = Window::Ms1)
inline

Definition at line 809 of file seekdas.hpp.

◆ uptime()

std::chrono::milliseconds seekdas::At::uptime ( )
inline

Definition at line 817 of file seekdas.hpp.

◆ host_ip()

std::string seekdas::At::host_ip ( )
inline

Definition at line 818 of file seekdas.hpp.

◆ set_host_ip()

void seekdas::At::set_host_ip ( const std::string & ip)
inline

Definition at line 819 of file seekdas.hpp.

◆ conv_sources()

std::vector< ConvSource > seekdas::At::conv_sources ( )
inline

CONV sources configured in the device (AT+CONV?).

Definition at line 821 of file seekdas.hpp.

◆ set_conv_sources()

void seekdas::At::set_conv_sources ( const std::vector< Channel > & inputs)
inline

AT+CONV=: replace the list (group 0, rising edge, threshold 1400, hysteresis 200); AtError while a run is active.

Definition at line 835 of file seekdas.hpp.

◆ add_conv_source()

void seekdas::At::add_conv_source ( const ConvSource & c)
inline

Definition at line 840 of file seekdas.hpp.

◆ remove_conv_source()

void seekdas::At::remove_conv_source ( Channel c)
inline

Definition at line 846 of file seekdas.hpp.

◆ read_reg()

std::uint32_t seekdas::At::read_reg ( std::uint16_t addr)
inline

register access over the serial port (about 10 ms per register)

Definition at line 848 of file seekdas.hpp.

◆ write_reg()

std::uint32_t seekdas::At::write_reg ( std::uint16_t addr,
std::uint32_t value )
inline

Definition at line 849 of file seekdas.hpp.

◆ native()

seekdas_at * seekdas::At::native ( )
inlinenoexcept

Definition at line 851 of file seekdas.hpp.


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