[Hamlib-developer] What am I missing?
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@n0...> - 2025-07-25 22:28:54
|
Looking at riglist.h there is an ominous set of comments toward the beginning of the file: // The rig model number is designed to fit in a 32-bit int // As of 2024-07-14 we have 39 backends defined -- need to be careful // about generating new ones // Perhaps combine them under a MISC entry should work // As of 2020-02-18 we have 33 backends defined // With a max of 1000 models per backend we get total a model number // range of 1001-33001 // This MAX was 100 prior to 2020-02-18 and Icom was close to running // out of the 100 range The macros this precedes are: #define MAX_MODELS_PER_BACKEND 1000 #define RIG_MAKE_MODEL(a,b) (MAX_MODELS_PER_BACKEND*(a)+(b)) #define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) All of the model numbers are decimal values. The 32 bit int referenced is rig_model_t which is declared as a uint32_t which has a value range of 0 to 4294967295. At 1000 models per backend, my calculator shows this leaves us *only* 4294967 backends. How will we cope? I'm sure we could have 10000 models per backend and we wouldn't run out for a few lifetimes. By then 32 bit will likely seem as quaint as 4 bit does today. Both comments were added by Mike, most of it in 2020 and lines two and three about a year ago. I wonder if he had in mind that rig_model_t was being used as a bit mask? Of course I don't know. Unless I'm reading the macro wrong, it seems to me his was an unfounded concern. 73, Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819 |