chronon::AutoRegisteredUnit
CRTP base that auto-registers Derived with SenderFactoryRegistry at program load. More...
#include <SenderFactory.hpp>
Inherits from chronon::sender::TickableUnit, chronon::sender::Unit
Public Functions
| Name | |
|---|---|
| AutoRegisteredUnit(std::string name) |
Protected Functions
| Name | |
|---|---|
| AutoRegisteredUnit(std::string name, bool ) Tag overload for derived classes needing custom construction. |
Additional inherited members
Public Functions inherited from chronon::sender::TickableUnit
| Name | |
|---|---|
| virtual | ~TickableUnit() =default |
| virtual void | tick() =0 Per-cycle behavior. Must complete synchronously. |
| virtual bool | isCompleted() const Return true to signal the simulation can stop. |
| void | executeTickAlwaysActive() Hot path for units that have not opted into activity scheduling. |
| void | executeTick() Inlined hot path executed millions of times per second. |
| void | advanceIdleTick(uint64_t delta) Batched inactive-cycle advance used when an entire cluster is idle. |
| TickableUnit(std::string name) |
Protected Functions inherited from chronon::sender::TickableUnit
| Name | |
|---|---|
| template <ValidPhase P> void | tickPhase() |
| void | requestTermination(TerminationReason reason, int32_t exit_code =0, std::string_view message ="") |
| void | requestTermination(TerminationReason reason, int32_t exit_code, uint64_t cycle, std::string_view message) |
| void | requestExitSyscall(int32_t exit_code) |
| void | requestError(std::string_view message) |
Friends inherited from chronon::sender::TickableUnit
| Name | |
|---|---|
| class | TickSimulation |
Public Functions inherited from chronon::sender::Unit
| Name | |
|---|---|
| virtual | ~Unit() =default |
| void | wakeAt(uint64_t cycle) Wake the unit no later than cycle. Safe for cross-thread producers. |
| bool | usesActivityScheduling() const |
| void | useFastCycleCounter() Default mode. Eliminates atomic overhead (~80% of tight-loop time). |
| void | useAtomicCycleCounter() |
| tree::TreeNode * | treeNode() const |
| uint32_t | tickInterval() const |
| UnitState | state() const |
| void | sleepUntil(uint64_t cycle) |
| void | sleepForever() Disable the tick body until an external wakeAt() or port arrival wakes it. |
| bool | shouldRunTickAt(uint64_t cycle) const |
| void | setTreeNode(tree::TreeNode * node) Triggers registration of all pending ports to PortDirectory. |
| void | setTickInterval(uint32_t interval) |
| void | registerPort(PortBase * port) |
| const std::vector< PortBase * > & | ports() const |
| Unit & | operator=(const Unit & ) =delete |
| Unit & | operator=(Unit && ) =delete |
| uint64_t | nextRunnableCycleAtOrAfter(uint64_t cycle) const |
| uint64_t | nextActiveCycle() const |
| const std::string & | name() const |
| uint64_t | localCycle() const |
| virtual void | initialize() Called after all connections are made, before run() starts. |
| uint32_t | id() const |
| std::string | fullPath() const Returns the tree path if a TreeNode is set, else the unit name. |
| virtual void | finalize() Called after run() completes or simulation is stopped. |
| void | enableActivityScheduling() |
| uint8_t | crashNameLen() const |
| const char * | crashName() const |
| void | addPendingPortRegistration(std::function< void(const std::string &)> registration) |
| bool | acceptsPortWakeups() const |
| Unit(std::string name) | |
| Unit(const Unit & ) =delete | |
| Unit(Unit && ) =delete |
Protected Functions inherited from chronon::sender::Unit
| Name | |
|---|---|
| void | setLocalCycle(uint64_t cycle) |
| void | setId(uint32_t id) |
| uint64_t | localCycleAtomic() const |
| void | finishActiveTick_() |
| void | beginActiveTick_() |
| void | advanceLocalCycle(uint64_t delta =1) Fast path: ~0.3ns increment. Slow path (atomic): ~15ns. |
Public Attributes inherited from chronon::sender::Unit
| Name | |
|---|---|
| uint64_t | NEVER_ACTIVE |
Friends inherited from chronon::sender::Unit
| Name | |
|---|---|
| class | TickSimulation |
Detailed Description
template <typename Derived >
class chronon::AutoRegisteredUnit;
CRTP base that auto-registers Derived with SenderFactoryRegistry at program load.
Derived must declare static unit_type_name / unit_description, a [ParameterSet](/docs/api/Classes/classchronon_1_1ParameterSet) type, a constructor accepting const ParameterSet*, and override [tick()](/docs/api/Classes/classchronon_1_1sender_1_1TickableUnit#function-tick) / [isCompleted()](/docs/api/Classes/classchronon_1_1sender_1_1TickableUnit#function-iscompleted).
Public Functions Documentation
function AutoRegisteredUnit
inline explicit AutoRegisteredUnit(
std::string name
)
Protected Functions Documentation
function AutoRegisteredUnit
inline AutoRegisteredUnit(
std::string name,
bool
)
Tag overload for derived classes needing custom construction.
Updated on 2026-07-06 at 09:03:34 +0000