Add optional ANT Neuro EDX support#799
Add optional ANT Neuro EDX support#799caleycaleycaley wants to merge 6 commits intobrainflow-dev:masterfrom
Conversation
| UDP = 1, | ||
| TCP = 2 | ||
| TCP = 2, | ||
| EDX = 3 |
There was a problem hiding this comment.
it should not be here, its a public enum to specify which protocol to use if device supports multiple. This one supports just one
There was a problem hiding this comment.
Addressed in 1af37346 . removed EDX from the public protocol enum; EDX is selected by explicit board ID, not by ip_protocol.
| } | ||
| string descr_str = System.Text.Encoding.UTF8.GetString (str, 0, len[0]); | ||
| var ms = new MemoryStream (Encoding.UTF8.GetBytes (descr_str)); | ||
| var serializer = new DataContractJsonSerializer (typeof (T)); |
There was a problem hiding this comment.
I think it complains due to removed using above, why is it removed?
docs/BuildBrainFlow.rst
Outdated
| cd build-edx | ||
| cmake -G "Visual Studio 17 2022" -A x64 -DBUILD_ANT_EDX=ON -DMSVC_RUNTIME=dynamic -DCMAKE_INSTALL_PREFIX=../installed-edx .. | ||
| cmake --build . --target install --config Release -j 2 --parallel 2 | ||
|
|
There was a problem hiding this comment.
why is it here? just add a cmake option and build.py option and set a default for this option properly, I dont think it requires mentioning it here
There was a problem hiding this comment.
Addressed in 1af37346 .
reduced to a short note and kept the main change in CMake/build flow instead
docs/BuildBrainFlow.rst
Outdated
|
|
||
| .. compound:: | ||
|
|
||
| EDX profile on Linux example: :: |
There was a problem hiding this comment.
Addressed in 1af37346 .
removed the extra profile/example block and keeps docs shorter
| board.config_board("reference_range:0.15")?; | ||
| board.config_board("bipolar_range:2.5")?; | ||
| board.start_stream(45000, "")?; | ||
|
|
There was a problem hiding this comment.
its too much, just one example is enough
There was a problem hiding this comment.
Addressed in 1af37346 .
one concise example per language
| case BoardIds::ANT_NEURO_EE_511_EDX_BOARD: | ||
| board = std::shared_ptr<Board> (new AntNeuroEdxBoard (board_id, params)); | ||
| break; | ||
| #endif |
There was a problem hiding this comment.
as is if ant edx board is selected but dyn lib is built wo flag it will just return unsupported board error, instead it would be good to print in logs how binary should be compiled to use these boards
There was a problem hiding this comment.
Addressed in 1af37346. added an #else path in board_controller.cpp so EDX board ids log a clear message telling to rebuild with -DBUILD_ANT_EDX=ON.
| {"eeg_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}}, | ||
| {"emg_channels", {25, 26, 27, 28}}, | ||
| {"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30}}, | ||
| {"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}}, |
There was a problem hiding this comment.
you can put resistance channels to its own preset
There was a problem hiding this comment.
Addressed in 5e6956f5. impedance data is now available through ancillary, but kept the default preset unchanged for compatibility with legacy ANT board consumers.
| {"emg_channels", {25, 26, 27, 28}}, | ||
| {"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 29, 30}}, | ||
| {"resistance_channels", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}}, | ||
| {"ref_resistance_channels", {29}}, |
There was a problem hiding this comment.
btw there is no public method exposing these 2, the only way to access them will be get_board_descr, although I think its fine
There was a problem hiding this comment.
understood. these are 'nice to have', for now access is via get_board_descr, fine to keep like that in this PR.
src/board_controller/build.cmake
Outdated
| if (NOT Protobuf_FOUND) | ||
| find_package (Protobuf REQUIRED) | ||
| endif () | ||
| find_package (gRPC CONFIG REQUIRED) |
There was a problem hiding this comment.
dont just use find try to install it from cmake instead
There was a problem hiding this comment.
or package to third_patry folder
There was a problem hiding this comment.
for this PR we kept dependency installation explicit and did not add auto-install logic. build now fails fast with clear install instructions when protobuf / gRPC are missing.
Good enough?
src/utils/inc/brainflow_constants.h
Outdated
| UDP = 1, | ||
| TCP = 2 | ||
| TCP = 2, | ||
| EDX = 3 |
… EDX board - Remove EDX=3 from IpProtocolTypes across all 8 language bindings (EDX uses gRPC only, not a generic IP protocol variant) - Restore accidentally removed `using System.Runtime.Serialization.Json;` in board_shim.cs (fixes DataContractJsonSerializer compile error) - Replace verbose EDX build docs with a single brief CMake note; emit FATAL_ERROR with install instructions when gRPC/protobuf not found - Collapse SupportedBoards.rst EDX examples to one per language; remove ip_protocol and master_board references; add RX-300 subsection - Add #else block in board_controller.cpp so EDX board IDs return a clear error when BrainFlow is built without -DBUILD_ANT_EDX=ON - Separate impedance channels into ancillary preset in clone_ant_edx_board; default preset now contains only EEG/streaming channels - Strip params.master_board cross-check from ant_neuro_edx.cpp (no longer used) - Add ANT_NEURO_RX_300_EDX_BOARD (id=81) as a self-contained EDX-only board with direct JSON config (4 EEG + 4 EMG + 17 aux channels, 500 Hz); no hidden legacy master board entry - Make board IDs contiguous: close gap at 67 by shifting EDX series from 68-82 down to 67-81; update LAST sentinel in all bindings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove EDX=3 from IpProtocolTypes across all 8 language bindings (EDX uses gRPC only; not a generic IP protocol variant) - Restore accidentally removed using System.Runtime.Serialization.Json in board_shim.cs (fixes DataContractJsonSerializer compile error) - Replace verbose EDX build steps in BuildBrainFlow.rst with a brief note; emit FATAL_ERROR with install instructions when gRPC/protobuf not found - Collapse SupportedBoards.rst EDX examples to one per language; remove ip_protocol and master_board references from docs - Add #else block in board_controller.cpp so EDX board IDs log a clear error when BrainFlow is built without -DBUILD_ANT_EDX=ON - Separate impedance channels into ancillary preset in clone_ant_edx_board; default preset now contains only EEG/streaming channels - Strip params.master_board cross-check from ant_neuro_edx.cpp - Make board IDs contiguous: shift EDX series from 68-82 to 67-80, close gap after NEUROPAWN_KNIGHT_BOARD_IMU; update LAST sentinel in all bindings
Summary
This PR adds optional ANT Neuro EDX support to BrainFlow behind a dedicated build flag.
It introduces EDX board IDs for supported ANT amplifiers, adds the native EDX board controller implementation, wires the new IDs across bindings, and documents both build and runtime usage.
What’s included
add optional BUILD_ANT_EDX CMake flag
add ANT Neuro EDX native implementation and protobuf/gRPC wiring
add explicit EDX board IDs for supported ANT amplifiers
add EDX protocol support and board descriptors
update Python, Java, C#, Node, Julia, MATLAB, and Rust bindings with the new board IDs
document CMake build requirements for EDX
document runtime usage for direct EDX board connections
add Python example tests for direct EDX lifecycle, impedance, and mode transitions
Design notes
EDX support is opt-in and does not affect default builds unless BUILD_ANT_EDX=ON
explicit EDX board IDs are used.
Validation
Built successfully:
Live device validation against a real EE511 on EDX (localhost:3390) passed:
python_package/examples/tests/edx_full_lifecycle.py
python_package/examples/tests/edx_impedance.py
python_package/examples/tests/edx_mode_transitions.py