DriverOpenH (FUN)ΒΆ
FUNCTION DriverOpenH : CAA.HANDLE
Opens a CAN interface and allocates memory from heap.
Not every hardware supports each baud rate. If a baud rate is not supported or
if the interface cannot be opened due to different reasons, the function returns CAA.gc_hINVALID
.
The function can be called several times on the same interface,
so that multiple parts of a program can work on it.
You can set uiBaudrate
to 0 if the interface is already opened or if the default baudrate from configuration file should be used.
See following section in configuration file:
Example
See Write.
- InOut:
Scope
Name
Type
Comment
Return
DriverOpenH
CAA.HANDLE
handle of CAN interface or
CAA.gc_hINVALID
if failed.Input
usiNetId
USINT
number of CAN interface [0..n]
uiBaudrate
UINT
Baudrate in kBit/s e.g. 1000 for 1 Mbit
xSupport29Bits
BOOL
FALSE
: only 11-Bit IDs,TRUE
: support also 29-BitctMessages
CAA.COUNT
number of transmit messages which should be allocated
peError
POINTER TO ERROR
optional pointer to error enum