Forum for the PCANBasic .NET Assembly Beta-Package containing
the PCANBasic-Assembly developed in .NET-Standard.
- Posts: 7
- Joined: Mon 13. Nov 2017, 15:42
I just saw that
is defined as int
while in the "classic" library it's a byte
. Is this a bug and will be changed to byte?
- Software Development
- Posts: 767
- Joined: Wed 22. Sep 2010, 13:36
no it is not a bug, it was intended so. As you can see the classic TPCANMsg structure has also a member LEN of type byte, and in the assembly is defined as int too.
The idea is to prevent the user for making castings by himself when working with the assembly. The assembly checks and sends the real data size to the underlying driver. This assembly is thought to do more than the classic library you know; even when it looks most same as the classic API, it could be extended to have other help functions and classes.