Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
owner_observer.h File Reference

Explicit owner progress diagnostics without default state. More...

Go to the source code of this file.

Data Structures

struct  nx_owner_observation_t
 Copied service facts without request, payload or slot references. More...
struct  nx_owner_observer_t
 Opt-in caller sidecar; no pointer added to default owner. More...

Functions

nx_result_t nx_owner_observer_bind (nx_owner_observer_t *observer, nx_bus_owner_t *owner)
 Bind an initialized exact owner without creating work.
nx_result_t nx_owner_observer_service (nx_owner_observer_t *observer, nx_time_us_t now, nx_owner_observation_t *out)
 Execute exactly one real service step and copy diagnostics.
void nx_owner_observer_detach (nx_owner_observer_t *observer)
 Drop only the observation binding, no owner/loan teardown.

Detailed Description

Explicit owner progress diagnostics without default state.

Author
Nexus Team

Definition in file owner_observer.h.

Function Documentation

◆ nx_owner_observer_bind()

nx_result_t nx_owner_observer_bind ( nx_owner_observer_t * observer,
nx_bus_owner_t * owner )

Bind an initialized exact owner without creating work.

Parameters
[in,out]observerFresh zero/detached sidecar, distinct from owner.
[in,out]ownerInitialized stable owner, no concurrent lifecycle.
Returns
SUCCESS or INVALID/STATE, no service or borrow on rejection.

◆ nx_owner_observer_detach()

void nx_owner_observer_detach ( nx_owner_observer_t * observer)

Drop only the observation binding, no owner/loan teardown.

Parameters
[in,out]observerCaller-serialized sidecar, no remaining readers.

◆ nx_owner_observer_service()

nx_result_t nx_owner_observer_service ( nx_owner_observer_t * observer,
nx_time_us_t now,
nx_owner_observation_t * out )

Execute exactly one real service step and copy diagnostics.

Parameters
[in,out]observerBound sidecar on the unique executor.
[in]nowMonotonic timestamp, independent of service result.
[out]outDistinct stable output, no retained references.
Returns
Actual service result; invalid bindings reject beforehand.
Note
Clock reversal never blocks drain or rewrites its result. Snapshot uses the existing guard outside hardware service. No callback, slot scan or worker occurs under that guard. Quarantine and elapsed deadlines never release a loan. Output also excludes accepted descriptors and payloads. Only the owner/slot control spans are checked here.