Closed yensoon2 closed 1 year ago
Hello @yensoon2. Thank you for working on this feature. I'm also looking to use slinktool with 128 and 256-byte records. I tried running your code but hit an error during compile.
slinktool.c:126:63: warning: implicit declaration of function 'sl_recsize' is invalid in C99 [-Wimplicit-function-declaration]
packet_handler ((char *)&slpack->msrecord, ptype, seqnum, sl_recsize (slpack, SLRECSIZE));
1 warning generated.
cc -o ../slinktool dsarchive.o archive.o slinkxml.o slinktool.o -L../libslink -L../ezxml -lslink -lezxml
Undefined symbols for architecture x86_64:
"_sl_recsize", referenced from:
_main in slinktool.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../slinktool] Error 1
make: *** [all] Error 2
[OSX 10.13.6]
I don't see sl_recsize
defined anywhere. Are you using a modified version of libslink
as well?
I'm working on an update to libslink for general modernization including the ability to receive and automatically detect variable record lengths. Automatic record length detection was completed in this commit. Once this is released I will update slinktool.
Thanks @chad-iris
Good morning @chad-iris,
I’m a user of some of your SeedLink software – thank you very much for writing them.
I noticed that slinktool v4.3 (i.e. currently the latest version of slinktool) fails to work with “low-latency” SeedLink servers that serve 256-byte SeedLink packets, because slinktool v4.3 has been hardcoded at compile time to only work with 512-byte SeedLink packets.
This pull request allows slinktool to determine SeedLink packet sizes at run time, so that slinktool can work well with both “normal” SeedLink servers that serve 512-byte SeedLink packets and “low-latency” SeedLink servers that serve 256-byte SeedLink packets, without requiring users to recompile slinktool.
Can you please consider including this pull request into future versions of slinktool?
Thank you,
@yen-soon