|
libtcspc C++ API
Streaming TCSPC and time tag data processing
|
Other utilities.
Enumerations | |
| enum class | tcspc::emitted_as { tcspc::emitted_as::any_allowed , tcspc::emitted_as::same_as_fed , tcspc::emitted_as::always_lvalue , tcspc::emitted_as::always_rvalue } |
| Value category to check emitted events against. More... | |
| enum class | tcspc::feed_as { tcspc::feed_as::const_lvalue , tcspc::feed_as::rvalue } |
| Value category used to feed an event via tcspc::feed_input. More... | |
Functions | |
| template<typename Event> | |
| auto | tcspc::from_reversed_bytes (std::array< std::uint8_t, sizeof(Event)> bytes) noexcept |
| Bit-cast an array of bytes to an event after reversing the order. | |
| template<typename T> | |
| auto | tcspc::test_bucket (std::initializer_list< T > il) -> bucket< T > |
| Create an ad-hoc tcspc::bucket<T> for testing, from a list of values. | |
| template<typename T> | |
| auto | tcspc::test_bucket (std::span< T > s) -> bucket< T > |
| Create an ad-hoc tcspc::bucket<T> for testing, from a span. | |
|
strong |
Value category to check emitted events against.
|
strong |
Value category used to feed an event via tcspc::feed_input.
| Enumerator | |
|---|---|
| const_lvalue | Feed as const lvalue. |
| rvalue | Feed as non-const rvalue. |
|
inlinenoexcept |
Bit-cast an array of bytes to an event after reversing the order.
This is a helper for writing more readable unit tests for raw device events that are specified in little-endian byte order.
The given array of bytes, which should be in big-endian order, is reversed and cast to the type Event (which must be trivial).
(There is no analogous be_event because device events specified in big-endian order have not been encountered.)
| Event | the returned event type |
| bytes | bytes constituting the event, in big-endian order |
| auto tcspc::test_bucket | ( | std::initializer_list< T > | il | ) | -> bucket< T > |
Create an ad-hoc tcspc::bucket<T> for testing, from a list of values.
The returned bucket does not support storage extraction.
| auto tcspc::test_bucket | ( | std::span< T > | s | ) | -> bucket< T > |
Create an ad-hoc tcspc::bucket<T> for testing, from a span.
The returned bucket does not support storage extraction.