File MotionRegistry.h
FileList > motion > MotionRegistry.h
Go to the source code of this file
Owns all active motions and drives per-tick evaluation + transport output. More...
#include "motion/IMotion.h"#include "signal/FadeCommand.h"#include "signal/LockFreeQueue.h"#include "time/MtcTickSource.h"#include <functional>#include <lo/lo.h>#include <memory>#include <string>#include <unordered_map>
Namespaces
| Type | Name |
|---|---|
| namespace | gme |
| namespace | motion |
Classes
| Type | Name |
|---|---|
| class | MotionRegistry Concrete registry of active motions with per-tick evaluation. |
Detailed Description
MotionRegistry is the evaluation core of libgradient_motion. It maintains a map of active IMotion instances indexed by motion_id (primary) and by composite OSC key "host:port:path" (secondary, for supersede detection). All transport knowledge lives in concrete IMotion subclasses; the registry only manages lifecycle.
Thread model
All public methods must be called from a single thread at a time — either the MTC tick callback thread or the 100 ms fallback drain thread, serialised externally by the caller. No internal mutex is required.
Status emission model
All status events (completion, errors, supersede, duplicate) are delivered synchronously through the statusDirect_ callback supplied at construction. The callback must be non-blocking and safe to call from any thread context.
addMotion ordered checks
- Duplicate-
motion_idguard: ifmotions_already contains the incoming id, emitMotionError:"duplicate_motion_id"for the incoming id, drop the incoming motion, leave the existing one untouched. - **
osc_keysupersede**: look upm->osc_keyinosc_index_; on hit, emitMotionError:"superseded"for the old motion, callnew_motion->inheritFrom(old_motion), erase the old. - Insert into both
motions_andosc_index_.
See also: IMotion
See also: MotionFactory
See also: gme::osc::OscSender
The documentation for this class was generated from the following file src/motion/MotionRegistry.h