Mike Black W9MDB
6f9d057162
astyle files getting ready for release
2022-05-13 16:50:13 -05:00
Mike Black W9MDB
a5fb30d5b6
Improve windows iofunc a bit
2022-03-29 16:16:07 -05:00
Mike Black W9MDB
8c34ce1a2d
astyle source code
2022-02-05 15:27:43 -06:00
Mike Black W9MDB
68e121d82c
Change all to remove HAVE_CONFIG dependency and include <hamlib/config.h> by default
...
This is necessary to keep alignment between the client view of rig->state and the shared libarary view
Including PTHREAD functions in rig->state necessitated this as HAVE_PTHREAD only defined during hamlib compilation.
Clients including hamlib/rig.h did not pick up all the HAVE* config variable that control what gets included
https://github.com/Hamlib/Hamlib/issues/947
2022-02-04 07:41:36 -06:00
Mike Black W9MDB
2e218c56b6
Fix some more mingw errors on iofunc.c
2022-01-31 07:42:04 -06:00
Mike Black W9MDB
6e6d22ae36
Fix iofunc.c compilation error on mingw
2022-01-31 07:40:53 -06:00
Mike Black W9MDB
7b4b7ee630
Add a depth count to debug statements to help understand calling sequences
...
First call into rig functions is level 1
Top level like rigctl, rigctld is level 0
Non-depth calls are internal debug statements -- which can be modified to also show levels but that's a whole lot of statements not really necessary
Normal calls from other clients will be level 1
2022-01-30 23:37:01 -06:00
Mike Black W9MDB
86c62d5dbb
Remove ASYNC_BUG #ifdef blocks as it is all working now
2022-01-28 09:55:48 -06:00
Mike Black W9MDB
fab7f4d54c
Revert "Revert "Deprecate hamlib_port_t to hamlib_port_t_deprecated""
...
Fixing hamlib_port_t deprecation
This reverts commit f696123a3b
.
https://github.com/Hamlib/Hamlib/issues/894
2022-01-27 06:37:55 -06:00
Mike Black W9MDB
f696123a3b
Revert "Deprecate hamlib_port_t to hamlib_port_t_deprecated"
...
This reverts commit 401e718d60
.
2022-01-26 17:56:58 -06:00
Mike Black W9MDB
81bb70bb84
Deprecate hamlib_port_t to hamlib_port_t_deprecated
...
New hamlib_port_t at end of structure -- eventually need to change this to a pointer'
Enable ASYNC_BUG now works with new hamlib_port_t
Backwards compatible with already-compiled clients and newly-compiled clients
https://github.com/Hamlib/Hamlib/issues/894
2022-01-26 12:39:13 -06:00
Mike Black W9MDB
a277d7ab9b
Changes changing hamlib_port_t to pointer are not backwards compatible
2022-01-25 17:41:26 -06:00
Mike Black W9MDB
9e86e62238
Enable async I/O by default
...
Change hamlib_port_t to a pointer in rig.state
Deprecate static hamlib_port_t structure
New hamlib_port_t structure at end of rig.state
Clients built with older hamlib will use old structure in DLL
Clients built with newer hamlib will use new structure in DLL
So we maintain backwards compatibility until Hamlib 5.0
https://github.com/Hamlib/Hamlib/issues/894
2022-01-25 07:59:47 -06:00
Mike Black W9MDB
4dfaa03838
Enable ASYNC and rename async to asynio to avoid python name collision
...
https://github.com/Hamlib/Hamlib/issues/894
2022-01-24 10:37:07 -06:00
Mikael Nousiainen
26e5692119
Remove comments added during debugging
2022-01-23 19:35:15 +02:00
Mikael Nousiainen
1f428c8d95
Allow icom_rig_open() to succeed even if the rig is powered off. Fix issues with async I/O error code propagation. Allow rigctld daemon to start even if rig is powered off. Add mutex locks around rig_open()/rig_close() calls as multiple client connections could end up calling them concurrently, which could lead to all kinds of issues as the functions are not meant to be thread-safe. This also blocks execution of rigctl commands during rig open/close.
2022-01-22 23:19:07 +02:00
Mike Black W9MDB
1eb474f2e6
Allow read_string_generic to timeout even when some chars have been received
2022-01-20 17:04:20 -06:00
Mike Black W9MDB
b6c5ecd584
Move write_block debug statement before post_write_delay so the debug timing makes more sense
2022-01-19 12:54:31 -06:00
Mike Black W9MDB
21ac4aaf05
Add method debug to write_block to show port_write logic used
2022-01-10 11:32:29 -06:00
Mike Black W9MDB
13e50f1a03
Fix compile warning in iofunc.c
2022-01-08 17:09:05 -06:00
Mike Black W9MDB
2f0b12fbb3
Fix WIN32 build
2022-01-05 13:13:12 -06:00
Mike Black W9MDB
0b6d423633
Revert "Fix win32 build"
...
This reverts commit 3f431314d8
.
2022-01-05 13:11:34 -06:00
Mike Black W9MDB
3f431314d8
Fix win32 build
2022-01-05 13:08:38 -06:00
Mikael Nousiainen
8ee0383464
Merge branch 'master' into async-io-on-windows
2022-01-03 14:40:09 +02:00
Mikael Nousiainen
a00d78c860
Implement pipes using asynchronous/overlapped I/O on Windows
2022-01-03 14:18:49 +02:00
Mike Black W9MDB
8a78069975
Make write_block fail when device is not open
...
https://github.com/Hamlib/Hamlib/issues/912
2021-12-30 06:59:26 -06:00
Mike Black W9MDB
e223cf8ac9
Remove debug statements from iofunc.c
2021-12-28 23:02:03 -06:00
Mike Black W9MDB
c8cf296711
https://github.com/Hamlib/Hamlib/issues/907
2021-12-28 18:14:35 -06:00
Mike Black W9MDB
0974680022
Fix compiler error from async code
2021-12-27 08:33:53 -06:00
Mike Black W9MDB
2fe9117639
Disable async processing and move async definitions out of hamlib_port_t
...
This broke backwards compatibility with DLL/shared libraries
2021-12-26 22:24:09 -06:00
Mike Black W9MDB
ef77f1c71f
Fix pipe NONBLOCK flags in iofunc.c -- was not being applied to both file descriptors
...
https://github.com/Hamlib/Hamlib/issues/902
2021-12-26 07:27:38 -06:00
Mike Black W9MDB
296b3b6e03
Change pipe flags to GETFL/SETFL for async NONBLOCK operations
2021-12-21 07:34:39 -06:00
Mike Black W9MDB
2c7394f638
Fix msys compilation with new pipe calls
...
Windows pipe will likely not work and needs to be replaced with overlapped I/O
2021-12-20 12:42:31 -06:00
Mike Black W9MDB
4f4b14f771
Fix compiler warning in iofunc.c
2021-12-20 09:17:27 -06:00
Mikael Nousiainen
c764336e73
Fix build warnings caused by changes to I/O function signatures
2021-12-18 23:49:45 +02:00
Mikael Nousiainen
56c95b1529
Merge upstream changes and fix conflicts
2021-12-12 23:05:26 +02:00
Mikael Nousiainen
c20f397c24
Refactor WIN32 I/O port routines to be hopefully compatible with async data reader (not tested). Fix some incomplete data fields in UDP snapshot packets.
2021-11-30 09:25:51 +02:00
Mikael Nousiainen
d857f18163
Initial implementation of: reader thread for async handling of rig data, UDP multicast publisher routine and rig state poll thread routine. The reader thread can correctly handle asynchronous data, such as transceive or spectrum data. Work in progress: multi-platform code for I/O routines still missing and the poll routine is not yet in use. Tested briefly on an IC-7300 so far.
2021-11-28 20:52:29 +02:00
Mike Black W9MDB
63a51c36a1
astyle files preparing for 4.4 release
2021-11-28 12:41:10 -06:00
Mike Black W9MDB
d22e7d2f77
Update minlen debug to be accurate
...
https://github.com/Hamlib/Hamlib/issues/850
2021-11-25 10:31:44 -06:00
Mike Black W9MDB
ada6543b09
Update read_string to use a minimum-size read based on experience
...
https://github.com/Hamlib/Hamlib/issues/850
2021-11-24 15:48:11 -06:00
Mike Black W9MDB
d820ee9dbf
Add expected_len to read_string function for potential serial I/O speedup
...
https://github.com/Hamlib/Hamlib/issues/850
2021-11-24 13:02:39 -06:00
Mikael Nousiainen
1f538ad7ec
Started work on asynchronous reader thread to enable handling of rig tranceive and waterfall data (WIP)
2021-11-20 21:33:29 +02:00
Mike Black W9MDB
9842cdb1f3
Some minor changes to serial.c as we progress to a faster method
...
https://github.com/Hamlib/Hamlib/issues/850
2021-11-02 11:17:19 -05:00
Mike Black W9MDB
8fe190d622
Reduce error messages about RIG_VFO_OTHER which only applies to some rigs like Icom rigs with the 0x25 command
...
Add a flush_flag to read_string so that the new serial_flush will not produce a timeout value when flushing
https://github.com/Hamlib/Hamlib/issues/835
2021-11-01 23:43:45 -05:00
Mike Black W9MDB
1ed398466d
Revert "Change serial_flush to read data instead of TCFLUSH"
...
Was causing timing problems
This reverts commit d28f440968
.
2021-10-29 14:38:40 -05:00
Mike Black W9MDB
d28f440968
Change serial_flush to read data instead of TCFLUSH
...
This is for the future to enable transceive mode on rigs
2021-10-29 11:24:16 -05:00
Mike Black W9MDB
d90d3eb0d0
Use EAGAIN error to retry when serial port is unavailable
...
https://github.com/Hamlib/Hamlib/issues/818
2021-10-10 08:33:31 -05:00
Mike Black W9MDB
4b77fc1eb3
Allow for EBUSY return during port read and retry 10x5ms for 50ms total before returning an error
...
https://github.com/Hamlib/Hamlib/issues/818
2021-10-08 23:58:07 -05:00
Mike Black W9MDB
9032e3e58b
Improve ser_open error message
2021-08-30 10:01:36 -05:00