C++ Weekly 2025-11-15 Issue #189

Click “View Original” to jump to the corresponding file on GitHub, the link is clickable. QQ group 753792291 for Q&A here. RSS Welcome to submit articles/software/resources, etc., leave a message in the comments. This issue has no sponsorship. It has been a long time since the last update; I have been too lazy, spending my … Read more

C++ Design Patterns: Observer Pattern

The Observer Pattern is a behavioral design pattern that defines a one-to-many dependency between objects. When the state of one object (the Subject) changes, all dependent objects (the Observers) are notified and updated automatically. This pattern is also known as the “publish-subscribe” pattern. Core Roles of the Observer Pattern Subject: The object being observed, which … Read more

C++ Design Patterns: Observer – Building a Publish-Subscribe Weather Forecast System

C++ Design Patterns: Observer - Building a Publish-Subscribe Weather Forecast System

C++ Design Patterns: Observer – Building a Publish-Subscribe Weather Forecast System Decouple your notification mechanism to keep objects “automatically” in sync Introduction: Isolated Information Updates Hello, C++ developers. Imagine you are building a weather monitoring system. The central weather station (<span>WeatherStation</span>) is responsible for collecting the latest meteorological data (temperature, humidity, pressure). At the same … Read more

Application Example of the Observer Pattern in C Language Projects

Application Example of the Observer Pattern in C Language Projects

Application Example of the Observer Pattern in C Language Projects The Observer Pattern is a behavioral design pattern that defines a one-to-many dependency between objects, so that when one object (the subject) changes state, all its dependents (the observers) are notified and updated automatically. This pattern is widely used in event handling systems, GUI frameworks, … Read more

An In-Depth Analysis of the BLE Observer Pattern Callback Mechanism

An In-Depth Analysis of the BLE Observer Pattern Callback Mechanism

Osprey Talks Microcontrollers • Source: Osprey Talks Microcontrollers The nRF5 SDK has updated the event callback mechanism starting from version 14, introducing the Observer Pattern to decouple different BLE layers from the callback functions for BLE events. This mechanism utilizes Flash sections, combining function calls in RAM with operations in Flash, which is a novel … Read more

ARMv8/ARMv9 Memory Barrier Mechanism (Observer & Barrier)

ARMv8/ARMv9 Memory Barrier Mechanism (Observer & Barrier)

ver0.3 Introduction Those who have persisted in reading this article are already remarkable, as they now understand the weak memory ordering architecture of ARM. You not only understand the types of memory, the memory sharing mechanisms, and the memory consistency mechanisms, but also the CPU architecture and the microarchitecture of processors, all of which lay … Read more

Embedded Programming Model | Observer Pattern

Embedded Programming Model | Observer Pattern

Hello everyone, I am the Mixed Content Master. This time we share a commonly used concept/programming model in embedded systems—the Observer Pattern. Overview of the Observer Pattern The Observer Pattern is a behavioral design pattern that focuses on establishing a dynamic subscription-notification mechanism between objects. It defines a one-to-many dependency between objects, so that when … Read more

Understanding Event Bus: Concepts and Implementation

Understanding Event Bus: Concepts and Implementation

1. Introduction The concept of an Event Bus may be unfamiliar to you, but you might be familiar with the Observer (Publish-Subscribe) pattern. The Event Bus is an implementation of the publish-subscribe pattern. It is a centralized event handling mechanism that allows different components to communicate with each other without needing to depend on one … Read more