Skip to main content

implementation Class

Policy class for the production trace instance. More...

Declaration

class micro_os_plus::trace::detail::implementation { ... }

Included Headers

Public Static Functions Index

static voidflush (void) noexcept

Flush the trace output channel. More...

static voidinitialise (void) noexcept

Initialise the trace output channel. More...

static ssize_twrite (const void *buf, std::size_t nbyte) noexcept

Write the given number of bytes to the trace output channel. More...

Description

Policy class for the production trace instance.

The user must provide a definition of initialise(), write(), and flush() for this class (typically in a single .cpp file, once per application/platform).

implementation is not a template; it has no member data and is never instantiated as an object. Its static methods are looked up by tracer<implementation> and are otherwise ordinary, non-template member functions, so there is no instantiation-order hazard between their declaration here and their definition elsewhere.

Definition at line 289 of file trace-cpp-api.h.

Public Static Functions

flush()

void micro_os_plus::trace::detail::implementation::flush (void)
noexcept static

Flush the trace output channel.

Parameters

None.

Returns

Nothing.

The user must provide a definition of this method. For buffered output channels, it must drain any internally buffered data to the output device. For unbuffered or character-mode channels (e.g. ITM), the body can be left empty.

Definition at line 338 of file trace-cpp-api.h.

initialise()

void micro_os_plus::trace::detail::implementation::initialise (void)
noexcept static

Initialise the trace output channel.

Parameters

None.

Returns

Nothing.

The user must provide a definition of this method, called once during startup to configure the underlying output device (e.g. a semihosting channel, or ITM port).

Definition at line 305 of file trace-cpp-api.h.

write()

ssize_t micro_os_plus::trace::detail::implementation::write (const void * buf, std::size_t nbyte)
noexcept static

Write the given number of bytes to the trace output channel.

Parameters
buf

An array of bytes.

nbyte

The number of bytes in the array.

Returns

The number of bytes actually transferred, or -1 if error. May be less than nbyte if the device is full.

The user must provide a definition of this method. It is the core output primitive; all higher-level functions (printf, puts, putchar) ultimately delegate to it.

Definition at line 321 of file trace-cpp-api.h.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.17.0.