DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
PyModules.h
Go to the documentation of this file.
1// This file is part of DynExp.
2
9#pragma once
10
11#include "stdafx.h"
13
14namespace DynExpInstr
15{
20 {
21 public:
26 static void import();
27
31 PyDataStreamInstrument() noexcept = default;
32
37
44
48 void Cleared() { ShouldClearFlag = false; }
49
53 auto ShouldCLear() const noexcept { return ShouldClearFlag; }
55
61 size_t CalcLastConsumedSampleID(size_t NumConsumedSamples) const;
62
67 size_t ConsumeNone() const { return CalcLastConsumedSampleID(0); }
68
73 size_t ConsumeAll() const;
74
79 void Clear() { ShouldClearFlag = true; }
80
84 bool IsTimeUsed{ false };
85
90
95
100
105
110
111 private:
115 bool ShouldClearFlag{ false };
116 };
117}
Implementation of a data stream meta instrument and of data streams input/output devices might work o...
std::vector< BasicSample > BasicSampleListType
Type of a list containing data stream samples of type BasicSample.
Data class for DataStreamInstrument.
UnitType
Units which can be used for data stream instruments.
Python mapping of a DynExpInstr::DataStreamInstrument's DynExpInstr::DataStreamBase instance.
Definition PyModules.h:20
size_t ConsumeNone() const
Allows to calculate the ID of the last consumed sample for the situation that no samples was consumed...
Definition PyModules.h:67
bool IsTimeUsed
Contains the result of DynExpInstr::DataStreamBase::IsBasicSampleTimeUsed().
Definition PyModules.h:84
bool ShouldClearFlag
Indicates whether DataStreamBase::Clear() should be called on the related data stream instrument.
Definition PyModules.h:115
void Clear()
Requests a call to DataStreamBase::Clear() on the related data stream instrument. Sets ShouldClearFla...
Definition PyModules.h:79
size_t StreamSizeWrite
Contains the result of DynExpInstr::DataStreamBase::GetStreamSizeWrite().
Definition PyModules.h:99
auto ShouldCLear() const noexcept
Getter for ShouldClearFlag.
Definition PyModules.h:53
PyDataStreamInstrument() noexcept=default
Default-constructs a PyDataStreamInstrument object.
void Cleared()
Resets ShouldClearFlag to false.
Definition PyModules.h:48
size_t NumSamplesWritten
Contains the result of DynExpInstr::DataStreamBase::GetNumSamplesWritten().
Definition PyModules.h:104
size_t ConsumeAll() const
Allows to calculate the ID of the last consumed sample for the situation that all samples were consum...
Definition PyModules.cpp:62
size_t StreamSizeRead
Contains the result of DynExpInstr::DataStreamBase::GetStreamSizeRead().
Definition PyModules.h:94
DataStreamBase::BasicSampleListType Samples
Samples of the data stream instrument.
Definition PyModules.h:109
DataStreamInstrumentData::UnitType ValueUnit
Refer to DynExpInstr::DataStreamInstrumentData::UnitType.
Definition PyModules.h:89
size_t CalcLastConsumedSampleID(size_t NumConsumedSamples) const
Allows to calculate the ID of the last consumed sample based on the amount of samples consumed from t...
Definition PyModules.cpp:57
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
Accumulates include statements to provide a precompiled header.