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

fix: Use BuffaloZdo in ZStackAdapter #1133

Merged
merged 26 commits into from
Sep 14, 2024
Merged

fix: Use BuffaloZdo in ZStackAdapter #1133

merged 26 commits into from
Sep 14, 2024

Conversation

Koenkk
Copy link
Owner

@Koenkk Koenkk commented Jul 27, 2024

I checked a bit how we can use BuffaloZdo in the zstack adapter, this PR contains a poc.

@Nerivec could you check 8f3d6b6 ?

@Koenkk Koenkk marked this pull request as draft July 27, 2024 12:32
@Koenkk Koenkk marked this pull request as ready for review September 6, 2024 19:38
@Koenkk Koenkk requested a review from Nerivec September 6, 2024 19:38
@Nerivec
Copy link
Collaborator

Nerivec commented Sep 13, 2024

    public readIeeeAddr(): EUI64 {
        return `0x${Buffer.from(this.readBuffer(8)).reverse().toString('hex')}`;
    }

in src/buffalo/buffalo.ts, should fix some of the issues. Should be less dangerous overall (no reversal in underlaying buffer), cleaner and much faster as a bonus (x2-3, despite the added Buffer alloc).
Note: same pattern is used in buffaloZiGate.ts and should be changed too (just for perf.).

    public readIeeeAddrBE(): EUI64 {
        return `0x${this.readBuffer(8).toString('hex')}`;
    }

@Koenkk Koenkk merged commit 4fa371d into master Sep 14, 2024
2 checks passed
@Koenkk Koenkk deleted the fix/zstack-zdo branch September 14, 2024 15:16
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