OBSERVER Embedded C library v1.0.0
Files | Typedefs | Enumerations
Observer Library

Deterministic observer pattern for embedded systems. More...

Files

file  observer.c
 Deterministic Observer pattern implementation for safety-critical systems.
 
file  observer.h
 Public API for the deterministic Observer library.
 

Typedefs

typedef void(* observer_cb_t) (void)
 Callback without arguments.
 
typedef void(* observer_cb_state_t) (event_state_e state)
 Callback taking event_state_e argument.
 
typedef void(* observer_cb_u8_arg_t) (uint8_t data)
 Callback taking uint8_t argument.
 

Enumerations

enum  subscr_status_e { OBSERVER_OK = 0u , OBSERVER_INVALID_ARGUMENT_ERROR = 1u , OBSERVER_TABLE_FULL_ERROR = 2u , OBSERVER_TABLE_EMPTY_ERROR = 3u }
 Subscription operation status codes. More...
 
enum  event_state_e { EVENT_STATE_EXIT = 0u , EVENT_STATE_ENTER = 1u }
 Event state passed to event_state_e callbacks.
 

Detailed Description

Deterministic observer pattern for embedded systems.

@safety This header defines types only; no runtime behavior is implemented.

Enumeration Type Documentation

◆ subscr_status_e

Subscription operation status codes.

Note
  • OBSERVER_OK == 0 (success)
  • OBSERVER_INVALID_ARGUMENT_ERROR indicates invalid input parameters.
  • OBSERVER_TABLE_FULL_ERROR indicates no free slots available.
  • OBSERVER_TABLE_EMPTY_ERROR indicates table has no valid entries.