Use IntFlag for MethodAccessMode3 bitmask values - #51
Conversation
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.
|
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. Regards, |
|
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. Best regards, |
Summary
MethodAccessMode3represents 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
GXIntEnumprevents these combined flags from being interpreted correctly.Solution
Replace
GXIntEnumwithGXIntFlagso thatMethodAccessMode3behaves as a proper bitmask while preserving the existing API.This change aligns the implementation with the DLMS Blue Book definition of
MethodAccessMode3.