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
DriverOpenHCAA.HANDLEhandle of CAN interface or
CAA.gc_hINVALIDif failed.Input
usiNetIdUSINTnumber of CAN interface [0..n]
uiBaudrateUINTBaudrate in kBit/s e.g. 1000 for 1 Mbit
xSupport29BitsBOOLFALSE: only 11-Bit IDs,TRUE: support also 29-BitctMessagesCAA.COUNTnumber of transmit messages which should be allocated
peErrorPOINTER TO ERROR
optional pointer to error enum