I am using a GX400W to interface with some other equipment, and as part of the communication protocol I need to perform a CRC. This uses lots of bit-shifting and masking, which I don’t believe is natively supported in Lua. There are a number of extensions (BitOps - bitop.luajit.org/) for adding bit operations. Are any of these integrated, or are there plans to be?
I can write equivalent functions using divide-by-2 and multiply-by-2 and similar to achieve rotations and masking, but it would be better if there was a proper library to do it.
Hi Alan,
My apologies for the delay in response. You’re right we don’t currently have a bitwise operation library included in our current release and it is definitely needed. We do plan to include a bitwise library (likely bit32 found in Lua 5.2) in the next official ALEOS AF targeted for end of September.
Thanks again for the message, your feedback and feature requests are really appreciated.
For what it 's worth: the upcoming ALEOS version 4.3.4 will bring a new version of AAF that natively support bitwise operation.
We backported the Lua5.2 bitlib into the framework, so the API is strictly the same: lua.org/manual/5.2/manual.html#6.7
ALEOS 4.3.4 should be released in less than a month from now.