Skip to content

Use IntFlag for MethodAccessMode3 bitmask values - #51

Open
stefan-andrejevic wants to merge 1 commit into
Gurux:masterfrom
stefan-andrejevic:bugfix/method-access-bitmask
Open

Use IntFlag for MethodAccessMode3 bitmask values#51
stefan-andrejevic wants to merge 1 commit into
Gurux:masterfrom
stefan-andrejevic:bugfix/method-access-bitmask

Conversation

@stefan-andrejevic

Copy link
Copy Markdown

Summary

MethodAccessMode3 represents a bitmask according to the DLMS Blue Book.

The current implementation derives from GXIntEnum, which only supports single values and therefore cannot correctly represent combined method access rights returned by a meter.

Problem

Meters may return multiple method access rights combined into a single bitmask value (for example, value 3).

Using GXIntEnum prevents these combined flags from being interpreted correctly.

Solution

Replace GXIntEnum with GXIntFlag so that MethodAccessMode3 behaves as a proper bitmask while preserving the existing API.

This change aligns the implementation with the DLMS Blue Book definition of MethodAccessMode3.

MethodAccessMode3 represents a bitmask according to the DLMS Blue Book.

Using GXIntEnum prevents combined flag values from being represented
correctly when multiple access rights are returned by the meter.

Replace GXIntEnum with GXIntFlag to support proper bitmask semantics.
@gurux-kurumi

Copy link
Copy Markdown

Hi,

Thank you for pointing this out. This is fixed and released after testing. Please use the Gurux forum if you have any questions, ideas, or issues. That is read daily, whereas GitHub is only used to release source code.
www.gurux.fi/forum

Regards,
Mikko

@stefan-andrejevic

Copy link
Copy Markdown
Author

Hi Mikko,

Thanks for the update!

I’ve also been working on several improvements related to General Signing and message signatures for HIGH_ECDSA authentication.

These changes enable message signing when using GMAC, SHA-256, and ECDSA authentication, including combinations with authentication only, authentication + encryption, and authentication + encryption + digital signature.

Once I finish cleaning everything up and splitting the changes into logical commits, I’ll open additional PRs.

Hopefully they’ll be useful as well.
@gurux-kurumi

Best regards,
Stefan Andrejević

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