AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
ntv2interrupts.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #include "ntv2card.h"
9 
10 
13 
14 
16 {
18 }
19 
20 
21 bool CNTV2Card::EnableInterrupt (const INTERRUPT_ENUMS inInterruptCode) {return ConfigureInterrupt (true, inInterruptCode);}
24 bool CNTV2Card::EnableInputInterrupt (const NTV2ChannelSet & inFrameStores)
25 {
26  UWord failures(0);
27  for (NTV2ChannelSetConstIter it(inFrameStores.begin()); it != inFrameStores.end(); ++it)
28  if (!EnableInputInterrupt (*it))
29  failures++;
30  return failures == 0;
31 }
32 
33 bool CNTV2Card::DisableInterrupt (const INTERRUPT_ENUMS inInterruptCode)
34 {
35  if(NTV2_IS_INPUT_INTERRUPT(inInterruptCode) || NTV2_IS_OUTPUT_INTERRUPT(inInterruptCode))
36  return true;
37  return ConfigureInterrupt (false, inInterruptCode);
38 }
42 {
43  UWord failures(0);
44  for (NTV2ChannelSetConstIter it(inFrameStores.begin()); it != inFrameStores.end(); ++it)
45  if (!DisableInputInterrupt (*it))
46  failures++;
47  return failures == 0;
48 }
NTV2ChannelSet::const_iterator NTV2ChannelSetConstIter
A handy const iterator into an NTV2ChannelSet.
virtual bool DisableInputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Prevents the CNTV2Card instance from waiting for and responding to vertical blanking interrupts origi...
NTV2InterruptMask
Definition: ntv2enums.h:1527
virtual bool EnableInputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Allows the CNTV2Card instance to wait for and respond to input vertical blanking interrupts originati...
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1357
virtual bool EnableOutputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Allows the CNTV2Card instance to wait for and respond to output vertical blanking interrupts originat...
virtual bool EnableInterrupt(const INTERRUPT_ENUMS inEventCode)
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device...
enum _INTERRUPT_ENUMS_ INTERRUPT_ENUMS
#define NTV2_IS_OUTPUT_INTERRUPT(__e__)
static const INTERRUPT_ENUMS gChannelToInputInterrupt[]
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
static const INTERRUPT_ENUMS gChannelToOutputInterrupt[]
uint16_t UWord
Definition: ajatypes.h:221
Declares the CNTV2Card class.
virtual bool ConfigureInterrupt(bool, INTERRUPT_ENUMS)
NTV2Interrupt2Mask
Definition: ntv2enums.h:1600
virtual bool GetCurrentInterruptMasks(NTV2InterruptMask &outIntMask1, NTV2Interrupt2Mask &outIntMask2)
#define NTV2_IS_INPUT_INTERRUPT(__e__)
virtual bool DisableOutputInterrupt(const NTV2Channel channel=NTV2_CHANNEL1)
Prevents the CNTV2Card instance from waiting for and responding to vertical blanking interrupts origi...
virtual bool DisableInterrupt(const INTERRUPT_ENUMS inEventCode)