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
Requires a 4-parameter subbits function #12587
Comments
The documentation for the family of subbits functions says that the fifth and sixth parameters are optional (since they only make sense when the forth parameter is 'integer'). However, before this commit `subbits/4` and `subbits/5` did not exist. Fixes: https://emqx.atlassian.net/browse/EMQX-11942 emqx#12587
PR with fix has been created: |
@kjellwinblad Hi, I revisited the code of this PR once again, and found that there may be some problems in the implementation. Neither float nor bits types distinguish between signed and unsigned. Instead, they should distinguish between big endian and little endian. So the 5th param of the |
Result:
Supplement: float distinguishes big and little endian, bits does not distinguish. |
The argument list order is the same in I think we can still change
I guess this is how it should be? I'm not sure if we can change this now since the function has existed in earlier releases. |
I agree with this.
I think we could remove |
What happened?
Arg 5 and Arg 6 of the rule engine built-in function
subbits
are only valid when Arg 4 isinteger
, but the rule engine does not provide a 4-parametersubbits
, so when Arg4 isbits
orfloat
, I still have to write like this:What did you expect to happen?
Support:
How can we reproduce it (as minimally and precisely as possible)?
No response
Anything else we need to know?
No response
EMQX version
EMQX v5.4.1
OS version
macOS 13.4
Log files
The text was updated successfully, but these errors were encountered: