Struct TriggerManager::TriggerState

Nested Relationships

This struct is a nested type of Class TriggerManager.

Struct Documentation

struct TriggerState

Per-trigger runtime state.

Threading: most fields require mtx for read/write access. Exceptions:

  • info.entity_id and info.entity_type are immutable after creation and safe to read without mtx (e.g. in matches_entity()).

  • active is atomic and can be read/written without mtx.

Public Members

TriggerInfo info
nlohmann::json previous_value
bool has_previous_value = {false}
std::mutex mtx
std::condition_variable cv
std::atomic<bool> active = {true}
std::deque<nlohmann::json> pending_events
std::atomic<uint64_t> event_counter = {0}

Public Static Attributes

static constexpr size_t kMaxPendingEvents = 100