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

Start of updating CAN ID header format to match v1.0 #99

Merged
merged 3 commits into from
Mar 28, 2019

Conversation

aasmune
Copy link
Contributor

@aasmune aasmune commented Mar 26, 2019

This is a start of updating the ID header to match the new format for v1.0. Note: It could be that I have missed some parts which also must be updated related to the new header format, or that I have made some mistakes. Therefore, I would appreciate that you check my changes thoroughly.

These changes were originally included in #96, but we chose to split it out to a separate PR.

Copy link
Member

@pavel-kirienko pavel-kirienko left a comment

Choose a reason for hiding this comment

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

This is great. Beware that the library API will also need updating: data type ID will need replacing with subject ID and service ID, new priority limits, etc.

canard.c Outdated Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
tests/test_rxerr.cpp Outdated Show resolved Hide resolved
@aasmune aasmune force-pushed the header_rework-v1.0 branch from 87a8f35 to f780ae0 Compare March 26, 2019 21:19
canard.c Show resolved Hide resolved
Copy link
Member

@pavel-kirienko pavel-kirienko left a comment

Choose a reason for hiding this comment

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

The function "canardCleanupStaleTransfers()" must be removed (this affects the API and the demo); see section 4.2.1 for details. This change to the spec was implemented in order to improve deterministic behavior at the cost of somewhat increased average-case memory usage (the worst case is unaffected). The constant CANARD_RECOMMENDED_STALE_TRANSFER_CLEANUP_INTERVAL_USEC is therefore not needed either (there could be other constants which we no longer need).

Data type signature must be removed from everywhere. This includes the callback signature CanardShouldAcceptTransfer.

The API functions still use "data type ID" instead of "subject ID" and "service ID", this should be fixed.

The transfer priority constants require updating. We have proper mnemonic names for the eight priority levels defined in 4.1.4.

The script show_data_type_info.py will no longer be needed, since there are no signatures to worry about.

canard.c Outdated Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
canard.h Outdated Show resolved Hide resolved
canard.h Outdated Show resolved Hide resolved
canard.h Show resolved Hide resolved
canard.c Show resolved Hide resolved
canard.c Outdated Show resolved Hide resolved
canard.c Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@aasmune
Copy link
Contributor Author

aasmune commented Mar 27, 2019

The function "canardCleanupStaleTransfers()" must be removed (this affects the API and the demo); see section 4.2.1 for details. This change to the spec was implemented in order to improve deterministic behavior at the cost of somewhat increased average-case memory usage (the worst case is unaffected). The constant CANARD_RECOMMENDED_STALE_TRANSFER_CLEANUP_INTERVAL_USEC is therefore not needed either (there could be other constants which we no longer need).

Data type signature must be removed from everywhere. This includes the callback signature CanardShouldAcceptTransfer.

The API functions still use "data type ID" instead of "subject ID" and "service ID", this should be fixed.

The transfer priority constants require updating. We have proper mnemonic names for the eight priority levels defined in 4.1.4.

The script show_data_type_info.py will no longer be needed, since there are no signatures to worry about.

I would prefer to do this in a separate PR, for the same reason as the other comment, as this one is mainly for updating header format. I would suggest doing it as a part of #98.

@aasmune
Copy link
Contributor Author

aasmune commented Mar 27, 2019

I notice that the travis build has been queued for a long time, could you check that I didn't make any mistakes when updating the travis file? @pavel-kirienko

@pavel-kirienko
Copy link
Member

I notice that the travis build has been queued for a long time, could you check that I didn't make any mistakes when updating the travis file?

It's weird. The changes seem benign and I can't imagine why would they cause any problems. I just tried restarting the build but it didn't help, it keeps getting stuck at the stage "Queued". Could be related to this:

@aasmune
Copy link
Contributor Author

aasmune commented Mar 27, 2019

I notice that the travis build has been queued for a long time, could you check that I didn't make any mistakes when updating the travis file?

It's weird. The changes seem benign and I can't imagine why would they cause any problems. I just tried restarting the build but it didn't help, it keeps getting stuck at the stage "Queued". Could be related to this:

It could be. The build is finally finished queueing and has passed now!

@aasmune
Copy link
Contributor Author

aasmune commented Mar 28, 2019

What do you think, are we ready to merge soon?

@pavel-kirienko
Copy link
Member

Yes. Is this ready for another review?

@aasmune
Copy link
Contributor Author

aasmune commented Mar 28, 2019

Yes, it is.

Copy link
Member

@pavel-kirienko pavel-kirienko left a comment

Choose a reason for hiding this comment

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

LGTM, assuming that the CRC handling and #98 will be updated separately.

@aasmune
Copy link
Contributor Author

aasmune commented Mar 28, 2019

LGTM, assuming that the CRC handling and #98 will be updated separately.

Yes.

@aasmune aasmune merged commit 43c5385 into OpenCyphal:uavcan-v1.0 Mar 28, 2019
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.

2 participants