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

E2E: Invent support for E2E Profile 05. #589

Merged
merged 2 commits into from
Dec 20, 2023
Merged

E2E: Invent support for E2E Profile 05. #589

merged 2 commits into from
Dec 20, 2023

Conversation

brenkem
Copy link
Contributor

@brenkem brenkem commented Dec 15, 2023

As requested under 1 I split the P05 from the PR and add the changes here to a new PR.

This PR adds support for the E2E Profile 05, that we added and tested in our project.

Please check to merge the changes or request changes if needed. Thanks.

struct profile_config {
profile_config() = delete;

profile_config(uint32_t _data_id, size_t _offset,
Copy link
Contributor

Choose a reason for hiding this comment

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

Profile 05 does not require _min_data_length nor _max_data_length. Instead, it uses a fixed data length. The necessary parameters can be found here


void write_8(e2e_buffer &_buffer, uint8_t _data, size_t _index);
void write_16(e2e_buffer &_buffer, uint16_t _data, size_t _index);
void write_32(e2e_buffer &_buffer, uint32_t _data, size_t _index);
Copy link
Contributor

Choose a reason for hiding this comment

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

This method is not used anywhere, it can be removed

" (" << offset << ")";
offset /= 8;

size_t min_data_length = read_value_from_config<size_t>(_config,
Copy link
Contributor

Choose a reason for hiding this comment

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

min_data_length and max_data_length are not parameters of profile 05, instead use just dataLength

}

bool
profile_05_checker::verify_input(const e2e_buffer &_buffer) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

The verify_input method should be checking the fixed dataLength

}

bool
protector::verify_inputs(e2e_buffer &_buffer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The verify_input method should be checking the fixed dataLength

@brenkem
Copy link
Contributor Author

brenkem commented Dec 18, 2023

I added the requested changes. Please check and let me know if anything else needs to be fixed.

Thanks.

@goncaloalmeida goncaloalmeida merged commit 00ab822 into COVESA:master Dec 20, 2023
2 checks passed
@brenkem brenkem deleted the add_P05 branch January 2, 2024 09:45
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.

4 participants