Commit Graph

629 Commits (1bb33156f7ce15cf6e7b4736dbce845428ca4819)

Author SHA1 Message Date
Paul Hollinsky 4fd65d85c8 Windows: PCAP: Fix WinPCAP loading
Used when LIBICSNEO_NPCAP_INCLUDE_DIR is not defined
2022-02-14 19:24:46 -05:00
Paul Hollinsky 0ded5508c1 Windows: Fix build issues with EthPhyRegPacket 2022-02-14 19:20:50 -05:00
Paul Hollinsky 6d92b7a03a Windows: PCAP: Fix a race which could cause transmit delays
If you had a chain of packets being sent all at once, the latter
section of packets could be delayed, theoretically infinitely.

If queue1 was filled and enqueued for transmit, then queue2
had packets enqueued in it while queue1 was still transmitting,
we'd try to fill queue2 further rather than waiting for queue1's
transmit to finish.

However, in that case, we wouldn't check if we could transmit
queue2 again until the next packet. If the user application
was waiting for the response from something in queue2
before pushing more packets, it could hang indefinitely.

This also fixes a subtle bug where hitting the "not safe to try
to fit any more packets in this queue" limit would cause a
packet to drop, as it would be dequeued and then tossed.

Closes GH-42
2022-02-04 01:14:08 -05:00
Kyle Johannes 2d1bb381f6 Device: Implement Ethernet PHY MDIO Communication
The following fixups were added during the squash/merge:

Fix formatting in EthPhyMessage and EthPhyRegPacket
Device: Use std::make_shared when creating the EthPHYControl filter
Network: Create NetID String for EthPHYControl
EthPhyRegPacket: Constants in PascalCase
2021-12-08 19:07:07 -05:00
Paul Hollinsky 890eb1e1bc RAD-Galaxy: Update settings structure with new entries 2021-12-08 14:30:54 -05:00
Paul Hollinsky 96f18dcfd6 PCAP: Don't use pthread_cancel on Linux
It is not necessary and can cause a crash in libunwind
2021-12-08 14:30:02 -05:00
Paul Hollinsky d5087c1ba5 Communication: Remove extra accidentally added logging 2021-12-06 05:41:27 -05:00
Paul Hollinsky f8b5710a6c Communication: Avoid MessageFilter type punning in waitForMessageSync 2021-12-02 15:00:13 -05:00
Paul Hollinsky 78747aa899 CMake: Set CXX_STANDARD to C++11 if not set elsewhere
We need at least C++11.

If we're statically compiling into an application, we want to be using the same
CXX_STANDARD as it for ABI compatibility (particularly with icsneo::optional),
hence having the check around it.
2021-11-16 20:04:12 -05:00
Paul Hollinsky 2d6004bed1 CANPacket: Remove unused byte from datastream 2021-11-16 20:04:12 -05:00
Paul Hollinsky 574530978c Encoder: Add 1 to host-to-device long format packets
Vehicle Spy 3 does this, it's a long-standing firmware idiosyncrasy.

Due to the way the device handles packets, this didn't cause a loss of
communication, only a "host to device byte" app error under certain
circumstances.
2021-11-16 20:03:41 -05:00
Paul Hollinsky 988289afc1 ValueCAN 4 Industrial: Disable 16-bit alignment over Ethernet
This is a continuation of a1a544045b
2021-11-16 20:03:02 -05:00
Paul Hollinsky 714db03a05 CMake: Set CXX_STANDARD to C++11 if not set elsewhere
We need at least C++11.

If we're statically compiling into an application, we want to be using the same
CXX_STANDARD as it for ABI compatibility (particularly with icsneo::optional),
hence having the check around it.
2021-11-16 19:49:08 -05:00
Paul Hollinsky d097fb9a74 CANPacket: Remove unused byte from datastream 2021-11-16 19:48:55 -05:00
Paul Hollinsky 9d5bad94d4 Encoder: Add 1 to host-to-device long format packets
Vehicle Spy 3 does this, it's a long-standing firmware idiosyncrasy.

Due to the way the device handles packets, this didn't cause a loss of
communication, only a "host to device byte" app error under certain
circumstances.
2021-11-16 19:35:20 -05:00
Paul Hollinsky 181223375a ValueCAN 4 Industrial: Disable 16-bit alignment over Ethernet
This is a continuation of a1a544045b
2021-11-16 19:27:38 -05:00
Paul Hollinsky 51626b9e63 POSIX: PCAP: Use EthernetPacketizer 2021-11-16 18:00:04 -05:00
Paul Hollinsky a1a544045b Ethernet Comm Devices: Disable unnecessary align16bit 2021-11-16 18:00:04 -05:00
Paul Hollinsky 719dbcefc8 EthernetPacketizer: Coalesce small PC-to-device packets 2021-11-16 18:00:04 -05:00
Paul Hollinsky ac77fe2b56 POSIX: PCAP: Use EthernetPacketizer 2021-09-23 21:31:59 -04:00
Paul Hollinsky 1aa3828688 Ethernet Comm Devices: Disable unnecessary align16bit 2021-09-23 21:30:48 -04:00
Paul Hollinsky 0656cb568e EthernetPacketizer: Coalesce small PC-to-device packets 2021-09-23 21:29:15 -04:00
Paul Hollinsky 6b37acf471 Encoder: Remove unused function
This is instead handled by an overloaded function in Communication
2021-09-21 00:23:32 -04:00
Paul Hollinsky df9827fb2c Device: Don't allow suppressDisconnects during a heartbeat request
See the comment block for an explanation
2021-09-20 23:39:45 -04:00
Paul Hollinsky f129be34b5 C API: Resolve compilation against new icsneo::Messasge API 2021-09-20 23:24:19 -04:00
Paul Hollinsky 38f0022bb6 Communication: Support extended commands 2021-09-20 23:07:49 -04:00
Kyle Schwarz 67c8e6a952 Build: Associate pcap include dir with icsneocpp
If an external project links to the icsneocpp target and pcap has
been installed in a non-standard location, the build will fail to find
pcap.h because PCAP_INCLUDE_DIR is not associated with the
target.

Closes #58
2021-09-20 21:55:56 -04:00
Kyle Schwarz 80c6816a54 Build: Associate libusb include dir with icsneocpp
If an external project links to the icsneocpp target and libusb has
been installed in a non-standard location, the build will fail to find
libusb.h because LIBUSB_INCLUDE_DIR is not associated with the
target.

Closes #57
2021-09-20 21:55:56 -04:00
Kyle Schwarz c5314884ce Build: Associate pcap include dir with icsneocpp
If an external project links to the icsneocpp target and pcap has
been installed in a non-standard location, the build will fail to find
pcap.h because PCAP_INCLUDE_DIR is not associated with the
target.

Closes #58
2021-09-20 21:38:34 -04:00
Kyle Schwarz 82954d9190 Build: Associate libusb include dir with icsneocpp
If an external project links to the icsneocpp target and libusb has
been installed in a non-standard location, the build will fail to find
libusb.h because LIBUSB_INCLUDE_DIR is not associated with the
target.

Closes #57
2021-09-20 21:31:13 -04:00
Paul Hollinsky 1b13e2d6a4 MessageFilter: Ensure non-frames can be filtered by network type and ID 2021-09-20 19:38:00 -04:00
Paul Hollinsky c847d68f3c POSIX FTDI: Count LIBUSB_ERROR_IO as a disconnection 2021-09-20 19:30:59 -04:00
Paul Hollinsky 3764a2e814 Device: Wider tolerance for disconnections 2021-09-20 19:29:57 -04:00
Paul Hollinsky 5f44986c1b Merge branch 'master' into v0.3.0-dev 2021-08-22 13:15:54 -04:00
Paul Hollinsky 68715d515d Decoder: Allow older ResetStatus packets without voltage or temperature 2021-08-22 13:12:36 -04:00
Paul Hollinsky 27184a203f Legacy: Use new layout for SDeviceSettings
This fixes issues where the settings values would be shifted.
2021-08-20 10:36:55 -04:00
Paul Hollinsky c7e7222140 Legacy: Ensure stddef.h is present for size_t
Many compilers won't need this, but better to
have it so it's correct.
2021-08-05 15:07:02 -07:00
Paul Hollinsky 6241996a58 RAD-Star 2: Fix invalid serial numbers being reported 2021-07-06 19:38:41 -04:00
Paul Hollinsky 84c6b202c7 RAD-Star 2: Fix invalid serial numbers being reported 2021-07-06 19:31:44 -04:00
Paul Hollinsky 16b88b7787 macOS: PCAP: Fix typo 2021-07-05 23:55:22 -04:00
Paul Hollinsky 0c67cdf078 macOS: PCAP: Fix typo 2021-07-05 23:54:15 -04:00
Paul Hollinsky bb65e37841 Merge branch 'master' into v0.3.0-dev 2021-06-17 21:07:50 -04:00
Paul Hollinsky 02c14aeb35 macOS: PCAP: Add code necessary for device discovery
You will still need chmod_bpf or similar to find devices
2021-06-17 21:07:22 -04:00
Tomasz Ziobrowski ca83d7c4f2 Fixed ValueCan4 Industrial settings interpretation.
Description:
Possibly was an type - casting was done different structure.
Was not possible to determine or setup settings for ValueCan4 Industrial.

Whitespace fixed from the original commit
Co-authored-by: Paul Hollinsky <phollinsky@intrepidcs.com>
2021-06-16 21:02:42 -04:00
sbo79 4da5f63e57 Update README.md
Just experienced list filters got introduced to cmake in 3.6.... still failed run trough in ubuntu 18.04. works above 3.12.
2021-06-15 19:19:47 -04:00
Paul Hollinsky 37d06807e4 POSIX: PCAP: Update inferface name to match Windows implementation 2021-06-15 19:09:13 -04:00
Paul Hollinsky b13a33f0be Windows: PCAP: Less verbose name for the interface
Fixing some tabs/spaces formatting here as well
2021-06-15 19:09:05 -04:00
Tomasz Ziobrowski af2c30885b Added support for MinGW32 - to be working with qticsneo 2021-06-15 20:15:08 +02:00
Paul Hollinsky 3cff831c6b Examples: C++: Correct compilation in a C++20 project
Otherwise nonstd::optional doesn't match std::optional
2021-06-14 14:42:37 -04:00
Paul Hollinsky a8562aca60 API: Legacy: Make icsneoFindDevices edge cases match icsneo40 2021-06-14 14:41:54 -04:00