User`s manual

Software Manual • EKF Intelligent I/O Controller Family On
CompactPCI
- 29 -
EKF Elektronik GmbH * Philipp-Reis-Str. 4 * D-59065 HAMM (Germany)
Tel. +49 (0)2381/6890-0 * Fax. +49 (0)2381/6890-90 * E-Mail info@ekf.de * Internet http://www.ekf.de
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_EKF960SI1_GET_ACCEPTANCE,
NULL,
0,
pAcceptance, // pointer to a SJA1000_ACCEPTANCE structure
1
)
sizeof(*pAcceptance),
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) The acceptance filter setting is returned in this structure. It is defined in the C header file
“ntddekf.h” delivered with the driver installation package.
An alternative way to get the acceptance filter is to use the C function
Ekf960GetAcceptance
coming with the library “ekf960si1.lib”.
See also the source file of
Ekf960GetAcceptance
“getaccept.c” that is delivered with the
driver installation package, the description of the I/O control request
IOCTL_EKF960SI1_SET_ACCEPTANCE and the section “
SJA1000_ACCEPTANCE
” in
chapter “
Board Level Interface Description
”.
Get Performance Statistics: IOCTL_EKF960SI1_GET_STATS_CAN
This I/O control request returns the current performance statistics of a CANbus port. To get
the statistics for a serial port use IOCTL_SERIAL_GET_STATS.
Call: DeviceIoControl(
handle, // handle returned by
CreateFile
IOCTL_EKF960SI1_GET_STATS_CAN,
NULL,
0,
pStatistics, // pointer to a SJA1000PERF_STATS structure
1
)
sizeof(*pStatistics),
&unused, // pointer to a DWORD variable
pOverlapped // optional pointer to overlapped buffer (may be NULL)
);
Note:
1
) The performance statistics are returned in this structure. It is defined in the C header file
“ntddekf.h” delivered with the driver installation package. See also the description in section
SJA1000_PERF_STATS
” in the chapter “
Board Level Interface Description
” for an
explanation of the fields of SJA1000PERF_STATS.
An alternative way to get the performance statistics is to use the C function
Ekf960GetStatisticsCan
coming with the library “ekf960si1.lib”. See also the source file of
Ekf960GetStatisticsCan
“getstatscan.c” that is delivered with the driver installation package.