AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
AJALock Class Reference

#include <lock.h>

Public Member Functions

 AJALock (const char *pName=NULL)
 
virtual ~AJALock ()
 
virtual AJAStatus Lock (uint32_t timeout=0xffffffff)
 
virtual AJAStatus Unlock ()
 
virtual bool IsValid (void) const
 
 AJALock (const AJALock &inLock)
 
virtual AJALockoperator= (const AJALock &inLock)
 

Detailed Description

Class to coordinate access to non reentrant code.

Definition at line 30 of file lock.h.

Constructor & Destructor Documentation

◆ AJALock() [1/2]

AJALock::AJALock ( const char *  pName = NULL)

Constructor obtains a lockable object from the system.

Specify a name if the lock is to be shared system wide.

Parameters
pNameName of a shared lock object.

Definition at line 25 of file lock.cpp.

◆ ~AJALock()

AJALock::~AJALock ( )
virtual

Definition at line 55 of file lock.cpp.

◆ AJALock() [2/2]

AJALock::AJALock ( const AJALock inLock)

Definition at line 37 of file lock.cpp.

Member Function Documentation

◆ IsValid()

virtual bool AJALock::IsValid ( void  ) const
inlinevirtual
Returns
True if valid (has implementation). False if not valid.

Definition at line 67 of file lock.h.

◆ Lock()

AJAStatus AJALock::Lock ( uint32_t  timeout = 0xffffffff)
virtual

Request the lock.

Parameters
[in]timeoutRequest timeout in milliseconds (0xffffffff infinite).
Returns
AJA_STATUS_SUCCESS Object locked AJA_STATUS_TIMEOUT Lock wait timeout AJA_STATUS_OPEN Lock not initialized AJA_STATUS_FAIL Lock failed

Definition at line 69 of file lock.cpp.

◆ operator=()

AJALock & AJALock::operator= ( const AJALock inLock)
virtual

Definition at line 48 of file lock.cpp.

◆ Unlock()

AJAStatus AJALock::Unlock ( )
virtual

Release the lock.

Returns
AJA_STATUS_SUCCESS Lock released AJA_STATUS_OPEN Lock not initialized

Definition at line 89 of file lock.cpp.


The documentation for this class was generated from the following files: