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

Add support for qos settings in sample #348

Merged
merged 10 commits into from
Feb 23, 2024

Conversation

DenisBiryukov91
Copy link
Contributor

Add support for qos settings in sample (see eclipse-zenoh/zenoh#730)

@eclipse-zenoh-bot
Copy link

@DenisBiryukov91 If this pull request contains a bugfix or a new feature, then please consider using Closes #ISSUE-NUMBER syntax to link it to an issue.

z_congestion_control_t congestion_control;
bool express;
} _z_qos_t;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment and the structure do not agree on type visibility (_z_priority_t vs z_priority_t), also we use _Bool for booleans generally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -227,6 +241,7 @@ typedef struct {
_z_timestamp_t timestamp;
_z_encoding_t encoding;
z_sample_kind_t kind;
_z_qos_t qos;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure by putting the private type here, the public alias z_qos_t is never used. So I'm tempted to use z_qos_t instead, if that doesn't cause include issues.

@@ -29,7 +29,8 @@
break;
}
}
printf("[rx]: Received packet on %s, len: %d, validity: %d\n", z_loan(keystr), (int)sample->payload.len, is_valid);
printf("[rx]: Received packet on %s, len: %d, validity: %d, qos {priority: %d, cong_ctrl: %d}\n", z_loan(keystr),

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.7 rule Note

MISRA 17.7 rule
- replace _z_n_qos_unmake with _z_n_qos_unmake_public in subscription.c
*/
static inline z_priority_t z_qos_get_priority(z_qos_t qos) {
z_priority_t ret = _z_n_qos_get_priority(qos);
return ret == _Z_PRIORITY_CONTROL ? Z_PRIORITY_DEFAULT : ret;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
@milyin milyin merged commit 2ac04a2 into eclipse-zenoh:main Feb 23, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants