Commit Graph

908 Commits (dbab92b25cd8afffc0e9af21f76e6ad1b98c0b60)

Author SHA1 Message Date
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
Paul Hollinsky 8566f9d57d Update copyright date 2020-08-06 16:06:31 -04:00
Paul Hollinsky f49f65c3ed Move examples into tree
See history at https://github.com/intrepidcs/libicsneo-examples/tree/v0.2.0-dev
2020-08-06 15:41:48 -04:00
Paul Hollinsky 2079037ae4 POSIX FTDI: Nicer error message for when device is in use
Commonly, the device is being used by another libicsneo program
(icsscand, maybe) or passed through to a VM.
2020-06-24 22:15:22 -04:00
Paul Hollinsky a759c1faa9 Communication: Fix issue where driver failing to open leaves dangling thread 2020-06-24 22:03:31 -04:00
Paul Hollinsky 67bd1e616a MultiChannelCommunication: Fix issue where initial open fails 2020-06-24 21:38:57 -04:00
Paul Hollinsky 25f079b5c6 POSIX FTDI: Fix a bug where closing device successfully returned an error 2020-06-24 20:59:53 -04:00
Paul Hollinsky dcc44d99ea Fix an issue where the FIRE could not be opened 2020-06-17 15:11:57 -04:00
Jeffrey Quesnelle 7a71a35848 add option to build with Npcap on Windows 2020-06-16 12:14:46 -04:00
Jeffrey Quesnelle 8f6ff86448 Load pcap_sendqueue functions on Windows 2020-06-12 13:55:47 -04:00
Paul Hollinsky 8260149cb8 Add bridging between neomessage_eth_t and EthernetMessage
This allows transmitting Ethernet from the C API
2020-05-18 17:23:40 -04:00
Jeffrey Quesnelle d2019c24df reuse discovered pcap interfaces in DeviceFinder::FindAll() 2020-05-11 16:17:56 -04:00
Jeffrey Quesnelle 99879c9021 turn PCAPDLL into a singleton 2020-03-24 13:15:26 -04:00
Paul Hollinsky 38e24d7641 Refactor ICommunication/Transport => Driver 2020-03-09 14:09:27 -04:00
Paul Hollinsky d8798acaa7 Communication: MultiChannel: Properly mask out communication from non-main VNETs
This also makes it possible for Communication to create more instances of Packetizer
This is necessary because Packetizer is not thread safe,
so when we support more VNETs we will need to create more Packetizers.
2020-03-09 13:56:18 -04:00
Paul Hollinsky 42780dc610 Add ReaderWriterQueue and update ConcurrentQueue 2020-03-09 13:38:14 -04:00
Paul Hollinsky 9ac3fd56bd FlexRay: Don't check for POCReady when writing configuration
It is not needed and this gives a good speedup to configuration
2020-02-28 20:10:31 -05:00
Paul Hollinsky 8ae3317930 FlexRay: Rework controller register reading for reliability 2020-02-28 20:09:33 -05:00
Paul Hollinsky 1cd817a16b Fix race conditions with Communication::waitForMessageSync 2020-02-28 20:00:08 -05:00