feature: make OSDP protocol constants configurable at build time#265
Closed
adaskar wants to merge 3 commits intogoToMain:masterfrom
Closed
feature: make OSDP protocol constants configurable at build time#265adaskar wants to merge 3 commits intogoToMain:masterfrom
adaskar wants to merge 3 commits intogoToMain:masterfrom
Conversation
- Add 7 configurable OSDP timeout/retry constants to CMakeLists.txt - Update osdp_config.h.in to use CMake variable substitution for configurable constants - Add command-line options to configure.sh for configurable constants - Keep 10 constants hardcoded (buffer sizes, limits, offsets, short timeouts) as they should not be changed - Maintain full backward compatibility with existing builds - All configurable constants default to their original hardcoded values Configurable constants: - OSDP_PD_SC_RETRY_MS - OSDP_PD_SC_TIMEOUT_MS - OSDP_PD_ONLINE_TOUT_MS - OSDP_CMD_MAX_RETRIES - OSDP_ONLINE_RETRY_WAIT_MAX_MS - OSDP_CMD_RETRY_WAIT_MS - OSDP_FILE_ERROR_RETRY_MAX Hardcoded constants (not configurable): - OSDP_PD_POLL_TIMEOUT_MS (50) - OSDP_RESP_TOUT_MS (200) - OSDP_PACKET_BUF_SIZE (256) - OSDP_RX_RB_SIZE (512) - OSDP_CP_CMD_POOL_SIZE (4) - OSDP_PD_MAX (126) - OSDP_CMD_ID_OFFSET (5) - OSDP_PCAP_LINK_TYPE (162) - OSDP_PD_NAME_MAXLEN (16) - OSDP_MINIMUM_PACKET_SIZE (128) Users can now configure timeout/retry values via: - CMake: -DOSDP_ONLINE_RETRY_WAIT_MAX_MS=3000 - configure.sh: --osdp-online-retry-wait-max-ms 3000
…com/adaskar/libosdp into feature/configurable-osdp-constants
Author
|
Fixes #263 |
Member
|
Thanks for the PR, looks good, but the approach may not be the best. Closing this PR for now, let's discuss this further in that thread and if needed we can reopen this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configurable constants:
Hardcoded constants (not configurable):
Users can now configure timeout/retry values via: