STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::t7::LjmT7Device Class Reference

A T7 reached over Ethernet through LabJack's LJM library. More...

#include <LjmT7Device.hpp>

Inheritance diagram for fsw::t7::LjmT7Device:
[legend]
Collaboration diagram for fsw::t7::LjmT7Device:
[legend]

Public Member Functions

 LjmT7Device ()=default
 ~LjmT7Device () override
 LjmT7Device (const LjmT7Device &)=delete
LjmT7Device & operator= (const LjmT7Device &)=delete
void open (const std::string &ip) override
int64_t serial_number () override
void write_names (const std::vector< std::string > &names, const std::vector< double > &values) override
std::vector< double > read_names (const std::vector< std::string > &names) override
 Command-response reads; only valid while no stream is running.
double stream_start (const std::vector< std::string > &scan_names, int scans_per_read, double scan_rate_hz) override
 Starts the stream; returns the scan rate the device will actually run at.
Backlog stream_read (std::vector< double > &data) override
 Fills data with scans_per_read scans, channels interleaved.
void stream_stop () override
void close () override
Public Member Functions inherited from fsw::t7::T7Device
virtual ~T7Device ()=default

Private Attributes

int handle_ = -1
int num_addresses_ = 0
int scans_per_read_ = 0

Detailed Description

A T7 reached over Ethernet through LabJack's LJM library.

One instance per device.

Definition at line 9 of file LjmT7Device.hpp.

Constructor & Destructor Documentation

◆ LjmT7Device() [1/2]

fsw::t7::LjmT7Device::LjmT7Device ( )
default

Referenced by LjmT7Device(), and operator=().

◆ ~LjmT7Device()

fsw::t7::LjmT7Device::~LjmT7Device ( )
override

Definition at line 59 of file LjmT7Device.cpp.

References close().

◆ LjmT7Device() [2/2]

fsw::t7::LjmT7Device::LjmT7Device ( const LjmT7Device & )
delete

References LjmT7Device().

Member Function Documentation

◆ close()

void fsw::t7::LjmT7Device::close ( )
overridevirtual

Implements fsw::t7::T7Device.

Definition at line 143 of file LjmT7Device.cpp.

References handle_.

Referenced by engine.layerx.pool.WorkerPool::__exit__(), open(), and ~LjmT7Device().

◆ open()

void fsw::t7::LjmT7Device::open ( const std::string & ip)
overridevirtual

Implements fsw::t7::T7Device.

Definition at line 63 of file LjmT7Device.cpp.

References check(), close(), and handle_.

◆ operator=()

LjmT7Device & fsw::t7::LjmT7Device::operator= ( const LjmT7Device & )
delete

References LjmT7Device().

◆ read_names()

std::vector< double > fsw::t7::LjmT7Device::read_names ( const std::vector< std::string > & names)
overridevirtual

Command-response reads; only valid while no stream is running.

Implements fsw::t7::T7Device.

Definition at line 102 of file LjmT7Device.cpp.

References check(), and handle_.

◆ serial_number()

int64_t fsw::t7::LjmT7Device::serial_number ( )
overridevirtual

Implements fsw::t7::T7Device.

Definition at line 71 of file LjmT7Device.cpp.

References check(), and handle_.

◆ stream_read()

T7Device::Backlog fsw::t7::LjmT7Device::stream_read ( std::vector< double > & data)
overridevirtual

Fills data with scans_per_read scans, channels interleaved.

Blocks until they arrive.

Implements fsw::t7::T7Device.

Definition at line 132 of file LjmT7Device.cpp.

References b, check(), handle_, num_addresses_, and scans_per_read_.

◆ stream_start()

double fsw::t7::LjmT7Device::stream_start ( const std::vector< std::string > & scan_names,
int scans_per_read,
double scan_rate_hz )
overridevirtual

Starts the stream; returns the scan rate the device will actually run at.

Implements fsw::t7::T7Device.

Definition at line 114 of file LjmT7Device.cpp.

References check(), handle_, num_addresses_, and scans_per_read_.

◆ stream_stop()

void fsw::t7::LjmT7Device::stream_stop ( )
overridevirtual

Implements fsw::t7::T7Device.

Definition at line 139 of file LjmT7Device.cpp.

References check(), and handle_.

◆ write_names()

void fsw::t7::LjmT7Device::write_names ( const std::vector< std::string > & names,
const std::vector< double > & values )
overridevirtual

Implements fsw::t7::T7Device.

Definition at line 77 of file LjmT7Device.cpp.

References handle_.

Member Data Documentation

◆ handle_

int fsw::t7::LjmT7Device::handle_ = -1
private

◆ num_addresses_

int fsw::t7::LjmT7Device::num_addresses_ = 0
private

Definition at line 29 of file LjmT7Device.hpp.

Referenced by stream_read(), and stream_start().

◆ scans_per_read_

int fsw::t7::LjmT7Device::scans_per_read_ = 0
private

Definition at line 30 of file LjmT7Device.hpp.

Referenced by stream_read(), and stream_start().


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