Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/udp-receive-thread-timing-configuration #1262

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

rex-schilasky
Copy link
Contributor

@rex-schilasky rex-schilasky commented Nov 20, 2023

Description

There was one hardcoded udp sample receive timeout parameter of 10 ms inside CSampleReceiver::Receive. This function is used in 3 different receive threads for registration, logging and payload udp sample receiving. This internal parameter is now replaced by a function parameter and can be configured in ecal_def.h.

/* cylce time udp registration receive thread in ms */
#define CMN_REGISTRATION_RECEIVE_THREAD_CYCLE_TIME_MS  1000

/* cylce time udp logging receive thread in ms */
#define CMN_LOGGING_RECEIVE_THREAD_CYCLE_TIME_MS       1000

/* cylce time udp paylaod receive thread in ms */
#define CMN_PAYLOAD_RECEIVE_THREAD_CYCLE_TIME_MS       1000

They are adapted from 10 ms to 1000 ms. This will not lead to any new functional behavior except the the graceful shutdown of an eCAL node can take up to 1000 ms in theory.

Furthermore, there is a rarely used functionality of the CSubscriber API (CSubscriber::SetTimeout(int timeout_)) to define a timeout for incoming payload messages (independent from the transport layer). The resolution can be configured by the ecal_def.h parameter CMN_DATAREADER_TIMEOUT_RESOLUTION_MS. This parameter is now changed from 10 ms to 100 ms to decrease the cpu load of this test logic.

Summary:

  • hard coded receive timeout (10 ms) in CSampleReceiver::Receive replaced by function parameter
  • separate udp receive thread cycle time parameter introduced for registration, logging and payload (ecal_def.h), default now 1000 ms
  • delta time (resolution) for checking subscriber timeouts increased from 10 ms to 100 ms

Related issues

Related to #1236

Cherry-pick to

  • none

… function parameter

separate udp receive thread cycle times introduced for registration, logging and payload
delta time (resolution) for checking subscriber timeouts increased from 10 ms to 100 ms
@rex-schilasky rex-schilasky added the enhancement New feature or request label Nov 20, 2023
@rex-schilasky rex-schilasky merged commit 665dcc4 into master Nov 21, 2023
14 checks passed
@rex-schilasky rex-schilasky deleted the feature/udp-thread-timing-configuration branch February 15, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants