Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gocator

Gocator is a C++17 acquisition and configuration facade for LMI Gocator sensors using the GoPxL SDK.

Capabilities

  • Discover sensors and open a connection by IP address.
  • Receive GoDataSet profile or surface payloads through registered callbacks.
  • Configure scan length, scan mode, exposure, intensity, and uniform spacing.
  • Read parameter schemas and values or write individual parameters through the sensor REST resources.
  • Build an optional Qt 6 feature widget without adding Qt to the core target.

Requirements

  • CMake 3.20 or newer and a C++17 compiler.
  • A GoPxL SDK whose headers and libraries match the target operating system, architecture, compiler, and build configuration.
  • Qt 6 Widgets and Concurrent only when GOCATOR_BUILD_QT_UI=ON.

The repository-local SDK layout is documented in GoPxL-SDK/README.md. Set GOPXL_SDK_DIR to another compatible SDK root when necessary. GOPXL_PLATFORM_DIR can override the selected library directory.

Integration

set(GOCATOR_BUILD_QT_UI OFF CACHE BOOL "" FORCE)
add_subdirectory(path/to/Gocator/C++ Gocator-build)
target_link_libraries(consumer PRIVATE gocator_core)

Qt integration is explicit and disabled by default. A Qt consumer enables the option and links only the UI target; Gocator::QtWidget brings in gocator_core, Qt Widgets, and Qt Concurrent transitively:

set(GOCATOR_BUILD_QT_UI ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/Gocator/C++ Gocator-build)
target_link_libraries(qt_consumer PRIVATE Gocator::QtWidget)

Requesting the UI without an available Qt 6 Widgets/Concurrent package is a configure error. The contents and public dependencies of gocator_core do not change when the UI is enabled.

The optional scene adapter is disabled by default and requires a neutral scene-contract target before this module is configured; it does not require the visualization renderer.

Acquisition Contract

#include "Gocator.h"

Gocator sensor;
const auto devices = sensor.discoverDevices();
if (!devices.empty() && sensor.open(devices.front().address)) {
    sensor.setScanMode(Gocator::SurfaceMode);
    sensor.registerGrabCallback(
        [](const GoPxLSdk::GoDataSet& dataSet, std::size_t sequence) {
            // Consume dataSet during this callback.
        });
    sensor.grab();
}

Grab callbacks run on the module's receive path. Keep callbacks bounded and avoid synchronous logging or GUI access there. Stop acquisition before closing or destroying the facade.

Parameter schema, data, and write methods perform synchronous REST requests. A GUI or latency-sensitive consumer must move those calls off its event thread and define its own timeout and cancellation behavior.

Validation

GOCATOR_BUILD_TESTS=ON requires GOCATOR_BUILD_QT_UI=ON because the focused test executable exercises QGocatorWidget. A successful build establishes only compile/link compatibility; discovery, REST configuration, profile/surface payloads, reconnect behavior, and throughput require validation with the intended SDK package and sensor firmware.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages