FrontPanel API 5.3.6
Loading...
Searching...
No Matches
Version-related Macros

Macros

#define OK_API_VERSION_MAJOR   5
 Major version of FrontPanel the application was compiled with.
 
#define OK_API_VERSION_MINOR   3
 Minor version of FrontPanel the application was compiled with.
 
#define OK_API_VERSION_MICRO   6
 Micro version of FrontPanel the application was compiled with.
 
#define OK_API_VERSION_STRING   "5.3.6"
 FrontPanel API version the application was compiled with in string form.
 
#define OK_CHECK_API_VERSION(major, minor, micro)
 Check if FrontPanel version used during compilation is at least the given one.
 

Detailed Description

Macro Definition Documentation

◆ OK_API_VERSION_MAJOR

#define OK_API_VERSION_MAJOR   5

Major version is the first version component, e.g. for FrontPanel 5.3.6 the major version is 5.

Notice that the version actually used during run-time, as returned by OpalKelly::GetAPIVersionMajor(), may be different, e.g. if a newer but compatible version of the library is used.

Note: Two versions of this functions are exported to other APIs for compatibility purposes. Using the member function is preferred.

# Python:
import ok
print(ok.GetAPIVersionMajor()) # global function
print(ok.okCFrontPanel.GetAPIVersionMajor()) # member function
See also
OK_API_VERSION_MINOR, OK_API_VERSION_MICRO, OK_CHECK_API_VERSION()

◆ OK_API_VERSION_MICRO

#define OK_API_VERSION_MICRO   6

Micro version is the third version component, e.g. for FrontPanel 5.3.6 the major version is 6.

Notice that the version actually used during run-time, as returned by OpalKelly::GetAPIVersionMicro(), may be different, e.g. if a newer but compatible version of the library is used.

Note: Two versions of this functions are exported to other APIs for compatibility purposes. Using the member function is preferred.

# Python:
import ok
print(ok.GetAPIVersionMicro()) # global function
print(ok.okCFrontPanel.GetAPIVersionMicro()) # member function
See also
OK_API_VERSION_MAJOR, OK_API_VERSION_MINOR, OK_CHECK_API_VERSION()

◆ OK_API_VERSION_MINOR

#define OK_API_VERSION_MINOR   3

Minor version is the second version component, e.g. for FrontPanel 5.3.6 the major version is 5.

Notice that the version actually used during run-time, as returned by OpalKelly::GetAPIVersionMinor(), may be different, e.g. if a newer but compatible version of the library is used.

Note: Two versions of this functions are exported to other APIs for compatibility purposes. Using the member function is preferred.

# Python:
import ok
print(ok.GetAPIVersionMinor()) # global function
print(ok.okCFrontPanel.GetAPIVersionMinor()) # member function
See also
OK_API_VERSION_MAJOR, OK_API_VERSION_MICRO, OK_CHECK_API_VERSION()

◆ OK_API_VERSION_STRING

#define OK_API_VERSION_STRING   "5.3.6"

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

Note: Two versions of this functions are exported to other APIs for compatibility purposes. Using the member function is preferred.

# Python:
import ok
print(ok.GetAPIVersionString()) # global function
print(ok.okCFrontPanel.GetAPIVersionString()) # member function
See also
OK_API_VERSION_MAJOR, OK_API_VERSION_MINOR, OK_API_VERSION_MICRO, OpalKelly::GetAPIVersionString()

◆ OK_CHECK_API_VERSION

#define OK_CHECK_API_VERSION ( major,
minor,
micro )

If an application can be compiled with both an older and a newer version of FrontPanel SDK but still wants to use a feature only available in the newer version, it can do something like the following:

#if OK_CHECK_API_VERSION(5, 2, 0)
// If it's possible that the run-time version differs, i.e. if the
// application could be compiled with FrontPanel 5.2 but use 5.1 or
// earlier version at run-time, then also call CheckAPIVersion()
// here.
... use features only available in FrontPanel 5.2 ...
#endif
See also
OK_API_VERSION_MAJOR, OK_API_VERSION_MINOR, OK_API_VERSION_MICRO, OpalKelly::CheckAPIVersion()

Copyright (c) 2005-2025 Opal Kelly Incorporated