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

Feature: New Class MacAddress similar to IPAddress #9304

Merged
merged 23 commits into from Mar 18, 2024

Conversation

P-R-O-C-H-Y
Copy link
Member

Description of Change

This adds new class MacAddress that allows for better handling of MAC and BSSID addresses.
MacAddress also support 8-byte EUI-64 as noted in esp_mac.h.

Changes have been done on top of @mrengineer7777 PR #6667. Thanks David!

Tests scenarios

Tested by running slightly modified test sketch by @mrengineer7777.
https://gist.github.com/P-R-O-C-H-Y/ab6b2443fc57bc12ec424f89493b9022

Related links

Closes #6658

mrengineer7777 and others added 15 commits January 30, 2023 12:37
In the same style as class IPAddress.
Based on Apache License.
Added a few changes to make it closer to IPAddress Class implementation.
Makes it closer to IPAddress Class implementation
Moved implementation details .h->.cpp.  Added bounds checking on index operators.  Added constructor to MacAddress8 to match MacAddress.
Chars must be uppercase to match toString() and pass test
@P-R-O-C-H-Y P-R-O-C-H-Y added Type: Feature request Feature request for Arduino ESP32 Area: BT&Wifi BT & Wifi related issues Status: Review needed Issue or PR is awaiting review labels Feb 28, 2024
@P-R-O-C-H-Y P-R-O-C-H-Y added this to the 3.0.0-RC1 milestone Feb 28, 2024
@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Feb 28, 2024
Copy link
Contributor

github-actions bot commented Feb 28, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Added Printable":
    • summary looks empty
    • type/action looks empty
  • the commit message "Added Printable, constructor and extra operators":
    • summary looks empty
    • type/action looks empty
  • the commit message "Added Printble and some more operators":
    • summary looks empty
    • type/action looks empty
  • the commit message "Added construtor and Printable":
    • summary looks empty
    • type/action looks empty
  • the commit message "Added new classes MacAddress and MacAddress8":
    • summary looks empty
    • type/action looks empty
  • the commit message "Cleanup and bounds checking":
    • body's lines must not be longer than 100 characters
    • summary looks empty
    • type/action looks empty
  • the commit message "Fix buffer size for toString":
    • summary looks empty
    • type/action looks empty
  • the commit message "Fixed printTo":
    • summary looks empty
    • type/action looks empty
  • the commit message "Fixes include Printable":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update MacAddress.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update MacAddress.cpp":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update MacAddress.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update MacAddress8.h":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update toString function with single buf and return":
    • summary looks empty
    • type/action looks empty
  • the commit message "feat(MAC): Remove MacAddress8.h file":
    • scope/component should be lowercase without whitespace, allowed special characters are _ / . , * - .
  • the commit message "feat(MAC): Rework API to support both 6+8 bytes MacAddress":
    • scope/component should be lowercase without whitespace, allowed special characters are _ / . , * - .
  • the commit message "fix(MAC): Remove comment + reorder lines":
    • scope/component should be lowercase without whitespace, allowed special characters are _ / . , * - .

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

⚠️ Please consider squashing your 23 commits (simplifying branch history).

👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against df8c70c

Copy link
Collaborator

@lucasssvaz lucasssvaz left a comment

Choose a reason for hiding this comment

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

LGTM

@me-no-dev
Copy link
Member

@mrengineer7777 will you chime in to say if you are OK with this PR?

@lucasssvaz
Copy link
Collaborator

lucasssvaz commented Mar 4, 2024

@P-R-O-C-H-Y Could you add a simple example sketch ? (A very basic one is enough IMO)

@VojtechBartoska VojtechBartoska added Status: In Progress Issue is in progress and removed Status: Review needed Issue or PR is awaiting review labels Mar 13, 2024
@me-no-dev me-no-dev merged commit c17a688 into espressif:master Mar 18, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BT&Wifi BT & Wifi related issues Status: In Progress Issue is in progress Type: Feature request Feature request for Arduino ESP32
Projects
Development

Successfully merging this pull request may close these issues.

MacAddress.h
6 participants