- namespace ACL
- namespace AclLog
A namespace for logging utilities. - namespace ControlDataCommon
- namespace IngestUtils
- namespace TimeCommon
- namespace UUIDUtils
A namespace for UUID utility functions. - namespace spdlog
This is the multi-page printable view of this section. Click here to print.
Namespaces
- 1: ACL
- 2: AclLog
- 3: ControlDataCommon
- 4: IngestUtils
- 5: spdlog
- 6: TimeCommon
- 7: UUIDUtils
1 - ACL
ACL Namespace Reference
Functions
| Name | |
|---|---|
| constexpr uint32_t | makeFourCC(char a, char b, char c, char d) Helper function to create a FourCC code out of four characters. |
Functions Documentation
function makeFourCC
constexpr uint32_t makeFourCC(
char a,
char b,
char c,
char d
)
Helper function to create a FourCC code out of four characters.
Return: The characters a-d encoded as a 32 bit FourCC code.
2 - AclLog
AclLog Namespace Reference A namespace for logging utilities.
Classes
| Name | |
|---|---|
| class | AclLog::CommandLogFormatter This class is used to format log entries for Rendering Engine commands. |
| class | AclLog::ThreadNameFormatterFlag |
| class | AclLog::FileLocationFormatterFlag A custom flag formatter which logs the source file location between a par of “[]”, in case the location is provided with the log call. |
Types
| Name | |
|---|---|
| enum class | Level { kTrace, kDebug, kInfo, kWarning, kError, kCritical, kOff} Log levels. |
Functions
| Name | |
|---|---|
| void | init(const std::string & name) Initialize logging. |
| void | initCommandLog(const std::string & name) Init the Rendering Engine command log. |
| void | setLevel(Level level) Set global logging level. |
| void | logCommand(const std::string & origin, const std::string & command) Log a command to the command log. |
| AclLog::Level | getLogLevel() Internal helper function for getting the setting for the log level. |
| size_t | getMaxFileSize() Internal helper function for getting the setting for the maximum size for a log file. |
| size_t | getMaxLogRotations() Internal helper function for getting the setting for the maximum number of rotated log files. |
| std::filesystem::path | getLogFileFullPath(const std::string & name) Internal helper function for constructing the full path name for the log file. |
| std::string | getThreadName() |
Types Documentation
enum Level
| Enumerator | Value | Description |
|---|---|---|
| kTrace | ||
| kDebug | ||
| kInfo | ||
| kWarning | ||
| kError | ||
| kCritical | ||
| kOff |
Log levels.
Functions Documentation
function init
void init(
const std::string & name
)
Initialize logging.
Parameters:
- name The name of the component (used for log prefix and filename)
By default two sinks are created. The first sink writes messages to the console. The second sink attempts to create a log file in the path set by the environment variable ACL_LOG_PATH (’/tmp’ if unset). The name of the log file is ’name-
function initCommandLog
void initCommandLog(
const std::string & name
)
Init the Rendering Engine command log.
Parameters:
- name The name of the Rendering Engine (used for filename)
function setLevel
void setLevel(
Level level
)
Set global logging level.
Parameters:
- level Logging level to set
function logCommand
void logCommand(
const std::string & origin,
const std::string & command
)
Log a command to the command log.
Parameters:
- origin The origin of the command to log, usually the UUID of the control panel sending the command
- command The command to log
function getLogLevel
AclLog::Level getLogLevel()
Internal helper function for getting the setting for the log level.
Return: The wanted log level fetched from an environment variable if set, or else a default value
function getMaxFileSize
size_t getMaxFileSize()
Internal helper function for getting the setting for the maximum size for a log file.
Return: The wanted maximum size of the log file fetched from an environment variable if set, or else a default value
function getMaxLogRotations
size_t getMaxLogRotations()
Internal helper function for getting the setting for the maximum number of rotated log files.
Return: The wanted number of log files to rotate fetched from an environment variable if set, or else a default value
function getLogFileFullPath
std::filesystem::path getLogFileFullPath(
const std::string & name
)
Internal helper function for constructing the full path name for the log file.
Parameters:
- name The name of the component
Return: The full path to the log file
function getThreadName
inline std::string getThreadName()
3 - ControlDataCommon
ControlDataCommon Namespace Reference
Classes
| Name | |
|---|---|
| struct | ControlDataCommon::ConnectionStatus Connection status struct containing information about a connection event. |
| struct | ControlDataCommon::Response A response from a ControlDataReceiver to a request. The UUID tells which receiver the response is sent from. |
| struct | ControlDataCommon::StatusMessage A status message from a ControlDataReceiver. The UUID tells which receiver the message is sent from. |
Types
| Name | |
|---|---|
| enum class | ConnectionType { CONNECTED, DISCONNECTED} The connection types. |
Types Documentation
enum ConnectionType
| Enumerator | Value | Description |
|---|---|---|
| CONNECTED | ||
| DISCONNECTED |
The connection types.
4 - IngestUtils
IngestUtils Namespace Reference
Functions
| Name | |
|---|---|
| bool | isRunningWithRootPrivileges() |
Functions Documentation
function isRunningWithRootPrivileges
bool isRunningWithRootPrivileges()
Return: true if this application is executing with root privileges, false otherwise
5 - spdlog
spdlog Namespace Reference
6 - TimeCommon
TimeCommon Namespace Reference
Classes
| Name | |
|---|---|
| struct | TimeCommon::TAIStatus |
| struct | TimeCommon::TimeStructure |
Types
| Name | |
|---|---|
| enum class | StratumLevel { UnknownStratum, stratum0, stratum1, stratum2, stratum3, stratum4} |
Functions
| Name | |
|---|---|
| uint64_t | getMonotonicClockMicro() Get current time since epoch. |
| tl::expected< TimeCommon::TAIStatus, std::string > | getStatus() Get TAI status. |
| int64_t | getTAIMicro() Get current TAI time. |
| std::string | taiMicroToString(int64_t taiTimestamp) Converts the input TAI timestamp to a human readable string. Timestamp is converted to local time including leap seconds. |
Types Documentation
enum StratumLevel
| Enumerator | Value | Description |
|---|---|---|
| UnknownStratum | ||
| stratum0 | ||
| stratum1 | ||
| stratum2 | ||
| stratum3 | ||
| stratum4 |
Functions Documentation
function getMonotonicClockMicro
uint64_t getMonotonicClockMicro()
Get current time since epoch.
Return: Return current time since epoch in microseconds
function getStatus
tl::expected< TimeCommon::TAIStatus, std::string > getStatus()
Get TAI status.
Return: Expected with the TAI status if successful or an error string in case something went wrong
function getTAIMicro
int64_t getTAIMicro()
Get current TAI time.
Return: Return current TAI time in microseconds
function taiMicroToString
std::string taiMicroToString(
int64_t taiTimestamp
)
Converts the input TAI timestamp to a human readable string. Timestamp is converted to local time including leap seconds.
Parameters:
- taiTimestamp A TAI timestamp with microseconds resolution
Return: Return a human readable timestamp
7 - UUIDUtils
UUIDUtils Namespace Reference A namespace for UUID utility functions.
Functions
| Name | |
|---|---|
| std::string | generateRandomUUID() Generates a completely randomized UUID string. |
| bool | isValidUUIDString(const std::string & uuid) Checks if a string is a valid UUID string. |
Functions Documentation
function generateRandomUUID
std::string generateRandomUUID()
Generates a completely randomized UUID string.
Return: A random generated UUID string
function isValidUUIDString
bool isValidUUIDString(
const std::string & uuid
)
Checks if a string is a valid UUID string.
Parameters:
- uuid The string to check
Return: True if uuid is a valid UUID string, otherwise false