AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <ThreadMoniker.h>
Static Public Member Functions | |
static std::string | getThisThreadMoniker () noexcept |
static std::string | generateMoniker (char prefix=0) noexcept |
static void | setThisThreadMoniker (const std::string &moniker) noexcept |
Static Public Attributes | |
static constexpr char | PREFIX_EXECUTOR = 'e' |
Prefix value for executor monikers. More... | |
static constexpr char | PREFIX_TIMER = 't' |
Prefix value for timer monikers. More... | |
Class to provide unique name for execution context.
This class provides management for thread-local execution context identifiers. Execution context identifier is a hexadecimal string which is managed by facilities like Executor
and Timer
. Logging framework adds identifier value to all messages to identify which executor or timer is running the task.
|
staticnoexcept |
Generate a unique moniker.
This method generates a fixed-width moniker string. By default the value is a alpha-numeric string, prepended with spaces. If the prefix is specified, the value also includes prefix character with colon.
prefix | Optional prefix for moniker value. If prefix if not 0, it is used for generating moniker. Some of prefix values are reserved for use by ACSDK: 't' prefix is used by timers, and 'e' prefix is used by executors. |
|
staticnoexcept |
Get the moniker for the caller's thread.
Method returns identifier value assigned to the current thread by a call to setThisThreadMoniker(). If the value has not been previously set, a new value is generated by generateMoniker(), assigned to the current thread, and returned.
|
staticnoexcept |
Set the moniker for the caller's thread.
This method sets identifier value for the caller's thread. Any subsequent calls to getThisThreadMoniker() will return moniker value.
moniker | The moniker for std::this_thread . |
|
static |
Prefix value for executor monikers.
|
static |
Prefix value for timer monikers.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0