Commit Graph

526 Commits (0f9bf83c89905fca0087b0a5d574aef91a7c5502)

Author SHA1 Message Date
Paul Hollinsky 66d7c2f390
Merge pull request #25 from pierreluctg/icsneolegacy-setFDBitRate
Adding icsneoSetFDBitRate api to the icsneolocacy
2020-09-23 12:36:23 -04:00
Paul Hollinsky 7e714abfd1 EthernetPacketizer: Add missing include for GCC 2020-09-23 10:23:05 -04:00
Pierre-Luc Tessier Gagne 2cd074cf13 Setting ExtraDataPtrEnabled when ExtraDataPtr is use 2020-09-23 08:40:57 -04:00
Pierre-Luc Tessier Gagne 90b04f4578 Adding icsneoSetFDBitRate api to the icsneolocacy 2020-09-23 07:23:17 -04:00
Paul Hollinsky 6f0654c336 Windows: PCAP: Rework for Ethernet Packetizer and Performance 2020-09-22 19:22:40 -04:00
Paul Hollinsky 76619e2496 RAD-Galaxy: RJ45 Ethernet Support
The "Ethernet" network must be enabled in neoVI Explorer.
It is disabled by default.

This network corresponds with the port labeled DAQ on
the Galaxy.
2020-09-22 19:20:56 -04:00
Paul Hollinsky 2c55584962 Ethernet: Encode preemption enabled flag 2020-09-22 19:19:22 -04:00
Paul Hollinsky 1f4358af4b Packetizer: Correct packet length check
AA(1) + Old format(1)  + New Length(2) + New NetID(2) = 6
2020-09-22 19:17:12 -04:00
Paul Hollinsky 28b35a8243 Communication: Create EthernetPacketizer
This code previously was separately maintained in each of the
PCAP driver layers.

While adding complexity for reassembly, I decided it was
time to pull it out into a common implementation.

As of this commit, the old implementations have not been
removed from the PCAP drivers yet.
2020-09-22 19:15:24 -04:00
Paul Hollinsky 5c18bedf70 RAD-Gigalog: Fix serial number prefix 2020-09-18 16:38:09 -04:00
Paul Hollinsky eda4a30dcd Add ValueCAN 4 Industrial 2020-09-14 12:45:32 -04:00
Paul Hollinsky 211f844f77 ValueCAN 4-2EL: Fix device agnostic CAN settings 2020-09-14 12:36:19 -04:00
Paul Hollinsky 8843ace87e ValueCAN 4-2EL: Add communication over Ethernet
The device can communicate with the PC over its Ethernet if the
enablePcEthernetComm setting is set within the structure.

This stops the Ethernet port from being used for vehicle data.
2020-09-14 12:35:43 -04:00
Paul Hollinsky d2676afa11 Update device names for consistency 2020-09-14 11:58:34 -04:00
Paul Hollinsky c48efe8e5b Add Gigalog, Gigastar, Moon 2, Moon Duo, and Supermoon
The USB drivers for these devices are currently stubbed, it will find them
but not connect.

The Ethernet drivers work though, where applicable.
2020-09-14 11:57:01 -04:00
Paul Hollinsky 9dc4b302ef POSIX: PCAP: Enable if permissions are set, with a warning otherwise
On Linux, raw packet capture requires CAP_NET_RAW (or root).

If we can't capture raw packets, we will not be able to find/connect to
devices over ethernet.
2020-09-14 11:51:15 -04:00
Paul Hollinsky a460e27657 Add RADGigalog for Windows
Ethernet communication with device only
2020-09-08 17:55:52 -04:00
Paul Hollinsky eaa1409af0 Update/add settings structures for several devices 2020-09-08 17:41:47 -04:00
Paul Hollinsky de0c16a461 VividCAN: Better "Online Not Supported" Error 2020-09-08 17:39:47 -04:00
Paul Hollinsky 3f8ed840ba Start callback IDs at 1 so 0 is reserved 2020-09-08 17:38:38 -04:00
Kyle Schwarz 12463ea2f4 Remove globs from CMake 2020-09-02 12:19:17 -04:00
Paul Hollinsky 8e999a0fb8 Heartbeat: Break from loop rather than returning
This makes sure we run the cleanup code at the bottom of the thread
2020-09-01 16:32:54 -04:00
Paul Hollinsky a325d8a12b PCAP: Send initial requests from the interface MAC
This allows the device to respond directly to us
2020-09-01 15:53:45 -04:00
Paul Hollinsky 046e2bae9d Ensure proper closure of the heartbeat thread on reopen 2020-09-01 15:52:41 -04:00
Paul Hollinsky c48995520f POSIX: FTDI: Report warnings and retry on libftdi errors 2020-09-01 15:15:36 -04:00
Paul Hollinsky aceea6dc5b libftdi: Don't discard data on LIBUSB_ERROR_TIMEOUT
libusb may have transferred some data, don't want to lose it
2020-09-01 15:14:37 -04:00
Kyle Schwarz 1bb1ab7a82 Add CoreFoundation and IOKit frameworks for macOS 2020-08-28 13:34:28 -04:00
Kyle Schwarz 044c2bb86f Detect device disconnects
When a device is sending any traffic, the device is considered to be connected. If no traffic if being received from the device, a status is requested. If the device fails to report the status back in a timely manner, it is considered to be disconnected.

If the device fails to reply to the status request, it is important to confirm that the device is not applying settings. While the device is applying settings, it will not be sending heartbeats or able to process a status request.
2020-08-27 13:20:48 -04:00
Paul Hollinsky 5db07102aa PCAP: Listen for ICS_UNSET_MAC
On newer firmware, the device will address the PC directly after
EnableNetworkComm. Before this, it will set the destination MAC to
00:FC:70:FF:FF:FF.
2020-08-27 12:24:35 -04:00
Paul Hollinsky b5c9443fc8 POSIX: PCAP: Ensure packets get captured
No packets were being captured with a timeout of 0
2020-08-27 12:24:35 -04:00
Kyle Schwarz 4c2cd918de Revert "Add FindLibUSB.cmake for libftdi"
This reverts commit dfe5845b3c.
2020-08-27 12:22:24 -04:00
Kyle Schwarz 7cd008a003 Switch to non-blocking I/O for STM32
STM32 can latency is not as good as it could be when it is synchronous due to read() timeouts,
so switch to asynchronous reading with select().
2020-08-25 16:14:47 -04:00
Kyle Schwarz dfe5845b3c Add FindLibUSB.cmake for libftdi 2020-08-20 12:44:05 -04:00
Kyle Schwarz b6692d3762 Add missing C++ guards 2020-08-18 16:01:51 -04:00
Kyle Schwarz 3e4b595fe4 Resolve signedness warnings on GCC 2020-08-18 15:37:05 -04:00
Kyle Schwarz 4cd897badd Fix deadlock with Driver::write
Use a spin lock to recheck the queue size until it has room to push.
2020-08-14 16:57:52 -04:00
Kyle Schwarz afda617894 Remove trailing white-space 2020-08-11 13:42:13 -04:00
Kyle Schwarz 1d286be1e4 Switch PLUTO_MAX_MAC_CONFIG_ENTRIES to C API define 2020-08-10 15:50:29 -04:00
Kyle Schwarz 6638cf05ae Use C++11 constexpr instead of define 2020-08-10 15:21:16 -04:00
Kyle Schwarz d58202dfc0 Add RADPlutoSettings to initializer template call 2020-08-10 15:07:12 -04:00
Kyle Schwarz 08928c36e3 RADPluto uses HSCAN2 instead of MSCAN 2020-08-10 14:31:59 -04:00
Kyle Schwarz 4b218b3f9a Merge branch 'master' of Lustra:InfiniteWalrus/libicsneo into radpluto 2020-08-10 13:06:14 -04:00
Paul Hollinsky 07e99515fa Always send the ReadSettings command in short format
This is needed for FIRE
2020-08-10 12:30:30 -04:00
Kyle Schwarz 3123cbb54b Merge branch 'master' of Lustra:InfiniteWalrus/libicsneo into radpluto 2020-08-10 11:11:38 -04:00
Kyle Schwarz 17ebba3c57 Fix line-endings and include guard 2020-08-10 10:40:40 -04:00
Kyle Schwarz 7b3782cbe7 Update concurrentqueue to 1.0.2
1.0.2 resolves compiler warnings for MSVC 2019 with C++17 support (9cfda6cc61)
2020-08-10 10:20:00 -04:00
Kyle Schwarz f9ff4049f2 Add initial support for RADPluto settings 2020-08-07 17:13:08 -04:00
Paul Hollinsky 154eab4b1b Direct to the examples folder 2020-08-06 16:26:46 -04:00
Paul Hollinsky b09f85693f v0.2.0
This update has breaking changes for the event/error subsystem, see
Usage within the documentation for details on the workings of the new
system.
2020-08-06 16:17:28 -04:00
Paul Hollinsky 6218a5cc7e Fix documentation building 2020-08-06 16:09:29 -04:00