AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2nubaccess.h File Reference

Declares NTV2 "nub" client functions. More...

#include "ntv2utils.h"
#include <string>
#include <vector>
#include <map>
Include dependency graph for ntv2nubaccess.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  NTV2Dictionary
 A simple set of zero or more key/value pairs. (New in SDK 16.3) More...
 
class  NTV2DeviceSpecParser
 One-stop shop for parsing device specifications. (New in SDK 16.3) I do very little in the way of validating semantics. I simply do the parsing and provide the information needed to connect to local or remote devices, real or fake. More...
 
class  NTV2RPCClientAPI
 Base class of objects that can connect to, and operate remote or fake devices. I have three general API groups: More...
 
class  NTV2RPCServerAPI
 Base class of objects that can serve device operation RPCs with NTV2RPCClientAPI instances. More...
 

Typedefs

typedef std::pair< NTV2DeviceID, ULWord64NTV2DeviceIDSerialPair
 Identifies a device by its NTV2DeviceID and serial number. More...
 
typedef std::vector< NTV2DeviceIDSerialPairNTV2DeviceIDSerialPairs
 An ordered sequence of NTV2DeviceIDSerialPairs. More...
 
typedef NTV2DeviceIDSerialPairs::iterator NTV2DeviceIDSerialPairsIter
 
typedef NTV2DeviceIDSerialPairs::const_iterator NTV2DeviceIDSerialPairsConstIter
 
typedef NTV2Dictionary NTV2Dict
 
typedef NTV2Dictionary NTV2ConnectParams
 A dictionary of parameters used to connect to remote/fake devices. More...
 
typedef NTV2Dictionary NTV2ConfigParams
 A dictionary of parameters used to configure an RPC server. More...
 
typedef std::pair< std::string, std::string > NTV2DictionaryEntry
 
typedef std::pair< std::string, std::string > NTV2DictEntry
 
typedef std::pair< std::string, std::string > NTV2ConnectParam
 A parameter used to connect to remote/fake devices. More...
 
typedef NTV2RPCClientAPI NTV2RPCAPI
 
typedef NTV2RPCClientAPI *(* fpCreateClient) (void *, const NTV2ConnectParams &, const uint32_t)
 Instantiates a new client instance to talk to a remote server. More...
 
typedef NTV2RPCServerAPI *(* fpCreateServer) (void *, const NTV2ConfigParams &, const uint32_t)
 Instantiates a new server instance for talking to clients. More...
 
typedef NTV2RPCAPI *(* fpCreateNTV2SoftwareDevice) (void *, const std::string &, const uint32_t)
 

Functions

static const std::string kConnectParamScheme ("Scheme")
 URL scheme. More...
 
static const std::string kConnectParamHost ("Host")
 DNS name, IPv4 or sw device DLL name. More...
 
static const std::string kConnectParamPort ("Port")
 Port number (optional) More...
 
static const std::string kConnectParamDevIndex ("DeviceIndex")
 Device having this index number. More...
 
static const std::string kConnectParamDevSerial ("DeviceSerial")
 Device with this serial number. More...
 
static const std::string kConnectParamDevModel ("DeviceModel")
 First device of this model (e.g. 'kona4') More...
 
static const std::string kConnectParamDevID ("DeviceID")
 First device having this ID (e.g. '0x10518400') More...
 
static const std::string kConnectParamResource ("ResourcePath")
 Resource path – everything past URL [scheme://host[:port]/], excluding [?query]. More...
 
static const std::string kConnectParamQuery ("Query")
 Query – everything past '?' in URL. More...
 
static const std::string kLegalSchemeNTV2 ("ntv2")
 
static const std::string kLegalSchemeNTV2Local ("ntv2local")
 
static const std::string kFuncNameCreateClient ("CreateClient")
 Create an NTV2RPCClientAPI instance. More...
 
static const std::string kFuncNameCreateServer ("CreateServer")
 Create an NTV2RPCServerAPI instance. More...
 
std::ostream & operator<< (std::ostream &oss, const NTV2Dictionary &inDict)
 
std::ostream & operator<< (std::ostream &oss, const NTV2RPCClientAPI &inObj)
 
std::ostream & operator<< (std::ostream &oss, const NTV2RPCServerAPI &inObj)
 

Detailed Description

Declares NTV2 "nub" client functions.

Definition in file ntv2nubaccess.h.

Typedef Documentation

◆ fpCreateClient

typedef NTV2RPCClientAPI*(* fpCreateClient) (void *, const NTV2ConnectParams &, const uint32_t)

Instantiates a new client instance to talk to a remote server.

The scheme specified in a device specifier URL identifies the dynamically-loaded library to load in order to provide a requested NTV2RPCClientAPI or NTV2RPCServerAPI. These are the functions the library must provide that instantiate the client or server instance.

  • pDLLHandle: A pointer to the DLL/dylib/so handle.
  • inParams: A const reference to the NTV2ConnectParams that specify the "what" and "how" the new client should access the server device.
  • inHostSDKVersion: Specifies the NTV2 SDK version the caller was compiled with.
    Returns
    A pointer to the new client instance if successful, or nullptr (zero) upon failure.

Definition at line 353 of file ntv2nubaccess.h.

◆ fpCreateNTV2SoftwareDevice

typedef NTV2RPCAPI*(* fpCreateNTV2SoftwareDevice) (void *, const std::string &, const uint32_t)

Definition at line 366 of file ntv2nubaccess.h.

◆ fpCreateServer

typedef NTV2RPCServerAPI*(* fpCreateServer) (void *, const NTV2ConfigParams &, const uint32_t)

Instantiates a new server instance for talking to clients.

  • pDLLHandle: A pointer to the DLL/dylib/so handle.
  • inParams: A const reference to the NTV2ConfigParams that specify how to configure the server.
  • inHostSDKVersion: Specifies the NTV2 SDK version the caller was compiled with.
    Returns
    A pointer to the new server instance if successful, or nullptr (zero) upon failure.
    Note
    Do not implement this function if a server implementation is not required.

Definition at line 363 of file ntv2nubaccess.h.

◆ NTV2ConfigParams

A dictionary of parameters used to configure an RPC server.

Definition at line 83 of file ntv2nubaccess.h.

◆ NTV2ConnectParam

typedef std::pair<std::string, std::string> NTV2ConnectParam

A parameter used to connect to remote/fake devices.

Definition at line 84 of file ntv2nubaccess.h.

◆ NTV2ConnectParams

A dictionary of parameters used to connect to remote/fake devices.

Definition at line 82 of file ntv2nubaccess.h.

◆ NTV2DeviceIDSerialPair

Identifies a device by its NTV2DeviceID and serial number.

Definition at line 17 of file ntv2nubaccess.h.

◆ NTV2DeviceIDSerialPairs

An ordered sequence of NTV2DeviceIDSerialPairs.

Definition at line 18 of file ntv2nubaccess.h.

◆ NTV2DeviceIDSerialPairsConstIter

typedef NTV2DeviceIDSerialPairs::const_iterator NTV2DeviceIDSerialPairsConstIter

Definition at line 20 of file ntv2nubaccess.h.

◆ NTV2DeviceIDSerialPairsIter

typedef NTV2DeviceIDSerialPairs::iterator NTV2DeviceIDSerialPairsIter

Definition at line 19 of file ntv2nubaccess.h.

◆ NTV2Dict

Definition at line 81 of file ntv2nubaccess.h.

◆ NTV2DictEntry

typedef std::pair<std::string, std::string> NTV2DictEntry

Definition at line 84 of file ntv2nubaccess.h.

◆ NTV2DictionaryEntry

typedef std::pair<std::string, std::string> NTV2DictionaryEntry

Definition at line 84 of file ntv2nubaccess.h.

◆ NTV2RPCAPI

Definition at line 273 of file ntv2nubaccess.h.

Function Documentation

◆ kConnectParamDevID()

static const std::string kConnectParamDevID ( "DeviceID"  )
static

First device having this ID (e.g. '0x10518400')

◆ kConnectParamDevIndex()

static const std::string kConnectParamDevIndex ( "DeviceIndex"  )
static

Device having this index number.

◆ kConnectParamDevModel()

static const std::string kConnectParamDevModel ( "DeviceModel"  )
static

First device of this model (e.g. 'kona4')

◆ kConnectParamDevSerial()

static const std::string kConnectParamDevSerial ( "DeviceSerial"  )
static

Device with this serial number.

◆ kConnectParamHost()

static const std::string kConnectParamHost ( "Host"  )
static

DNS name, IPv4 or sw device DLL name.

◆ kConnectParamPort()

static const std::string kConnectParamPort ( "Port"  )
static

Port number (optional)

◆ kConnectParamQuery()

static const std::string kConnectParamQuery ( "Query"  )
static

Query – everything past '?' in URL.

◆ kConnectParamResource()

static const std::string kConnectParamResource ( "ResourcePath"  )
static

Resource path – everything past URL [scheme://host[:port]/], excluding [?query].

◆ kConnectParamScheme()

static const std::string kConnectParamScheme ( "Scheme"  )
static

URL scheme.

◆ kFuncNameCreateClient()

static const std::string kFuncNameCreateClient ( "CreateClient"  )
static

Create an NTV2RPCClientAPI instance.

◆ kFuncNameCreateServer()

static const std::string kFuncNameCreateServer ( "CreateServer"  )
static

Create an NTV2RPCServerAPI instance.

◆ kLegalSchemeNTV2()

static const std::string kLegalSchemeNTV2 ( "ntv2"  )
static

◆ kLegalSchemeNTV2Local()

static const std::string kLegalSchemeNTV2Local ( "ntv2local"  )
static

◆ operator<<() [1/3]

std::ostream& operator<< ( std::ostream &  oss,
const NTV2Dictionary inDict 
)
inline

Definition at line 86 of file ntv2nubaccess.h.

◆ operator<<() [2/3]

std::ostream& operator<< ( std::ostream &  oss,
const NTV2RPCClientAPI inObj 
)
inline

Definition at line 275 of file ntv2nubaccess.h.

◆ operator<<() [3/3]

std::ostream& operator<< ( std::ostream &  oss,
const NTV2RPCServerAPI inObj 
)
inline

Definition at line 337 of file ntv2nubaccess.h.