Skip to main content

Linux with C++

Build the C++17 source preview with OpenSSL and apply a device-bound signed license before processing frames.

Status
Preview
Integration
Embedded SDK
Distribution
Source preview
Version
0.1.0-RC4

Prerequisites

  • CMake 3.20 or newer
  • A C++17 compiler
  • OpenSSL development libraries
  • Source access to host-linux

1. Link the source target

Link the source target
add_subdirectory(path/to/PrxVision PrxVision-build)
target_link_libraries(my_worker PRIVATE vision_scan_host_linux)

No certified Debian, RPM, or container binary is published for RC2.

2. Register PEM and apply JWS

Register PEM and apply JWS
VisionScanLinuxEntitlementManager entitlement;
std::string error;
if (!entitlement.register_trusted_public_key_pem(key_id, "RS256", public_key_pem, &error)) throw std::runtime_error(error);
auto result = entitlement.apply_signed_license_jws(jws, tenant_id, device_id, now_epoch_seconds);
if (!result.is_allowed) throw std::runtime_error(result.denial_reason);

Without OpenSSL the signed-license path fails closed.

3. Process one luma frame

Process one luma frame
LinuxHostSession session;
if (!session.Initialize() || !session.Start()) return 1;
LinuxFrameDescriptor frame{frame_id, width, height, stride, luma_bytes, timestamp_us};
auto result = session.ProcessFrame(frame);
session.Stop();

Media decoding and pixel conversion remain host responsibilities.

Errors and recovery

ConditionResolution
Signed activation always failsConfirm OpenSSL was detected at configure time and the registered kid/algorithm matches the JWS header.
Frame validation failsProvide positive dimensions, stride at least width, and enough luma bytes for the declared layout.

Production checklist

  • Pin the source revision
  • Require OpenSSL in release builds
  • Keep media decoding outside the portable core
  • Complete binary packaging and platform certification before claiming support

Public contract reference

These are the callable methods and HTTP operations used by this guide. Inputs, results, lifecycle rules, and denial behavior are part of the versioned customer contract.

Linux signed-license preview

The C++ source preview requires OpenSSL-backed asymmetric verification.

VisionScanLinuxEntitlementManager::apply_signed_license_jws(compact_jws, expected_tenant_id, expected_device_id, now_epoch_seconds)

method

Verify and apply a backend-issued compact JWS to the Linux host entitlement manager.

Inputs for VisionScanLinuxEntitlementManager::apply_signed_license_jws(compact_jws, expected_tenant_id, expected_device_id, now_epoch_seconds)
InputTypeRequiredMeaning
compact_jwsstd::stringYesBackend-signed compact license token.
expected_tenant_idstd::stringYesAuthenticated tenant binding.
expected_device_idstd::stringYesActivated host/device binding.
now_epoch_secondsint64_tYesCurrent Unix time.
Result
EntitlementEvaluationResult with deterministic allow/deny and remediation fields.
Lifecycle
Register the trusted key ID and algorithm, then apply before starting licensed processing.
Trust boundary
The legacy object path and is_cryptographically_verified Boolean cannot establish trust.
Failure behavior
  • OpenSSL absence, unknown key, algorithm mismatch, bad signature, wrong tenant/device, expiry, revocation, or rollback deny access.

Linux frame-processing preview

The legacy frame facade is a placeholder. A separate native MatrixScan adapter exposes privacy-safe usage without claiming Linux delivery certification.

LinuxHostSession::ProcessFrame(const LinuxFrameDescriptor&): LinuxDetectionResult

method

Exercise legacy preview lifecycle and layout validation; placeholder detections are not real decoder evidence.

Inputs for LinuxHostSession::ProcessFrame(const LinuxFrameDescriptor&): LinuxDetectionResult
InputTypeRequiredMeaning
frame_idstd::stringYesHost correlation identifier.
width / height / strideint32_tYesPositive dimensions with stride at least width.
datastd::vector<uint8_t>YesEnough luminance bytes for the declared layout.
Result
LinuxDetectionResult with placeholder detection fields, timing, and deterministic error text; excluded from scan-usage telemetry.
Lifecycle
Initialize, start, process frames or batches, inspect metrics, then stop before destruction.
Trust boundary
Media decoding, persistence, networking, credentials, and tenant isolation remain host responsibilities.
Failure behavior
  • Invalid lifecycle or frame layout returns an error result.
  • RC2 source preview is not a certified customer binary or container.

MatrixUsageCollector(mode); RecordNative(const MatrixScanResult&): bool; SnapshotJson(): std::string; ResetAfterScheduled(): void

method

Count one-shot accepted events from real portable MatrixScan results using the shared native accumulator.

Inputs for MatrixUsageCollector(mode); RecordNative(const MatrixScanResult&): bool; SnapshotJson(): std::string; ResetAfterScheduled(): void
InputTypeRequiredMeaning
resultprx::tracking::session::MatrixScanResultYesReal native session result matching the collector mode; visible tracks and cumulative count state are not admissions.
Result
Content-free visionscan-matrix-usage/v1 delta with signed 64-bit saturating counters and 19 closed accounting buckets.
Lifecycle
Serialize access; retain counters on persistence failure, reset only after durable host enqueue. Automatic licensed session integration and secure transport remain pending.
Trust boundary
No payloads, images, quads, tenant IDs, raw license keys, or tokens; tenant attribution is backend-authoritative.
Failure behavior
  • Wrong-mode results return false without mutation.
  • Failed frames contribute diagnostics but no admissions; unknown symbology text becomes Unknown.
  • MSVC builds do not certify Linux runtime or delivery.

vs_matrix_usage_create_v1 / record_v1 / json_v1 / reset_v1 / destroy_v1 (contracts/c/vision_scan_matrix_usage.h)

method

Provide additive content-free portable usage counters through a source-built static C ABI, independently of the bootstrap scan ABI.

Inputs for vs_matrix_usage_create_v1 / record_v1 / json_v1 / reset_v1 / destroy_v1 (contracts/c/vision_scan_matrix_usage.h)
InputTypeRequiredMeaning
framevs_matrix_usage_frame_v1YesExact struct_size and ABI version 1, status OK/capacity/failed, budget flag, and non-negative native frame counters.
Result
Opaque handle and caller-owned NUL-terminated JSON buffer; size queries include NUL and return BUFFER_TOO_SMALL.
Lifecycle
Caller serializes record/peek/durable host enqueue/reset; destroy via the same library, never free the handle directly. Shared-library packaging and native host wiring remain release tasks.
Trust boundary
Portable counters perform no I/O or licensing. Backend authorizes tenant/device and hosts own encrypted retry and credentials. This ABI is not a supported Windows SDK.
Failure behavior
  • Null or invalid descriptors fail atomically.
  • Short output buffers are untouched; peeks are non-consuming.
  • Allocation failure is typed and exceptions never cross C.

Review the release support matrix before deployment. Support status and contract failure behavior remain authoritative even when an example is copied.