PCANBasic

PCAN-Basic

PCAN-Basic Documentation
Home
PreviousUpNext
PCANBasic

Defines a class which represents the PCAN-Basic API for using within the Microsoft's .NET Framework and Python (ver. 2.6).

Syntax
public static class PCANBasic
public ref class PCANBasic abstract sealed
Public NotInheritable Class PCANBasic
class PCANBasic

The PCANBasic class collects and implements the PCAN-Basic API functions. Each method is called just like the API function with the exception that the prefix "CAN_" is not used. The structure and functionality of the methods and API functions is the same. 

Within the .NET Framework from Microsoft, the PCANBasic class is a static, not inheritable, class. It can (must) directly be used, without any instance of it, e.g. :

TPCANStatus res;
// Static use, without any instance
//
res = PCANBasic.Initialize(PCAN_USBBUS1,PCAN_BAUD_500K);

Within Python, a variable must be instantiated with an object of type PCANBasic, in order to use the API.

# Object instantiation
#
objPCAN = PCANBasic()
res = objPCAN.Initialize(PCAN_USBBUS1, PCAN_BAUD_500K)

Note that this class under Delphi is called TPCANBasic.

Copyright © 2017. PEAK-System Technik GmbH. All rights reserved.
Send feedback to this documentation