Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: Report reproducible incorrect behavior in the SDK or CLI
description: Report reproducible incorrect behavior in the C++ SDK
title: "[Bug]: "
labels:
- bug
Expand All @@ -21,7 +21,6 @@ body:
label: Component
options:
- C++ SDK
- CLI
- Discovery and calibration
- Build or packaging
- Tests or automation
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
id: proposal
attributes:
label: Proposed solution
description: Describe the API, CLI, or workflow you would expect.
description: Describe the API or integration workflow you would expect.
validations:
required: true
- type: textarea
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ jobs:
"-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_TARGET_TRIPLET=x64-windows
-DBUILD_SHARED_LIBS=OFF
-DNETFT_BUILD_CLI=OFF
-DBUILD_TESTING=ON
- name: Build
run: cmake --build build/windows --config Release
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project are documented in this file.

## Unreleased

### Removed

- Remove the legacy bundled CLI and its `NETFT_BUILD_CLI` option. Command-line workflows now
live in the independent [netft-cli](https://github.com/netft/netft-cli) project.

## 0.3.1 - 2026-07-31

### Fixed
Expand Down
19 changes: 0 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

option(NETFT_SANITIZERS "Enable address and undefined behavior sanitizers" OFF)
option(NETFT_BUILD_CLI "Build the netft command-line tool" ON)

add_library(netft_sanitizers INTERFACE)
if(NETFT_SANITIZERS)
Expand Down Expand Up @@ -68,17 +67,6 @@ target_link_libraries(netft
$<BUILD_INTERFACE:netft_sanitizers>
)

if(NETFT_BUILD_CLI)
add_library(netft_cli_lib STATIC app/cli.cpp)
target_compile_features(netft_cli_lib PUBLIC cxx_std_17)
target_include_directories(netft_cli_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/app)
target_link_libraries(netft_cli_lib PUBLIC netft::netft)

add_executable(netft_cli app/main.cpp)
set_target_properties(netft_cli PROPERTIES OUTPUT_NAME netft)
target_link_libraries(netft_cli PRIVATE netft_cli_lib)
endif()

install(
DIRECTORY include/netft
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
Expand All @@ -90,13 +78,6 @@ install(
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
if(NETFT_BUILD_CLI)
install(
TARGETS netft_cli
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()

set(netft_cmake_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/netft")
configure_package_config_file(
cmake/netftConfig.cmake.in
Expand Down
98 changes: 22 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,24 @@
[![C++17](https://img.shields.io/badge/C%2B%2B-17-blue)](https://en.cppreference.com/w/cpp/17)
[![License](https://img.shields.io/github/license/netft/netft-cpp?label=license)](LICENSE)

`netft-cpp` is a standalone C++17 SDK and command-line tool for receiving calibrated
force/torque samples from ATI Net F/T Ethernet sensors over the RDT protocol, with HTTP
configuration discovery, stream health reporting, and explicit recovery policies.
`netft-cpp` is a standalone C++17 SDK for receiving calibrated force/torque samples from ATI
Net F/T Ethernet sensors over the RDT protocol, with HTTP configuration discovery, stream
health reporting, and explicit recovery policies. For an end-user command-line application,
see [netft-cli](https://github.com/netft/netft-cli).

## Highlights
## Features

- Discovers calibration scales and measurement units from the sensor before streaming.
- Tracks sequence, status, delivery, and recovery health with reconnect and fail-stop policies.
- Installs as the `netft::netft` CMake target and includes a human- and JSON-readable CLI.
- Installs shared or static libraries as the `netft::netft` CMake target.

## Supported platforms

| Platform | Architectures | SDK | CLI |
| --- | --- | --- | --- |
| Linux | x86-64, AArch64 | Tested | Tested |
| macOS | x86-64, Apple silicon | Tested | Tested |
| Windows | x86-64 | Tested | Not currently supported |
| 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.
GoogleTest is required only when `BUILD_TESTING=ON`. The checked-in Pixi environment provides
Expand All @@ -32,37 +33,31 @@ project with externally supplied dependencies.

## Installation

Pixi provides the reproducible development environment:
Configure, build, and install the SDK with CMake:

```bash
git clone https://github.com/netft/netft-cpp.git
cd netft-cpp
pixi install
pixi run cmake -S . -B build/release -G Ninja \
cmake -S . -B build/release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX="$PWD/install"
pixi run cmake --build build/release
pixi run cmake --install build/release
cmake --build build/release
cmake --install build/release
```

Set `BUILD_SHARED_LIBS=OFF` for a static library. The same CMake commands work with system
packages instead of Pixi when the required compiler, CMake, Threads, and libcurl dependencies
are available. Homebrew can provide the macOS dependencies, while vcpkg can provide the Windows
dependencies. Pass their installation prefixes or toolchain file to CMake as appropriate. For
a non-system shared-library prefix, configure the platform dynamic loader for `install/lib`
before running `install/bin/netft`.

On Windows, configure with `-DNETFT_BUILD_CLI=OFF`. The SDK uses WinSock 2 and links `ws2_32`
automatically; the current CLI still relies on POSIX file and process facilities.
Set `BUILD_SHARED_LIBS=OFF` for a static library. Homebrew can provide the macOS dependencies,
while vcpkg can provide the Windows dependencies; pass their installation prefix or toolchain
file to CMake as appropriate. The repository's Pixi environment and development tasks are
documented in [CONTRIBUTING.md](CONTRIBUTING.md).

## CMake usage

After installation, consume the package with CMake config mode:

```cmake
find_package(netft 0.1 CONFIG REQUIRED)
find_package(netft 0.3 CONFIG REQUIRED)
Comment on lines +36 to +60

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove or relabel the remaining CLI commands.

The new installation instructions install only the SDK, but the README still instructs users to run netft info and netft monitor at Line 104 and Lines 114-120. These commands are not installed by this project after the bundled CLI removal. Replace them with C++ SDK examples, or state that users must install netft-cli first.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 36 - 60, Update the README sections containing the
netft info and netft monitor commands to reflect that the SDK installation no
longer provides the CLI. Replace those commands with relevant C++ SDK usage
examples, or explicitly instruct users to install netft-cli before running them.


add_executable(read_sensor main.cpp)
target_link_libraries(read_sensor PRIVATE netft::netft)
Expand Down Expand Up @@ -94,27 +89,6 @@ int main() {

`192.168.1.1` is the ATI [factory-default sensor address](https://www.ati-ia.com/app_content/Documents/9620-05-Net%20FT.pdf). Replace it with the address configured for your sensor when it has been moved to another network.

## CLI usage

The installed `netft` executable provides three commands:

```bash
netft --help
netft info --host 192.168.1.1
netft monitor --host 192.168.1.1 --duration 10
netft monitor --host 192.168.1.1 --duration 10 --json --output sample.json
netft bias --host 192.168.1.1
```

`info` reads and prints sensor configuration without starting an RDT stream. `monitor` keeps
the latest sample and reports a summary after five seconds by default. `bias` waits for a
sample, applies software bias, and succeeds only after receiving a later sample. `--json`
selects JSON output, while `--output PATH` replaces the output file atomically.

CLI exit codes are `0` for success without reported device warnings or errors, `1` when a
completed operation reports device warnings or errors, `2` for invalid usage or an operational
failure, and `130` for interruption by `SIGINT`.

## Automatic discovery and units

Without a manual override, the client requests `http://HOST:HTTP_PORT/netftapi2.xml` before
Expand Down Expand Up @@ -200,46 +174,18 @@ sensor, network, application, controller, and independent safety system as one i
any controller. Do not copy the example address or calibration into another installation.
- Applying software bias changes the measurement zero and can change downstream control and
limit behavior. Unload or fixture the sensor as required, stop hazardous motion, and keep
people clear before calling `Client::bias()` or running `netft bias`.
people clear before calling `Client::bias()`.
- Test disconnects, stale data, device status errors, and the selected recovery policy under
controlled conditions. This software is not a substitute for an emergency stop or a
safety-rated control path.

Repository tests use simulated HTTP and UDP sensors. Connecting tests or examples to physical
hardware is always an explicit, operator-approved action.

### Opt-in hardware verification

The hardware harness builds and installs a fresh Release CLI into a temporary prefix, checks
the sensor-selected calibration returned by automatic discovery, and monitors a two-second
stream without printing individual samples. It requires an explicit sensor host and does not
assume a particular unit system or calibration scale:

```bash
NETFT_SENSOR_HOST=192.168.1.1 pixi run hardware-test
```

The default `hardware-test` task explicitly forces `NETFT_ALLOW_BIAS=0`, so an inherited shell
setting cannot enable bias. Review the reported product, units, scales, rates, and counters
against the intended installation before using the results.

The bias variant must be treated as a separate physical operation. Before every individual
run, obtain fresh operator authorization, verify that the named sensor is the intended device,
unload or fixture it as required, stop hazardous motion, and keep people clear. Only after
those checks may an operator deliberately run:

```bash
NETFT_SENSOR_HOST=192.168.1.1 pixi run hardware-bias-test
```

Authorization from an earlier run must not be reused. The bias task opts in by setting
`NETFT_ALLOW_BIAS=1`; the harness then requires the CLI result to report
`"bias_applied": true`.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow, tests, formatting rules,
hardware-test policy, versioning, and `ros-netft` backports.
hardware testing policy, versioning, and `ros-netft` backports.

## License

Expand Down
Loading
Loading