Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
diagnostic.h
Go to the documentation of this file.
1
9#ifndef NEXUS_OS_DIAGNOSTIC_H
10#define NEXUS_OS_DIAGNOSTIC_H
11#include "nexus/core/status.h"
12#include <stddef.h>
13#include <stdint.h>
14#ifdef __cplusplus
15extern "C" {
16#endif
18typedef struct {
19 uint64_t timestamp;
20 uintptr_t identity;
21 uint32_t value;
22 uint32_t event;
24
25typedef struct {
27 uint32_t capacity;
28 uint32_t read_index;
29 uint32_t write_index;
30 uint32_t count;
31 uint32_t dropped;
33
45 size_t capacity);
58 const nx_diagnostic_event_t* event);
78 uint32_t* dropped);
79#ifdef __cplusplus
80}
81#endif
82#endif /* NEXUS_OS_DIAGNOSTIC_H */
nx_result_t nx_diagnostic_ring_write(nx_diagnostic_ring_t *ring, const nx_diagnostic_event_t *event)
Copy one event under a bounded saved interrupt mask.
nx_result_t nx_diagnostic_ring_init(nx_diagnostic_ring_t *ring, nx_diagnostic_event_t *events, size_t capacity)
Initialize unpublished ring and caller-owned entries.
nx_result_t nx_diagnostic_ring_read(nx_diagnostic_ring_t *ring, nx_diagnostic_event_t *event)
Consume one event from caller-owned ring.
nx_result_t nx_diagnostic_ring_dropped(const nx_diagnostic_ring_t *ring, uint32_t *dropped)
Snapshot the saturating overflow count.
Small vendor-independent result vocabulary.
nx_result_t
Operation result; success at submission means admission only.
Definition status.h:21
One opaque diagnostic record; interpretation belongs to its owner.
Definition diagnostic.h:18
Explicit ring state, with no default pool, worker or transport.
Definition diagnostic.h:25
nx_diagnostic_event_t * events
Definition diagnostic.h:26