3#include "./../software/monitor_channel.hpp"
6#define INTERARRIVALTIME_MINMAX_STATISTICS 0
7template <
typename CounterType,
typename CPUTickType>
23 #if INTERARRIVALTIME_MINMAX_STATISTICS == 1
25 CounterType Min = 100;
33 static_assert(std::is_unsigned<CounterType>::value,
"The CounterType must be an unsigned integer type.");
49 #if INTERARRIVALTIME_MINMAX_STATISTICS == 1
59 void output() __attribute__((always_inline))
62 Serial.write((uint8_t*)&(mean),
sizeof(float_t));
65 #if INTERARRIVALTIME_MINMAX_STATISTICS == 1
Definition: interarrival.hpp:9
MonitorChannel< true > Mean
Mean Inter-arrival time.
Definition: interarrival.hpp:21
constexpr InterArrivalTime(const CounterType *cntr_location)
Constructor that accepts the counter location, that it frequently samples. It only accepts unsigned i...
Definition: interarrival.hpp:31
void measure() __attribute__((flatten))
Measures the difference between two observable counts. If the mean is closer to 1,...
Definition: interarrival.hpp:39
CounterType get_counter() __attribute__((always_inline))
Definition: interarrival.hpp:11
CounterType * Cntr
Saves the address of the counter location.
Definition: interarrival.hpp:17
void output() __attribute__((always_inline))
Outputs the calculated statistics as a binary struct.
Definition: interarrival.hpp:59
CounterType LastCntr
Last Counter value recorded.
Definition: interarrival.hpp:19
CounterType Now
Current Counter value storage.
Definition: interarrival.hpp:20
CounterType CountDiff
The difference between the arrival time of last two photons.
Definition: interarrival.hpp:18
Template specialization.
Definition: monitor_channel.hpp:14
void push_back(DataType data)
Adds datum to the channel.
Definition: monitor_channel.hpp:23
float_t mean() const __attribute__((always_inline))
Returns the estimated mean.
Definition: monitor_channel.hpp:31