netft-cpp is a standalone C++17 SDK for receiving calibrated force/torque
samples from ATI Net F/T Ethernet sensors. It provides the reusable native core
for applications that need direct control over acquisition, health, and
recovery. For an end-user terminal application, see
netft-cli.
- Discovers calibration scales and measurement units before streaming RDT data.
- Exposes raw counts, calibrated samples, sensor status, and stream health.
- Supports reconnect and fail-stop recovery policies.
- Installs shared or static libraries as the
netft::netftCMake target.
| Platform | Architectures | Support |
|---|---|---|
| Linux | x86-64, AArch64 | Tested |
| macOS | x86-64, Apple silicon | Tested |
| Windows | x86-64 | Tested |
Building requires a C++17 compiler, CMake 3.16 or newer, threads, and libcurl 7.63.0 or newer.
git clone https://github.com/netft/netft-cpp.git
cd netft-cpp
cmake -S . -B build/release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX="$PWD/install"
cmake --build build/release
cmake --install build/releaseSet BUILD_SHARED_LIBS=OFF for a static library. See the
C++ SDK tutorial for dependency
setup on each supported platform.
Consume an installed package with CMake config mode:
find_package(netft 0.3 CONFIG REQUIRED)
add_executable(read_sensor main.cpp)
target_link_libraries(read_sensor PRIVATE netft::netft)Then receive a sample with netft::Client:
#include <chrono>
#include <iostream>
#include <netft/client.hpp>
int main() {
netft::Config config;
config.sensor_host = "192.168.1.1";
netft::Client client{config};
client.start([](const netft::Sample &sample) {
std::cout << sample.force[0] << ' '
<< netft::to_string(sample.force_unit) << '\n';
});
const bool received = client.wait_for_first_sample(std::chrono::seconds{2});
client.stop();
return received ? 0 : 1;
}192.168.1.1 is the ATI factory-default sensor address. Replace it with the
address configured for your sensor.
Samples preserve the force and torque units reported by the sensor; the SDK does not silently convert them to a preferred unit system. Automatic discovery is recommended. Use a manual calibration override only when the active sensor configuration has been independently verified.
See CONTRIBUTING.md for the development environment, tests, hardware-testing policy, versioning, and downstream snapshot workflow. Report security issues through SECURITY.md.
This project is licensed under the Apache License 2.0.
Configuration durations must be finite, positive and representable by the steady clock; HTTP timers must also fit libcurl milliseconds. wait_for_first_sample accepts a zero-duration poll and rejects negative, non-finite or nonrepresentable waits. Deadlines are checked before integer conversion or addition.
UDP hostname resolution uses synchronous system getaddrinfo. Its DNS/NSS latency cannot be cancelled by stop(), and libcurl discovery cancellation also depends on the resolver backend. Receive/configuration timeouts do not provide a hard bound for every hostname resolution or callback. Use a numeric device address on the isolated sensor network when a predictable shutdown bound is required; keep callbacks bounded. The SDK does not create detached resolver threads or promise a hard realtime stop.