API Documentation

tango-moenchzmq

class CPUComputationBackend

Public Types

typedef boost::singleton_pool<FullFrame, sizeof(FullFrame)> memory_pool

Public Functions

CPUComputationBackend(FileWriter *file_writer_ptr, float PEDESTAL_BUFFER_LENGTH, unsigned long long THREAD_AMOUNT)
CPUComputationBackend(FileWriter *file_writer_ptr)
CPUComputationBackend() = default
~CPUComputationBackend()
void pause()
void resume()
void allocateIndividualStorage()

Allocate memory for all of the single frames storage.

void deleteIndividualStorage()

Delete memory for all of the single frames storage.

void resetAccumulators()

Reset all of the accumulators.

void resetPedestalAndRMS()

Reset the pedestal and RMS accumulators.

void dumpAccumulators()

Dump the sum frames to the file.

void loadPedestalAndRMS(OrderedFrame<float, consts::LENGTH> &pedestal, OrderedFrame<float, consts::LENGTH> &pedestal_rms)

The function calculates the \( \hat{p} \) pedestal and \( p_{\sigma} \) RMS values with the \( p_\Sigma= \) pedestal_sum and \( p_{\Sigma}^2= \) pedestal_squared_sum.

Since the pedestal is the mean value of the pixel values and the RMS is the square root of the variance

\[\begin{split} \begin{split} \hat{p} &= \frac{p_\Sigma}{N} \\ p_{\sigma} &= \sqrt{\frac{p_{\Sigma}^2}{N} - \left(\frac{p_\Sigma}{N}\right)^2} \end{split} \end{split}\]

Parameters:
  • pedestal – the pedestal values

  • pedestal_rms – the pedestal RMS values

OrderedFrame<char, consts::LENGTH> classifyFrame(OrderedFrame<float, consts::LENGTH> &input, OrderedFrame<float, consts::LENGTH> &pedestal_rms)

Classify the pixels of the frame in types.

Parameters:
  • input – frame to classify

  • pedestal_rms – the \( p_{\sigma} \) RMS values (see loadPedestalAndRMS())

Returns:

OrderedFrame<char, consts::LENGTH> the classes of pixel in frame

void updatePedestalMovingAverage(OrderedFrame<unsigned short, consts::LENGTH> &raw_frame, OrderedFrame<char, consts::LENGTH> &frame_classes, bool isPedestal)

Update the pedestal moving average pedestal_sum and pedestal_squared_sum.

Parameters:
  • raw_frame – unprocessed frame (no pedestal subtraction etc)

  • frame_classes – pixel classes (see classifyFrame())

  • isPedestal – if the frame is pedestal frame

void dispatchTasks()

Dispatch the tasks to the thread pool.

void processFrame(FullFrame *ptr)

Process the FullFrame.

Parameters:

ptr – pointer to the FullFrame structure

Public Members

boost::lockfree::queue<FullFrame*> frame_ptr_queue
FileWriter *file_writer_ptr
float PEDESTAL_BUFFER_LENGTH
unsigned int THREAD_AMOUNT
std::atomic_bool threads_sleep = true
std::atomic_bool destroy_threads = false
std::atomic_bool destoy_dispatcher = false
std::vector<std::thread> threads
std::thread dispatcher_thread
boost::asio::thread_pool *thread_pool
std::string save_root_path
std::string file_path
std::string file_name
int max_frame_index = 0
std::atomic<float> counting_sigma = 4
std::atomic<long> file_index
size_t individual_frame_buffer_capacity = 300
std::shared_mutex pedestal_share
std::mutex frames_sums
std::atomic<long> processed_frames_amount = {0}
OrderedFrame<float, consts::LENGTH> pedestal_counter_counting
OrderedFrame<float, consts::LENGTH> pedestal_sum_counting
OrderedFrame<float, consts::LENGTH> pedestal_squared_sum_counting
OrderedFrame<float, consts::LENGTH> pedestal_counter
OrderedFrame<float, consts::LENGTH> pedestal_sum

Sum of the pedestal values.

OrderedFrame<float, consts::LENGTH> pedestal_squared_sum

Sum of the squared pedestal values.

OrderedFrame<float, consts::LENGTH> analog_sum
OrderedFrame<float, consts::LENGTH> analog_sum_pumped
OrderedFrame<float, consts::LENGTH> thresholded_sum
OrderedFrame<float, consts::LENGTH> thresholded_sum_pumped
OrderedFrame<float, consts::LENGTH> counting_sum
OrderedFrame<int, consts::LENGTH> counting_sum_pumped
std::atomic_bool isSplitPumped = false
std::atomic_bool isPedestal = true
long updatePedestalPeriod = 1
std::atomic_bool saveIndividualFrames = true
std::atomic_bool saveRawFrames = true
long *frameindex_storage_ptr = nullptr
float *individual_analog_storage_ptr = nullptr
unsigned short *individual_raw_storage_ptr = nullptr
class FileWriter
#include <FileWriter.hpp>

Abstract class for writing frames to files.

Subclassed by HDFWriter

Public Functions

FileWriter() = default

Construct a new File Writer object.

inline FileWriter(std::filesystem::path root_path, int file_index)

Construct a new File Writer object.

Parameters:
  • root_path

  • file_index

virtual std::filesystem::path buildFullFilePath() = 0
virtual std::filesystem::path buildFullDirectoryPath() = 0
virtual ~FileWriter() = default
virtual void openFile() = 0
virtual void closeFile() = 0
virtual void writeFrame(const std::string group_name, const std::string frame_name, OrderedFrame<float, consts::LENGTH> &frame) = 0

Generic method to write a frame to the file.

virtual void writeFrameStack(const std::string group_name, const std::string frame_stack_name, float *frame_stack_ptr, size_t frame_stack_length) = 0

Generic method to write a frame stack to the file.

virtual void writeFrameStack(const std::string group_name, const std::string frame_stack_name, char *frame_stack_ptr, size_t frame_stack_length) = 0
virtual void writeFrameStack(const std::string group_name, const std::string frame_stack_name, unsigned short *frame_stack_ptr, size_t frame_stack_length) = 0
virtual void write1DArray(const std::string group_name, const std::string array_name, long *array, size_t array_length) = 0

Public Members

std::filesystem::path root_path

Directory path (e.g. /home/user/)

std::string session_directory

Session directory path (e.g. /home/user/20230825_run)

std::string file_name

Filename like 20230825_run.

int file_index

File index like 122.

struct FullFrame
#include <Frames.hpp>

FullFrame is a struct that contains the metadata and the frame.

Public Members

Metadata m

Metadata of the frame.

OrderedFrame<unsigned short, consts::LENGTH> f

The frame itself.

class HDFWriter : public FileWriter

Public Functions

HDFWriter(std::filesystem::path root_path)
HDFWriter(std::filesystem::path root_path, int file_index)
~HDFWriter()
virtual void openFile() override
virtual void closeFile() override
virtual void writeFrame(const std::string group_name, const std::string frame_name, OrderedFrame<float, consts::LENGTH> &frame) override

Write a single frame to the file.

Parameters:
  • group_name – Group name in the HDF5 file (e.g. /data)

  • frame_name – Frame name in the HDF5 file (e.g. /data/averaged_frame)

  • frame – Single frame to write into the file

virtual void writeFrameStack(const std::string group_name, const std::string frame_stack_name, float *frame_stack_ptr, size_t frame_stack_length) override

Write a stack of frames to the .h5 file.

Parameters:
  • group_name – Group name in the HDF5 file (e.g. /data)

  • frame_name – Frame stack name in the HDF5 file (e.g. /data/individual_frames)

  • frame_stack_ptr – Pointer to the T[] frame stack of the length frame_stack_length * #consts::HEIGHT * #consts::WIDTH

  • frame_stack_length – Length of the frame stack to write. Should be less than or equal to the length of the frame stack array.

virtual void writeFrameStack(const std::string group_name, const std::string frame_stack_name, char *frame_stack_ptr, size_t frame_stack_length) override
virtual void writeFrameStack(const std::string group_name, const std::string frame_stack_name, unsigned short *frame_stack_ptr, size_t frame_stack_length) override
virtual void write1DArray(const std::string group_name, const std::string array_name, long *array_ptr, size_t array_length) override

Write a 1D array to the .h5 file.

Parameters:
  • group_name – Group name in the HDF5 file (e.g. /data)

  • array_name – 1D array name in the HDF5 file (e.g. /data/frame_indexes)

  • array_ptr – Pointer to the long[] 1D array (e.g. frame indexes)

  • array_length – Length of the 1D array to write

Protected Functions

virtual std::filesystem::path buildFullFilePath() override

Build the full file path (e.g. /home/user/20230825_run/20230825_run_122.h5)

virtual std::filesystem::path buildFullDirectoryPath() override

Build the full directory path (e.g. /home/user/20230825_run)

Private Members

H5::H5File current_file

HDF5 file object.

const std::string file_format = std::string("{file_name}_{file_index:06d}.") + file_extension

format string like {file_name}_{file_index:06d}.h5 with file_name and file_index arguments

const std::regex file_match = std::regex(std::string("^\\w+_(\\d+)\\.") + file_extension)

regex to match file names like 20230825_run_122.h5

Private Static Attributes

static constexpr char file_extension[] = "h5"

File extension (e.g. h5)

struct Metadata
#include <Frames.hpp>

Required metadata for the frame.

Public Members

unsigned int bitmode

Bitmode of the frame.

unsigned long frameIndex

Countinous frame index within the acquisition.

class MoenchZMQ : public TANGO_BASE_CLASS

Public Functions

MoenchZMQ(Tango::DeviceClass *cl, std::string &s)

Constructs a newly device object.

Method : MoenchZMQ::MoenchZMQ() Description: Constructors for a Tango device implementing the classMoenchZMQ

Parameters:
  • cl – Class.

  • s – Device Name

MoenchZMQ(Tango::DeviceClass *cl, const char *s)

Constructs a newly device object.

Parameters:
  • cl – Class.

  • s – Device Name

MoenchZMQ(Tango::DeviceClass *cl, const char *s, const char *d)

Constructs a newly device object.

Parameters:
  • cl – Class.

  • s – Device name

  • d – Device description.

~MoenchZMQ()

The device object destructor.

void delete_device()

Method : MoenchZMQ::delete_device() Description: will be called at device destruction or at init command

virtual void init_device()

Method : MoenchZMQ::init_device() Description: will be called at device initialization.

void get_device_property()

Method : MoenchZMQ::get_device_property() Description: Read database to initialize property data members.

virtual void always_executed_hook()

Method : MoenchZMQ::always_executed_hook() Description: method always executed before any command is executed

void check_mandatory_property(Tango::DbDatum &class_prop, Tango::DbDatum &dev_prop)

Method : MoenchZMQ::check_mandatory_property() Description: For mandatory properties check if defined in database.

void load_images_previews()
void copy_image_buffers()
virtual void read_attr_hardware(std::vector<long> &attr_list)

Method : MoenchZMQ::read_attr_hardware() Description: Hardware acquisition for attributes

virtual void write_attr_hardware(std::vector<long> &attr_list)

Method : MoenchZMQ::write_attr_hardware() Description: Hardware writing for attributes

virtual void read_file_index(Tango::Attribute &attr)

Attribute file_index related methods

Data type: Tango::DevULong Attr type: Scalar

Read attribute file_index related method

Data type: Tango::DevULong Attr type: Scalar

virtual void write_file_index(Tango::WAttribute &attr)

Write attribute file_index related method

Data type: Tango::DevULong Attr type: Scalar

virtual bool is_file_index_allowed(Tango::AttReqType type)
virtual void read_file_name(Tango::Attribute &attr)

Attribute filename related methods

Data type: Tango::DevString Attr type: Scalar

Read attribute filename related method

Data type: Tango::DevString Attr type: Scalar

virtual void write_file_name(Tango::WAttribute &attr)

Write attribute filename related method

Data type: Tango::DevString Attr type: Scalar

virtual bool is_file_name_allowed(Tango::AttReqType type)
virtual void read_session_directory(Tango::Attribute &attr)

Attribute file_root_path related methods

Data type: Tango::DevString Attr type: Scalar

Read attribute file_root_path related method

Data type: Tango::DevString Attr type: Scalar

virtual void write_session_directory(Tango::WAttribute &attr)

Write attribute file_root_path related method

Data type: Tango::DevString Attr type: Scalar

virtual bool is_session_directory_allowed(Tango::AttReqType type)
virtual void read_normalize(Tango::Attribute &attr)

Attribute normalize related methods

Data type: Tango::DevBoolean Attr type: Scalar

Read attribute normalize related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual void write_normalize(Tango::WAttribute &attr)

Write attribute normalize related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual bool is_normalize_allowed(Tango::AttReqType type)
virtual void read_update_pedestal_period(Tango::Attribute &attr)

Attribute update_pedestal related methods

Data type: Tango::DevBoolean Attr type: Scalar

virtual void write_update_pedestal_period(Tango::WAttribute &attr)
virtual bool is_update_pedestal_allowed(Tango::AttReqType type)
virtual void read_threshold(Tango::Attribute &attr)

Attribute threshold related methods

Data type: Tango::DevDouble Attr type: Scalar

Read attribute threshold related method

Data type: Tango::DevDouble Attr type: Scalar

virtual void write_threshold(Tango::WAttribute &attr)
virtual bool is_threshold_allowed(Tango::AttReqType type)
virtual void read_counting_sigma(Tango::Attribute &attr)

Attribute counting_sigma related methods

Data type: Tango::DevDouble Attr type: Scalar

Read attribute counting_sigma related method

Data type: Tango::DevDouble Attr type: Scalar

virtual void write_counting_sigma(Tango::WAttribute &attr)

Write attribute counting_sigma related method

Data type: Tango::DevDouble Attr type: Scalar

virtual bool is_counting_sigma_allowed(Tango::AttReqType type)
virtual void read_process_pedestal(Tango::Attribute &attr)

Attribute process_pedestal related methods

Data type: Tango::DevBoolean Attr type: Scalar

Read attribute process_pedestal related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual void write_process_pedestal(Tango::WAttribute &attr)
virtual bool is_process_pedestal_allowed(Tango::AttReqType type)
virtual void read_save_raw_frames(Tango::Attribute &attr)

Attribute save_raw_frames related methods

Data type: Tango::DevBoolean Attr type: Scalar

Read attribute save_raw_frames related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual void write_save_raw_frames(Tango::WAttribute &attr)
virtual bool is_save_raw_frames_allowed(Tango::AttReqType type)
virtual void read_split_pumped(Tango::Attribute &attr)

Attribute split_pumped related methods

Data type: Tango::DevBoolean Attr type: Scalar

Read attribute split_pumped related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual void write_split_pumped(Tango::WAttribute &attr)

Write attribute split_pumped related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual bool is_split_pumped_allowed(Tango::AttReqType type)
virtual void read_acquired_frames(Tango::Attribute &attr)

Attribute acquired_frames related methods

Data type: Tango::DevLong Attr type: Scalar

Read attribute acquired_frames related method

Data type: Tango::DevLong Attr type: Scalar

virtual bool is_acquired_frames_allowed(Tango::AttReqType type)
virtual void read_analog_img(Tango::Attribute &attr)

Attribute analog_img related methods

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

Read attribute analog_img related method

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

virtual bool is_analog_img_allowed(Tango::AttReqType type)
virtual void read_counting_img(Tango::Attribute &attr)

Attribute counting_img related methods

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

Read attribute counting_img related method

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

virtual bool is_counting_img_allowed(Tango::AttReqType type)
virtual void read_analog_img_pumped(Tango::Attribute &attr)

Attribute analog_img_pumped related methods

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

Read attribute analog_img_pumped related method

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

virtual bool is_analog_img_pumped_allowed(Tango::AttReqType type)
virtual void read_counting_img_pumped(Tango::Attribute &attr)

Attribute counting_img_pumped related methods

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

Read attribute counting_img_pumped related method

Data type: Tango::DevFloat Attr type: Image max = 400 x 400

virtual bool is_counting_img_pumped_allowed(Tango::AttReqType type)
virtual void read_individual_frame_buffer_capacity(Tango::Attribute &attr)
virtual void write_individual_frame_buffer_capacity(Tango::WAttribute &attr)
virtual bool is_individual_frame_buffer_capacity_allowed(Tango::AttReqType type)
void add_dynamic_attributes()

Method : MoenchZMQ::add_dynamic_attributes() Description: Add dynamic attributes if any.

Method : MoenchZMQ::add_dynamic_attributes() Description: Create the dynamic attributes if any for specified device.

virtual void start_receiver()

Command start_receiver related method

virtual bool is_start_receiver_allowed(const CORBA::Any &any)
virtual void stop_receiver()

Command stop_receiver related method

virtual bool is_stop_receiver_allowed(const CORBA::Any &any)
virtual void abort_receiver()

Command abort_receiver related method

virtual bool is_abort_receiver_allowed(const CORBA::Any &any)
virtual void reset_pedestal()

Command reset_pedestal related method

virtual bool is_reset_pedestal_allowed(const CORBA::Any &any)
virtual void push_images_change()

Command push_images_change related method

virtual bool is_push_images_change_allowed(const CORBA::Any &any)
void add_dynamic_commands()

Method : MoenchZMQ::add_dynamic_commands() Description: Add dynamic commands if any.

Method : MoenchZMQ::add_dynamic_commands() Description: Create the dynamic commands if any for specified device.

Public Members

std::string ZMQ_RX_IP
Tango::DevULong64 ZMQ_RX_PORT
std::string SAVE_ROOT_PATH
Tango::DevULong64 THREAD_AMOUNT
Tango::DevFloat PEDESTAL_BUFFER_LENGTH
bool mandatoryNotDefined
FileWriter *file_writer_ptr
ZMQListener *zmq_listener_ptr
std::atomic<bool> receiver_is_stopping
Tango::DevULong *attr_file_index_read
Tango::DevString *attr_file_name_read
Tango::DevString *attr_session_directory_read
Tango::DevBoolean *attr_normalize_read
Tango::DevLong *attr_update_pedestal_period_read
Tango::DevDouble *attr_threshold_read
Tango::DevFloat *attr_counting_sigma_read
Tango::DevBoolean *attr_process_pedestal_read
Tango::DevBoolean *attr_save_raw_frames_read
Tango::DevBoolean *attr_split_pumped_read
Tango::DevLong *attr_acquired_frames_read
Tango::DevFloat *attr_analog_img_read
Tango::DevFloat *attr_counting_img_read
Tango::DevFloat *attr_analog_img_pumped_read
Tango::DevFloat *attr_counting_img_pumped_read
Tango::DevULong *attr_individual_frame_buffer_capacity_read
template<typename T, unsigned int V>
struct OrderedFrame

Public Functions

inline T &operator()(int y, int x)
template<typename B>
inline void copy_to_buffer(B &buffer, bool flip = true)
inline OrderedFrame &operator+=(const OrderedFrame &rhs)
inline OrderedFrame<float, consts::LENGTH> operator-(const OrderedFrame<float, consts::LENGTH> &rhs)
inline OrderedFrame &operator-=(const OrderedFrame &rhs)
inline void addClass(OrderedFrame<char, V> &classes, const char class_nr)
inline void fill(T value)
inline void zero()

Public Members

T arr[V]
class ZMQListener

Public Functions

ZMQListener(std::string socket_addr, unsigned long long socket_port)
~ZMQListener()
void listen_socket()
void start_receive()
void stop_receive()
void abort_receive()

Public Members

CPUComputationBackend *comp_backend_ptr
std::atomic<long> received_frames_amount

Private Members

zmq::context_t context
zmq::socket_t socket
std::thread zmq_listener_thread
std::atomic_bool receive_data
std::atomic_bool abort_wait
std::atomic_bool abort_listen

Private Static Attributes

static constexpr size_t FRAME_SIZE = sizeof(FullFrame::f.arr)
namespace consts

Variables

constexpr int FRAME_WIDTH = 400
constexpr int FRAME_HEIGHT = 400
constexpr unsigned int LENGTH = FRAME_HEIGHT * FRAME_WIDTH
namespace MoenchZMQ_ns

MoenchZMQ class description:

namespace std
file CPUComputationBackend.cpp
#include <algorithm>
#include <boost/asio/post.hpp>
#include <cmath>
#include <condition_variable>
#include <fmt/chrono.h>
#include <fmt/core.h>
#include <iostream>
#include <numeric>
#include <syncstream>
#include <tuple>
#include “FileWriter.hpp
#include <chrono>
file CPUComputationBackend.hpp
#include <boost/asio/thread_pool.hpp>
#include <boost/lockfree/queue.hpp>
#include <boost/pool/singleton_pool.hpp>
#include <filesystem>
#include <shared_mutex>
#include <thread>
#include <vector>
#include “FileWriter.hpp
#include “Frames.hpp
file FileWriter.hpp
#include <fmt/core.h>
#include <filesystem>
#include <iostream>
#include <regex>
#include <string>
#include “Frames.hpp
file Frames.hpp
#include <boost/lockfree/queue.hpp>
#include <boost/pool/singleton_pool.hpp>
#include <filesystem>
#include <shared_mutex>
#include <thread>
#include <vector>
file HDFWriter.cpp
#include “HDFWriter.hpp
#include <H5Cpp.h>
#include <chrono>
#include <fmt/chrono.h>
#include <fmt/core.h>
#include <regex>
file HDFWriter.hpp
#include <H5Cpp.h>
#include <fmt/core.h>
#include <filesystem>
#include <regex>
#include <string>
#include “FileWriter.hpp
#include “Frames.hpp
file ZMQListener.cpp
#include “ZMQListener.hpp
#include <iostream>
#include <numeric>
#include <thread>
file ZMQListener.hpp
#include <rapidjson/document.h>
#include <rapidjson/stringbuffer.h>
#include <sls/ZmqSocket.h>
#include <algorithm>
#include <boost/lockfree/queue.hpp>
#include <boost/pool/singleton_pool.hpp>
#include <condition_variable>
#include <queue>
#include <shared_mutex>
#include <string>
#include <syncstream>
#include <thread>
#include <tuple>
#include <vector>
#include <zmq.hpp>
file data.hpp

Variables

static const unsigned char ANALOG_PUMPED[]
static const unsigned char ANALOG_UNPUMPED[]
static const unsigned char THRESHOLD_PUMPED[]
static const unsigned char THRESHOLD_UNPUMPED[]
static const unsigned char COUNTING_PUMPED[]
static const unsigned char COUNTING_UNPUMPED[]
file MoenchZMQ.cpp
#include “MoenchZMQ.h
#include “../backend/HDFWriter.hpp
#include “MoenchZMQClass.h”
#include “data.hpp
file MoenchZMQ.h
#include <tango/tango.h>

Defines

TANGO_LOG
TANGO_LOG_INFO
TANGO_LOG_DEBUG
dir backend
dir tangods

tango-moenchcontrol

class MoenchControl : public TANGO_BASE_CLASS

Public Functions

MoenchControl(Tango::DeviceClass *cl, std::string &s)

Constructs a newly device object.

Method : MoenchControl::MoenchControl() Description: Constructors for a Tango device implementing the classMoenchControl

Parameters:
  • cl – Class.

  • s – Device Name

MoenchControl(Tango::DeviceClass *cl, const char *s)

Constructs a newly device object.

Parameters:
  • cl – Class.

  • s – Device Name

MoenchControl(Tango::DeviceClass *cl, const char *s, const char *d)

Constructs a newly device object.

Parameters:
  • cl – Class.

  • s – Device name

  • d – Device description.

~MoenchControl()

The device object destructor.

void delete_device()

Method : MoenchControl::delete_device() Description: will be called at device destruction or at init command

virtual void init_device()

Method : MoenchControl::init_device() Description: will be called at device initialization.

void get_device_property()

Method : MoenchControl::get_device_property() Description: Read database to initialize property data members.

virtual void always_executed_hook()

Method : MoenchControl::always_executed_hook() Description: method always executed before any command is executed

void check_mandatory_property(Tango::DbDatum &class_prop, Tango::DbDatum &dev_prop)

Method : MoenchControl::check_mandatory_property() Description: For mandatory properties check if defined in database.

virtual void read_attr_hardware(std::vector<long> &attr_list)

Method : MoenchControl::read_attr_hardware() Description: Hardware acquisition for attributes

virtual void write_attr_hardware(std::vector<long> &attr_list)

Method : MoenchControl::write_attr_hardware() Description: Hardware writing for attributes

virtual bool is_detector_read_write_allowed()
virtual void read_exposure(Tango::Attribute &attr)

Attribute exposure related methods

Data type: Tango::DevFloat Attr type: Scalar

Read attribute exposure related method

Data type: Tango::DevFloat Attr type: Scalar

virtual void write_exposure(Tango::WAttribute &attr)

Write attribute exposure related method

Data type: Tango::DevFloat Attr type: Scalar

virtual bool is_exposure_allowed(Tango::AttReqType type)
virtual void read_delay(Tango::Attribute &attr)

Attribute delay related methods

Data type: Tango::DevFloat Attr type: Scalar

Read attribute delay related method

Data type: Tango::DevFloat Attr type: Scalar

virtual void write_delay(Tango::WAttribute &attr)

Write attribute delay related method

Data type: Tango::DevFloat Attr type: Scalar

virtual bool is_delay_allowed(Tango::AttReqType type)
virtual void read_timing_mode(Tango::Attribute &attr)

Attribute timing_mode related methods

Data type: Tango::DevEnum Attr type: Scalar

Read attribute timing_mode related method

Data type: Tango::DevEnum (timing_modeEnum) Attr type: Scalar

virtual void write_timing_mode(Tango::WAttribute &attr)

Write attribute timing_mode related method

Data type: Tango::DevEnum (timing_modeEnum) Attr type: Scalar

virtual bool is_timing_mode_allowed(Tango::AttReqType type)
virtual void read_triggers(Tango::Attribute &attr)

Attribute triggers related methods

Data type: Tango::DevLong64 Attr type: Scalar

Read attribute triggers related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual void write_triggers(Tango::WAttribute &attr)

Write attribute triggers related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual bool is_triggers_allowed(Tango::AttReqType type)
virtual void read_frames(Tango::Attribute &attr)

Attribute frames related methods

Data type: Tango::DevLong64 Attr type: Scalar

Read attribute frames related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual void write_frames(Tango::WAttribute &attr)

Write attribute frames related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual bool is_frames_allowed(Tango::AttReqType type)
virtual void read_high_voltage(Tango::Attribute &attr)

Attribute high_voltage related methods

Data type: Tango::DevLong64 Attr type: Scalar

Read attribute high_voltage related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual void write_high_voltage(Tango::WAttribute &attr)

Write attribute high_voltage related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual bool is_high_voltage_allowed(Tango::AttReqType type)
virtual void read_period(Tango::Attribute &attr)

Attribute period related methods

Data type: Tango::DevFloat Attr type: Scalar

Read attribute period related method

Data type: Tango::DevFloat Attr type: Scalar

virtual void write_period(Tango::WAttribute &attr)

Write attribute period related method

Data type: Tango::DevFloat Attr type: Scalar

virtual bool is_period_allowed(Tango::AttReqType type)
virtual void read_zmq_rx_ip(Tango::Attribute &attr)

Attribute zmq_rx_ip related methods

Data type: Tango::DevString Attr type: Scalar

Read attribute zmq_rx_ip related method

Data type: Tango::DevString Attr type: Scalar

virtual void write_zmq_rx_ip(Tango::WAttribute &attr)

Write attribute zmq_rx_ip related method

Data type: Tango::DevString Attr type: Scalar

virtual bool is_zmq_rx_ip_allowed(Tango::AttReqType type)
virtual void read_zmq_rx_port(Tango::Attribute &attr)

Attribute zmq_rx_port related methods

Data type: Tango::DevUShort Attr type: Scalar

Read attribute zmq_rx_port related method

Data type: Tango::DevUShort Attr type: Scalar

virtual void write_zmq_rx_port(Tango::WAttribute &attr)

Write attribute zmq_rx_port related method

Data type: Tango::DevUShort Attr type: Scalar

virtual bool is_zmq_rx_port_allowed(Tango::AttReqType type)
virtual void read_rx_discard_policy(Tango::Attribute &attr)

Attribute rx_discard_policy related methods

Data type: Tango::DevEnum Attr type: Scalar

Read attribute rx_discard_policy related method

Data type: Tango::DevEnum (rx_discard_policyEnum) Attr type: Scalar

virtual void write_rx_discard_policy(Tango::WAttribute &attr)

Write attribute rx_discard_policy related method

Data type: Tango::DevEnum (rx_discard_policyEnum) Attr type: Scalar

virtual bool is_rx_discard_policy_allowed(Tango::AttReqType type)
virtual void read_rx_hostname(Tango::Attribute &attr)

Attribute rx_hostname related methods

Data type: Tango::DevString Attr type: Scalar

Read attribute rx_hostname related method

Data type: Tango::DevString Attr type: Scalar

virtual void write_rx_hostname(Tango::WAttribute &attr)

Write attribute rx_hostname related method

Data type: Tango::DevString Attr type: Scalar

virtual bool is_rx_hostname_allowed(Tango::AttReqType type)
virtual void read_rx_tcp_port(Tango::Attribute &attr)

Attribute rx_tcp_port related methods

Data type: Tango::DevLong64 Attr type: Scalar

Read attribute rx_tcp_port related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual void write_rx_tcp_port(Tango::WAttribute &attr)

Write attribute rx_tcp_port related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual bool is_rx_tcp_port_allowed(Tango::AttReqType type)
virtual void read_detector_status(Tango::Attribute &attr)

Attribute detector_status related methods

Data type: Tango::DevEnum Attr type: Scalar

Read attribute detector_status related method

Data type: Tango::DevEnum (detector_statusEnum) Attr type: Scalar

virtual bool is_detector_status_allowed(Tango::AttReqType type)
virtual void read_rx_zmq_data_stream(Tango::Attribute &attr)

Attribute rx_zmq_data_stream related methods

Data type: Tango::DevBoolean Attr type: Scalar

Read attribute rx_zmq_data_stream related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual void write_rx_zmq_data_stream(Tango::WAttribute &attr)

Write attribute rx_zmq_data_stream related method

Data type: Tango::DevBoolean Attr type: Scalar

virtual bool is_rx_zmq_data_stream_allowed(Tango::AttReqType type)
virtual void read_triggers_left(Tango::Attribute &attr)

Attribute triggers_left related methods

Data type: Tango::DevLong64 Attr type: Scalar

Read attribute triggers_left related method

Data type: Tango::DevLong64 Attr type: Scalar

virtual bool is_triggers_left_allowed(Tango::AttReqType type)
void add_dynamic_attributes()

Method : MoenchControl::add_dynamic_attributes() Description: Add dynamic attributes if any.

Method : MoenchControl::add_dynamic_attributes() Description: Create the dynamic attributes if any for specified device.

virtual void start_acquire()

Command start_acquire related method

virtual bool is_start_acquire_allowed(const CORBA::Any &any)
virtual void stop_acquire()

Command stop_acquire related method

virtual bool is_stop_acquire_allowed(const CORBA::Any &any)
virtual void check_stop_in_backgroud()
void add_dynamic_commands()

Method : MoenchControl::add_dynamic_commands() Description: Add dynamic commands if any.

Method : MoenchControl::add_dynamic_commands() Description: Create the dynamic commands if any for specified device.

Public Members

Tango::DevLong64 sLS_RECEIVER_PORT
std::string dETECTOR_CONFIG_PATH
bool mandatoryNotDefined
Tango::DevFloat *attr_exposure_read
Tango::DevFloat *attr_delay_read
timing_modeEnum *attr_timing_mode_read
Tango::DevLong64 *attr_triggers_read
Tango::DevLong64 *attr_frames_read
Tango::DevLong64 *attr_high_voltage_read
Tango::DevFloat *attr_period_read
Tango::DevString *attr_zmq_rx_ip_read
Tango::DevUShort *attr_zmq_rx_port_read
rx_discard_policyEnum *attr_rx_discard_policy_read
Tango::DevString *attr_rx_hostname_read
Tango::DevLong64 *attr_rx_tcp_port_read
detector_statusEnum *attr_detector_status_read
Tango::DevBoolean *attr_rx_zmq_data_stream_read
Tango::DevLong64 *attr_triggers_left_read

Private Members

std::unique_ptr<sls::Receiver> receiver_ptr
std::unique_ptr<sls::Detector> detector_ptr
namespace MoenchControl_ns

MoenchControl class description:

Typedefs

using floatsec = std::chrono::duration<float>
typedef slsDetectorDefs::timingMode timing_modeEnum
typedef slsDetectorDefs::frameDiscardPolicy rx_discard_policyEnum
typedef slsDetectorDefs::runStatus detector_statusEnum

Enums

enum class _timing_modeEnum : short

Values:

enumerator _AUTO_TIMING
enumerator _TRIGGER_EXPOSURE
enum class _rx_discard_policyEnum : short

Values:

enumerator _NO_DISCARD
enumerator _DISCARD_EMPTY_FRAMES
enumerator _DISCARD_PARTIAL_FRAMES
enum class _detector_statusEnum : short

Values:

enumerator _IDLE
enumerator _ERROR
enumerator _WAITING
enumerator _RUN_FINISHED
enumerator _TRANSMITTING
enumerator _RUNNING
enumerator _STOPPED
file MoenchControl.cpp
#include “MoenchControl.h
#include “MoenchControlClass.h”
#include <chrono>
#include <thread>
file MoenchControl.h
#include <tango/tango.h>
#include “sls/Detector.h”
#include “sls/Receiver.h”
#include “sls/sls_detector_defs.h”

Defines

TANGO_LOG
TANGO_LOG_INFO
TANGO_LOG_DEBUG
dir tangods