Context API
Source headers: raptor/Context.hpp
raptor
Types
| Name | Description |
|---|---|
| Context | Holds process-wide state required by the Raptor SDK. |
| LicenseStatus | License validation status. |
raptor::Context
class Context
Holds process-wide state required by the Raptor SDK.
Construction performs SDK initialization. A Context must be created before any other Raptor SDK object (e.g. raptor::guide::PoseEstimator) is constructed and must outlive every object that references it.
See: Config for SDK-wide configuration options.
Thread safety A Context may be shared by any number of threads. All functions that take a Context and the objects created from it may be called concurrently, unless an object documents otherwise. Concurrent calls share the Context's GPU and worker threads, so an individual call may take longer than it would alone. The Context must not be destroyed while any call that uses it is in progress.
The Context is not copyable or movable. Pass it by reference.
Functions
| Name | Description |
|---|---|
| Context | Construct and initialize the Raptor SDK context. |
| version | Get the Raptor SDK version and build information. |
| generateFingerprint | Generate a license fingerprint for the current machine. |
| validateLicense | Validate a license file. |
Function Details
Context
explicit Context(const Config& config = {})
Construct and initialize the Raptor SDK context.
Parameters:
config- SDK configuration.
See: Config for the available fields and their defaults.
Throws: std::runtime_error - if initialization fails.
version
static raptor::Version version() noexcept
Get the Raptor SDK version and build information
Returns: Version number and version control metadata
generateFingerprint
static std::optional<std::string> generateFingerprint()
Generate a license fingerprint for the current machine.
This function creates a fingerprint that can be used when requesting a license for the machine where the SDK is running.
For detailed information, see the documentation.
Returns: The fingerprint on success; std::nullopt on failure.
validateLicense
static LicenseStatus validateLicense(const std::string& licensePath)
Validate a license file
Parameters:
licensePath- Path to the license file to validate
Returns: LicenseStatus indicating the result of validation
raptor::LicenseStatus
enum class LicenseStatus : std::uint8_t
License validation status
Ok = 0 : License is valid
FileNotFound : License file could not be opened at the configured path
Invalid : License is malformed or not authorized for this application
Expired : License has expired
ExpiresInvalid : License Expires timestamp is invalid
IssuedInvalid : License Issued timestamp is invalid or in the future
ApplicationIdMismatch : License ApplicationId does not match this application
ProfileInvalid : License fingerprint profile is invalid
FingerprintMismatch : Machine fingerprint does not match the license
FingerprintMissing : License requires a fingerprint but none could be generated
ContextInvalid : Fingerprint context is invalid
FeaturesMissing : License is missing the required Features bitmap