Frame Lock
FrameLock objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::interfaces::stream::FrameLock> rogue::interfaces::stream::FrameLockPtr
Shared pointer alias for
FrameLock.
The class description is shown below:
-
class FrameLock
Scoped lock wrapper for stream frames.
Holds a lock while frame data is accessed. This allows multiple stream slaves to read/update safely while ensuring only one updater at a time. Locks are released on destruction. Instances are created via
Frame::lock().Public Functions
Constructs a lock wrapper for the provided frame.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
frame – Frame to lock.
-
~FrameLock()
Destroys the wrapper and releases any held lock.
-
void enter()
Python context-manager entry hook.
Exists to support Python
withusage. Exposed as__enter__()in Python.
-
void exit(void*, void*, void*)
Python context-manager exit hook.
Exists to support Python
withusage. Exposed as__exit__()in Python.
Public Static Functions
Creates a frame lock wrapper.
Intended for internal use by
Frame. Parameter semantics are identical to the constructor; seeFrameLock()for lock-wrapper behavior details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.- Parameters:
frame – Frame to lock.
- Returns:
Shared pointer to the created lock object.
-
static void setup_python()
Registers this type with Python bindings.