DLC as int vs byte TPCANMsgFD

Forum for the PCANBasic .NET Assembly Beta-Package containing
the PCANBasic-Assembly developed in .NET-Standard.
Post Reply
Posts: 8
Joined: Mon 13. Nov 2017, 15:42

DLC as int vs byte TPCANMsgFD

Post by ChololateIT » Thu 7. Jan 2021, 14:49


I just saw that

Code: Select all

is defined as int while in the "classic" library it's a byte. Is this a bug and will be changed to byte?

Best regards

Software Development
Software Development
Posts: 852
Joined: Wed 22. Sep 2010, 13:36

Re: DLC as int vs byte TPCANMsgFD

Post by K.Wagner » Fri 8. Jan 2021, 08:55


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.


Code: Select all


Code: Select all

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.
Best regards,

Post Reply