Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
rjonaitis committed Sep 8, 2024
1 parent 865792b commit c7c215e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/include/limesuiteng/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@

#include "limesuiteng/config.h"
#include "limesuiteng/OpStatus.h"
#include <cstdint>
#include <string>
#include <functional>

namespace lime {

enum class LogLevel : uint8_t {
enum class LogLevel : std::uint8_t {
Critical, //!< A critical error. The application might not be able to continue running successfully.
Error, //!< An error. An operation did not complete successfully, but the application as a whole is not affected.
Warning, //!< A warning. An operation completed with an unexpected result.
Expand Down
22 changes: 11 additions & 11 deletions src/include/limesuiteng/StreamConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "limesuiteng/config.h"
#include "limesuiteng/types.h"

#include <cstdint>
#include <unordered_map>

namespace lime {
Expand All @@ -12,24 +13,23 @@ namespace lime {
struct StreamStats {
/// @brief Structure for storing the first in first out queue statistics
struct FIFOStats {
std::size_t totalCount; ///< The total amount of samples that can be in the FIFO queue.
std::size_t usedCount; ///< The amount of samples that is currently in the FIFO queue.
std::size_t totalCount{ 0 }; ///< The total amount of samples that can be in the FIFO queue.
std::size_t usedCount{ 0 }; ///< The amount of samples that is currently in the FIFO queue.

/// @brief Gets the ratio of the amount of FIFO filled up.
/// @return The amount of FIFO filled up (0 - completely empty, 1 - completely full).
constexpr float ratio() const { return static_cast<float>(usedCount) / totalCount; }
};

StreamStats() { std::memset(this, 0, sizeof(StreamStats)); }
uint64_t timestamp; ///< The current timestamp of the stream.
int64_t bytesTransferred; ///< The total amount of bytes transferred.
int64_t packets; ///< The total amount of packets transferred.
uint64_t timestamp{ 0 }; ///< The current timestamp of the stream.
int64_t bytesTransferred{ 0 }; ///< The total amount of bytes transferred.
int64_t packets{ 0 }; ///< The total amount of packets transferred.
FIFOStats FIFO; ///< The status of the FIFO queue.
float dataRate_Bps; ///< The current data transmission rate.
uint32_t overrun; ///< The amount of packets overrun.
uint32_t underrun; ///< The amount of packets underrun.
uint32_t loss; ///< The amount of packets that are lost.
uint32_t late; ///< The amount of packets that arrived late for transmitting and were dropped.
float dataRate_Bps{ 0 }; ///< The current data transmission rate.
uint32_t overrun{ 0 }; ///< The amount of packets overrun.
uint32_t underrun{ 0 }; ///< The amount of packets underrun.
uint32_t loss{ 0 }; ///< The amount of packets that are lost.
uint32_t late{ 0 }; ///< The amount of packets that arrived late for transmitting and were dropped.
};

/// @brief Configuration settings for a stream.
Expand Down

0 comments on commit c7c215e

Please sign in to comment.