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

Update query, reply and error messages format #372

Merged

Conversation

jean-roland
Copy link
Contributor

@jean-roland jean-roland commented Mar 18, 2024

Re-align reply, query and error message format with Zenoh changes.

Plus some bugfix on test_msgcodec.

Part of #344

@eclipse-zenoh-bot
Copy link

@jean-roland 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.

1 similar comment
@eclipse-zenoh-bot
Copy link

@jean-roland 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.

@@ -173,7 +172,7 @@

// Check if this is the same resource key
if (_z_str_eq(pen_rep->_reply.data.sample.keyexpr._suffix, reply.data.sample.keyexpr._suffix) == true) {
if (timestamp.time <= pen_rep->_tstamp.time) {
if (msg->_commons._timestamp.time <= pen_rep->_tstamp.time) {

Check warning

Code scanning / Cppcheck (reported by Codacy)

time is Y2038-unsafe Warning

time is Y2038-unsafe

void _z_msg_reply_clear(_z_msg_reply_t *msg) { _z_value_clear(&msg->_value); }
void _z_msg_reply_clear(_z_msg_reply_t *msg) { _z_push_body_clear(&msg->_body); }

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 804 with no text in the supplied rule-texts-file Warning

misra violation 804 with no text in the supplied rule-texts-file
_z_reply_body_t _body;
} _z_msg_reply_t;
void _z_msg_reply_clear(_z_msg_reply_t *msg);
#define _Z_FLAG_Z_R_C 0x20

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 2101 with no text in the supplied rule-texts-file Warning

misra violation 2101 with no text in the supplied rule-texts-file
#define _Z_FLAG_Z_E_I 0x40
/// ~ pl: <u8;z32> ~ Payload
/// +---------------+
#define _Z_FLAG_Z_E_E 0x40

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 2101 with no text in the supplied rule-texts-file Warning

misra violation 2101 with no text in the supplied rule-texts-file
// ~ [qry_exts] ~ if Z==1
// +---------------+
#define _Z_FLAG_Z_Q_P 0x20 // 1 << 6 | Period if P==1 then a period is present
#define _Z_FLAG_Z_Q_C 0x20 // 1 << 5 | Consolidation if C==1 then consolidation is present
#define _Z_FLAG_Z_Q_P 0x40 // 1 << 6 | Params if P==1 then parameters are present

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 2101 with no text in the supplied rule-texts-file Warning

misra violation 2101 with no text in the supplied rule-texts-file
// ~ [qry_exts] ~ if Z==1
// +---------------+
#define _Z_FLAG_Z_Q_P 0x20 // 1 << 6 | Period if P==1 then a period is present
#define _Z_FLAG_Z_Q_C 0x20 // 1 << 5 | Consolidation if C==1 then consolidation is present

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 2101 with no text in the supplied rule-texts-file Warning

misra violation 2101 with no text in the supplied rule-texts-file
@@ -340,7 +340,8 @@
return _Z_RES_OK;
}

int8_t _z_send_reply(const _z_query_t *query, _z_keyexpr_t keyexpr, const _z_value_t payload) {
int8_t _z_send_reply(const _z_query_t *query, _z_keyexpr_t keyexpr, const _z_value_t payload,

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 804 with no text in the supplied rule-texts-file Warning

misra violation 804 with no text in the supplied rule-texts-file
union {
_z_msg_del_t _del;
_z_msg_put_t _put;
} _body;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 19.2 rule Note

MISRA 19.2 rule
_Bool attachment;
} _z_msg_query_reqexts_t;
_z_msg_query_reqexts_t _z_msg_query_required_extensions(const _z_msg_query_t *msg);
void _z_msg_query_clear(_z_msg_query_t *msg);

typedef struct {
_Bool _is_put;
union {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 19.2 rule Note

MISRA 19.2 rule
@@ -25,8 +25,11 @@
// TODO check id to know where to dispatch

#if Z_FEATURE_QUERY == 1
ret = _z_trigger_query_reply_partial(zn, id, key, reply->_value.payload, reply->_value.encoding, Z_SAMPLE_KIND_PUT,
reply->_timestamp);
if (reply->_body._is_put) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
@OlivierHecart OlivierHecart merged commit 8311045 into eclipse-zenoh:protocol_changes Mar 19, 2024
31 of 51 checks passed
@jean-roland jean-roland deleted the ft_query_reply branch April 9, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants