FrontPanel API 5.3.6
Loading...
Searching...
No Matches
OpalKelly Namespace Reference

Namespace containing public Opal Kelly functions and classes. More...

Classes

class  Buffer
 Fixed size buffer used for passing data to/from script functions. More...
 
class  FrontPanelDevices
 Allows to iterate over and open all devices available in the given realm. More...
 
class  FrontPanelManager
 Class for managing device connections and disconnections. More...
 
class  ProgressCallback
 Allows to receive progress notifications during FPGA configuration. More...
 
class  ScriptEngine
 Allows to load scripts and run functions defined in them. More...
 
class  ScriptValue
 Represents a value passed to a scripting function or returned from it. More...
 
class  ScriptValues
 A collection of script values. More...
 

Typedefs

typedef std::unique_ptr< okCFrontPanelFrontPanelPtr
 Typedef for a smart pointer to okCFrontPanel.
 

Functions

int GetAPIVersionMajor ()
 Return the major version of FrontPanel actually used.
 
int GetAPIVersionMinor ()
 Return the minor version of FrontPanel actually used.
 
int GetAPIVersionMicro ()
 Return the micro version of FrontPanel actually used.
 
const char * GetAPIVersionString ()
 Return the version of FrontPanel actually used as a string.
 
bool CheckAPIVersion (int major, int minor, int micro)
 Check if FrontPanel version used during run-time is at least the given one.
 
FrontPanel::ErrorCode FrontPanelEmulateTestDeviceConnection (const std::string &serial, bool connect)
 Connect/disconnect a device to FrontPanelManager created with a test realm.
 

Detailed Description

Notice that earlier versions of the library used classes outside of this namespace but with "okC" prefix. These classes still exist for compatibility, but you are encouraged to use the classes in OpalKelly namespace in any new code.

Function Documentation

◆ CheckAPIVersion()

bool OpalKelly::CheckAPIVersion ( int major,
int minor,
int micro )

A call to this function would normally be done inside a check for OK_CHECK_API_VERSION() as otherwise the code guarded by it might not compile when using older library versions, so a typical example of its use would look like the following:

#if OK_CHECK_API_VERSION(5, 2, 0)
... use the new function ...
} else {
... maybe complain about the library being too old ...
}
#else
... maybe fall back to something else ...
#endif
bool CheckAPIVersion(int major, int minor, int micro)
Check if FrontPanel version used during run-time is at least the given one.
See also
GetAPIVersionMajor(), GetAPIVersionMinor(), GetAPIVersionMicro()

◆ FrontPanelEmulateTestDeviceConnection()

FrontPanel::ErrorCode OpalKelly::FrontPanelEmulateTestDeviceConnection ( const std::string & serial,
bool connect )
inline

Connect/disconnect a device to FrontPanelManager created with okREALM_TEST for debug and test purposes. This function fires OnDeviceAdded/OnDeviceRemoved from the thread where it was called (can be different from the thread where EnterMonitorLoop() is currently running).

Parameters
serialThe serial number of the emulated device.
connectWhether to call OnDeviceAdded or OnDeviceRemoved.
Returns
NoError - Operation completed successfully.
InvalidParameter - The serial is empty string.
Failed - The device was not added/removed because there is no one test manager or device already exists/removed.

◆ GetAPIVersionMajor()

int OpalKelly::GetAPIVersionMajor ( )

Major version is the first version component, e.g. for FrontPanel 4.5.7 the major version is 4.

See also
OK_API_VERSION_MAJOR, GetAPIVersionMinor(), GetAPIVersionMicro(), CheckAPIVersion()

◆ GetAPIVersionMicro()

int OpalKelly::GetAPIVersionMicro ( )

Micro version is the first version component, e.g. for FrontPanel 4.5.7 the micro version is 7.

See also
OK_API_VERSION_MICRO, GetAPIVersionMajor(), GetAPIVersionMinor(), CheckAPIVersion()

◆ GetAPIVersionMinor()

int OpalKelly::GetAPIVersionMinor ( )

Minor version is the first version component, e.g. for FrontPanel 4.5.7 the minor version is 5.

See also
OK_API_VERSION_MINOR, GetAPIVersionMajor(), GetAPIVersionMicro(), CheckAPIVersion()

◆ GetAPIVersionString()

const char * OpalKelly::GetAPIVersionString ( )

This string is composed of dot-separated major, minor and micro version numbers, e.g. "4.5.7" for FrontPanel 4.5.7.

See also
OK_API_VERSION_STRING, GetAPIVersionMajor(), GetAPIVersionMinor(), GetAPIVersionMicro()

Copyright (c) 2005-2024 Opal Kelly Incorporated