Kvaser CANLIB: j1587lib.h File Reference
Data Structures | Defines | Typedefs | Functions

j1587lib.h File Reference

#include <windows.h>
#include <pshpack1.h>
#include <poppack.h>

Go to the source code of this file.

Data Structures

struct  J1587MessageInfo

Defines

#define j1587INVALID_HANDLE   ((J1587Handle)(-1))
#define J1587LIB_VERSION   1
Linx tranceiver types

#define canTRANSCEIVER_TYPE_LINX_LIN   64
#define canTRANSCEIVER_TYPE_LINX_J1708   66
#define canTRANSCEIVER_TYPE_LINX_K   68
#define canTRANSCEIVER_TYPE_LINX_SWC   70
#define canTRANSCEIVER_TYPE_LINX_LS   72
Operation modes

#define EEPROM_OP_MODE_NONE   0x00
#define EEPROM_OP_MODE_J1587_NORMAL   0x01
#define EEPROM_OP_MODE_J1587_NODE   0x02
Flags for J1587MessageInfo

#define j1587FLAG_CHECKSUM   0x80
#define j1587FLAG_FRAMEDELAY   0x40
#define j1587FLAG_BYTEDELAY   0x20
#define j1587FLAG_STOPBIT   0x10
#define j1587FLAG_OVERRUN   0x08
Flags for j1587OpenChannel()

#define J1587_NORMAL   1
#define J1587_NODE   2
#define J1587_READ   4
#define J1587_WRITE   8
Flags for j1587Configure()

#define J1587_INTER_CHAR_DELAY_MASK   0x0f
#define J1587_REPORT_BAD_CHECKSUM   0x10
#define J1587_REPORT_FRAME_DELAY   0x20
#define J1587_REPORT_CHAR_DELAY   0x40

Typedefs

typedef int J1587Handle

Enumerations

Return codes from the J1587lib functions

enum  J1587Status {
  j1587OK = 0,
  j1587ERR_NOMSG = -1,
  j1587ERR_NOTRUNNING = -3,
  j1587ERR_RUNNING = -4,
  j1587ERR_NORMALONLY = -5,
  j1587ERR_NODEONLY = -6,
  j1587ERR_PARAM = -7,
  j1587ERR_NOTFOUND = -8,
  j1587ERR_NOMEM = -9,
  j1587ERR_NOCHANNELS = -10,
  j1587ERR_TIMEOUT = -11,
  j1587ERR_NOTINITIALIZED = -12,
  j1587ERR_NOHANDLES = -13,
  j1587ERR_INVHANDLE = -14,
  j1587ERR_CANERROR = -15,
  j1587ERR_ERRRESP = -16,
  j1587ERR_WRONGRESP = -17,
  j1587ERR_DRIVER = -18,
  j1587ERR_DRIVERFAILED = -19,
  j1587ERR_NOCARD = -20,
  j1587ERR_LICENSE = -21,
  j1587ERR_INTERNAL = -22,
  j1587ERR_NO_ACCESS = -23,
  j1587ERR_VERSION = -24
}

Functions

J1587Status j1587Close (J1587Handle h)
J1587Status j1587GetFirmwareVersion (J1587Handle h, unsigned char *bootVerMajor, unsigned char *bootVerMinor, unsigned char *bootVerBuild, unsigned char *appVerMajor, unsigned char *appVerMinor, unsigned char *appVerBuild)
J1587Status j1587SetBitrate (J1587Handle h, unsigned int bps)
J1587Status j1587BusOn (J1587Handle h)
J1587Status j1587BusOff (J1587Handle h)
unsigned long j1587ReadTimer (J1587Handle h)
J1587Status j1587WriteMessageWait (J1587Handle h, const void *msg, unsigned int length, unsigned int priority, DWORD timeout)
J1587Status j1587ReadMessageWait (J1587Handle h, void *msg, unsigned int *msgLength, J1587MessageInfo *msgInfo, DWORD timeout)
J1587Status j1587WriteSync (J1587Handle h, J1587MessageInfo *msgInfo, DWORD timeout)
J1587Status j1587Configure (J1587Handle h, unsigned int flags)
J1587Status j1587GetCanHandle (J1587Handle h, unsigned int *canHandle)
J1587MessageInfo

In certain J1587 bus API calls, the following structure is used to provide more information about the J1587 messages.

void j1587InitializeLibrary (void)
J1587Handle j1587OpenChannel (int channel, int flags)

Detailed Description

LICENSE

Copyright 2007-2011 by KVASER AB, SWEDEN

WWW: http://www.kvaser.com

This software is furnished under a license and may be used and copied only in accordance with the terms of such license.

DESCRIPTION

Definitions for the J1587lib API.

Author:
Kvaser AB