mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 00:07:13 +02:00

# Setting DAC names for CTB * Introduced new shared memory for CTB only * Prepared for additional functionality * Works from C++ and Python Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
32 lines
834 B
C++
32 lines
834 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
namespace sls {
|
|
|
|
|
|
class CtbConfig {
|
|
static constexpr size_t name_length = 20;
|
|
static constexpr size_t num_dacs = 18;
|
|
static constexpr const char* shm_tag_ = "ctbdacs";
|
|
char dacnames[name_length * num_dacs]{};
|
|
|
|
void check_index(size_t i) const;
|
|
void check_size(const std::string &name) const;
|
|
|
|
public:
|
|
CtbConfig();
|
|
CtbConfig(const CtbConfig&) = default;
|
|
CtbConfig(CtbConfig&&) = default;
|
|
CtbConfig& operator=(const CtbConfig&) = default;
|
|
~CtbConfig() = default;
|
|
|
|
void setDacNames(const std::vector<std::string> &names);
|
|
void setDacName(size_t index, const std::string &name);
|
|
std::string getDacName(size_t index) const;
|
|
std::vector<std::string> getDacNames() const;
|
|
static const char* shm_tag();
|
|
};
|
|
|
|
|
|
} // namespace sls
|