AJA NTV2 SDK  18.1.0.2439
NTV2 SDK 18.1.0.2439
NTV2ConfigInterrupt Class Reference

Configure interrupt (subscribe/unsubscribe, enable/disable, query subscribed interrupts, query enabled interrupts, etc.). More...

#include <ntv2publicinterface.h>

Collaboration diagram for NTV2ConfigInterrupt:
[legend]

Public Member Functions

 NTV2ConfigInterrupt (const void *pClient=nullptr)
 Default ctor, optionally set clientID if needed. More...
 
 ~NTV2ConfigInterrupt ()
 Destructor. More...
 
ULWord operation (void) const
 
ULWord flags (void) const
 
INTERRUPT_ENUMS interruptID (void) const
 
uint64_t interruptIDs (void) const
 
bool isValid (void) const
 
 operator bool () const
 
bool isSuccess (void) const
 
 operator NTV2_HEADER * ()
 
std::ostream & print (std::ostream &oss) const
 prints a human-readable representation of me to the given output stream More...
 
uint64_t clientID (void) const
 
uint64_t clientPID (void) const
 
uint64_t clientTID (void) const
 
ULWord count (void) const
 
size_t maxHandleCapacity (void) const
 
HANDLE eventHandle (const INTERRUPT_ENUMS id) const
 
bool setEventHandle (const INTERRUPT_ENUMS id, HANDLE h)
 
bool hasCreateHandleFlag (void) const
 
bool hasIncludeGlobalsFlag (void) const
 
NTV2ConfigInterrupt & doSubscribe (const INTERRUPT_ENUMS id)
 Create event handle and subscribe it to given interruptID. More...
 
NTV2ConfigInterrupt & doSubscribeEvent (const INTERRUPT_ENUMS id, const HANDLE &hdl)
 Subscribe given HANDLE for interruptID. More...
 
NTV2ConfigInterrupt & doUnsubscribe (const INTERRUPT_ENUMS id)
 Unsubscribe local HANDLE from given interruptID. More...
 
NTV2ConfigInterrupt & doEnable (const INTERRUPT_ENUMS id)
 Enable given interruptID. More...
 
NTV2ConfigInterrupt & doDisable (const INTERRUPT_ENUMS id)
 Disable given interruptID. More...
 
NTV2ConfigInterrupt & doGetCount (const INTERRUPT_ENUMS id)
 Get interruptID count. More...
 
NTV2ConfigInterrupt & doSetCount (const INTERRUPT_ENUMS id, const ULWord cnt=0)
 Set interruptID count. More...
 
NTV2ConfigInterrupt & doGetSubscribed (const bool includeHdls=false)
 Retrieve subscribed interrupt IDs + count of them (+ optional event HANDLEs) More...
 
NTV2ConfigInterrupt & setResult (const ULWord val)
 Sets my mResult. More...
 
NTV2ConfigInterrupt & setFail (void)
 Zeroes my mResult (indicating failure) More...
 
NTV2ConfigInterrupt & setSuccess (void)
 Sets my mResult to 1 (non-zero indicates success) More...
 
NTV2ConfigInterrupt & setClientID (const uint64_t id)
 Sets my mClientID. More...
 
NTV2ConfigInterrupt & setCount (const ULWord val)
 Sets my mCount. More...
 
NTV2ConfigInterrupt & setOperation (const ULWord op)
 Sets my operation; also stores caller's PID & TID. More...
 
NTV2ConfigInterrupt & setInterruptID (const INTERRUPT_ENUMS id)
 Sets my interruptID. More...
 
NTV2ConfigInterrupt & setEventHandle (const HANDLE &h)
 Sets my event handle. More...
 
NTV2ConfigInterrupt & setCreateEvent (void)
 Sets the kFlagMaskCreateHandle option. More...
 
bool RPCEncode (NTV2_RPC_BLOB_TYPE &outBlob)
 
bool RPCDecode (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
 
bool RPCDecodeClient (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
 
bool RPCEncodeClient (NTV2_RPC_BLOB_TYPE &inBlob)
 
bool RPCDecodeServer (const NTV2_RPC_BLOB_TYPE &inBlob, size_t &inOutIndex)
 
bool RPCEncodeServer (NTV2_RPC_BLOB_TYPE &inBlob)
 

Static Public Member Functions

static std::string OpName (const ULWord op)
 
static NTV2StringList IntNames (const uint64_t mask)
 
static std::string IntName (const INTERRUPT_ENUMS id)
 

Public Attributes

NTV2_HEADER mHeader
 The common structure header – ALWAYS FIRST! More...
 
ULWord mOperation
 In: requested operation. More...
 
ULWord mFlags
 In: option flags. More...
 
ULWord mInterruptID
 In: INTERRUPT_ENUMS (interruptID) of interest. More...
 
ULWord mResult
 Out: 0=false (fail), 1 or non-zero == true (success) More...
 
ULWord64 mInterruptIDs
 Out: bitmap of enabled interrupt IDs. More...
 
ULWord64 mEventHandle
 In: handle to subscribe if kFlagMaskCreateHandle bit is clear. More...
 
ULWord64 mClientID
 In: client identifier. More...
 
ULWord64 mClientPID
 In: client process identifier. More...
 
ULWord64 mClientTID
 In: client thread identifier. More...
 
ULWord mCount
 In: set interrupt count; Out: requested count. More...
 
NTV2Buffer mHandles
 Optional buffer to store subscribed HANDLEs. More...
 
ULWord mSpares [32]
 Reserved for future use. More...
 
NTV2_TRAILER mTrailer
 The common structure trailer – ALWAYS LAST! More...
 

Static Public Attributes

static const ULWord kOpINVALID = 0x00000000
 
static const ULWord kOpFIRST = 0x00000001
 
static const ULWord kOpSubscribe = kOpFIRST
 For given mInterruptID, subscribe it. More...
 
static const ULWord kOpUnsubscribe = 0x00000002
 For given mInterruptID, unsubscribe it. More...
 
static const ULWord kOpEnable = 0x00000003
 For given mInterruptID, enable it. More...
 
static const ULWord kOpDisable = 0x00000004
 For given mInterruptID, disable it. More...
 
static const ULWord kOpGetSubscribed = 0x00000005
 Get subscribed interrupt IDs (mInterruptID ignored, fills mResultMask, respects kFlagMaskIncludeGlobals) More...
 
static const ULWord kOpGetEnabledIDs = 0x00000006
 Get enabled interrupt IDs (mInterruptID ignored, fills mInterruptIDs) More...
 
static const ULWord kOpGetIntCount = 0x00000007
 For given mInterruptID, fetch driver interrupt count into mCount. More...
 
static const ULWord kOpSetIntCount = 0x00000008
 For given mInterruptID, reset driver interrupt count from mCount. More...
 
static const ULWord kOpLAST = kOpSetIntCount
 
static const ULWord kFlagMaskCreateHandle = 0x00000001
 If set, create local event handle; otherwise handle is supplied for subscribe operation. More...
 
static const ULWord kFlagMaskIncludeGlobals = 0x00000002
 If set, also include global event handles. More...
 

Detailed Description

Configure interrupt (subscribe/unsubscribe, enable/disable, query subscribed interrupts, query enabled interrupts, etc.).

Note
This struct uses a constructor to properly initialize itself. Do not use memset or bzero to initialize or "clear" it.

Definition at line 7978 of file ntv2publicinterface.h.

Constructor & Destructor Documentation

◆ NTV2ConfigInterrupt()

NTV2ConfigInterrupt::NTV2ConfigInterrupt ( const void *  pClient = nullptr)
explicit

Default ctor, optionally set clientID if needed.

Definition at line 3853 of file ntv2publicinterface.cpp.

◆ ~NTV2ConfigInterrupt()

NTV2ConfigInterrupt::~NTV2ConfigInterrupt ( )
inline

Destructor.

Definition at line 7996 of file ntv2publicinterface.h.

Member Function Documentation

◆ clientID()

uint64_t NTV2ConfigInterrupt::clientID ( void  ) const
inline
Returns
my client ID

Definition at line 8025 of file ntv2publicinterface.h.

◆ clientPID()

uint64_t NTV2ConfigInterrupt::clientPID ( void  ) const
inline
Returns
my client process ID

Definition at line 8026 of file ntv2publicinterface.h.

◆ clientTID()

uint64_t NTV2ConfigInterrupt::clientTID ( void  ) const
inline
Returns
my client thread ID

Definition at line 8027 of file ntv2publicinterface.h.

◆ count()

ULWord NTV2ConfigInterrupt::count ( void  ) const
inline
Returns
count value

Definition at line 8028 of file ntv2publicinterface.h.

◆ doDisable()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doDisable ( const INTERRUPT_ENUMS  id)
inline

Disable given interruptID.

Definition at line 8041 of file ntv2publicinterface.h.

◆ doEnable()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doEnable ( const INTERRUPT_ENUMS  id)
inline

Enable given interruptID.

Definition at line 8040 of file ntv2publicinterface.h.

◆ doGetCount()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doGetCount ( const INTERRUPT_ENUMS  id)
inline

Get interruptID count.

Definition at line 8042 of file ntv2publicinterface.h.

◆ doGetSubscribed()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doGetSubscribed ( const bool  includeHdls = false)
inline

Retrieve subscribed interrupt IDs + count of them (+ optional event HANDLEs)

Definition at line 8044 of file ntv2publicinterface.h.

◆ doSetCount()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doSetCount ( const INTERRUPT_ENUMS  id,
const ULWord  cnt = 0 
)
inline

Set interruptID count.

Definition at line 8043 of file ntv2publicinterface.h.

◆ doSubscribe()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doSubscribe ( const INTERRUPT_ENUMS  id)
inline

Create event handle and subscribe it to given interruptID.

Definition at line 8037 of file ntv2publicinterface.h.

◆ doSubscribeEvent()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doSubscribeEvent ( const INTERRUPT_ENUMS  id,
const HANDLE &  hdl 
)
inline

Subscribe given HANDLE for interruptID.

Definition at line 8038 of file ntv2publicinterface.h.

◆ doUnsubscribe()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::doUnsubscribe ( const INTERRUPT_ENUMS  id)
inline

Unsubscribe local HANDLE from given interruptID.

Definition at line 8039 of file ntv2publicinterface.h.

◆ eventHandle()

HANDLE NTV2ConfigInterrupt::eventHandle ( const INTERRUPT_ENUMS  id) const
inline
Returns
interrupt event handle

Definition at line 8030 of file ntv2publicinterface.h.

◆ flags()

ULWord NTV2ConfigInterrupt::flags ( void  ) const
inline
Returns
my option flags

Definition at line 8017 of file ntv2publicinterface.h.

◆ hasCreateHandleFlag()

bool NTV2ConfigInterrupt::hasCreateHandleFlag ( void  ) const
inline
Returns
True if my "create handle" option is set

Definition at line 8033 of file ntv2publicinterface.h.

◆ hasIncludeGlobalsFlag()

bool NTV2ConfigInterrupt::hasIncludeGlobalsFlag ( void  ) const
inline
Returns
True if my "include globals" option is set

Definition at line 8034 of file ntv2publicinterface.h.

◆ interruptID()

INTERRUPT_ENUMS NTV2ConfigInterrupt::interruptID ( void  ) const
inline
Returns
my interrupt ID of interest

Definition at line 8018 of file ntv2publicinterface.h.

◆ interruptIDs()

uint64_t NTV2ConfigInterrupt::interruptIDs ( void  ) const
inline
Returns
my interrupt IDs bitmap (a set of unique interrupt IDs)

Definition at line 8019 of file ntv2publicinterface.h.

◆ IntName()

string NTV2ConfigInterrupt::IntName ( const INTERRUPT_ENUMS  id)
static
Returns
human-readable name of interrupt ID

Definition at line 3834 of file ntv2publicinterface.cpp.

◆ IntNames()

NTV2StringList NTV2ConfigInterrupt::IntNames ( const uint64_t  mask)
static
Returns
list of interrupt enum ID names from corresponding bits set in 'mask'

Definition at line 3844 of file ntv2publicinterface.cpp.

◆ isSuccess()

bool NTV2ConfigInterrupt::isSuccess ( void  ) const
inline
Returns
true if my mResult is non-zero; otherwise false (if zero)

Definition at line 8022 of file ntv2publicinterface.h.

◆ isValid()

bool NTV2ConfigInterrupt::isValid ( void  ) const
inline
Returns
True if I'm valid

Definition at line 8020 of file ntv2publicinterface.h.

◆ maxHandleCapacity()

size_t NTV2ConfigInterrupt::maxHandleCapacity ( void  ) const
inline
Returns
number of event HANDLEs in mOutHandles NTV2Buffer

Definition at line 8029 of file ntv2publicinterface.h.

◆ operation()

ULWord NTV2ConfigInterrupt::operation ( void  ) const
inline
Returns
my desired/intended operation

Definition at line 8016 of file ntv2publicinterface.h.

◆ operator bool()

NTV2ConfigInterrupt::operator bool ( ) const
inline
Returns
True if I'm valid (cast to bool)

Definition at line 8021 of file ntv2publicinterface.h.

◆ operator NTV2_HEADER *()

NTV2ConfigInterrupt::operator NTV2_HEADER * ( )
inline
Returns
my starting address casted to an NTV2_HEADER pointer

Definition at line 8023 of file ntv2publicinterface.h.

◆ OpName()

string NTV2ConfigInterrupt::OpName ( const ULWord  op)
static
Returns
Converts operation code to human-readable string

Definition at line 3827 of file ntv2publicinterface.cpp.

◆ print()

ostream & NTV2ConfigInterrupt::print ( std::ostream &  oss) const

prints a human-readable representation of me to the given output stream

Definition at line 3871 of file ntv2publicinterface.cpp.

◆ RPCDecode()

bool NTV2ConfigInterrupt::RPCDecode ( const NTV2_RPC_BLOB_TYPE &  inBlob,
size_t &  inOutIndex 
)

Definition at line 4249 of file ntv2publicinterface.cpp.

◆ RPCDecodeClient()

bool NTV2ConfigInterrupt::RPCDecodeClient ( const NTV2_RPC_BLOB_TYPE &  inBlob,
size_t &  inOutIndex 
)

◆ RPCDecodeServer()

bool NTV2ConfigInterrupt::RPCDecodeServer ( const NTV2_RPC_BLOB_TYPE &  inBlob,
size_t &  inOutIndex 
)

◆ RPCEncode()

bool NTV2ConfigInterrupt::RPCEncode ( NTV2_RPC_BLOB_TYPE &  outBlob)

Definition at line 4222 of file ntv2publicinterface.cpp.

◆ RPCEncodeClient()

bool NTV2ConfigInterrupt::RPCEncodeClient ( NTV2_RPC_BLOB_TYPE &  inBlob)

◆ RPCEncodeServer()

bool NTV2ConfigInterrupt::RPCEncodeServer ( NTV2_RPC_BLOB_TYPE &  inBlob)

◆ setClientID()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setClientID ( const uint64_t  id)
inline

Sets my mClientID.

Definition at line 8055 of file ntv2publicinterface.h.

◆ setCount()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setCount ( const ULWord  val)
inline

Sets my mCount.

Definition at line 8056 of file ntv2publicinterface.h.

◆ setCreateEvent()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setCreateEvent ( void  )
inline

Sets the kFlagMaskCreateHandle option.

Definition at line 8060 of file ntv2publicinterface.h.

◆ setEventHandle() [1/2]

bool NTV2ConfigInterrupt::setEventHandle ( const INTERRUPT_ENUMS  id,
HANDLE  h 
)
inline
Returns
store interrupt event handle

Definition at line 8031 of file ntv2publicinterface.h.

◆ setEventHandle() [2/2]

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setEventHandle ( const HANDLE &  h)
inline

Sets my event handle.

Definition at line 8059 of file ntv2publicinterface.h.

◆ setFail()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setFail ( void  )
inline

Zeroes my mResult (indicating failure)

Definition at line 8053 of file ntv2publicinterface.h.

◆ setInterruptID()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setInterruptID ( const INTERRUPT_ENUMS  id)
inline

Sets my interruptID.

Definition at line 8058 of file ntv2publicinterface.h.

◆ setOperation()

NTV2ConfigInterrupt & NTV2ConfigInterrupt::setOperation ( const ULWord  op)

Sets my operation; also stores caller's PID & TID.

Definition at line 3898 of file ntv2publicinterface.cpp.

◆ setResult()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setResult ( const ULWord  val)
inline

Sets my mResult.

Definition at line 8052 of file ntv2publicinterface.h.

◆ setSuccess()

NTV2ConfigInterrupt& NTV2ConfigInterrupt::setSuccess ( void  )
inline

Sets my mResult to 1 (non-zero indicates success)

Definition at line 8054 of file ntv2publicinterface.h.

Member Data Documentation

◆ kFlagMaskCreateHandle

const ULWord NTV2ConfigInterrupt::kFlagMaskCreateHandle = 0x00000001
static

If set, create local event handle; otherwise handle is supplied for subscribe operation.

Definition at line 8012 of file ntv2publicinterface.h.

◆ kFlagMaskIncludeGlobals

const ULWord NTV2ConfigInterrupt::kFlagMaskIncludeGlobals = 0x00000002
static

If set, also include global event handles.

Definition at line 8013 of file ntv2publicinterface.h.

◆ kOpDisable

const ULWord NTV2ConfigInterrupt::kOpDisable = 0x00000004
static

For given mInterruptID, disable it.

Definition at line 8004 of file ntv2publicinterface.h.

◆ kOpEnable

const ULWord NTV2ConfigInterrupt::kOpEnable = 0x00000003
static

For given mInterruptID, enable it.

Definition at line 8003 of file ntv2publicinterface.h.

◆ kOpFIRST

const ULWord NTV2ConfigInterrupt::kOpFIRST = 0x00000001
static

Definition at line 8000 of file ntv2publicinterface.h.

◆ kOpGetEnabledIDs

const ULWord NTV2ConfigInterrupt::kOpGetEnabledIDs = 0x00000006
static

Get enabled interrupt IDs (mInterruptID ignored, fills mInterruptIDs)

Definition at line 8006 of file ntv2publicinterface.h.

◆ kOpGetIntCount

const ULWord NTV2ConfigInterrupt::kOpGetIntCount = 0x00000007
static

For given mInterruptID, fetch driver interrupt count into mCount.

Definition at line 8007 of file ntv2publicinterface.h.

◆ kOpGetSubscribed

const ULWord NTV2ConfigInterrupt::kOpGetSubscribed = 0x00000005
static

Get subscribed interrupt IDs (mInterruptID ignored, fills mResultMask, respects kFlagMaskIncludeGlobals)

Definition at line 8005 of file ntv2publicinterface.h.

◆ kOpINVALID

const ULWord NTV2ConfigInterrupt::kOpINVALID = 0x00000000
static

Definition at line 7999 of file ntv2publicinterface.h.

◆ kOpLAST

const ULWord NTV2ConfigInterrupt::kOpLAST = kOpSetIntCount
static

Definition at line 8009 of file ntv2publicinterface.h.

◆ kOpSetIntCount

const ULWord NTV2ConfigInterrupt::kOpSetIntCount = 0x00000008
static

For given mInterruptID, reset driver interrupt count from mCount.

Definition at line 8008 of file ntv2publicinterface.h.

◆ kOpSubscribe

const ULWord NTV2ConfigInterrupt::kOpSubscribe = kOpFIRST
static

For given mInterruptID, subscribe it.

Definition at line 8001 of file ntv2publicinterface.h.

◆ kOpUnsubscribe

const ULWord NTV2ConfigInterrupt::kOpUnsubscribe = 0x00000002
static

For given mInterruptID, unsubscribe it.

Definition at line 8002 of file ntv2publicinterface.h.

◆ mClientID

ULWord64 NTV2ConfigInterrupt::mClientID

In: client identifier.

Definition at line 7986 of file ntv2publicinterface.h.

◆ mClientPID

ULWord64 NTV2ConfigInterrupt::mClientPID

In: client process identifier.

Definition at line 7987 of file ntv2publicinterface.h.

◆ mClientTID

ULWord64 NTV2ConfigInterrupt::mClientTID

In: client thread identifier.

Definition at line 7988 of file ntv2publicinterface.h.

◆ mCount

ULWord NTV2ConfigInterrupt::mCount

In: set interrupt count; Out: requested count.

Definition at line 7989 of file ntv2publicinterface.h.

◆ mEventHandle

ULWord64 NTV2ConfigInterrupt::mEventHandle

In: handle to subscribe if kFlagMaskCreateHandle bit is clear.

Definition at line 7985 of file ntv2publicinterface.h.

◆ mFlags

ULWord NTV2ConfigInterrupt::mFlags

In: option flags.

Definition at line 7981 of file ntv2publicinterface.h.

◆ mHandles

NTV2Buffer NTV2ConfigInterrupt::mHandles

Optional buffer to store subscribed HANDLEs.

Definition at line 7990 of file ntv2publicinterface.h.

◆ mHeader

NTV2_HEADER NTV2ConfigInterrupt::mHeader

The common structure header – ALWAYS FIRST!

Definition at line 7979 of file ntv2publicinterface.h.

◆ mInterruptID

ULWord NTV2ConfigInterrupt::mInterruptID

In: INTERRUPT_ENUMS (interruptID) of interest.

Definition at line 7982 of file ntv2publicinterface.h.

◆ mInterruptIDs

ULWord64 NTV2ConfigInterrupt::mInterruptIDs

Out: bitmap of enabled interrupt IDs.

Definition at line 7984 of file ntv2publicinterface.h.

◆ mOperation

ULWord NTV2ConfigInterrupt::mOperation

In: requested operation.

Definition at line 7980 of file ntv2publicinterface.h.

◆ mResult

ULWord NTV2ConfigInterrupt::mResult

Out: 0=false (fail), 1 or non-zero == true (success)

Definition at line 7983 of file ntv2publicinterface.h.

◆ mSpares

ULWord NTV2ConfigInterrupt::mSpares[32]

Reserved for future use.

Definition at line 7991 of file ntv2publicinterface.h.

◆ mTrailer

NTV2_TRAILER NTV2ConfigInterrupt::mTrailer

The common structure trailer – ALWAYS LAST!

Definition at line 7992 of file ntv2publicinterface.h.


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