IOCTL_FARC_GET_INTERRUPTS

Description:
query the interrupts occured on the ARCNET controller since the initialization (see IOCTL_FARC_INIT). This function can be used for examining driver and controller activity .

Parameters:

Parameter Type Description
Input
- - -
Output
Interrupts ULONG[10] the number of interrupts, that occured since the last initialization of the ARCNET-adapter
  • [0] - sum of RECON, RX, TX, ExNAK, NextID interrupts
  • [1] - number of RECON interrupts
  • [2] - number of RX interrupts
  • [3] - number of TX interrupts
  • [4] - number of Excessive NAK interrupts
  • [5] - number of NextID interrupts
  • [6] - number of Unknown interrupts
  • [7] - total number of interrupts
  • [8] - number of message buffer half full interrupts (SH ARC-USB only)
  • [9] - number of message error interrupts (SH ARC-USB only)

Possible errors (see also Error codes):
E_FARC_INVALID_HANDLE
E_FARC_BUFFER_TOO_SMALL

Note:

It is strongly recommended to familiarize you with datasheets of corresponded ARCNET-controller before you use this values.

Example:
Note, that the following example is only a fragment. It is recommended, that the driver is opened in asynchronous mode and a handle to the driver is available.

OVERLAPPED overlapped; DWORD read, err; BOOL ret; ULONG dwInterrupts[10]; overlapped.Offset = 0; overlapped.OffsetHigh = 0; overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); ... ret = DeviceIoControl(drvhandle, IOCTL_FARC_GET_INTERRUPTS, NULL, 0, &dwInterrupts[0], sizeof(dwInterrupts), &read, &overlapped); if (!ret) { err = GetLastError(); if (err == E_FARC_PENDING) { ret = GetOverlappedResult(drvhandle, &overlapped, &read, TRUE); if (!ret) { err = GetLastError(); // do errorhandling here } } else { // other error occured, perhaps wrong handle } } printf("Total Interrupts occured = %u",dwInterrupts[7]); ...

See also:
DeviceIoControl()
IOCTL_FARC_INIT

Back to Programming Guide Contact Copyright and Disclaimer