-
Notifications
You must be signed in to change notification settings - Fork 75
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
Update query, reply and error messages format #372
Conversation
@jean-roland If this pull request contains a bugfix or a new feature, then please consider using |
1 similar comment
@jean-roland If this pull request contains a bugfix or a new feature, then please consider using |
@@ -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
|
||
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
_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
#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
// ~ [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
// ~ [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
@@ -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
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
_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
@@ -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
8311045
into
eclipse-zenoh:protocol_changes
Re-align reply, query and error message format with Zenoh changes.
Plus some bugfix on test_msgcodec.
Part of #344