AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
CNTV2SerialControl Class Reference

This sample class demonstrates how to use the Corvid/Kona/Io UART RS422 port(s). It is NOT intended to be an extensive machine control implementation. More...

#include <ntv2serialcontrol.h>

Inheritance diagram for CNTV2SerialControl:
[legend]
Collaboration diagram for CNTV2SerialControl:
[legend]

Public Member Functions

 CNTV2SerialControl (const UWord inDeviceIndex=0, const UWord inSerialPortIndexNum=0)
 
virtual ~CNTV2SerialControl ()
 
virtual bool Open (void)
 
virtual void Close (void)
 
virtual ULWord Play (void)
 
virtual ULWord ReversePlay (void)
 
virtual ULWord Stop (void)
 
virtual ULWord FastForward (void)
 
virtual ULWord Rewind (void)
 
virtual ULWord AdvanceFrame (void)
 
virtual ULWord BackFrame (void)
 
virtual ULWord GotoFrameByHMS (UByte inHrs, UByte inMins, UByte inSecs, UByte inFrames)
 
virtual ULWord GetTimecodeString (SByte *timecodeString)
 
virtual const SerialMachineResponseGetLastResponse (void) const
 
virtual bool WriteCommand (const UByte *txBuffer, bool response=(!(0)))
 
virtual bool WriteTxBuffer (const UByte *txBuffer, UWord length)
 
virtual bool ReadRxBuffer (UByte *rxBuffer, UWord &actualLength, UWord maxlength)
 
virtual bool GotACK (void)
 
virtual bool WaitForRxInterrupt (void)
 
virtual bool WaitForTxInterrupt (void)
 
- Public Member Functions inherited from CBaseMachineControl
 CBaseMachineControl ()
 
virtual ~CBaseMachineControl ()
 
virtual ULWord GotoFrameByString (SByte *pInFrameString)
 
virtual ULWord GotoFrame (ULWord inFrameNumber)
 
virtual ULWord RecordAtFrame (ULWord inFrameNumber)
 
virtual ULWord Loop (ULWord inStartFrameNumber, ULWord inEndFrameNumber)
 
virtual ControlType GetControlType (void) const
 

Protected Attributes

CNTV2Card _ntv2Card
 
SerialMachineResponse _serialMachineResponse
 
RegisterNum _controlRegisterNum
 Which UART control register to use: kRegRS422Control (72) or kRegRS4222Control (246) More...
 
RegisterNum _receiveRegisterNum
 Which UART receive data register to use: kRegRS422Receive (71) or kRegRS4222Receive (245) More...
 
RegisterNum _transmitRegisterNum
 Which UART transmit data register to use: kRegRS422Transmit (70) or kRegRS4222Transmit (244) More...
 
- Protected Attributes inherited from CBaseMachineControl
ControlType _controlType
 

Additional Inherited Members

- Public Types inherited from CBaseMachineControl
enum  ControlType {
  CONTROLTYPE_DDR, CONTROLTYPE_XVID, CONTROLTYPE_NTV2, CONTROLTYPE_SERIAL,
  CONTROLTYPE_INVALID
}
 
enum  ControUnimplemented { CONTROL_UNIMPLEMENTED = 0xFFFFFFFF }
 

Detailed Description

This sample class demonstrates how to use the Corvid/Kona/Io UART RS422 port(s). It is NOT intended to be an extensive machine control implementation.

Note
This class is not thread safe.
Currently assumes a 30fps frame rate.

Definition at line 32 of file ntv2serialcontrol.h.

Constructor & Destructor Documentation

◆ CNTV2SerialControl()

CNTV2SerialControl::CNTV2SerialControl ( const UWord  inDeviceIndex = 0,
const UWord  inSerialPortIndexNum = 0 
)
explicit

Definition at line 26 of file ntv2serialcontrol.cpp.

◆ ~CNTV2SerialControl()

CNTV2SerialControl::~CNTV2SerialControl ( )
virtual

Definition at line 65 of file ntv2serialcontrol.cpp.

Member Function Documentation

◆ AdvanceFrame()

ULWord CNTV2SerialControl::AdvanceFrame ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 118 of file ntv2serialcontrol.cpp.

◆ BackFrame()

ULWord CNTV2SerialControl::BackFrame ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 154 of file ntv2serialcontrol.cpp.

◆ Close()

virtual void CNTV2SerialControl::Close ( void  )
inlinevirtual

Implements CBaseMachineControl.

Definition at line 42 of file ntv2serialcontrol.h.

◆ FastForward()

ULWord CNTV2SerialControl::FastForward ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 104 of file ntv2serialcontrol.cpp.

◆ GetLastResponse()

virtual const SerialMachineResponse& CNTV2SerialControl::GetLastResponse ( void  ) const
inlinevirtual

Definition at line 54 of file ntv2serialcontrol.h.

◆ GetTimecodeString()

ULWord CNTV2SerialControl::GetTimecodeString ( SByte timecodeString)
virtual

Reimplemented from CBaseMachineControl.

Definition at line 193 of file ntv2serialcontrol.cpp.

◆ GotACK()

bool CNTV2SerialControl::GotACK ( void  )
virtual

Definition at line 328 of file ntv2serialcontrol.cpp.

◆ GotoFrameByHMS()

ULWord CNTV2SerialControl::GotoFrameByHMS ( UByte  inHrs,
UByte  inMins,
UByte  inSecs,
UByte  inFrames 
)
virtual

Reimplemented from CBaseMachineControl.

Definition at line 229 of file ntv2serialcontrol.cpp.

◆ Open()

virtual bool CNTV2SerialControl::Open ( void  )
inlinevirtual

Implements CBaseMachineControl.

Definition at line 41 of file ntv2serialcontrol.h.

◆ Play()

ULWord CNTV2SerialControl::Play ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 83 of file ntv2serialcontrol.cpp.

◆ ReadRxBuffer()

bool CNTV2SerialControl::ReadRxBuffer ( UByte rxBuffer,
UWord actualLength,
UWord  maxlength 
)
virtual

Definition at line 360 of file ntv2serialcontrol.cpp.

◆ ReversePlay()

ULWord CNTV2SerialControl::ReversePlay ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 90 of file ntv2serialcontrol.cpp.

◆ Rewind()

ULWord CNTV2SerialControl::Rewind ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 111 of file ntv2serialcontrol.cpp.

◆ Stop()

ULWord CNTV2SerialControl::Stop ( void  )
virtual

Reimplemented from CBaseMachineControl.

Definition at line 97 of file ntv2serialcontrol.cpp.

◆ WaitForRxInterrupt()

bool CNTV2SerialControl::WaitForRxInterrupt ( void  )
virtual

Definition at line 384 of file ntv2serialcontrol.cpp.

◆ WaitForTxInterrupt()

bool CNTV2SerialControl::WaitForTxInterrupt ( void  )
virtual

Definition at line 393 of file ntv2serialcontrol.cpp.

◆ WriteCommand()

bool CNTV2SerialControl::WriteCommand ( const UByte txBuffer,
bool  response = (! (0) ) 
)
virtual

Definition at line 250 of file ntv2serialcontrol.cpp.

◆ WriteTxBuffer()

bool CNTV2SerialControl::WriteTxBuffer ( const UByte txBuffer,
UWord  length 
)
virtual

Definition at line 344 of file ntv2serialcontrol.cpp.

Member Data Documentation

◆ _controlRegisterNum

RegisterNum CNTV2SerialControl::_controlRegisterNum
protected

Which UART control register to use: kRegRS422Control (72) or kRegRS4222Control (246)

Definition at line 70 of file ntv2serialcontrol.h.

◆ _ntv2Card

CNTV2Card CNTV2SerialControl::_ntv2Card
protected

Definition at line 68 of file ntv2serialcontrol.h.

◆ _receiveRegisterNum

RegisterNum CNTV2SerialControl::_receiveRegisterNum
protected

Which UART receive data register to use: kRegRS422Receive (71) or kRegRS4222Receive (245)

Definition at line 71 of file ntv2serialcontrol.h.

◆ _serialMachineResponse

SerialMachineResponse CNTV2SerialControl::_serialMachineResponse
protected

Definition at line 69 of file ntv2serialcontrol.h.

◆ _transmitRegisterNum

RegisterNum CNTV2SerialControl::_transmitRegisterNum
protected

Which UART transmit data register to use: kRegRS422Transmit (70) or kRegRS4222Transmit (244)

Definition at line 72 of file ntv2serialcontrol.h.


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