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

explicit FrameLock(std::shared_ptr<rogue::interfaces::stream::Frame> frame)

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:

frameFrame to lock.

~FrameLock()

Destroys the wrapper and releases any held lock.

void lock()

Locks the associated frame when not already locked.

Exposed as lock() in Python.

void unlock()

Unlocks the associated frame when currently locked.

Exposed as unlock() in Python.

void enter()

Python context-manager entry hook.

Exists to support Python with usage. Exposed as __enter__() in Python.

void exit(void*, void*, void*)

Python context-manager exit hook.

Exists to support Python with usage. Exposed as __exit__() in Python.

Public Static Functions

static std::shared_ptr<rogue::interfaces::stream::FrameLock> create(std::shared_ptr<rogue::interfaces::stream::Frame> frame)

Creates a frame lock wrapper.

Intended for internal use by Frame. Parameter semantics are identical to the constructor; see FrameLock() 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 returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Parameters:

frameFrame to lock.

Returns:

Shared pointer to the created lock object.

static void setup_python()

Registers this type with Python bindings.