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

Add examples #66

Merged
merged 6 commits into from
Mar 22, 2024
Merged

Add examples #66

merged 6 commits into from
Mar 22, 2024

Conversation

mjhouse
Copy link
Owner

@mjhouse mjhouse commented Mar 21, 2024

This will partially resolve #54 and #41

  • Added inner 'mil_std_1553b_derive' crate that contains proc macros to implement Word and some conversion functions for a custom word.
  • Added default feature flag derive that includes the 'mil_std_1553b_derive' crate.
  • Added proc macros:
    • A derive macro for Word that requires that Default is also implemented and that there are two fields that are decorated with #[data] and #[parity], respectively. These two fields need types [u8;2] and u8 respectively.
    • An attribute macro called #[field(...)] that takes an identifier and a u16 bit mask, and adds a const mask and const field to the impl.
  • Added two example projects that demonstrate a custom word and simple message construction.
  • Made Field public
  • Added get_as<T>() method of message
  • Moved Word trait into its own file
  • Added some extra &DataWord conversions

Copy link
Contributor

github-actions bot commented Mar 21, 2024

Coverage

File Coverage
All files 99%
src/message/packets.rs 100%
src/errors.rs 100%
src/word/words.rs 98%
src/fields.rs 100%
src/message/messages.rs 98%
src/word/enums.rs 100%
src/flags.rs 100%

Minimum allowed coverage is 95%

Generated by 🐒 cobertura-action against db347bf

@mjhouse mjhouse merged commit 27e4c75 into development Mar 22, 2024
17 checks passed
@mjhouse mjhouse deleted the add_examples branch March 22, 2024 19:14
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.

Add standalone examples to project
1 participant