TransactionLock

For conceptual usage, see:

TransactionLock objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::interfaces::memory::TransactionLock> rogue::interfaces::memory::TransactionLockPtr
[header]

Shared pointer alias for TransactionLock.

The class description is shown below:

class TransactionLock
[header]

Scoped lock wrapper for a memory transaction.

Holds a lock on transaction data while client code accesses it. The lock prevents transaction destruction while a slave updates data and completion state. Instances are created via Transaction::lock().

Public Functions

explicit TransactionLock(std::shared_ptr<rogue::interfaces::memory::Transaction> transaction)
[header] [impl]

Constructs a lock wrapper for the provided transaction.

Constructor.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

Parameters:

transactionTransaction to guard.

~TransactionLock()
[header] [impl]

Destroys the wrapper and releases any held lock.

Destructor.

void lock()
[header] [impl]

Locks the associated transaction when not already locked.

lock

Exposed as lock() in Python.

void unlock()
[header] [impl]

Unlocks the associated transaction when currently locked.

lock

Exposed as unlock() in Python.

void enter()
[header] [impl]

Python context-manager entry hook.

Enter method for python, do nothing.

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

void exit(void*, void*, void*)
[header] [impl]

Python context-manager exit hook.

Exit method for python, do nothing.

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

Public Static Functions

static std::shared_ptr<rogue::interfaces::memory::TransactionLock> create(std::shared_ptr<rogue::interfaces::memory::Transaction> transaction)
[header] [impl]

Creates a transaction lock wrapper.

Create a container.

Parameter semantics are identical to the constructor; see TransactionLock() 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.

Company : SLAC National Accelerator Laboratory

Description: Memory lock

This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE.txt file.

Parameters:

transactionTransaction to guard.

Returns:

Shared pointer to the created lock object.

static void setup_python()
[header] [impl]

Registers this type with Python bindings.

Setup class in python.