Skip to content

Commit

Permalink
EventManagement reenabled with buffers trimmed (#25944)
Browse files Browse the repository at this point in the history
  • Loading branch information
milanr-q authored and pull[bot] committed Oct 12, 2023
1 parent 205fd58 commit 1374846
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 29 deletions.
7 changes: 0 additions & 7 deletions examples/lighting-app/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@
*/
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* @name Interaction Model object pool configuration.
*
Expand Down
7 changes: 0 additions & 7 deletions examples/lock-app/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@
*/
#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* @name Interaction Model object pool configuration.
*
Expand Down
7 changes: 0 additions & 7 deletions examples/persistent-storage/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@
*/
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
*
Expand Down
7 changes: 0 additions & 7 deletions examples/shell/qpg/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@
*/
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"

/**
* CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* A size, in bytes, of the individual debug event logging buffer.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)

/**
* CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
*
Expand Down
42 changes: 41 additions & 1 deletion src/platform/qpg/SystemPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,44 @@ struct ChipDeviceEvent;
#define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent *
#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 8
// ========== Platform-specific Configuration Overrides =========
#define CHIP_CONFIG_ENABLE_SERVER_IM_EVENT 0
/**
* @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE
*
* @brief
* A size, in bytes, of the buffer reserved for storing CRITICAL events and no
* other events. CRITICAL events will never be evicted until this buffer is
* full, so its size and the sizes of events determine how many of the last N
* CRITICAL events are guaranteed to be available.
*
* Note: this number must be nonzero.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (512)

/**
* @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE
*
* @brief
* A size, in bytes, of the buffer reserved for storing events at INFO
* priority and higher. INFO-priority events will not be evicted until this
* buffer is full (with INFO and CRITICAL events in it) and the oldest event
* in the buffer is an INFO-priority event (which cannot be evicted into the
* CRITICAL event buffer).
*
* Note: set to 0 to treat INFO events as effectively equivalent to DEBUG events.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (384)

/**
* @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
*
* @brief
* A size, in bytes, of the buffer used for storing newly generated events,
* and the only buffer in which DEBUG-priority events are allowed.
* DEBUG-priority events will start getting evicted when this buffer is full
* (with DEBUG, INFO, and CRITICAL events in it) and the oldest event in the
* buffer is a DEBUG-priority event, which cannot be evicted into the INFO
* event buffer.
*
* Note: set to 0 to disable storing DEBUG events.
*/
#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256)

0 comments on commit 1374846

Please sign in to comment.