Add optional ANT Neuro EDX support#799
Add optional ANT Neuro EDX support#799caleycaleycaley wants to merge 1 commit 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
| } | ||
| 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?
| 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
|
|
||
| .. compound:: | ||
|
|
||
| EDX profile on Linux example: :: |
| 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
| 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
| {"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
| {"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
| 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
| UDP = 1, | ||
| TCP = 2 | ||
| TCP = 2, | ||
| EDX = 3 |
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