|
fiber
|
Namespaces | |
| namespace | ansi |
| namespace | detail |
| namespace | stm32f446 |
| namespace | utf8_lines |
Classes | |
| struct | _FormatUIntParams |
| class | _TryAwait |
Awaits on something that returns an std::optional and throws if it does not have a value. More... | |
| class | _TryAwait< T, false > |
| Specialisation of fiber::_TryAwait for lvalue-references. More... | |
| class | AllocationFailure |
| class | ArrayList |
| An array of contiguous memory which is statically allocated. More... | |
| class | AssertionFailure |
| class | AssertionFailureCritical |
| class | AssertionFailureFull |
| class | AssertionFailureO1 |
| class | AwaitableWrapper |
Wraps awaitables that are not yet derived from fiber::AwaitableNode More... | |
| class | AwaitableWrapper< Awaitable, false > |
Wraps awaitables that are not yet derived from fiber::AwaitableNode More... | |
| class | AwaitCallable |
| Awaitable that waits for a function to return true. More... | |
| class | AwaitCallable< Callable, false > |
| class | AwaitMethod |
| class | AwaitMethod< Object, Method, false > |
| class | Coroutine |
| Owning handle to a coroutine with a custom promise type. More... | |
| struct | CoroutineNode |
| Represents a coroutine (node) in a reverse-linked list of nested coroutines. More... | |
| class | CoroutinePromise |
| Promise type for an fiber::Coroutine. More... | |
| class | CoroutinePromise< void > |
Specialisation for ReturnTypes of type void More... | |
| class | CoSignal |
| A signal that can be sent from an awaitable to the Task and Scheduler. More... | |
| class | Delay |
| class | DualArrayList |
| Two ArrayLists that share the same memory buffer. More... | |
| class | DualPriorityQueue |
| class | Duration |
| Overflow aware duration for hardware timers/counters. More... | |
| class | Exception |
The base class for exceptions in fiber More... | |
| struct | ExecutionTime |
| struct | FormatBool |
| formats a bool for use with OStream More... | |
| struct | FormatBoolParam |
| struct | FormatFloat |
| Formats an floating point for further printing use. More... | |
| struct | FormatFloatParams |
| struct | FormatHex |
| struct | FormatHexParams |
| struct | FormatInt |
| Formats an unsigned integer (of any size) for use with OStream. More... | |
| struct | FormatIntParams |
| struct | FormatIntSuffix |
| struct | FormatIntSuffixParams |
| struct | FormatStr |
| Formats a string and allows to pass an additional size parameter. More... | |
| struct | FormatStrParams |
| class | Future |
| Future and Promise pairs are used to synchronise values between asynchronous tasks. More... | |
| struct | FuturePromisePair |
| class | InterruptGuard |
| Makes sure that equaly many interrupt disable and enable calls are beingmade. More... | |
| class | InvertedPin |
| struct | is_coroutine |
| struct | is_coroutine< Coroutine< T > > |
| struct | is_std_optional |
| struct | is_std_optional< std::optional< T > > |
| class | LCD_HD44780 |
| driver for a LCD display with 8 data bit interface More... | |
| struct | LCD_HD44780_BusyFlagAddress |
| class | LeftDualArrayListConstRef |
| A reference to the left side of a DualArrayList. More... | |
| class | LeftDualArrayListRef |
| A reference to the left side of a DualArrayList. More... | |
| struct | make_fast |
| struct | make_fast< SInt > |
| struct | make_fast< UInt > |
| class | NextCycle |
| class | NullLogger |
| A default logger that does nothing. More... | |
| class | OStream |
| Abstract class for an output character stream that offers string and number formating. More... | |
| struct | OStreamRef |
| class | OutputLogger |
| A logger that will write all loggings directly to an output stream. More... | |
| class | PeriodicTask |
| class | PinTuple |
| A tuple (heterogenious collection) of pins that can be written together as if it was a port. More... | |
| class | PriorityQueue |
| class | Promise |
| Promise and Future pairs are used to synchronise values between asynchronous tasks. More... | |
| class | RightDualArrayListConstRef |
| A reference to the right side of a DualArrayList. More... | |
| class | RightDualArrayListRef |
| A reference to the right side of a DualArrayList. More... | |
| struct | Schedule |
| class | Scheduler |
| A real time scheduler that starts tasks once they are ready and schedules them by earliest deadline first. More... | |
| class | SoftPeriodicTask |
| class | StackAllocator |
| class | StackAllocatorExtern |
| class | Stage1DualPriorityQueueConstRef |
| class | Stage1DualPriorityQueueRef |
| class | Stage2DualPriorityQueueConstRef |
| class | Stage2DualPriorityQueueRef |
| struct | StaticLinearAllocator |
A linear allocator that uses stack memory and follows std::pmr::memory_resource More... | |
| class | StaticLinearAllocatorDebug |
| struct | str_add_float_params |
| class | Task |
| class | TaskBase |
A TaskBase (short for coroutine task) is the root of a linked list of nested coroutines. More... | |
| struct | TestResult |
| class | Tick |
| An overflow aware integer type for hardware timer/counter that are used as clocks. More... | |
| class | TimePoint |
| Overflow aware point in time for hardware timers/counters. More... | |
| class | VoidPin |
| Represents an unconnected pin that does nothing. More... | |
| class | VoidPins |
Concepts | |
| concept | CStringView |
| concept | CRatio |
| concept | CStdDuration |
| concept | CStdOptional |
| concept | AwaitableLike |
| concept | cLCD_HD44780 |
| Template interface for the 'LCD_HD447080' or compatible version. | |
| concept | cAwaitable |
Concept describeing the interface of an object that can be co_awaited. | |
| concept | cOutPin |
| Concept for a pin that can be immediatly written to. | |
| concept | cInPin |
| Concept for pin that can be immediatelly read from. | |
| concept | cPin |
| Concept for tri-state pin (high, low, input) that can be immediatelly read from and written to. | |
| concept | cOutPins |
| Concept for synchronous output pins. | |
| concept | cInPins |
| Concept for synchronous output pins. | |
| concept | cPins |
| Concept for tri-state pin (high, low, input) that can be immediatelly read from and written to. | |
| concept | is_power_of_two |
| concept | CSchedulerLogger |
| The concept for a logging device that can be passed into the Scheduler. | |
Enumerations | |
| enum class | RoundingMethod { Up , Down , Nearest } |
| enum class | LCD_HD44780_NumberOfLines : unsigned int { One = 0 , Two = 0b00001000 } |
| enum class | LCD_HD44780_Dots : unsigned int { _5x8 = 0 , _5x11 = 0b00000100 } |
| enum class | LCD_HD44780_CursorEntryDirection : unsigned int { Decrement = 0 , Increment = 0b00000010 } |
| enum class | LCD_HD44780_DisplayEntryShift : unsigned int { Off = 0 , On = 0b00000001 } |
| enum class | LCD_HD44780_DisplayControl : unsigned int { Off = 0 , On = 0b00000100 } |
| enum class | LCD_HD44780_CursorControl : unsigned int { Off = 0 , On = 0b00000010 , Blink = 0b00000011 } |
| enum class | LCD_HD44780_CursorDisplayShift : unsigned int { CursorLeft = 0b00000000 , CursorRight = 0b00000100 , DisplayLeft = 0b00001000 , DisplayRight = 0b00001100 } |
| enum class | Exit { Success , Failure } |
| enum class | AlignmentLRC { Left , Right , Center } |
| enum class | FloatRepresentation { Scientific , Engineering , Full } |
| Enum to specify the formating of floating point numbers. More... | |
Functions | |
| OStream & | operator<< (OStream &stream, const Duration &duration) |
| prints the time duration to the output stream | |
| template<class ToDuration, RoundingMethod rounding_type = RoundingMethod::Up, class Rep = unsigned int, fiber::CRatio Period = std::ratio<1>> | |
| constexpr ToDuration | rounding_duration_cast (const std::chrono::duration< Rep, Period > &d) |
duration cast that round to the nearest tick of the new ToDuration | |
| static fiber::TestResult | ClockTick_test_construction () |
| static fiber::TestResult | ClockTick_test_addition () |
| static fiber::TestResult | ClockTick_test_subtraction () |
| static fiber::TestResult | ClockTest_negation () |
| static fiber::TestResult | ClockTick_test_comparison () |
| static fiber::TestResult | Duration_test_construction () |
| static fiber::TestResult | Duration_test_std_integration () |
| uint32_t | get_timer_count () |
| static fiber::TestResult | Clock_template_instantiation_and_time_point () |
| fiber::TestResult | ClockTick_test () |
| Tests Tick and instantiations of derived Duration, TimePoint, CClock and Clock. | |
| OStream & | operator<< (OStream &stream, const TimePoint &time) |
| prints the time point to the output stream | |
| template<class T, std::size_t N, class Function> | |
| auto | for_each (const ArrayList< T, N > &list, Function &&function) |
| template<class T, std::size_t N> | |
| OStream & | operator<< (OStream &stream, const ArrayList< T, N > &array) |
| prints the array list to the output stream | |
| template<class T, std::size_t N1, std::size_t N2, class F> | |
| ArrayList< bool,(N1< N2) ? N1 :N2 > | point_wise_compare (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs, F &&compare) |
| performs a point wise comparison of the ArrayList | |
| template<class T, std::size_t N1, std::size_t N2> | |
| auto | point_wise_equal (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise equal list of the left and right hand side | |
| template<class T, std::size_t N1, std::size_t N2> | |
| auto | point_wise_not_equal (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise un-equal list of the left and right hand side | |
| template<class T, std::size_t N1, std::size_t N2> | |
| auto | point_wise_less (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise less list of the left and right hand side | |
| template<class T, std::size_t N1, std::size_t N2> | |
| auto | point_wise_greater (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise greater list of the left and right hand side | |
| template<class T, std::size_t N1, std::size_t N2> | |
| auto | point_wise_less_equal (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise less equal list of the left and right hand side | |
| template<class T, std::size_t N1, std::size_t N2> | |
| auto | point_wise_greater_equal (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise greater equal list of the left and right hand side | |
| template<class T1, class T2, std::size_t N1, std::size_t N2> | |
| bool | operator== (const ArrayList< T1, N1 > &lhs, const ArrayList< T2, N2 > &rhs) |
| returns the point wise equal list of the left and right hand side | |
| template<class T, std::size_t N1, std::size_t N2> | |
| bool | operator!= (const ArrayList< T, N1 > &lhs, const ArrayList< T, N2 > &rhs) |
| returns the point wise un-equal list of the left and right hand side | |
| template<class T1, class T2, std::size_t N1, std::size_t N2> | |
| bool | operator< (const ArrayList< T1, N1 > &lhs, const ArrayList< T2, N2 > &rhs) |
| returns the point wise less list of the left and right hand side | |
| template<class T1, class T2, std::size_t N1, std::size_t N2> | |
| bool | operator> (const ArrayList< T1, N1 > &lhs, const ArrayList< T2, N2 > &rhs) |
| returns the point wise greater list of the left and right hand side | |
| template<class T1, class T2, std::size_t N1, std::size_t N2> | |
| bool | operator<= (const ArrayList< T1, N1 > &lhs, const ArrayList< T2, N2 > &rhs) |
| returns the point wise less equal list of the left and right hand side | |
| template<class T1, class T2, std::size_t N1, std::size_t N2> | |
| bool | operator>= (const ArrayList< T1, N1 > &lhs, const ArrayList< T2, N2 > &rhs) |
| returns the point wise greater equal list of the left and right hand side | |
| template<class T, std::size_t N1> | |
| constexpr bool | any (const ArrayList< T, N1 > &list) |
returns true if any (aka. at least one) values from the list (converted to bool) are true | |
| template<class T, std::size_t N1> | |
| constexpr bool | all (const ArrayList< T, N1 > &lhs) |
returns true if all values from the list (converted to bool) are true | |
| template<class T, std::size_t N1> | |
| constexpr bool | none (const ArrayList< T, N1 > &lhs) |
returns true if no values from the list (converted to bool) are true | |
| template<class T, std::size_t N> | |
| fiber::OStream & | operator<< (OStream &stream, const DualArrayList< T, N > &dlist) |
| fiber::TestResult | ArrayList_test () |
| fiber::TestResult | DualArrayList_test () |
| template<class A, class B> | |
| constexpr bool | equal (A a, B b) |
| template<std::integral A, std::integral B> | |
| constexpr bool | not_equal (A a, B b) |
| template<std::integral A, std::integral B> | |
| constexpr bool | less_equal (A a, B b) |
| template<std::integral A, std::integral B> | |
| constexpr bool | less (A a, B b) |
| template<std::integral A, std::integral B> | |
| constexpr bool | greater_equal (A a, B b) |
| template<std::integral A, std::integral B> | |
| constexpr bool | greater (A a, B b) |
| OStream & | operator<< (OStream &stream, const Exception &e) |
| template<class T> | |
| FuturePromisePair< T > | make_future_promise () |
| creates a linked future promise pair | |
| template<std::size_t I, class T> | |
| decltype(auto) | get (fiber::FuturePromisePair< T > &&p) |
| static fiber::TestResult | make_future_promise_test () |
| static fiber::TestResult | promise_set_value_test () |
| static fiber::TestResult | promise_assign_value_test () |
| static fiber::TestResult | handover_test () |
| static fiber::TestResult | broken_promise_test () |
| fiber::TestResult | Future_test () |
| FIBER_WEAK void | disable_interrupts_command () |
| Weak, user overloadable function that provides the command to disable interrupts. | |
| FIBER_WEAK void | enable_interrupts_command () |
| Weak, user overloadable function that probides the command to enable interrupts. | |
| void | disable_interrupts () |
| Function that is used to disable the interrupts. | |
| void | enable_interrupts () |
| Function pointer that is used to enable the interrupts. | |
| float | frexp10 (float value, int *exp10_out) |
| template<typename Int, typename std::enable_if< std::is_integral< Int >::value, int >::type = 0> | |
| constexpr Int | pow (const Int base, const unsigned int exponent) |
| constexpr std::size_t | string_length (const char *str) |
| returns the length of a terminated c-style string | |
| bool | is_nan (float value) |
| bool | is_pinf (float value) |
| bool | is_ninf (float value) |
| bool | is_inf (float value) |
| void | _memcpy (void *dest, const void *source, size_t count) |
Copies count many bytes from source to dest in a blocking behaviour. | |
| void | _async_memcpy (void *dest, const void *source, size_t count, Promise< int > promise) |
Copies count many bytes from source to dest in a blocking behaviour. | |
| void | memcpy_s (void *dest, size_t destSize, const void *source, size_t sourceSize) |
| copies from source to dest so that no more bytes than destSize or sourceSize are written | |
| void | memcpy_s (void *destFirst, void *destLast, const void *sourceFirst, const void *sourceLast) |
| Copies data from source to dest, without leaving the closed open range [first, last) | |
| void | async_memcpy_s (void *dest, size_t destSize, const void *source, size_t sourceSize, Promise< int > promise) |
| void | async_memcpy_s (void *destFirst, void *destLast, const void *sourceFirst, const void *sourceLast, Promise< int > promise) |
| template<class Callable> | |
| AwaitCallable< Callable, true > | Await (bool expected, const Callable &callable) |
| template<class Callable> | |
| AwaitCallable< Callable, false > | Await (bool expected, Callable &&callable) |
| template<class Callable> | |
| auto | AwaitTrue (Callable &&callable) |
| template<class Callable> | |
| auto | AwaitFalse (Callable &&callable) |
| template<class Object, class Method> | |
| AwaitMethod< Object, Method, true > | Await (bool expected, const Object &object, Method method) |
| template<class Object, class Method> | |
| AwaitMethod< Object, Method, true > | Await (bool expected, Object &&object, Method method) |
| template<class Object, class Method> | |
| auto | AwaitTrue (Object &&object, Method method) |
| template<class Object, class Method> | |
| auto | AwaitFalse (Object &&object, Method method) |
| template<class Awaitable> | |
| AwaitableWrapper< Awaitable, std::is_lvalue_reference< Awaitable >::value > | wrap_awaitable (Awaitable &&awaitable) |
| Construction helper for AwaitableWrapper. | |
| fiber::OStream & | operator<< (fiber::OStream &stream, fiber::CoSignal::Type type) |
| OStream & | operator<< (OStream &stream, Exit value) |
| void | default_sleep_until (TimePoint time) |
Default implementation for a function that should send the MCU to sleep until time, but does nothing. | |
| fiber::TestResult | Coroutine_test () |
| TestResult | Scheduler_test () |
| template<class T> | |
| _TryAwait< T, true > | TryAwait (fiber::Future< T > &&future) |
Wraps an awaitable that returns an std::optional conditionally unpacks it or throws if there is no value. | |
| template<class T> | |
| _TryAwait< T, false > | TryAwait (fiber::Future< T > &future) |
Wraps an awaitable that returns an std::optional conditionally unpacks it or throws if there is no value. | |
| OStream & | operator<< (OStream &stream, const FormatStr &fstr) |
Writes a FormatStr to the stream that allows to pass the string length in addition to the const char* type string. | |
| OStream & | operator<< (OStream &stream, const FormatBool &value) |
| Writes a bool to the output stream and applies custom formating. | |
| void | print_num_stringified (OStream &stream, std::string_view sign_str, std::string_view num_str, const FormatIntParams ¶ms) |
| void | print_num_stringified (OStream &stream, std::string_view sign_str, std::string_view num_str, std::string_view suffix, const FormatIntSuffixParams ¶ms) |
| char * | str_add_float (char *first, char *last, const FormatFloat &value) |
| OStream & | operator<< (OStream &stream, FormatFloat value) |
| void | newl (OStream &stream) |
| Writes a new line character to the stream. | |
| void | flush (OStream &stream) |
| Writes a new line character to the stream. | |
| void | endl (OStream &stream) |
| Writes a new line character to the stream followed by a call to OStream::flush() | |
| OStream & | operator<< (OStream &stream, void(*function)(OStream &)) |
| Calls a function with the stream as the argument. | |
| OStream & | operator<< (OStream &stream, char c) |
| Writes a char to the stream. | |
| OStream & | operator<< (OStream &stream, const char *str) |
| writes a terminated c-style string to the stream | |
| template<CStringView StringView> | |
| OStream & | operator<< (OStream &stream, const StringView &str) |
| OStream & | operator<< (OStream &stream, bool value) |
| Default bool formating, uses the settings of the stream. | |
| template<std::unsigned_integral UInt> | |
| std::string_view | uint_to_string (char *buffer_first, char *buffer_last, UInt value, bool use_thousands_char=false, char thousands_char=',') |
| template<std::integral Int> requires (std::same_as<Int, typename fiber::make_fast<Int>::type>) | |
| void | print_fast_int (OStream &stream, const Int &value, const FormatIntParams ¶ms) |
| template<std::integral Int> | |
| void | print (OStream &stream, const Int &value, const FormatIntParams ¶ms) |
| template<std::integral Int> | |
| OStream & | operator<< (OStream &stream, const FormatInt< Int > &fvalue) |
| template<std::integral Int> | |
| OStream & | operator<< (OStream &stream, const Int &value) |
| template<std::integral Int> requires (std::same_as<Int, typename fiber::make_fast<Int>::type>) | |
| void | print_fast_int (OStream &stream, const Int &value, std::string_view suffix, const FormatIntSuffixParams ¶ms) |
| template<std::integral Int> | |
| void | print (OStream &stream, const Int &value, std::string_view suffix, const FormatIntSuffixParams ¶ms) |
| template<std::integral Int> | |
| OStream & | operator<< (OStream &stream, const FormatIntSuffix< Int > &value) |
| template<typename Float, typename std::enable_if< std::is_floating_point< Float >::value, int >::type = 0> | |
| OStream & | operator<< (OStream &stream, Float value) |
| template<std::unsigned_integral UInt> | |
| OStream & | operator<< (OStream &stream, FormatHex< UInt > hex) |
| template<class T> | |
| OStream & | operator<< (OStream &stream, const T *ptr) |
| OStream & | operator<< (OStream &stream, std::nullptr_t ptr) |
| template<class Rep, class Period = std::ratio<1, 1>> | |
| auto | format_chrono (std::chrono::duration< Rep, Period > duration) |
| template<class Rep, class Period = std::ratio<1, 1>> | |
| OStream & | operator<< (OStream &stream, std::chrono::duration< Rep, Period > duration) |
| template<class T> | |
| OStream & | operator<< (OStream &stream, std::reverse_iterator< T > value) |
| template<class T> | |
| OStream & | operator<< (OStreamRef stream, const T &value) |
| void | OutputStream_test_string_formating (OStream &stream) |
| void | OutputStream_test_bool_formating (OStream &stream) |
| void | OutputStream_test_integer_formating (OStream &stream) |
| void | OutputStream_test_float_formating (OStream &stream) |
| void | OutputStream_test (OStream &stream) |
| int | evaluate (TestResult result) |
| void | print_failed_function_file_line (const char *signature, const char *file, std::size_t line) |
| void | TEST_FUNC_print_1 (const char *signature, const char *file, std::size_t line, const char *test_func, const char *val_str) |
| void | TEST_FUNC2_print_1 (const char *signature, const char *file, std::size_t line, const char *test_func, const char *lhs_str, const char *rhs_str) |
| void | TEST_BINARY_OPERATOR_print_1 (const char *signature, const char *file, std::size_t line, const char *lhs_str, const char *op, const char *rhs_str) |
| void | TEST_NOT_BINARY_OPERATOR_print_1 (const char *signature, const char *file, std::size_t line, const char *lhs_str, const char *op, const char *rhs_str) |
| void | TEST_TRUE_print_1 (const char *signature, const char *file, std::size_t line, const char *val) |
| void | TEST_FALSE_print_1 (const char *signature, const char *file, std::size_t line, const char *val) |
| void | TEST_ERROR_print (const char *signature, const char *file, std::size_t line) |
| template<class T, class R> | |
| void | TEST_FUNC_print_2 (const char *test_func, const T &val, const R &result) |
| template<class T1, class T2, class R> | |
| void | TEST_FUNC2_print_2 (const char *test_func, const T1 &lhs, const T2 &rhs, const R &result) |
| template<class T1, class T2, class R> | |
| void | TEST_BINARY_OPERATOR_print_2 (const T1 &lhs, const char *op, const T2 &rhs, const R &result) |
| template<class T1, class T2, class R> | |
| void | TEST_NOT_BINARY_OPERATOR_print_2 (const T1 &lhs, const char *op, const T2 &rhs, const R &result) |
| template<class R> | |
| void | TEST_TRUE_print_2 (const R &val) |
| template<class R> | |
| void | TEST_FALSE_print_2 (const R &val) |
| constexpr TestResult | operator| (TestResult lhs, TestResult rhs) |
| constexpr int | operator| (TestResult lhs, int(*f)(TestResult)) |
| constexpr TestResult | operator| (TestResult lhs, TestResult(*test)(void)) |
Variables | |
| template<typename T> | |
| constexpr bool | is_clocktick = false |
| template<typename U, U Max> | |
| constexpr bool | is_clocktick< Tick< U, Max > > = true |
| template<class T> | |
| constexpr bool | is_std_optional_v = is_std_optional<T>::value |
| static std::atomic< uint32_t > | _irq_disable_count {0} |
| void(* | memcpy )(void *dest, const void *source, size_t count) = _memcpy |
| Function that the fiber:: library uses to copy memory. | |
| void(* | async_memcpy )(void *dest, const void *source, size_t count, Promise< int > promise) = _async_memcpy |
| Function that the fiber library uses to copy memory. | |
| template<class T> | |
| constexpr bool | is_coroutine_v = is_coroutine<T>::value |
| OStreamRef | cout |
| OStreamRef | cerr |
| OStreamRef | clog |
| static constexpr const char * | expected_true_but = " expected `true` but: `" |
| static constexpr const char * | expected_false_but = " expected `false` but: `" |
| static constexpr const char * | indented_arrow = " --> `" |
|
strong |
|
strong |
|
strong |
Enum to specify the formating of floating point numbers.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| void fiber::_async_memcpy | ( | void * | dest, |
| const void * | source, | ||
| size_t | count, | ||
| Promise< int > | promise ) |
Copies count many bytes from source to dest in a blocking behaviour.
Internal/default implementation for fiber::async_memcpy that the fiber library uses to copy data. Redirect the fiber::memcpy and fiber::async_memcpy function pinters to overload it with your custom copy implementation, that for example uses a direct memory access controller (DMA).
| dest | Pointer to the destination to which count many bytes will be written |
| source | Pointer to the source from which count many bytes will be read |
| count | The number of bytes that will be copied |
| promise | The caller will generate a Future that stores a future value. From which this promise is derived. The Promise will signal to the future when the asynchrunous operation completed. |
| void fiber::_memcpy | ( | void * | dest, |
| const void * | source, | ||
| size_t | count ) |
Copies count many bytes from source to dest in a blocking behaviour.
Internal/default implementation for fiber::memcpy that the fiber library uses to copy data. Redirect the fiber::memcpy and fiber::async_memcpy function pinters to overload it with your custom copy implementation, that for example uses a direct memory access controller (DMA).
| dest | Pointer to the destination to which count many bytes will be written |
| source | Pointer to the source from which count many bytes will be read |
| count | The number of bytes that will be copied |
|
constexpr |
returns true if all values from the list (converted to bool) are true
|
constexpr |
returns true if any (aka. at least one) values from the list (converted to bool) are true
| fiber::TestResult fiber::ArrayList_test | ( | ) |
|
inline |
|
inline |
| AwaitCallable< Callable, false > fiber::Await | ( | bool | expected, |
| Callable && | callable ) |
| AwaitCallable< Callable, true > fiber::Await | ( | bool | expected, |
| const Callable & | callable ) |
| AwaitMethod< Object, Method, true > fiber::Await | ( | bool | expected, |
| const Object & | object, | ||
| Method | method ) |
| AwaitMethod< Object, Method, true > fiber::Await | ( | bool | expected, |
| Object && | object, | ||
| Method | method ) |
| auto fiber::AwaitFalse | ( | Callable && | callable | ) |
| auto fiber::AwaitFalse | ( | Object && | object, |
| Method | method ) |
| auto fiber::AwaitTrue | ( | Callable && | callable | ) |
| auto fiber::AwaitTrue | ( | Object && | object, |
| Method | method ) |
|
static |
|
static |
|
static |
| fiber::TestResult fiber::ClockTick_test | ( | ) |
Tests Tick and instantiations of derived Duration, TimePoint, CClock and Clock.
Depends on OStream, fiber::cerr and fiber::cout.
|
static |
|
static |
|
static |
|
static |
| fiber::TestResult fiber::Coroutine_test | ( | ) |
| void fiber::default_sleep_until | ( | TimePoint | time | ) |
Default implementation for a function that should send the MCU to sleep until time, but does nothing.
| void fiber::disable_interrupts | ( | ) |
Function that is used to disable the interrupts.
This function disables interrupts in a thread safe manner. It will make sure that in a series of calls to disable_interrupts() and enable_interrupts() only the first will disable it and the last will enable it.
It will internally call the user overloadable weak function:
If you are working on a single core machine without peremption, consider defining FIBER_SINGLE_CORE for a simplified and faster version.
| FIBER_WEAK void fiber::disable_interrupts_command | ( | ) |
Weak, user overloadable function that provides the command to disable interrupts.
| fiber::TestResult fiber::DualArrayList_test | ( | ) |
|
static |
|
static |
| void fiber::enable_interrupts | ( | ) |
Function pointer that is used to enable the interrupts.
This function enables interrupts in a thread safe manner. It will make sure that in a series of calls to disable_interrupts() and enable_interrupts() only the first will disable it and the last will enable it.
It will internally call the user overloadable weak function:
If you are working on a single core machine without peremption, consider defining FIBER_SINGLE_CORE for a simplified and faster version.
| FIBER_WEAK void fiber::enable_interrupts_command | ( | ) |
Weak, user overloadable function that probides the command to enable interrupts.
|
inline |
Writes a new line character to the stream followed by a call to OStream::flush()
Calls OStream::endl(). Uses the new line character set by the stream with OStream::new_line_char().
|
constexpr |
| int fiber::evaluate | ( | TestResult | result | ) |
|
inline |
Writes a new line character to the stream.
Calls OStream::flush().
| auto fiber::for_each | ( | const ArrayList< T, N > & | list, |
| Function && | function ) |
| auto fiber::format_chrono | ( | std::chrono::duration< Rep, Period > | duration | ) |
| float fiber::frexp10 | ( | float | value, |
| int * | exp10_out ) |
| fiber::TestResult fiber::Future_test | ( | ) |
| decltype(auto) fiber::get | ( | fiber::FuturePromisePair< T > && | p | ) |
| uint32_t fiber::get_timer_count | ( | ) |
|
constexpr |
|
constexpr |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
constexpr |
|
constexpr |
| FuturePromisePair< T > fiber::make_future_promise | ( | ) |
creates a linked future promise pair
Example:
| T | The type that is being promised by the promise and awaited by the future |
FuturePromisePair Future promise pair
|
static |
|
inline |
copies from source to dest so that no more bytes than destSize or sourceSize are written
| dest | a pointer to the destination that data should be written to |
| destSize | The number of bytes that can be written to dest |
| source | a pointer to the source that data should be read from |
| sourceSize | The number of bytes that can be read from the source |
|
inline |
Copies data from source to dest, without leaving the closed open range [first, last)
| destFirst | Pointer to the first byte that should be written to |
| destLast | Pointer past the last byte that should be written to |
| sourceFirst | Pointer to the first byte that should be read from |
| sourceLast | Pointer past the last byte that should be read from |
|
inline |
Writes a new line character to the stream.
Calls OStream::newl(). Uses the new line character set by the stream with OStream::new_line_char().
|
constexpr |
returns true if no values from the list (converted to bool) are true
|
constexpr |
|
inline |
returns the point wise un-equal list of the left and right hand side
|
inline |
returns the point wise less list of the left and right hand side
| OStream & fiber::operator<< | ( | fiber::OStream & | stream, |
| fiber::CoSignal::Type | type ) |
Default bool formating, uses the settings of the stream.
| OStream & fiber::operator<< | ( | OStream & | stream, |
| const ArrayList< T, N > & | array ) |
prints the array list to the output stream
writes a terminated c-style string to the stream
| fiber::OStream & fiber::operator<< | ( | OStream & | stream, |
| const DualArrayList< T, N > & | dlist ) |
prints the time duration to the output stream
| OStream & fiber::operator<< | ( | OStream & | stream, |
| const FormatBool & | value ) |
Writes a bool to the output stream and applies custom formating.
|
inline |
| OStream & fiber::operator<< | ( | OStream & | stream, |
| const FormatIntSuffix< Int > & | value ) |
Writes a FormatStr to the stream that allows to pass the string length in addition to the const char* type string.
|
inline |
|
inline |
prints the time point to the output stream
|
inline |
| OStream & fiber::operator<< | ( | OStream & | stream, |
| FormatFloat | value ) |
| OStream & fiber::operator<< | ( | OStream & | stream, |
| FormatHex< UInt > | hex ) |
| OStream & fiber::operator<< | ( | OStream & | stream, |
| std::chrono::duration< Rep, Period > | duration ) |
| OStream & fiber::operator<< | ( | OStream & | stream, |
| std::reverse_iterator< T > | value ) |
Calls a function with the stream as the argument.
Example:
|
inline |
|
inline |
returns the point wise less equal list of the left and right hand side
|
inline |
returns the point wise equal list of the left and right hand side
|
inline |
returns the point wise greater list of the left and right hand side
|
inline |
returns the point wise greater equal list of the left and right hand side
|
constexpr |
|
constexpr |
|
constexpr |
| void fiber::OutputStream_test | ( | OStream & | stream | ) |
| void fiber::OutputStream_test_bool_formating | ( | OStream & | stream | ) |
| void fiber::OutputStream_test_float_formating | ( | OStream & | stream | ) |
| void fiber::OutputStream_test_integer_formating | ( | OStream & | stream | ) |
| void fiber::OutputStream_test_string_formating | ( | OStream & | stream | ) |
| ArrayList< bool,(N1< N2) ? N1 :N2 > fiber::point_wise_compare | ( | const ArrayList< T, N1 > & | lhs, |
| const ArrayList< T, N2 > & | rhs, | ||
| F && | compare ) |
performs a point wise comparison of the ArrayList
|
inline |
returns the point wise equal list of the left and right hand side
|
inline |
returns the point wise greater list of the left and right hand side
|
inline |
returns the point wise greater equal list of the left and right hand side
|
inline |
returns the point wise less list of the left and right hand side
|
inline |
returns the point wise less equal list of the left and right hand side
|
inline |
returns the point wise un-equal list of the left and right hand side
|
constexpr |
|
inline |
|
inline |
| void fiber::print_failed_function_file_line | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line ) |
| void fiber::print_fast_int | ( | OStream & | stream, |
| const Int & | value, | ||
| const FormatIntParams & | params ) |
| void fiber::print_fast_int | ( | OStream & | stream, |
| const Int & | value, | ||
| std::string_view | suffix, | ||
| const FormatIntSuffixParams & | params ) |
| void fiber::print_num_stringified | ( | OStream & | stream, |
| std::string_view | sign_str, | ||
| std::string_view | num_str, | ||
| const FormatIntParams & | params ) |
| void fiber::print_num_stringified | ( | OStream & | stream, |
| std::string_view | sign_str, | ||
| std::string_view | num_str, | ||
| std::string_view | suffix, | ||
| const FormatIntSuffixParams & | params ) |
|
static |
|
static |
|
constexpr |
duration cast that round to the nearest tick of the new ToDuration
| fiber::TestResult fiber::Scheduler_test | ( | ) |
| char * fiber::str_add_float | ( | char * | first, |
| char * | last, | ||
| const FormatFloat & | value ) |
|
constexpr |
returns the length of a terminated c-style string
| void fiber::TEST_BINARY_OPERATOR_print_1 | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line, | ||
| const char * | lhs_str, | ||
| const char * | op, | ||
| const char * | rhs_str ) |
| void fiber::TEST_BINARY_OPERATOR_print_2 | ( | const T1 & | lhs, |
| const char * | op, | ||
| const T2 & | rhs, | ||
| const R & | result ) |
| void fiber::TEST_ERROR_print | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line ) |
| void fiber::TEST_FALSE_print_1 | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line, | ||
| const char * | val ) |
| void fiber::TEST_FALSE_print_2 | ( | const R & | val | ) |
| void fiber::TEST_FUNC2_print_1 | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line, | ||
| const char * | test_func, | ||
| const char * | lhs_str, | ||
| const char * | rhs_str ) |
| void fiber::TEST_FUNC2_print_2 | ( | const char * | test_func, |
| const T1 & | lhs, | ||
| const T2 & | rhs, | ||
| const R & | result ) |
| void fiber::TEST_FUNC_print_1 | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line, | ||
| const char * | test_func, | ||
| const char * | val_str ) |
| void fiber::TEST_FUNC_print_2 | ( | const char * | test_func, |
| const T & | val, | ||
| const R & | result ) |
| void fiber::TEST_NOT_BINARY_OPERATOR_print_1 | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line, | ||
| const char * | lhs_str, | ||
| const char * | op, | ||
| const char * | rhs_str ) |
| void fiber::TEST_NOT_BINARY_OPERATOR_print_2 | ( | const T1 & | lhs, |
| const char * | op, | ||
| const T2 & | rhs, | ||
| const R & | result ) |
| void fiber::TEST_TRUE_print_1 | ( | const char * | signature, |
| const char * | file, | ||
| std::size_t | line, | ||
| const char * | val ) |
| void fiber::TEST_TRUE_print_2 | ( | const R & | val | ) |
| _TryAwait< T, true > fiber::TryAwait | ( | fiber::Future< T > && | future | ) |
Wraps an awaitable that returns an std::optional conditionally unpacks it or throws if there is no value.
Example:
| _TryAwait< T, false > fiber::TryAwait | ( | fiber::Future< T > & | future | ) |
Wraps an awaitable that returns an std::optional conditionally unpacks it or throws if there is no value.
Example:
| std::string_view fiber::uint_to_string | ( | char * | buffer_first, |
| char * | buffer_last, | ||
| UInt | value, | ||
| bool | use_thousands_char = false, | ||
| char | thousands_char = ',' ) |
| AwaitableWrapper< Awaitable, std::is_lvalue_reference< Awaitable >::value > fiber::wrap_awaitable | ( | Awaitable && | awaitable | ) |
Construction helper for AwaitableWrapper.
AwaitableWrapper has two specialisations: awaitables passed as lvalue- and rvalue-references. Depending on how the awaitable is passed to wrap_awaitable() the corresponding specialisation is instantiated.
| Awaitable | and awaitable that does not derive from AwaitableNode |
| awaitable | the awaitable object as lvalue- or rvalue-reference |
|
static |
| void(* fiber::async_memcpy)(void *dest, const void *source, size_t count, Promise< int > promise) | ( | void * | dest, |
| const void * | source, | ||
| size_t | count, | ||
| Promise< int > | promise ) = _async_memcpy |
Function that the fiber library uses to copy memory.
The expected behaviour of memcpy is to copy count many bytes from source to dest in a non-blocking behaviour, aka. the function returns immediately after it has beed called which might happen before the copy finished.
This function pointer can be overloaded by the user for a concrete implementation that uses hardware acceleration, like f.e. a DMA controller that can copy data independently of the main prozessing thread.
Note: the default implementation is a blocking one.
| OStreamRef fiber::cerr |
| OStreamRef fiber::clog |
| OStreamRef fiber::cout |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
constexpr |
|
inlineconstexpr |
| void(* fiber::memcpy)(void *dest, const void *source, size_t count) | ( | void * | dest, |
| const void * | source, | ||
| size_t | count ) = _memcpy |
Function that the fiber:: library uses to copy memory.
The expected behaviour of memcpy is to copy count many bytes from source to dest in a blocking behaviour, aka. the function returns once the copy has completed.
This function pointer can be overloaded by the user for a concrete implementation that uses hardware acceleration.
| dest | Pointer to the destination to which count many bytes will be written |
| source | Pointer to the source from which count many bytes will be read |
| count | The number of bytes that will be copied |