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

Fixed AVnu certification test failure 6.1a and 6.3a #177

Merged
merged 3 commits into from
Jan 23, 2015

Conversation

christopher-s-hall
Copy link
Contributor

Rejects Announce message with sourcePortIdentity same as my own

AVnu certification test 6.3a - PASS
Rejects Path Trace TLV with ClockIdentity same as mine
Implemented PathTraceTLV Parsing
Implemented PathTraceTLV Append/Search Operations
Added debug (print method) to ClockIdentity class

Corrected misc output format (printf), indentation issues

Rejects Announce message with sourcePortIdentity same as my own

AVnu certification test 6.3a - PASS
Rejects Path Trace TLV with ClockIdentity same as mine
Implemented PathTraceTLV Parsing
Implemented PathTraceTLV Append/Search Operations
Added debug (print method) to ClockIdentity class

Corrected misc output format (printf), indentation issues
identityList.end();
}
int length() {
return 2*sizeof(uint16_t) + PTP_CLOCK_IDENTITY_LENGTH*identityList.size();

Choose a reason for hiding this comment

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

comment on magic 2* would be good. I'm guessing sizeof(tlvType) + sizeof(length)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add a comment

@pinealservo
Copy link
Contributor

This is just a general comment/suggestion for future reference, rather than something you should put into this commit:

I like to encapsulate the formatting of data into byte buffers/byte streams into a small library of functions that handle the writing of data, byte-order conversions (if necessary), and buffer position pointer management. This tends to make the functions that read/write various program data into the buffers much clearer and less error-prone, especially when you get into interactions of bit fields, byte order, and data field alignment. Casting arbitrary byte buffer positions to/from larger types can cause misaligned access exceptions on some architectures. E.g., from the ARM compiler support FAQ: "The compiler will generate code on the assumption that a pointer is correctly aligned." Most v7 ARM processors you're likely to run this on do support unaligned access, but notably Cortex-M processors still do not.

@andrew-elder
Copy link

MRP could benefit from pdu buffer read/write functions as well. I added as a wish to TWiki page.

Minor formatting changes
andrew-elder pushed a commit that referenced this pull request Jan 23, 2015
Fixed AVnu certification test failure 6.1a and 6.3a
@andrew-elder andrew-elder merged commit 8b6aa20 into Avnu:open-avb-next Jan 23, 2015
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.

3 participants