AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
AJAPnp Class Reference

This is a platform-agnostic plug-and-play class that notifies a client when AJA devices are attached/detached, powered on/off, sleep/wake, etc. More...

#include <pnp.h>

Public Member Functions

 AJAPnp ()
 Default constructor. More...
 
virtual ~AJAPnp ()
 Default destructor. More...
 
virtual AJAStatus Install (AJAPnpCallback pInCallback, void *inRefCon=NULL, uint32_t inDeviceMask=0xFFFFFFFF)
 Installs the given plug & play notification callback function, replacing any callback function that may have been installed earlier. More...
 
virtual AJAPnpCallback GetCallback () const
 
virtual AJAStatus Uninstall ()
 Uninstalls any previously-installed callback notifier. More...
 
virtual void * GetRefCon () const
 
virtual uint32_t GetPnpDevices () const
 

Detailed Description

This is a platform-agnostic plug-and-play class that notifies a client when AJA devices are attached/detached, powered on/off, sleep/wake, etc.

Definition at line 50 of file pnp.h.

Constructor & Destructor Documentation

◆ AJAPnp()

AJAPnp::AJAPnp ( )

Default constructor.

Definition at line 25 of file pnp.cpp.

◆ ~AJAPnp()

AJAPnp::~AJAPnp ( )
virtual

Default destructor.

Definition at line 31 of file pnp.cpp.

Member Function Documentation

◆ GetCallback()

AJAPnpCallback AJAPnp::GetCallback ( ) const
virtual
Returns
the address of the currently-installed callback (NULL if none installed).

Definition at line 52 of file pnp.cpp.

◆ GetPnpDevices()

uint32_t AJAPnp::GetPnpDevices ( ) const
virtual
Returns
the current bit mask that filters which devices to include or ignore (see implementation).

Definition at line 66 of file pnp.cpp.

◆ GetRefCon()

void * AJAPnp::GetRefCon ( ) const
virtual
Returns
the currently installed reference cookie.

Definition at line 59 of file pnp.cpp.

◆ Install()

AJAStatus AJAPnp::Install ( AJAPnpCallback  pInCallback,
void *  inRefCon = NULL,
uint32_t  inDeviceMask = 0xFFFFFFFF 
)
virtual

Installs the given plug & play notification callback function, replacing any callback function that may have been installed earlier.

Parameters
[in]pInCallbackSpecifies a valid (non-NULL) pointer to a client-defined function to be called when AJA devices are attached/detached to/from the host.
[in]inRefConOptionally specifies a pointer-sized reference value that gets passed to the callback function. Defaults to zero.
[in]inDeviceMaskOptionally specifies a bit mask that filters the types of devices to include/ignore (see AJAPnpDevice). Defaults to no filtering (i.e. notify for any/all device types).
Note
On macOS, the callback function is immediately called for each currently-attached matching device.
Bug:
macOS: doesn't work on programs that don't provide a run loop.
Bug:
Windows: doesn't work if the calling process is a Windows service.
Returns
AJA_STATUS_SUCCESS Install succeeded AJA_STATUS_FAIL Install failed

Definition at line 38 of file pnp.cpp.

◆ Uninstall()

AJAStatus AJAPnp::Uninstall ( )
virtual

Uninstalls any previously-installed callback notifier.

Returns
AJA_STATUS_SUCCESS Uninstall succeeded AJA_STATUS_FAIL Uninstall failed

Definition at line 45 of file pnp.cpp.


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