AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
BareMetal implementation of CNTV2DriverInterface. More...
#include <ntv2baremetaldriverinterface.h>
Public Member Functions | |
CNTV2BareMetalDriverInterface () | |
virtual | ~CNTV2BareMetalDriverInterface () |
virtual bool | WriteRegister (const ULWord inRegNum, const ULWord inValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0) |
Updates or replaces all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device. Using the optional mask and shift parameters, it's possible to set or clear any number of specific bits in a real register without altering any of the register's other bits. More... | |
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. Using the optional mask and shift parameters, it's possible to read any number of specific bits in a register while ignoring the register's other bits. More... | |
virtual bool | RestoreHardwareProcampRegisters (void) |
virtual bool | DmaTransfer (const NTV2DMAEngine inDMAEngine, const bool inIsRead, const ULWord inFrameNumber, ULWord *pFrameBuffer, const ULWord inCardOffsetBytes, const ULWord inTotalByteCount, const bool inSynchronous=(!(0))) |
Transfers data between the AJA device and the host. This function will block and not return to the caller until the transfer has finished or failed. More... | |
virtual bool | DmaTransfer (const NTV2DMAEngine inDMAEngine, const bool inIsRead, const ULWord inFrameNumber, ULWord *pFrameBuffer, const ULWord inCardOffsetBytes, const ULWord inTotalByteCount, const ULWord inNumSegments, const ULWord inHostPitchPerSeg, const ULWord inCardPitchPerSeg, const bool inSynchronous=(!(0))) |
Transfers data in segments between the AJA device and the host. This function will block and not return to the caller until the transfer has finished or failed. More... | |
virtual bool | DmaTransfer (const NTV2DMAEngine inDMAEngine, const NTV2Channel inDMAChannel, const bool inTarget, const ULWord inFrameNumber, const ULWord inCardOffsetBytes, const ULWord inByteCount, const ULWord inNumSegments, const ULWord inSegmentHostPitch, const ULWord inSegmentCardPitch, const PCHANNEL_P2P_STRUCT &inP2PData) |
virtual bool | ConfigureSubscription (const bool bSubscribe, const INTERRUPT_ENUMS eInterruptType, PULWord &hSubcription) |
virtual bool | ConfigureInterrupt (const bool bEnable, const INTERRUPT_ENUMS eInterruptType) |
virtual bool | GetInterruptCount (const INTERRUPT_ENUMS eInterrupt, ULWord &outCount) |
Answers with the number of interrupts of the given type processed by the driver. More... | |
virtual bool | WaitForInterrupt (INTERRUPT_ENUMS eInterrupt, ULWord timeOutMs=68) |
virtual bool | AutoCirculate (AUTOCIRCULATE_DATA &autoCircData) |
Sends an AutoCirculate command to the NTV2 driver. More... | |
virtual bool | NTV2Message (NTV2_HEADER *pInOutMessage) |
Sends a message to the NTV2 driver (the new, improved, preferred way). More... | |
virtual bool | ControlDriverDebugMessages (NTV2_DriverDebugMessageSet msgSet, bool enable) |
virtual bool | HevcSendMessage (HevcMessageHeader *pMessage) |
Sends an HEVC message to the NTV2 driver. More... | |
virtual bool | SetupBoard (void) |
virtual bool | DmaWriteWithOffsets (NTV2DMAEngine DMAEngine, ULWord frameNumber, ULWord *pFrameBuffer, ULWord offsetSrc, ULWord offsetDest, ULWord bytes) |
virtual bool | DmaReadWithOffsets (NTV2DMAEngine DMAEngine, ULWord frameNumber, ULWord *pFrameBuffer, ULWord offsetSrc, ULWord offsetDest, ULWord bytes) |
virtual bool | MapFrameBuffers (void) |
virtual bool | UnmapFrameBuffers (void) |
virtual bool | MapRegisters (void) |
virtual bool | UnmapRegisters (void) |
virtual bool | GetBA0MemorySize (ULWord *memSize) |
virtual bool | GetBA1MemorySize (ULWord *memSize) |
virtual bool | GetBA2MemorySize (ULWord *memSize) |
virtual bool | GetBA4MemorySize (ULWord *memSize) |
virtual bool | MapXena2Flash (void) |
virtual bool | UnmapXena2Flash (void) |
virtual bool | MapDNXRegisters (void) |
virtual bool | UnmapDNXRegisters (void) |
virtual bool | MapDMADriverBuffer () |
virtual bool | UnmapDMADriverBuffer () |
virtual bool | DmaReadFrameDriverBuffer (NTV2DMAEngine DMAEngine, ULWord frameNumber, unsigned long dmaBufferFrame, ULWord bytes, ULWord downSample, ULWord linePitch, ULWord poll) |
virtual bool | DmaReadFrameDriverBuffer (NTV2DMAEngine DMAEngine, ULWord frameNumber, unsigned long dmaBufferFrame, ULWord offsetSrc, ULWord offsetDest, ULWord bytes, ULWord downSample, ULWord linePitch, ULWord poll) |
virtual bool | DmaWriteFrameDriverBuffer (NTV2DMAEngine DMAEngine, ULWord frameNumber, unsigned long dmaBufferFrame, ULWord bytes, ULWord poll) |
virtual bool | DmaWriteFrameDriverBuffer (NTV2DMAEngine DMAEngine, ULWord frameNumber, unsigned long dmaBufferFrame, ULWord offsetSrc, ULWord offsetDest, ULWord bytes, ULWord poll) |
virtual bool | GetDMADriverBufferPhysicalAddress (ULWord *physAddr) |
virtual bool | GetDMADriverBufferAddress (ULWord **pDMADriverBuffer) |
virtual bool | GetDMANumDriverBuffers (ULWord *pNumDmaDriverBuffers) |
virtual bool | SetAudioOutputMode (NTV2_GlobalAudioPlaybackMode mode) |
virtual bool | GetAudioOutputMode (NTV2_GlobalAudioPlaybackMode *mode) |
Public Member Functions inherited from CNTV2DriverInterface | |
virtual ULWord | GetNumFrameBuffers (void) const |
virtual ULWord | GetFrameBufferSize (void) const |
virtual bool | DriverGetBitFileInformation (BITFILE_INFO_STRUCT &outBitFileInfo, const NTV2BitFileType inBitFileType=NTV2_VideoProcBitFile) |
Answers with the currently-installed bitfile information. More... | |
virtual bool | DriverGetBuildInformation (BUILD_INFO_STRUCT &outBuildInfo) |
Answers with the driver's build information. More... | |
virtual bool | GetPackageInformation (PACKAGE_INFO_STRUCT &outPkgInfo) |
Answers with the IP device's package information. More... | |
virtual bool | BitstreamWrite (const NTV2Buffer &inBuffer, const bool inFragment, const bool inSwap) |
virtual bool | BitstreamReset (const bool inConfiguration, const bool inInterface) |
virtual bool | BitstreamStatus (NTV2ULWordVector &outRegValues) |
virtual bool | BitstreamLoad (const bool inSuspend, const bool inResume) |
virtual bool | StreamChannelOps (const NTV2Channel inChannel, ULWord flags, NTV2StreamChannel &status) |
virtual bool | StreamBufferOps (const NTV2Channel inChannel, NTV2Buffer &inBuffer, ULWord64 bufferCookie, ULWord flags, NTV2StreamBuffer &status) |
virtual bool | ReadRP188Registers (const NTV2Channel inChannel, RP188_STRUCT *pRP188Data) |
virtual std::string | GetDescription (void) const |
virtual NTV2Dictionary | ConnectParams (void) const |
virtual bool | SuspendAudio (void) |
virtual bool | ResumeAudio (const ULWord inFBSize) |
virtual bool | ReadRegisterMulti (const ULWord numRegs, ULWord *pOutWhichRegFailed, NTV2RegInfo aRegs[]) |
virtual Word | SleepMs (const LWord msec) |
virtual NTV2DeviceID | GetDeviceID (void) |
virtual bool | IsDeviceReady (const bool inCheckValid=(0)) |
virtual bool | IsMBSystemValid (void) |
virtual bool | IsMBSystemReady (void) |
virtual bool | Open (const UWord inDeviceIndex) |
Opens a local/physical AJA device so it can be monitored/controlled. More... | |
virtual bool | Open (const std::string &inURLSpec) |
Opens the specified local, remote or software device. More... | |
virtual bool | Close (void) |
Closes me, releasing host resources that may have been allocated in a previous Open call. More... | |
template<typename T > | |
bool | ReadRegister (const ULWord inRegNum, T &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0) |
This template function reads all or part of the 32-bit contents of a specific register (real or virtual) from the AJA device, and if successful, returns its value automatically casted to the scalar type of the "outValue" parameter. More... | |
virtual bool | ReadRegisters (NTV2RegisterReads &inOutValues) |
Reads the register(s) specified by the given NTV2RegInfo sequence. More... | |
virtual HANDLE | GetInterruptEvent (const INTERRUPT_ENUMS eInterruptType) |
virtual bool | GetInterruptEventCount (const INTERRUPT_ENUMS inEventCode, ULWord &outCount) |
Answers with the number of interrupt events that I successfully waited for. More... | |
virtual bool | SetInterruptEventCount (const INTERRUPT_ENUMS inEventCode, const ULWord inCount) |
Resets my interrupt event tally for the given interrupt type. (This is my count of the number of successful event waits.) More... | |
virtual bool | IsSupported (const NTV2BoolParamID inParamID) |
virtual ULWord | GetNumSupported (const NTV2NumericParamID inParamID) |
virtual ULWordSet | GetSupportedItems (const NTV2EnumsID inEnumsID) |
virtual bool | AcquireStreamForApplicationWithReference (const ULWord inAppType, const int32_t inProcessID) |
A reference-counted version of CNTV2DriverInterface::AcquireStreamForApplication useful for process groups. More... | |
virtual bool | ReleaseStreamForApplicationWithReference (const ULWord inAppType, const int32_t inProcessID) |
A reference-counted version of CNTV2DriverInterface::ReleaseStreamForApplication useful for process groups. More... | |
virtual bool | AcquireStreamForApplication (const ULWord inAppType, const int32_t inProcessID) |
Reserves exclusive use of the AJA device for a given process, preventing other processes on the host from acquiring it until subsequently released. More... | |
virtual bool | ReleaseStreamForApplication (const ULWord inAppType, const int32_t inProcessID) |
Releases exclusive use of the AJA device for the given process, permitting other processes to acquire it. More... | |
virtual bool | SetStreamingApplication (const ULWord inAppType, const int32_t inProcessID) |
Sets the four-CC type and process ID of the application that should "own" the AJA device (i.e. reserve it for exclusive use). More... | |
virtual bool | GetStreamingApplication (ULWord &outAppType, int32_t &outProcessID) |
Answers with the four-CC type and process ID of the application that currently "owns" the AJA device (i.e. reserved it for exclusive use). More... | |
virtual bool | GetRecordedRegisterWrites (NTV2RegisterWrites &outRegWrites) const |
Answers with the recorded register writes. More... | |
virtual bool | StartRecordRegisterWrites (const bool inSkipActualWrites=(0)) |
Starts recording all WriteRegister calls. More... | |
virtual bool | IsRecordingRegisterWrites (void) const |
virtual bool | StopRecordRegisterWrites (void) |
Stops recording all WriteRegister calls. More... | |
virtual bool | PauseRecordRegisterWrites (void) |
Pauses recording WriteRegister calls. More... | |
virtual bool | ResumeRecordRegisterWrites (void) |
Resumes recording WriteRegister calls (after a prior call to PauseRecordRegisterWrites). More... | |
virtual ULWord | GetNumRecordedRegisterWrites (void) const |
CNTV2DriverInterface () | |
My default constructor. More... | |
virtual | ~CNTV2DriverInterface () |
My destructor. More... | |
Protected Member Functions | |
virtual bool | OpenLocalPhysical (const UWord inDeviceIndex) |
Opens the local/physical device connection. More... | |
virtual bool | CloseLocalPhysical (void) |
Releases host resources associated with the local/physical device connection. More... | |
Protected Member Functions inherited from CNTV2DriverInterface | |
virtual bool | OpenRemote (const std::string &inURLSpec) |
Peforms the housekeeping details of opening the specified local, remote or software device. More... | |
virtual bool | CloseRemote (void) |
Releases host resources associated with the remote/special device connection. More... | |
virtual bool | ParseFlashHeader (BITFILE_INFO_STRUCT &outBitfileInfo) |
virtual bool | GetBoolParam (const ULWord inParamID, ULWord &outValue) |
virtual bool | GetNumericParam (const ULWord inParamID, ULWord &outValue) |
virtual bool | GetRegInfoForBoolParam (const NTV2BoolParamID inParamID, NTV2RegInfo &outRegInfo) |
Answers with the NTV2RegInfo of the register associated with the given boolean (i.e., "Can Do") device feature. More... | |
virtual bool | GetRegInfoForNumericParam (const NTV2NumericParamID inParamID, NTV2RegInfo &outRegInfo) |
Answers with the NTV2RegInfo of the register associated with the given numeric (i.e., "Get Num") device feature. More... | |
virtual void | BumpEventCount (const INTERRUPT_ENUMS eInterruptType) |
Atomically increments the event count tally for the given interrupt type. More... | |
virtual void | FinishOpen (void) |
Initializes my member variables after a successful Open. More... | |
virtual bool | ReadFlashULWord (const ULWord inAddress, ULWord &outValue, const ULWord inRetryCount=1000) |
Additional Inherited Members | |
Static Public Member Functions inherited from CNTV2DriverInterface | |
static NTV2StringList | GetLegalSchemeNames (void) |
static void | SetShareMode (const bool inSharedMode) |
Specifies if subsequent Open calls should open the device in shared mode or not. More... | |
static bool | GetShareMode (void) |
static void | SetOverlappedMode (const bool inOverlapMode) |
Specifies if the next Open call should try to open the device in overlapped mode or not. More... | |
static bool | GetOverlappedMode (void) |
Protected Types inherited from CNTV2DriverInterface | |
typedef std::vector< ULWord > | _EventCounts |
typedef std::vector< PULWord > | _EventHandles |
BareMetal implementation of CNTV2DriverInterface.
Definition at line 25 of file ntv2baremetaldriverinterface.h.
CNTV2BareMetalDriverInterface::CNTV2BareMetalDriverInterface | ( | ) |
Definition at line 41 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 54 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Sends an AutoCirculate command to the NTV2 driver.
pAutoCircData | Points to the AUTOCIRCULATE_DATA that contains the AutoCirculate API command and parameters. |
Reimplemented from CNTV2DriverInterface.
Definition at line 844 of file ntv2baremetaldriverinterface.cpp.
|
protectedvirtual |
Releases host resources associated with the local/physical device connection.
Reimplemented from CNTV2DriverInterface.
Definition at line 99 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Reimplemented from CNTV2DriverInterface.
Definition at line 177 of file ntv2baremetaldriverinterface.cpp.
|
inlinevirtual |
Reimplemented from CNTV2DriverInterface.
Definition at line 66 of file ntv2baremetaldriverinterface.h.
|
virtual |
Reimplemented from CNTV2DriverInterface.
Definition at line 292 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1295 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1336 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1418 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Transfers data between the AJA device and the host. This function will block and not return to the caller until the transfer has finished or failed.
[in] | inDMAEngine | Specifies the device DMA engine to use. Use NTV2_DMA_FIRST_AVAILABLE for most applications. (Use the NTV2DeviceGetNumDMAEngines function to determine how many are available.) |
[in] | inIsRead | Specifies the transfer direction. Use 'true' for reading (device-to-host). Use 'false' for writing (host-to-device). |
[in] | inFrameNumber | Specifies the zero-based frame number of the starting frame to be transferred to/from the device. |
pFrameBuffer | Specifies a valid, non-NULL address of the host buffer. If reading (device-to-host), this memory will be written into. If writing (host-to-device), this memory will be read from. | |
[in] | inCardOffsetBytes | Specifies the byte offset into the device frame buffer where the data transfer will start. |
[in] | inTotalByteCount | Specifies the total number of bytes to be transferred. |
[in] | inSynchronous | This parameter is obsolete, and ignored. |
Reimplemented from CNTV2DriverInterface.
Definition at line 598 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Transfers data in segments between the AJA device and the host. This function will block and not return to the caller until the transfer has finished or failed.
[in] | inDMAEngine | Specifies the device DMA engine to use. Use NTV2_DMA_FIRST_AVAILABLE for most applications. (Use the NTV2DeviceGetNumDMAEngines function to determine how many are available.) |
[in] | inIsRead | Specifies the transfer direction. Use 'true' for reading (device-to-host). Use 'false' for writing (host-to-device). |
[in] | inFrameNumber | Specifies the zero-based frame number of the starting frame to be transferred to/from the device. |
pFrameBuffer | Specifies a valid, non-NULL address of the host buffer. If reading (device-to-host), this memory will be written into. If writing (host-to-device), this memory will be read from. | |
[in] | inCardOffsetBytes | Specifies the byte offset into the device frame buffer where the data transfer will start. |
[in] | inTotalByteCount | Specifies the total number of bytes to be transferred. |
[in] | inNumSegments | Specifies the number of segments to transfer. Note that this determines the number of bytes per segment (by dividing into inTotalByteCount). |
[in] | inHostPitchPerSeg | Specifies the number of bytes to increment the host memory pointer after each segment is transferred. |
[in] | inCardPitchPerSeg | Specifies the number of bytes to increment the on-device memory pointer after each segment is transferred. |
[in] | inSynchronous | This parameter is obsolete, and ignored. |
Reimplemented from CNTV2DriverInterface.
Definition at line 687 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Reimplemented from CNTV2DriverInterface.
Definition at line 772 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1222 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1258 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1370 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1205 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 464 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 469 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 474 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 479 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1161 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1114 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1119 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Answers with the number of interrupts of the given type processed by the driver.
[in] | eInterrupt | The interrupt type of interest. |
[out] | outCount | Receives the count value. |
Reimplemented from CNTV2DriverInterface.
Definition at line 199 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Sends an HEVC message to the NTV2 driver.
pMessage | Points to the HevcMessageHeader that contains the HEVC message. |
Reimplemented from CNTV2DriverInterface.
Definition at line 1094 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1127 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 537 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 335 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 411 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 484 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Sends a message to the NTV2 driver (the new, improved, preferred way).
pInMessage | Points to the message to pass to the driver. Valid messages start with an NTV2_HEADER and end with an NTV2_TRAILER. |
Reimplemented from CNTV2DriverInterface.
Definition at line 1075 of file ntv2baremetaldriverinterface.cpp.
|
protectedvirtual |
Opens the local/physical device connection.
Reimplemented from CNTV2DriverInterface.
Definition at line 65 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device. Using the optional mask and shift parameters, it's possible to read any number of specific bits in a register while ignoring the register's other bits.
[in] | inRegNum | Specifies the register number of interest. |
[out] | outValue | Receives the register value obtained from the device. |
[in] | inMask | Optionally specifies a bit mask to be applied after reading the device register. Zero and 0xFFFFFFFF masks are ignored. Defaults to 0xFFFFFFFF (no masking). |
[in] | inShift | Optionally specifies the number of bits to right-shift the value obtained from the device register after the mask has been applied. Defaults to zero (no shift). |
Reimplemented from CNTV2DriverInterface.
Definition at line 127 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Reimplemented from CNTV2DriverInterface.
Definition at line 157 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1200 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 312 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 1175 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 574 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 386 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 450 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Definition at line 520 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Reimplemented from CNTV2DriverInterface.
Definition at line 265 of file ntv2baremetaldriverinterface.cpp.
|
virtual |
Updates or replaces all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device. Using the optional mask and shift parameters, it's possible to set or clear any number of specific bits in a real register without altering any of the register's other bits.
[in] | inRegNum | Specifies the register number of interest. |
[in] | inValue | Specifies the desired new register value. If the "inShift" parameter is non-zero, this value is shifted left by the designated number of bit positions before being masked and applied to the real register contents. |
[in] | inMask | Optionally specifies a bit mask to be applied to the new (shifted) value before updating the register. Defaults to 0xFFFFFFFF, which does not perform any masking. On Windows and MacOS, a zero mask is treated the same as 0xFFFFFFFF. |
[in] | inShift | Optionally specifies the number of bits to left-shift the specified value before applying it to the register. Defaults to zero, which does not perform any shifting. On MacOS, this parameter is ignored. On Windows, a shift value of 0xFFFFFFFF is treated the same as a zero shift value. |
Reimplemented from CNTV2DriverInterface.
Definition at line 141 of file ntv2baremetaldriverinterface.cpp.
|
protected |
Definition at line 135 of file ntv2baremetaldriverinterface.h.
|
protected |
Definition at line 137 of file ntv2baremetaldriverinterface.h.
|
protected |
Definition at line 138 of file ntv2baremetaldriverinterface.h.
|
protected |
Definition at line 131 of file ntv2baremetaldriverinterface.h.
|
protected |
Definition at line 132 of file ntv2baremetaldriverinterface.h.
|
protected |
Definition at line 134 of file ntv2baremetaldriverinterface.h.
|
protected |
Definition at line 136 of file ntv2baremetaldriverinterface.h.