util::quantities::electronics_literals Namespace Reference

Literal constants for electronics quantities. More...

Functions

constexpr tick operator""_tick (long double v)
 Literal tick value. More...
 
constexpr tick operator""_tick (unsigned long long int v)
 
constexpr tick_d operator""_tickd (long double v)
 Literal tick (double-based, tick_d) value. More...
 
constexpr tick_d operator""_tickd (unsigned long long int v)
 
constexpr counts operator""_ADC (long double v)
 Literal ADC count value. More...
 
constexpr counts operator""_ADC (unsigned long long int v)
 
constexpr counts_f operator""_ADCf (long double v)
 Literal ADC count value (single precision floating points). More...
 
constexpr counts_f operator""_ADCf (unsigned long long int v)
 

Detailed Description

Literal constants for electronics quantities.

These functions allow a simplified syntax for specifying a tick quantity. In order to use these, their namespace must be used:

// definition of `util::quantities::tick` constant:
constexpr auto i = 56_tick;
// definition of `util::quantities::counts` constant:
constexpr auto q = 675_ADC;

Function Documentation

constexpr counts util::quantities::electronics_literals::operator""_ADC ( long double  v)

Literal ADC count value.

Definition at line 160 of file electronics.h.

161  { return counts{ static_cast<signed short int>(v) }; }
counts_as<> counts
Number of ADC counts, represented by signed short int.
Definition: electronics.h:116
constexpr counts util::quantities::electronics_literals::operator""_ADC ( unsigned long long int  v)

Definition at line 162 of file electronics.h.

163  { return counts{ static_cast<signed short int>(v) }; }
counts_as<> counts
Number of ADC counts, represented by signed short int.
Definition: electronics.h:116
constexpr counts_f util::quantities::electronics_literals::operator""_ADCf ( long double  v)

Literal ADC count value (single precision floating points).

Definition at line 168 of file electronics.h.

169  { return counts_f{ static_cast<float>(v) }; }
counts_as< float > counts_f
Number of ADC counts, represented by float.
Definition: electronics.h:119
constexpr counts_f util::quantities::electronics_literals::operator""_ADCf ( unsigned long long int  v)

Definition at line 170 of file electronics.h.

171  { return counts_f{ static_cast<float>(v) }; }
counts_as< float > counts_f
Number of ADC counts, represented by float.
Definition: electronics.h:119
constexpr tick util::quantities::electronics_literals::operator""_tick ( long double  v)

Literal tick value.

Definition at line 144 of file electronics.h.

145  { return tick::castFrom(v); }
constexpr tick util::quantities::electronics_literals::operator""_tick ( unsigned long long int  v)

Definition at line 146 of file electronics.h.

147  { return tick::castFrom(v); }
constexpr tick_d util::quantities::electronics_literals::operator""_tickd ( long double  v)

Literal tick (double-based, tick_d) value.

Definition at line 152 of file electronics.h.

153  { return tick_d::castFrom(v); }
constexpr tick_d util::quantities::electronics_literals::operator""_tickd ( unsigned long long int  v)

Definition at line 154 of file electronics.h.

155  { return tick_d::castFrom(v); }