nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer

#include <src/lib/profiles/data-management/Current/LoggingManagement.h>

מאגר אירועים פנימי שנוצר סביב nl::Weave::TLV::WeaveCircularTLVBuffer.

סיכום

בונים והורסים

CircularEventBuffer(uint8_t *inBuffer, size_t inBufferLength, CircularEventBuffer *inPrev, CircularEventBuffer *inNext)
בנאי של CircularEventBuffer (API פנימי).

מאפיינים ציבוריים

mBuffer
מאגר הנתונים הזמני של TLV, ששומר את האירועים בייצוג TLV.
mEventIdCounter
mFirstEventID
מזהה האירוע הראשון שמאוחסן במערכת המשנה לרישום ביומן עבור החשיבות הזו.
mFirstEventTimestamp
חותמת הזמן של האירוע הראשון במאגר הנתונים הזמני הזה.
mFirstEventUTCTimestamp
חותמת הזמן לפי שעון UTC של האירוע הראשון במאגר הנתונים הזמני הזה.
mImportance
המאגר הוא הקטגוריה האחרונה לאירועים בעלי חשיבות זו.
mLastEventID
מזהה האירוע האחרון שניתן עבור החשיבות הזו.
mLastEventTimestamp
חותמת הזמן של האירוע האחרון במאגר הנתונים הזמני הזה.
mLastEventUTCTimestamp
חותמת הזמן לפי שעון UTC של האירוע האחרון במאגר הנתונים הזמני הזה.
mNext
מצביע CircularEventBuffer שמאחסן אירועים חשובים יותר.
mNonPersistedCounter
mPrev
מצביע CircularEventBuffer שמאחסן אירועים פחות חשובים.
mUTCInitialized
bool
הערך הזה מציין אם חותמות הזמן של שעון UTC מאותחלות במאגר הנתונים הזמני הזה.

תפקידים ציבוריים

AddEvent(timestamp_t inEventTimestamp)
void
בהינתן חותמת זמן של אירוע, מחשבים את זמן הדלתא לשמירה ביומן.
AddEventUTC(utc_timestamp_t inEventTimestamp)
void
בהינתן חותמת זמן של אירוע, מחשבים את הדלתא של זמן ה-utc לשמירה ביומן.
IsFinalDestinationForImportance(ImportanceType inImportance) const
bool
פונקציית עזר שקובעת אם האירוע בעל החשיבות שצוינה נשמט מהמאגר הזמני.
LoadEvents(TLVReader & reader)
RemoveEvent(size_t aNumEvents)
void
SerializeEvents(TLVWriter & writer)
VendEventID(void)
הקצאת מזהה אירוע חדש על סמך חשיבות האירוע, ומקדמים את המונה אם יש לנו מזהה אירוע.

פונקציות סטטיות ציבוריות

GetNextBufferFunct(nl::Weave::TLV::TLVReader & ioReader, uintptr_t & inBufHandle, const uint8_t *& outBufStart, uint32_t & outBufLen)

מאפיינים ציבוריים

mBuffer

nl::Weave::TLV::WeaveCircularTLVBuffer nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mBuffer

מאגר הנתונים הזמני של TLV, ששומר את האירועים בייצוג TLV.

mEventIdCounter

nl::Weave::MonotonicallyIncreasingCounter * nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mEventIdCounter

mFirstEventID

event_id_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mFirstEventID

מזהה האירוע הראשון שמאוחסן במערכת המשנה לרישום ביומן עבור החשיבות הזו.

mFirstEventTimestamp

timestamp_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mFirstEventTimestamp

חותמת הזמן של האירוע הראשון במאגר הנתונים הזמני הזה.

mFirstEventUTCTimestamp

utc_timestamp_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mFirstEventUTCTimestamp

חותמת הזמן לפי שעון UTC של האירוע הראשון במאגר הנתונים הזמני הזה.

mImportance

ImportanceType nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mImportance

המאגר הוא הקטגוריה האחרונה לאירועים בעלי חשיבות זו.

אירועים בעלי חשיבות נמוכה יותר מושמטים כשהם יוצאים מהמאגר הזה

mLastEventID

event_id_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mLastEventID

מזהה האירוע האחרון שניתן עבור החשיבות הזו.

mLastEventTimestamp

timestamp_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mLastEventTimestamp

חותמת הזמן של האירוע האחרון במאגר הנתונים הזמני הזה.

mLastEventUTCTimestamp

utc_timestamp_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mLastEventUTCTimestamp

חותמת הזמן לפי שעון UTC של האירוע האחרון במאגר הנתונים הזמני הזה.

mNext

CircularEventBuffer * nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mNext

מצביע CircularEventBuffer שמאחסן אירועים חשובים יותר.

mNonPersistedCounter

nl::Weave::MonotonicallyIncreasingCounter nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mNonPersistedCounter

mPrev

CircularEventBuffer * nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mPrev

מצביע CircularEventBuffer שמאחסן אירועים פחות חשובים.

mUTCInitialized

bool nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::mUTCInitialized

הערך הזה מציין אם חותמות הזמן של שעון UTC מאותחלות במאגר הנתונים הזמני הזה.

תפקידים ציבוריים

AddEvent

void nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::AddEvent(
  timestamp_t inEventTimestamp
)

בהינתן חותמת זמן של אירוע, מחשבים את זמן הדלתא לשמירה ביומן.

פרטים
פרמטרים
inEventTimestamp
חותמת הזמן של האירוע.
החזרות
int32_t דלתא הזמן שיש לקודד עבור האירוע.

AddEventUTC

void nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::AddEventUTC(
  utc_timestamp_t inEventTimestamp
)

בהינתן חותמת זמן של אירוע, מחשבים את הדלתא של זמן ה-utc לשמירה ביומן.

פרטים
פרמטרים
inEventTimestamp
חותמת הזמן של האירוע ב-utc
החזרות
int64_t דלתא של זמן לקידוד עבור האירוע.

CircularEventBuffer

 nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::CircularEventBuffer(
  uint8_t *inBuffer,
  size_t inBufferLength,
  CircularEventBuffer *inPrev,
  CircularEventBuffer *inNext
)

בנאי של CircularEventBuffer (API פנימי).

פרטים
פרמטרים
[in] inBuffer
נפח האחסון לשימוש בפועל באחסון אירועים.
[in] inBufferLength
האורך של inBuffer בבייטים.
[in] inPrev
המצביע אל CircularEventBuffer שמאחסן אירועים בעדיפות נמוכה יותר.
[in] inNext
המצביע אל CircularEventBuffer שמאחסן אירועים בעדיפות גבוהה יותר.
החזרות

IsFinalDestinationForImportance

bool nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::IsFinalDestinationForImportance(
  ImportanceType inImportance
) const 

פונקציית עזר שקובעת אם האירוע בעל החשיבות שצוינה נשמט מהמאגר הזמני.

פרטים
פרמטרים
[in] inImportance
החשיבות של האירוע.
ערכים מוחזרים
true
האירוע יוסר מהמאגר הזה כתוצאה ממעבר לתור.
false
האירוע יועבר לתור הבא.

LoadEvents

WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::LoadEvents(
  TLVReader & reader
)

RemoveEvent

void nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::RemoveEvent(
  size_t aNumEvents
)

SerializeEvents

WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::SerializeEvents(
  TLVWriter & writer
)

VendEventID

event_id_t nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::VendEventID(
  void
)

הקצאת מזהה אירוע חדש על סמך חשיבות האירוע, ומקדמים את המונה אם יש לנו מזהה אירוע.

פרטים
החזרות
מזהה האירוע event_id_t של החשיבות הזו.

פונקציות סטטיות ציבוריות

GetNextBufferFunct

WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::CircularEventBuffer::GetNextBufferFunct(
  nl::Weave::TLV::TLVReader & ioReader,
  uintptr_t & inBufHandle,
  const uint8_t *& outBufStart,
  uint32_t & outBufLen
)