mirror of https://github.com/rusefi/openblt.git
Refs #1319. Reintegrated branch for Ixxat CAN device support back into the trunk.
git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@931 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
parent
483b6ae246
commit
acc660dfe2
Binary file not shown.
Binary file not shown.
|
@ -532,6 +532,7 @@ static void DisplayProgramUsage(void)
|
|||
printf(" kvaser_leaflight -> Kvaser Leaf Light V2.\n");
|
||||
printf(" lawicel_canusb -> Lawicel CANUSB.\n");
|
||||
printf(" vector_xldriver -> Vector XL Driver.\n");
|
||||
printf(" ixxat_vcidriver -> Ixxat VCI Driver.\n");
|
||||
printf(" -c=[value] Zero based index of the CAN channel if multiple CAN\n");
|
||||
printf(" channels are supported for the CAN adapter, as a 32-\n");
|
||||
printf(" bit value (Default = 0).\n");
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "leaflight.h" /* Kvaser Leaf Light v2 interface */
|
||||
#include "canusb.h" /* Lawicel CANUSB interface */
|
||||
#include "xldriver.h" /* Vector XL driver interface */
|
||||
#include "vcidriver.h" /* Ixxat VCI driver interface */
|
||||
#endif
|
||||
#if defined(PLATFORM_LINUX)
|
||||
#include "socketcan.h" /* SocketCAN interface */
|
||||
|
@ -99,6 +100,10 @@ void CanInit(tCanSettings const * settings)
|
|||
{
|
||||
canIfPtr = VectorXlGetInterface();
|
||||
}
|
||||
else if (strcmp(settings->devicename, "ixxat_vcidriver") == 0)
|
||||
{
|
||||
canIfPtr = IxxatVciGetInterface();
|
||||
}
|
||||
#endif
|
||||
#if defined(PLATFORM_LINUX)
|
||||
/* On Linux, the device name is the name of the SocketCAN link, so always link
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/*****************************************************************************
|
||||
HMS Technology Center Ravensburg GmbH
|
||||
******************************************************************************
|
||||
|
||||
File : BALTYPE.H
|
||||
Summary : Common BAL specific constants, data types and macros.
|
||||
|
||||
Date : 2004-06-03
|
||||
Author : Hartmut Heim
|
||||
|
||||
Compiler: MSVC
|
||||
|
||||
******************************************************************************
|
||||
all rights reserved
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _BALTYPE_H_
|
||||
#define _BALTYPE_H_
|
||||
|
||||
#include <vcitype.h>
|
||||
#include <pshpack1.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* BAL firmware features
|
||||
****************************************************************************/
|
||||
|
||||
#define BAL_MAX_SOCKETS VCI_MAX_BUSCTRL // maximum possible bus sockets
|
||||
|
||||
typedef struct _BALFEATURES
|
||||
{
|
||||
UINT16 FwMajorVersion; // major firmware version number
|
||||
UINT16 FwMinorVersion; // minor firmware version number
|
||||
UINT16 BusSocketCount; // number of supported bus sockets
|
||||
UINT16 BusSocketType[BAL_MAX_SOCKETS]; // array of supported bus sockets
|
||||
} BALFEATURES, *PBALFEATURES;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* BAL socket information
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _BALSOCKETINFO
|
||||
{
|
||||
VCIID ObjectId; // object identifier
|
||||
UINT16 BusType; // type of the bus socket
|
||||
UINT16 SocketNo; // number of the bus socket
|
||||
} BALSOCKETINFO, *PBALSOCKETINFO;
|
||||
|
||||
#include <poppack.h>
|
||||
#endif //_BALTYPE_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,225 @@
|
|||
/*****************************************************************************
|
||||
HMS Technology Center Ravensburg GmbH
|
||||
******************************************************************************
|
||||
|
||||
File : LINTYPE.H
|
||||
Summary : Common LIN constants, data types and macros.
|
||||
|
||||
Date : 2006-03-02
|
||||
Author : Hartmut Heim
|
||||
|
||||
Compiler: MSVC
|
||||
|
||||
******************************************************************************
|
||||
all rights reserved
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _LINTYPE_H_
|
||||
#define _LINTYPE_H_
|
||||
|
||||
#include <stdtype.h>
|
||||
#include <pshpack1.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* controller types
|
||||
****************************************************************************/
|
||||
|
||||
#define LIN_CTRL_UNKNOWN 0 // unknown
|
||||
#define LIN_CTRL_GENERIC 1 // generic LIN controller (USB-to-CAN II)
|
||||
#define LIN_CTRL_SERIAL 2 // LIN controller based on serial chip
|
||||
#define LIN_CTRL_MAXVAL 255 // maximum value for controller type
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* supported features
|
||||
****************************************************************************/
|
||||
|
||||
#define LIN_FEATURE_MASTER 0x0001 // master mode
|
||||
#define LIN_FEATURE_AUTORATE 0x0002 // automatic bitrate detection
|
||||
#define LIN_FEATURE_ERRFRAME 0x0004 // reception of error frames
|
||||
#define LIN_FEATURE_BUSLOAD 0x0008 // bus load measurement
|
||||
#define LIN_FEATURE_SLEEP 0x0010 // supports sleep message (master only)
|
||||
#define LIN_FEATURE_WAKEUP 0x0020 // supports wakeup message
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* controller operating modes
|
||||
****************************************************************************/
|
||||
|
||||
#define LIN_OPMODE_SLAVE 0x00 // slave
|
||||
#define LIN_OPMODE_MASTER 0x01 // enable master mode
|
||||
#define LIN_OPMODE_ERRORS 0x02 // enable reception of error frames
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* predefined bit rates
|
||||
****************************************************************************/
|
||||
|
||||
#define LIN_BITRATE_UNDEF 65535 // undefined bit rate
|
||||
#define LIN_BITRATE_AUTO 0 // automatic bit rate detection
|
||||
#define LIN_BITRATE_MIN 1000 // lowest specified bit rate
|
||||
#define LIN_BITRATE_MAX 20000 // highest specified bit rate
|
||||
|
||||
#define LIN_BITRATE_1000 1000 // 1000 baud
|
||||
#define LIN_BITRATE_1200 1200 // 1200 baud
|
||||
#define LIN_BITRATE_2400 2400 // 2400 baud
|
||||
#define LIN_BITRATE_4800 4800 // 4800 baud
|
||||
#define LIN_BITRATE_9600 9600 // 9600 baud
|
||||
#define LIN_BITRATE_10400 10400 // 10400 baud
|
||||
#define LIN_BITRATE_19200 19200 // 19200 baud
|
||||
#define LIN_BITRATE_20000 20000 // 20000 baud
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* controller status
|
||||
****************************************************************************/
|
||||
|
||||
#define LIN_STATUS_OVRRUN 0x01 // data overrun occurred
|
||||
#define LIN_STATUS_ININIT 0x10 // init mode active
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* controller initialization structure
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _LININITLINE
|
||||
{
|
||||
UINT8 bOpMode; // operating mode (see LIN_OPMODE_ constants)
|
||||
UINT8 bReserved; // reserved
|
||||
UINT16 wBitrate; // bit rate (see LIN_BITRATE_ constants)
|
||||
} LININITLINE, *PLININITLINE;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* LIN capabilities
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _LINCAPABILITIES
|
||||
{
|
||||
UINT32 dwFeatures; // supported features (see LIN_FEATURE_ constants)
|
||||
UINT32 dwClockFreq; // clock frequency of the primary counter in Hz
|
||||
UINT32 dwTscDivisor; // divisor for the message time stamp counter
|
||||
} LINCAPABILITIES, *PLINCAPABILITIES;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* controller status information structure
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _LINLINESTATUS
|
||||
{
|
||||
UINT8 bOpMode; // current operating mode
|
||||
UINT8 bBusLoad; // average bus load in percent (0..100)
|
||||
UINT16 wBitrate; // current bit rate
|
||||
UINT32 dwStatus; // status of the LIN controller (see LIN_STATUS_)
|
||||
} LINLINESTATUS, *PLINLINESTATUS;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* message monitor status information structure
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _LINMONITORSTATUS
|
||||
{
|
||||
LINLINESTATUS sLineStatus; // current LIN line status
|
||||
BOOL32 fActivated; // TRUE if the monitor is activated
|
||||
BOOL32 fRxOverrun; // TRUE if receive FIFO overrun occurs
|
||||
UINT8 bRxFifoLoad; // receive FIFO load in percent (0..100)
|
||||
} LINMONITORSTATUS, *PLINMONITORSTATUS;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* LIN message information
|
||||
****************************************************************************/
|
||||
|
||||
typedef union _LINMSGINFO
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT8 bPid; // protected id (see also LIN_MSGPID_IDMASK)
|
||||
UINT8 bType; // message type (see LIN_MSGTYPE_ constants)
|
||||
UINT8 bDlen; // data length
|
||||
UINT8 bFlags; // flags (see LIN_MSGFLAGS_ constants)
|
||||
} Bytes;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 pid : 8; // protected identifier
|
||||
UINT32 type : 8; // message type
|
||||
UINT32 dlen : 8; // data length
|
||||
UINT32 ecs : 1; // enhanced checksum
|
||||
UINT32 sor : 1; // sender of response
|
||||
UINT32 ovr : 1; // data overrun
|
||||
UINT32 ido : 1; // ID only
|
||||
UINT32 res : 4; // reserved
|
||||
} Bits;
|
||||
|
||||
} LINMSGINFO, *PLINMSGINFO;
|
||||
|
||||
|
||||
//
|
||||
// bit masks used for protected id field
|
||||
//
|
||||
|
||||
#define LIN_PIDMASK_ID 0x3F // mask for identifier bits
|
||||
#define LIN_PIDMASK_PARITY 0xC0 // mask for parity bits
|
||||
|
||||
|
||||
//
|
||||
// message types (see <LINMSGINFO.Bytes.bType>)
|
||||
//
|
||||
|
||||
#define LIN_MSGTYPE_DATA 0x00 // data frame
|
||||
#define LIN_MSGTYPE_INFO 0x01 // info frame
|
||||
#define LIN_MSGTYPE_ERROR 0x02 // error frame
|
||||
#define LIN_MSGTYPE_STATUS 0x03 // status frame
|
||||
#define LIN_MSGTYPE_WAKEUP 0x04 // wakeup frame
|
||||
#define LIN_MSGTYPE_SLEEP 0x05 // goto sleep frame
|
||||
#define LIN_MSGTYPE_TMOVR 0x06 // timer overrun
|
||||
|
||||
//
|
||||
// message flags (used by <LINMSGINFO.Bytes.bFlags>)
|
||||
//
|
||||
|
||||
#define LIN_MSGFLAGS_ECS 0x01 // enhanced checksum (LIN 2.0)
|
||||
#define LIN_MSGFLAGS_SOR 0x02 // sender of response
|
||||
#define LIN_MSGFLAGS_OVR 0x04 // possible data overrun
|
||||
#define LIN_MSGFLAGS_IDO 0x08 // ID only
|
||||
|
||||
//
|
||||
// Information supplied in the abData[0] field of info frames
|
||||
// (LINMSGINFO.Bytes.bType = LIN_MSGTYPE_INFO).
|
||||
//
|
||||
|
||||
#define LIN_INFO_START 1 // start of LIN controller
|
||||
#define LIN_INFO_STOP 2 // stop of LIN controller
|
||||
#define LIN_INFO_RESET 3 // reset of LIN controller
|
||||
|
||||
//
|
||||
// Error information supplied in the abData[0] field of error frames
|
||||
// (LINMSGINFO.Bytes.bType = LIN_MSGTYPE_ERROR).
|
||||
//
|
||||
|
||||
#define LIN_ERROR_BIT 1 // bit error
|
||||
#define LIN_ERROR_CHKSUM 2 // checksum error
|
||||
#define LIN_ERROR_PARITY 3 // identifier parity error
|
||||
#define LIN_ERROR_SLNORE 4 // slave not responding error
|
||||
#define LIN_ERROR_SYNC 5 // inconsistent sync field error
|
||||
#define LIN_ERROR_NOBUS 6 // no bus activity error
|
||||
#define LIN_ERROR_OTHER 7 // other (unspecified) error
|
||||
#define LIN_ERROR_WAKEUP 8 // wake-up response error
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* LIN message structure
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _LINMSG
|
||||
{
|
||||
UINT32 dwTime; // time stamp for receive message [ms]
|
||||
LINMSGINFO uMsgInfo; // message information (bit field)
|
||||
UINT8 abData[8]; // message data
|
||||
} LINMSG, *PLINMSG; // size is 20 bytes
|
||||
|
||||
#include <poppack.h>
|
||||
#endif //_LINTYPE_H_
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,50 @@
|
|||
/************************************************************************************//**
|
||||
* \file vcidriver.h
|
||||
* \brief Ixxat VCI driver interface header file.
|
||||
* \ingroup VCIDRIVER
|
||||
* \internal
|
||||
*----------------------------------------------------------------------------------------
|
||||
* C O P Y R I G H T
|
||||
*----------------------------------------------------------------------------------------
|
||||
* Copyright (c) 2021 by Feaser http://www.feaser.com All rights reserved
|
||||
*
|
||||
*----------------------------------------------------------------------------------------
|
||||
* L I C E N S E
|
||||
*----------------------------------------------------------------------------------------
|
||||
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You have received a copy of the GNU General Public License along with OpenBLT. It
|
||||
* should be located in ".\Doc\license.html". If not, contact Feaser to obtain a copy.
|
||||
*
|
||||
* \endinternal
|
||||
****************************************************************************************/
|
||||
/************************************************************************************//**
|
||||
* \defgroup VCIDRIVER Ixxat VCI driver USB to CAN interface
|
||||
* \brief This module implements the CAN interface for the Ixxat VCI driver.
|
||||
* \ingroup CanDriver
|
||||
****************************************************************************************/
|
||||
#ifndef VCIDRIVER_H
|
||||
#define VCIDRIVER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************************************************************
|
||||
* Function prototypes
|
||||
****************************************************************************************/
|
||||
tCanInterface const * IxxatVciGetInterface(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* VCIDRIVER_H */
|
||||
/*********************************** end of vcidriver.h ********************************/
|
|
@ -0,0 +1,516 @@
|
|||
/*****************************************************************************
|
||||
HMS Technology Center Ravensburg GmbH
|
||||
******************************************************************************
|
||||
|
||||
File : VCIERR.H
|
||||
Summary : VCI error codes.
|
||||
|
||||
Date : 2003-11-05
|
||||
Author : Hartmut Heim
|
||||
|
||||
Compiler: MSVC
|
||||
|
||||
******************************************************************************
|
||||
all rights reserved
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
Values are 32 bit values layed out as follows:
|
||||
|
||||
3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||
+---+-+-+-----------------------+-------------------------------+
|
||||
|Sev|C|R| Facility | Code | (NTSTATUS)
|
||||
+---+-+-+-----------------------+-------------------------------+
|
||||
|
||||
+-+-+-+-+-----------------------+-------------------------------+
|
||||
|S|s|C|R| Facility | Code | (HRESULT)
|
||||
+-+-+-+-+-----------------------+-------------------------------+
|
||||
|
||||
where
|
||||
|
||||
Sev - severity code (NTSTATUS)
|
||||
00 - Success
|
||||
01 - Informational
|
||||
10 - Warning
|
||||
11 - Error
|
||||
|
||||
S - severity code (HRESULT)
|
||||
0 - Success
|
||||
1 - Fail (Error)
|
||||
|
||||
s - reserved portion of the facility code, corresponds
|
||||
to NT's second severity bit (set to 0)
|
||||
|
||||
C - is the Customer code flag
|
||||
|
||||
R - reserved bit
|
||||
Used to indicate a NTSTATUS mapped to an HRESULT.
|
||||
|
||||
Facility - is the facility code
|
||||
|
||||
Code - is the facility's status code
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _VCIERR_H_
|
||||
#define _VCIERR_H_
|
||||
|
||||
#include <stdtype.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* severity & facility codes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef STATUS_SEVERITY_SUCCESS
|
||||
#define STATUS_SEVERITY_SUCCESS 0
|
||||
#endif
|
||||
|
||||
#ifndef STATUS_SEVERITY_INFORMATIONAL
|
||||
#define STATUS_SEVERITY_INFORMATIONAL 1
|
||||
#endif
|
||||
|
||||
#ifndef STATUS_SEVERITY_WARNING
|
||||
#define STATUS_SEVERITY_WARNING 2
|
||||
#endif
|
||||
|
||||
#ifndef STATUS_SEVERITY_ERROR
|
||||
#define STATUS_SEVERITY_ERROR 3
|
||||
#endif
|
||||
|
||||
#define SEV_SUCCESS STATUS_SEVERITY_SUCCESS
|
||||
#define SEV_INFO STATUS_SEVERITY_INFORMATIONAL
|
||||
#define SEV_WARN STATUS_SEVERITY_WARNING
|
||||
#define SEV_ERROR STATUS_SEVERITY_ERROR
|
||||
|
||||
#define SCODE_MASK 0x0000FFFF
|
||||
#define FACILITY_MASK 0x0FFF0000
|
||||
#define RESERVED_FLAG 0x10000000
|
||||
#define SEVERITY_MASK 0xC0000000
|
||||
#define CUSTOMER_FLAG 0x20000000
|
||||
|
||||
#define FACILITY_SHIFT 16
|
||||
#define SEVERITY_SHIFT 30
|
||||
|
||||
#define MAKESCODE(c) ((c) & SCODE_MASK)
|
||||
#define MAKEFACILITY(f) (((f) << FACILITY_SHIFT) & FACILITY_MASK)
|
||||
#define MAKESEVERITY(s) (((s) << SEVERITY_SHIFT) & SEVERITY_MASK)
|
||||
|
||||
#define GETSCODE(e) ((e) & SCODE_MASK)
|
||||
#define GETFACILITY(e) (((e) & FACILITY_MASK) >> FACILITY_SHIFT)
|
||||
#define GETSEVERITY(e) (((e) & SEVERITY_MASK) >> SEVERITY_SHIFT)
|
||||
|
||||
#define FACILITY_VCI 1
|
||||
|
||||
#define SEV_VCI_INFO (MAKESEVERITY(SEV_INFO) | \
|
||||
CUSTOMER_FLAG | MAKEFACILITY(FACILITY_VCI))
|
||||
#define SEV_VCI_WARN (MAKESEVERITY(SEV_WARN) | \
|
||||
CUSTOMER_FLAG | MAKEFACILITY(FACILITY_VCI))
|
||||
#define SEV_VCI_ERROR (MAKESEVERITY(SEV_ERROR) | \
|
||||
CUSTOMER_FLAG | MAKEFACILITY(FACILITY_VCI))
|
||||
|
||||
#define _IS_VCI_SCODE(e) (((e) & CUSTOMER_FLAG) && \
|
||||
(GETFACILITY(e) == FACILITY_VCI))
|
||||
|
||||
#define _VCI_INFO(c) (HRESULT) (SEV_VCI_INFO | MAKESCODE(c))
|
||||
#define _VCI_WARN(c) (HRESULT) (SEV_VCI_WARN | MAKESCODE(c))
|
||||
#define _VCI_ERROR(c) (HRESULT) (SEV_VCI_ERROR | MAKESCODE(c))
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* error codes
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// MessageId: VCI_SUCCESS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The operation completed successfully.
|
||||
//
|
||||
#define VCI_SUCCESS 0
|
||||
#define VCI_OK VCI_SUCCESS
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_UNEXPECTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Unexpected failure
|
||||
//
|
||||
#define VCI_E_UNEXPECTED _VCI_ERROR(0x0001)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NOT_IMPLEMENTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Not implemented
|
||||
//
|
||||
#define VCI_E_NOT_IMPLEMENTED _VCI_ERROR(0x0002)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_OUTOFMEMORY
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Not enough storage is available to complete this operation.
|
||||
//
|
||||
#define VCI_E_OUTOFMEMORY _VCI_ERROR(0x0003)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVALIDARG
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// One or more parameters are invalid.
|
||||
//
|
||||
#define VCI_E_INVALIDARG _VCI_ERROR(0x0004)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NOINTERFACE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The object does not support the requested interface
|
||||
//
|
||||
#define VCI_E_NOINTERFACE _VCI_ERROR(0x0005)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVPOINTER
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Invalid pointer
|
||||
//
|
||||
#define VCI_E_INVPOINTER _VCI_ERROR(0x0006)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVHANDLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Invalid handle
|
||||
//
|
||||
#define VCI_E_INVHANDLE _VCI_ERROR(0x0007)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_ABORT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Operation aborted
|
||||
//
|
||||
#define VCI_E_ABORT _VCI_ERROR(0x0008)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_FAIL
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Unspecified error
|
||||
//
|
||||
#define VCI_E_FAIL _VCI_ERROR(0x0009)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_ACCESSDENIED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Access is denied.
|
||||
//
|
||||
#define VCI_E_ACCESSDENIED _VCI_ERROR(0x000A)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_TIMEOUT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// This operation returned because the timeout period expired.
|
||||
//
|
||||
#define VCI_E_TIMEOUT _VCI_ERROR(0x000B)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_BUSY
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested resource is currently busy.
|
||||
//
|
||||
#define VCI_E_BUSY _VCI_ERROR(0x000C)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_PENDING
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The data necessary to complete this operation is not yet available.
|
||||
//
|
||||
#define VCI_E_PENDING _VCI_ERROR(0x000D)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NO_DATA
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// No more data available.
|
||||
//
|
||||
#define VCI_E_NO_DATA _VCI_ERROR(0x000E)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NO_MORE_ITEMS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// No more entries are available from an enumeration operation.
|
||||
//
|
||||
#define VCI_E_NO_MORE_ITEMS _VCI_ERROR(0x000F)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NOTINITIALIZED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The component is not initialized.
|
||||
//
|
||||
#define VCI_E_NOT_INITIALIZED _VCI_ERROR(0x0010)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_ALREADY_INITIALIZED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// An attempt was made to reinitialize an already initialized component.
|
||||
//
|
||||
#define VCI_E_ALREADY_INITIALIZED _VCI_ERROR(0x0011)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_RXQUEUE_EMPTY
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Receive queue empty.
|
||||
//
|
||||
#define VCI_E_RXQUEUE_EMPTY _VCI_ERROR(0x0012)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_TXQUEUE_FULL
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Transmit queue full.
|
||||
//
|
||||
#define VCI_E_TXQUEUE_FULL _VCI_ERROR(0x0013)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_BUFFER_OVERFLOW
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The data was too large to fit into the specified buffer.
|
||||
//
|
||||
#define VCI_E_BUFFER_OVERFLOW _VCI_ERROR(0x0014)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVALID_STATE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The component is not in a valid state to perform this request.
|
||||
//
|
||||
#define VCI_E_INVALID_STATE _VCI_ERROR(0x0015)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_OBJECT_ALREADY_EXISTS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The object already exists.
|
||||
//
|
||||
#define VCI_E_OBJECT_ALREADY_EXISTS _VCI_ERROR(0x0016)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVALID_INDEX
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// An attempt was made to access an array outside of its bounds.
|
||||
//
|
||||
#define VCI_E_INVALID_INDEX _VCI_ERROR(0x0017)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_END_OF_FILE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The end-of-file marker has been reached.
|
||||
// There is no valid data in the file beyond this marker.
|
||||
//
|
||||
#define VCI_E_END_OF_FILE _VCI_ERROR(0x0018)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_DISCONNECTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Attempt to send a message to a disconnected communication port.
|
||||
//
|
||||
#define VCI_E_DISCONNECTED _VCI_ERROR(0x0019)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVALID_FIRMWARE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Invalid fimware version or version not supported.
|
||||
// Check driver version and/or update firmware.
|
||||
//
|
||||
#define VCI_E_INVALID_FIRMWARE _VCI_ERROR(0x001A)
|
||||
#define VCI_E_WRONG_FLASHFWVERSION VCI_E_INVALID_FIRMWARE
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVALID_LICENSE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Invalid license.
|
||||
//
|
||||
#define VCI_E_INVALID_LICENSE _VCI_ERROR(0x001B)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NO_SUCH_LICENSE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// There is no license available.
|
||||
//
|
||||
#define VCI_E_NO_SUCH_LICENSE _VCI_ERROR(0x001C)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_LICENSE_EXPIRED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The time limited license has expired.
|
||||
//
|
||||
#define VCI_E_LICENSE_EXPIRED _VCI_ERROR(0x001D)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_LICENSE_QUOTA_EXCEEDED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The service request exceeds the license quota.
|
||||
//
|
||||
#define VCI_E_LICENSE_QUOTA_EXCEEDED _VCI_ERROR(0x001E)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_INVALID_TIMING
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Invalid bit timing parameter.
|
||||
//
|
||||
#define VCI_E_INVALID_TIMING _VCI_ERROR(0x001F)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_IN_USE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The resource requested is already in use.
|
||||
//
|
||||
#define VCI_E_IN_USE _VCI_ERROR(0x0020)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NO_SUCH_DEVICE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// A device which does not exist was specified.
|
||||
//
|
||||
#define VCI_E_NO_SUCH_DEVICE _VCI_ERROR(0x0021)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_DEVICE_NOT_CONNECTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The device is not connected.
|
||||
//
|
||||
#define VCI_E_DEVICE_NOT_CONNECTED _VCI_ERROR(0x0022)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_DEVICE_NOT_READY
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The device is not ready for use.
|
||||
//
|
||||
#define VCI_E_DEVICE_NOT_READY _VCI_ERROR(0x0023)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_TYPE_MISMATCH
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Mismatch between the type of object required by the operation
|
||||
// and the type of object specified in the request.
|
||||
//
|
||||
#define VCI_E_TYPE_MISMATCH _VCI_ERROR(0x0024)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_NOT_SUPPORTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The request is not supported.
|
||||
//
|
||||
#define VCI_E_NOT_SUPPORTED _VCI_ERROR(0x0025)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_DUPLICATE_OBJECTID
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The attempt to insert the object ID in the index failed
|
||||
// because the object ID is already in the index.
|
||||
//
|
||||
#define VCI_E_DUPLICATE_OBJECTID _VCI_ERROR(0x0026)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_OBJECTID_NOT_FOUND
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The specified object ID was not found.
|
||||
//
|
||||
#define VCI_E_OBJECTID_NOT_FOUND _VCI_ERROR(0x0027)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_WRONG_LEVEL
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested operation was called from a wrong execution level.
|
||||
//
|
||||
#define VCI_E_WRONG_LEVEL _VCI_ERROR(0x0028)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_WRONG_DRV_VERSION
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Incompatible version of the VCI device driver.
|
||||
//
|
||||
#define VCI_E_WRONG_DRV_VERSION _VCI_ERROR(0x0029)
|
||||
|
||||
//
|
||||
// MessageId: VCI_E_LUIDS_EXHAUSTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Indicates there are no more LUIDs to allocate.
|
||||
//
|
||||
#define VCI_E_LUIDS_EXHAUSTED _VCI_ERROR(0x002A)
|
||||
|
||||
#endif //_VCIERR_H_
|
|
@ -0,0 +1,990 @@
|
|||
/*****************************************************************************
|
||||
HMS Technology Center Ravensburg GmbH
|
||||
******************************************************************************
|
||||
|
||||
File : VCINPL.H
|
||||
Summary : Native VCI Programming Library.
|
||||
|
||||
Date : 2005-04-07
|
||||
|
||||
Compiler: MSVC
|
||||
|
||||
******************************************************************************
|
||||
all rights reserved
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _VCINPL_H_
|
||||
#define _VCINPL_H_
|
||||
|
||||
/*##########################################################################*/
|
||||
/*## ##*/
|
||||
/*## common declarations ##*/
|
||||
/*## ##*/
|
||||
/*##########################################################################*/
|
||||
|
||||
#include <vcisdk.h>
|
||||
|
||||
#if (CAN_ERROR_OTHER != 7)
|
||||
//
|
||||
// Redefinition of CAN_ERROR_OTHER for compatibility with VCI version 3.
|
||||
//
|
||||
#undef CAN_ERROR_OTHER
|
||||
#define CAN_ERROR_OTHER 7
|
||||
//
|
||||
// Undefine also CAN_ERROR_ codes not available before VCI version 4.
|
||||
// For backward compatibility VCINPL will translate newer error codes
|
||||
// to CAN_ERROR_OTHER.
|
||||
//
|
||||
#undef CAN_ERROR_FDB
|
||||
#undef CAN_ERROR_DLC
|
||||
#endif
|
||||
|
||||
/*##########################################################################*/
|
||||
/*## ##*/
|
||||
/*## exported API functions ##*/
|
||||
/*## ##*/
|
||||
/*##########################################################################*/
|
||||
|
||||
/*****************************************************************************
|
||||
* initialization
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciInitialize( void );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciInitialize)( void );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* version information
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciGetVersion( OUT PUINT32 pdwMajorVersion,
|
||||
OUT PUINT32 pdwMinorVersion );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciGetVersion)( OUT PUINT32 pdwMajorVersion,
|
||||
OUT PUINT32 pdwMinorVersion );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciGetVersionEx( OUT PUINT32 pdwMajorVersion,
|
||||
OUT PUINT32 pdwMinorVersion,
|
||||
OUT PUINT32 pdwRevNumber,
|
||||
OUT PUINT32 pdwBuildNumber );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciGetVersionEx)( OUT PUINT32 pdwMajorVersion,
|
||||
OUT PUINT32 pdwMinorVersion,
|
||||
OUT PUINT32 pdwRevNumber,
|
||||
OUT PUINT32 pdwBuildNumber );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* error handling
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C void VCIAPI
|
||||
vciFormatErrorA( IN HRESULT hrError,
|
||||
OUT PCHAR pszText,
|
||||
IN UINT32 dwLength );
|
||||
|
||||
EXTERN_C void VCIAPI
|
||||
vciFormatErrorW( IN HRESULT hrError,
|
||||
OUT PWCHAR pszText,
|
||||
IN UINT32 dwLength );
|
||||
|
||||
typedef void
|
||||
(VCIAPI *PF_vciFormatErrorA)(IN HRESULT hrError,
|
||||
OUT PCHAR pszText,
|
||||
IN UINT32 dwLength );
|
||||
|
||||
typedef void
|
||||
(VCIAPI *PF_vciFormatErrorW)(IN HRESULT hrError,
|
||||
OUT PWCHAR pszText,
|
||||
IN UINT32 dwLength );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define vciFormatError vciFormatErrorW
|
||||
#define PF_vciFormatError PF_vciFormatErrorW
|
||||
#else
|
||||
#define vciFormatError vciFormatErrorA
|
||||
#define PF_vciFormatError PF_vciFormatErrorA
|
||||
#endif //UNICODE
|
||||
|
||||
EXTERN_C void VCIAPI
|
||||
vciDisplayErrorA( IN HWND hwndParent,
|
||||
IN PCHAR pszCaption,
|
||||
IN HRESULT hrError );
|
||||
|
||||
EXTERN_C void VCIAPI
|
||||
vciDisplayErrorW( IN HWND hwndParent,
|
||||
IN PWCHAR pszCaption,
|
||||
IN HRESULT hrError );
|
||||
|
||||
typedef void
|
||||
(VCIAPI *PF_vciDisplayErrorA)( IN HWND hwndParent,
|
||||
IN PCHAR pszCaption,
|
||||
IN HRESULT hrError );
|
||||
|
||||
typedef void
|
||||
(VCIAPI *PF_vciDisplayErrorW)( IN HWND hwndParent,
|
||||
IN PWCHAR pszCaption,
|
||||
IN HRESULT hrError );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define vciDisplayError vciDisplayErrorW
|
||||
#define PF_vciDisplayError PF_vciDisplayErrorW
|
||||
#else
|
||||
#define vciDisplayError vciDisplayErrorA
|
||||
#define PF_vciDisplayError PF_vciFormatErrorA
|
||||
#endif //UNICODE
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* utility functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciCreateLuid( OUT PVCIID pVciid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciCreateLuid)( OUT PVCIID pVciid );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciLuidToCharA( IN REFVCIID rVciid,
|
||||
OUT PCHAR pszLuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciLuidToCharW( IN REFVCIID rVciid,
|
||||
OUT PWCHAR pszLuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciLuidToCharA)( IN REFVCIID rVciid,
|
||||
OUT PCHAR pszLuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciLuidToCharW)( IN REFVCIID rVciid,
|
||||
OUT PWCHAR pszLuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define vciLuidToChar vciLuidToCharW
|
||||
#define PF_vciLuidToChar PF_vciLuidToCharW
|
||||
#else
|
||||
#define vciLuidToChar vciLuidToCharA
|
||||
#define PF_vciLuidToChar PF_vciLuidToCharA
|
||||
#endif //UNICODE
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciCharToLuidA( IN PCHAR pszLuid,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciCharToLuidW( IN PWCHAR pszLuid,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciCharToLuidA)( IN PCHAR pszLuid,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciCharToLuidW)( IN PWCHAR pszLuid,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define vciCharToLuid vciCharToLuidW
|
||||
#define PF_vciCharToLuid PF_vciCharToLuidW
|
||||
#else
|
||||
#define vciCharToLuid vciCharToLuidA
|
||||
#define PF_vciCharToLuid PF_vciCharToLuidA
|
||||
#endif //UNICODE
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciGuidToCharA( IN REFGUID rGuid,
|
||||
OUT PCHAR pszGuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciGuidToCharW( IN REFGUID rGuid,
|
||||
OUT PWCHAR pszGuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciGuidToCharA)( IN REFGUID rGuid,
|
||||
OUT PCHAR pszGuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciGuidToCharW)( IN REFGUID rGuid,
|
||||
OUT PWCHAR pszGuid,
|
||||
IN LONG cbSize );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define vciGuidToChar vciGuidToCharW
|
||||
#define PF_vciGuidToChar PF_vciGuidToCharW
|
||||
#else
|
||||
#define vciGuidToChar vciGuidToCharA
|
||||
#define PF_vciGuidToChar PF_vciGuidToCharA
|
||||
#endif //UNICODE
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciCharToGuidA( IN PCHAR pszGuid,
|
||||
OUT PGUID pGuid );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciCharToGuidW( IN PWCHAR pszGuid,
|
||||
OUT PGUID pGuid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciCharToGuidA)( IN PCHAR pszGuid,
|
||||
OUT PGUID pGuid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciCharToGuidW)( IN PWCHAR pszGuid,
|
||||
OUT PGUID pGuid );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define vciCharToGuid vciCharToGuidW
|
||||
#define PF_vciCharToGuid PF_vciCharToGuidW
|
||||
#else
|
||||
#define vciCharToGuid vciCharToGuidA
|
||||
#define PF_vciCharToGuid PF_vciCharToGuidA
|
||||
#endif //UNICODE
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* event specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEventCreate( IN BOOL fManReset,
|
||||
IN BOOL fInitState,
|
||||
OUT PHANDLE phEvent );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEventCreate)( IN BOOL fManReset,
|
||||
IN BOOL fInitState,
|
||||
OUT PHANDLE phEvent );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEventDelete( IN HANDLE hEvent );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEventDelete)( IN HANDLE hEvent );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEventSignal( IN HANDLE hEvent );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEventSignal)( IN HANDLE hEvent );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEventReset( HANDLE hEvent );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEventReset)( HANDLE hEvent );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEventWaitFor( IN HANDLE hEvent,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEventWaitFor)( IN HANDLE hEvent,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* device manager specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEnumDeviceOpen( OUT PHANDLE hEnum );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEnumDeviceOpen)( OUT PHANDLE hEnum );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEnumDeviceClose( IN HANDLE hEnum );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEnumDeviceClose)( IN HANDLE hEnum );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEnumDeviceNext( IN HANDLE hEnum,
|
||||
OUT PVCIDEVICEINFO pInfo );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEnumDeviceNext)( IN HANDLE hEnum,
|
||||
OUT PVCIDEVICEINFO pInfo );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEnumDeviceReset( IN HANDLE hEnum );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEnumDeviceReset)( IN HANDLE hEnum );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciEnumDeviceWaitEvent( IN HANDLE hEnum,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciEnumDeviceWaitEvent)( IN HANDLE hEnum,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciFindDeviceByHwid( IN REFGUID rHwid,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciFindDeviceByHwid)( IN REFGUID rHwid,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciFindDeviceByClass( IN REFGUID rClass,
|
||||
IN UINT32 dwInst,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciFindDeviceByClass)( IN REFGUID rClass,
|
||||
IN UINT32 dwInst,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciSelectDeviceDlg( IN HWND hwndParent,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciSelectDeviceDlg)( IN HWND hwndParent,
|
||||
OUT PVCIID pVciid );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* device specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciDeviceOpen( IN REFVCIID rVciid,
|
||||
OUT PHANDLE phDevice );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciDeviceOpen)( IN REFVCIID rVciid,
|
||||
OUT PHANDLE phDevice );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciDeviceOpenDlg( IN HWND hwndParent,
|
||||
OUT PHANDLE phDevice );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciDeviceOpenDlg)( IN HWND hwndParent,
|
||||
OUT PHANDLE phDevice );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciDeviceClose( IN HANDLE hDevice );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciDeviceClose)( IN HANDLE hDevice );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciDeviceGetInfo( IN HANDLE hDevice,
|
||||
OUT PVCIDEVICEINFO pInfo );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciDeviceGetInfo)( IN HANDLE hDevice,
|
||||
OUT PVCIDEVICEINFO pInfo );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
vciDeviceGetCaps( IN HANDLE hDevice,
|
||||
OUT PVCIDEVICECAPS pCaps );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_vciDeviceGetCaps)( IN HANDLE hDevice,
|
||||
OUT PVCIDEVICECAPS pCaps );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* CAN controller specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlOpen( IN HANDLE hDevice,
|
||||
IN UINT32 dwCanNo,
|
||||
OUT PHANDLE phCanCtl );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlOpen)( IN HANDLE hDevice,
|
||||
IN UINT32 dwCanNo,
|
||||
OUT PHANDLE phCanCtl );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlClose( IN HANDLE hCanCtl );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlClose)( IN HANDLE hCanCtl );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlGetCaps( IN HANDLE hCanCtl,
|
||||
OUT PCANCAPABILITIES pCanCaps );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlGetCaps)( IN HANDLE hCanCtl,
|
||||
OUT PCANCAPABILITIES pCanCaps );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlGetStatus( IN HANDLE hCanCtl,
|
||||
OUT PCANLINESTATUS pStatus );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlGetStatus)( IN HANDLE hCanCtl,
|
||||
OUT PCANLINESTATUS pStatus );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlDetectBitrate( IN HANDLE hCanCtl,
|
||||
IN UINT16 wMsTimeout,
|
||||
IN UINT32 dwCount,
|
||||
IN PUINT8 pabBtr0,
|
||||
IN PUINT8 pabBtr1,
|
||||
OUT PINT32 plIndex );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlDetectBitrate)( IN HANDLE hCanCtl,
|
||||
IN UINT16 wMsTimeout,
|
||||
IN UINT32 dwCount,
|
||||
IN PUINT8 pabBtr0,
|
||||
IN PUINT8 pabBtr1,
|
||||
OUT PINT32 plIndex );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlInitialize( IN HANDLE hCanCtl,
|
||||
IN UINT8 bMode,
|
||||
IN UINT8 bBtr0,
|
||||
IN UINT8 bBtr1 );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlInitialize)( IN HANDLE hCanCtl,
|
||||
IN UINT8 bMode,
|
||||
IN UINT8 bBtr0,
|
||||
IN UINT8 bBtr1 );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlReset( IN HANDLE hCanCtl );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlReset)( IN HANDLE hCanCtl );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlStart( IN HANDLE hCanCtl,
|
||||
IN BOOL fStart );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlStart)( IN HANDLE hCanCtl,
|
||||
IN BOOL fStart );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlSetAccFilter( IN HANDLE hCanCtl,
|
||||
IN BOOL fExtend,
|
||||
IN UINT32 dwCode,
|
||||
IN UINT32 dwMask );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlSetAccFilter)( IN HANDLE hCanCtl,
|
||||
IN BOOL fExtend,
|
||||
IN UINT32 dwCode,
|
||||
IN UINT32 dwMask );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlAddFilterIds( IN HANDLE hCanCtl,
|
||||
IN BOOL fExtend,
|
||||
IN UINT32 dwCode,
|
||||
IN UINT32 dwMask );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlAddFilterIds)( IN HANDLE hCanCtl,
|
||||
IN BOOL fExtend,
|
||||
IN UINT32 dwCode,
|
||||
IN UINT32 dwMask );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canControlRemFilterIds( IN HANDLE hCanCtl,
|
||||
IN BOOL fExtend,
|
||||
IN UINT32 dwCode,
|
||||
IN UINT32 dwMask );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canControlRemFilterIds)( IN HANDLE hCanCtl,
|
||||
IN BOOL fExtend,
|
||||
IN UINT32 dwCode,
|
||||
IN UINT32 dwMask );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* CAN message channel specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelOpen( IN HANDLE hDevice,
|
||||
IN UINT32 dwCanNo,
|
||||
IN BOOL fExclusive,
|
||||
OUT PHANDLE phCanChn );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelOpen)( IN HANDLE hDevice,
|
||||
IN UINT32 dwCanNo,
|
||||
IN BOOL fExclusive,
|
||||
OUT PHANDLE phCanChn );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelClose( IN HANDLE hCanChn );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelClose)( IN HANDLE hCanChn );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelGetCaps( IN HANDLE hCanChn,
|
||||
OUT PCANCAPABILITIES pCanCaps );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelGetCaps)( IN HANDLE hCanChn,
|
||||
OUT PCANCAPABILITIES pCanCaps );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelGetStatus( IN HANDLE hCanChn,
|
||||
OUT PCANCHANSTATUS pStatus );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelGetStatus)( IN HANDLE hCanChn,
|
||||
OUT PCANCHANSTATUS pStatus );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelInitialize( IN HANDLE hCanChn,
|
||||
IN UINT16 wRxFifoSize,
|
||||
IN UINT16 wRxThreshold,
|
||||
IN UINT16 wTxFifoSize,
|
||||
IN UINT16 wTxThreshold );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelInitialize)( IN HANDLE hCanChn,
|
||||
IN UINT16 wRxFifoSize,
|
||||
IN UINT16 wRxThreshold,
|
||||
IN UINT16 wTxFifoSize,
|
||||
IN UINT16 wTxThreshold );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelActivate( IN HANDLE hCanChn,
|
||||
IN BOOL fEnable );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelActivate)( IN HANDLE hCanChn,
|
||||
IN BOOL fEnable );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelPeekMessage( IN HANDLE hCanChn,
|
||||
OUT PCANMSG pCanMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelPeekMessage)( IN HANDLE hCanChn,
|
||||
OUT PCANMSG pCanMsg );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelPeekMsgMult( IN HANDLE hCanChn,
|
||||
OUT CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelPeekMsgMult)( IN HANDLE hCanChn,
|
||||
OUT CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelPostMessage( IN HANDLE hCanChn,
|
||||
IN PCANMSG pCanMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelPostMessage)( IN HANDLE hCanChn,
|
||||
IN PCANMSG pCanMsg );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelPostMsgMult( IN HANDLE hCanChn,
|
||||
IN CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelPostMsgMult)( IN HANDLE hCanChn,
|
||||
IN CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelWaitRxEvent( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelWaitRxEvent)( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelWaitTxEvent( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelWaitTxEvent)( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelReadMessage( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT PCANMSG pCanMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelReadMessage)( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT PCANMSG pCanMsg );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelReadMsgMult( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelReadMsgMult)( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelSendMessage( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
IN PCANMSG pCanMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelSendMessage)( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
IN PCANMSG pCanMsg );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelSendMsgMult( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
IN CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canChannelSendMsgMult)( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
IN CANMSG aCanMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
//
|
||||
// legacy functions (do not use for new applications)
|
||||
//
|
||||
#ifndef _VCINPL_NO_LEGACY_
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelPeekMultipleMessages( IN HANDLE hCanChn,
|
||||
IN OUT PUINT32 pdwCount,
|
||||
OUT CANMSG aCanMsg[] );
|
||||
// use canChannelPeekMsgMult instead
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelPostMultipleMessages( IN HANDLE hCanChn,
|
||||
IN OUT PUINT32 pdwCount,
|
||||
IN CANMSG aCanMsg[] );
|
||||
// use canChannelPostMsgMult instead
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelReadMultipleMessages(IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
IN OUT PUINT32 pdwCount,
|
||||
OUT CANMSG aCanMsg[] );
|
||||
// use canChannelReadMsgMult instead
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canChannelSendMultipleMessages( IN HANDLE hCanChn,
|
||||
IN UINT32 dwTimeout,
|
||||
IN OUT PUINT32 pdwCount,
|
||||
IN CANMSG aCanMsg[] );
|
||||
// use canChannelSendMsgMult instead
|
||||
|
||||
#endif //_VCINPL_NO_LEGACY_
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* CAN message scheduler specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerOpen( IN HANDLE hDevice,
|
||||
IN UINT32 dwCanNo,
|
||||
OUT PHANDLE phCanShd );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerOpen)( IN HANDLE hDevice,
|
||||
IN UINT32 dwCanNo,
|
||||
OUT PHANDLE phCanShd );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerClose( IN HANDLE hCanShd );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerClose)( IN HANDLE hCanShd );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerGetCaps( IN HANDLE hCanShd,
|
||||
OUT PCANCAPABILITIES pCanCaps );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerGetCaps)( IN HANDLE hCanShd,
|
||||
OUT PCANCAPABILITIES pCanCaps );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerGetStatus( IN HANDLE hCanShd,
|
||||
OUT PCANSCHEDULERSTATUS pStatus );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerGetStatus)( IN HANDLE hCanShd,
|
||||
OUT PCANSCHEDULERSTATUS pStatus );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerActivate( IN HANDLE hCanShd,
|
||||
IN BOOL fEnable );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerActivate)( IN HANDLE hCanShd,
|
||||
IN BOOL fEnable );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerReset( IN HANDLE hCanShd );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerReset)( IN HANDLE hCanShd );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerAddMessage( IN HANDLE hCanShd,
|
||||
IN PCANCYCLICTXMSG pMessage,
|
||||
OUT PUINT32 pdwIndex );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerAddMessage)( IN HANDLE hCanShd,
|
||||
IN PCANCYCLICTXMSG pMessage,
|
||||
OUT PUINT32 pdwIndex );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerRemMessage( IN HANDLE hCanShd,
|
||||
IN UINT32 dwIndex );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerRemMessage)( IN HANDLE hCanShd,
|
||||
IN UINT32 dwIndex );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerStartMessage( IN HANDLE hCanShd,
|
||||
IN UINT32 dwIndex,
|
||||
IN UINT16 wRepeat );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerStartMessage)( IN HANDLE hCanShd,
|
||||
IN UINT32 dwIndex,
|
||||
IN UINT16 wRepeat );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
canSchedulerStopMessage( IN HANDLE hCanShd,
|
||||
IN UINT32 dwIndex );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_canSchedulerStopMessage)( IN HANDLE hCanShd,
|
||||
IN UINT32 dwIndex );
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* LIN controller specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlOpen( IN HANDLE hDevice,
|
||||
IN UINT32 dwLinNo,
|
||||
OUT PHANDLE phLinCtl );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlOpen)( IN HANDLE hDevice,
|
||||
IN UINT32 dwLinNo,
|
||||
OUT PHANDLE phLinCtl );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlClose( IN HANDLE hLinCtl );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlClose)( IN HANDLE hLinCtl );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlGetCaps( IN HANDLE hLinCtl,
|
||||
OUT PLINCAPABILITIES pLinCaps );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlGetCaps)( IN HANDLE hLinCtl,
|
||||
OUT PLINCAPABILITIES pLinCaps );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlGetStatus( IN HANDLE hLinCtl,
|
||||
OUT PLINLINESTATUS pStatus );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlGetStatus)( IN HANDLE hLinCtl,
|
||||
OUT PLINLINESTATUS pStatus );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlInitialize( IN HANDLE hLinCtl,
|
||||
IN UINT8 bMode,
|
||||
IN UINT16 wBitrate );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlInitialize)( IN HANDLE hLinCtl,
|
||||
IN UINT8 bMode,
|
||||
IN UINT16 wBitrate );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlReset( IN HANDLE hLinCtl );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlReset)( IN HANDLE hLinCtl );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlStart( IN HANDLE hLinCtl,
|
||||
IN BOOL fStart );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlStart)( IN HANDLE hLinCtl,
|
||||
IN BOOL fStart );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linControlWriteMessage( IN HANDLE hLinCtl,
|
||||
IN BOOL fSend,
|
||||
IN PLINMSG pLinMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linControlWriteMessage)( IN HANDLE hLinCtl,
|
||||
IN BOOL fSend,
|
||||
IN PLINMSG pLinMsg );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* LIN message monitor specific functions
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorOpen( IN HANDLE hDevice,
|
||||
IN UINT32 dwLinNo,
|
||||
IN BOOL fExclusive,
|
||||
OUT PHANDLE phLinMon );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorOpen)( IN HANDLE hDevice,
|
||||
IN UINT32 dwLinNo,
|
||||
IN BOOL fExclusive,
|
||||
OUT PHANDLE phLinMon );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorClose( IN HANDLE hLinMon );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorClose)( IN HANDLE hLinMon );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorGetCaps( IN HANDLE hLinMon,
|
||||
OUT PLINCAPABILITIES pLinCaps );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorGetCaps)( IN HANDLE hLinMon,
|
||||
OUT PLINCAPABILITIES pLinCaps );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorGetStatus( IN HANDLE hLinMon,
|
||||
OUT PLINMONITORSTATUS pStatus );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorGetStatus)( IN HANDLE hLinMon,
|
||||
OUT PLINMONITORSTATUS pStatus );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorInitialize( IN HANDLE hLinMon,
|
||||
IN UINT16 wFifoSize,
|
||||
IN UINT16 wThreshold );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorInitialize)( IN HANDLE hLinMon,
|
||||
IN UINT16 wFifoSize,
|
||||
IN UINT16 wThreshold );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorActivate( IN HANDLE hLinMon,
|
||||
IN BOOL fEnable );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorActivate)( IN HANDLE hLinMon,
|
||||
IN BOOL fEnable );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorPeekMessage( IN HANDLE hLinMon,
|
||||
OUT PLINMSG pLinMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorPeekMessage)( IN HANDLE hLinMon,
|
||||
OUT PLINMSG pLinMsg );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorPeekMsgMult( IN HANDLE hLinMon,
|
||||
OUT LINMSG aLinMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorPeekMsgMult)( IN HANDLE hLinMon,
|
||||
OUT LINMSG aLinMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorWaitRxEvent( IN HANDLE hLinMon,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorWaitRxEvent)( IN HANDLE hLinMon,
|
||||
IN UINT32 dwTimeout );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorReadMessage( IN HANDLE hLinMon,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT PLINMSG pLinMsg );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorReadMessage)( IN HANDLE hLinMon,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT PLINMSG pLinMsg );
|
||||
|
||||
EXTERN_C HRESULT VCIAPI
|
||||
linMonitorReadMsgMult( IN HANDLE hLinMon,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT LINMSG aLinMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
typedef HRESULT
|
||||
(VCIAPI *PF_linMonitorReadMsgMult)( IN HANDLE hLinMon,
|
||||
IN UINT32 dwTimeout,
|
||||
OUT LINMSG aLinMsg[],
|
||||
IN UINT32 dwCount,
|
||||
OUT PUINT32 pdwDone );
|
||||
|
||||
#endif //_VCINPL_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,523 @@
|
|||
/*****************************************************************************
|
||||
HMS Technology Center Ravensburg GmbH
|
||||
******************************************************************************
|
||||
|
||||
File : VCITYPE.H
|
||||
Summary : VCI specific constants, data types and macros.
|
||||
|
||||
Date : 2003-09-04
|
||||
Author : Hartmut Heim
|
||||
|
||||
Compiler: MSVC
|
||||
|
||||
******************************************************************************
|
||||
all rights reserved
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _VCITYPE_H_
|
||||
#define _VCITYPE_H_
|
||||
|
||||
#include <stdtype.h>
|
||||
#include <pshpack1.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* unique VCI object identifier
|
||||
****************************************************************************/
|
||||
|
||||
typedef union _VCIID
|
||||
{
|
||||
LUID AsLuid;
|
||||
INT64 AsInt64;
|
||||
} VCIID, *PVCIID;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
typedef const VCIID& REFVCIID;
|
||||
#else
|
||||
typedef const VCIID* const REFVCIID;
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI version information
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _VCIVERSIONINFO
|
||||
{
|
||||
UINT32 VciMajorVersion; // major VCI version number
|
||||
UINT32 VciMinorVersion; // minor VCI version number
|
||||
UINT32 VciRevNumber; // VCI revision number
|
||||
UINT32 VciBuildNumber; // VCI build number
|
||||
UINT32 OsMajorVersion; // major OS version number
|
||||
UINT32 OsMinorVersion; // minor OS version number
|
||||
UINT32 OsBuildNumber; // OS build number
|
||||
UINT32 OsPlatformId; // OS platform id
|
||||
} VCIVERSIONINFO, *PVCIVERSIONINFO;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI device license information
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _VCILICINFO
|
||||
{
|
||||
GUID DeviceClass; // Class ID of the licensed product
|
||||
UINT32 MaxDevices; // maximum number of allowed devices (0=no limit)
|
||||
UINT32 MaxRuntime; // maximum runtime in seconds (0=no limit)
|
||||
UINT32 Restrictions; // additional restrictions (see VCI_LICX_xxx const)
|
||||
} VCILICINFO, *PVCILICINFO;
|
||||
|
||||
//
|
||||
// license restriction flags
|
||||
//
|
||||
|
||||
#define VCI_LICX_NORESTRICT 0x00000000 // no additional restrictions
|
||||
#define VCI_LICX_SINGLEUSE 0x00000001 // single application use only
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI driver information
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _VCIDRIVERINFO
|
||||
{
|
||||
VCIID VciObjectId; // unique VCI object identifier
|
||||
GUID DriverClass; // driver class identifier
|
||||
UINT16 MajorVersion; // major driver version number
|
||||
UINT16 MinorVersion; // minor driver version number
|
||||
} VCIDRIVERINFO, *PVCIDRIVERINFO;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI device information
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _VCIDEVICEINFO
|
||||
{
|
||||
VCIID VciObjectId; // unique VCI object identifier
|
||||
GUID DeviceClass; // device class identifier
|
||||
|
||||
UINT8 DriverMajorVersion; // driver major version number
|
||||
UINT8 DriverMinorVersion; // driver minor version number
|
||||
UINT16 DriverBuildVersion; // driver build version number
|
||||
|
||||
UINT8 HardwareBranchVersion;// hardware branch version number
|
||||
UINT8 HardwareMajorVersion; // hardware major version number
|
||||
UINT8 HardwareMinorVersion; // hardware minor version number
|
||||
UINT8 HardwareBuildVersion; // hardware build version number
|
||||
|
||||
union _UniqueHardwareId // unique hardware identifier
|
||||
{
|
||||
CHAR AsChar[16];
|
||||
GUID AsGuid;
|
||||
} UniqueHardwareId;
|
||||
|
||||
CHAR Description[128]; // device description
|
||||
CHAR Manufacturer[126]; // device manufacturer
|
||||
UINT16 DriverReleaseVersion; // driver release version number
|
||||
} VCIDEVICEINFO, *PVCIDEVICEINFO;
|
||||
|
||||
|
||||
typedef struct _VCIDEVINFOEXA
|
||||
{
|
||||
VCIID VciObjectId; // unique VCI object identifier
|
||||
GUID DeviceClass; // device class identifier
|
||||
|
||||
UINT16 DriverMajorVersion; // driver major version number
|
||||
UINT16 DriverMinorVersion; // driver minor version number
|
||||
UINT16 DriverRevisionNumber; // driver revision number
|
||||
UINT16 DriverBuildNumber; // driver build number
|
||||
|
||||
UINT16 HardwareBranchNumber; // hardware branch version number
|
||||
UINT16 HardwareMajorVersion; // hardware major version number
|
||||
UINT16 HardwareMinorVersion; // hardware minor version number
|
||||
UINT16 HardwareBuildNumber; // hardware build number
|
||||
|
||||
UINT16 FpgaMajorVersion; // FPGA major version number
|
||||
UINT16 FpgaMinorVersion; // FPGA minor version number
|
||||
UINT16 FpgaRevisionNumber; // FPGA revision number
|
||||
UINT16 FpgaBuildNumber; // FPGA build number
|
||||
|
||||
UINT16 BldrMajorVersion; // boot loader major version number
|
||||
UINT16 BldrMinorVersion; // boot loader minor version number
|
||||
UINT16 BldrRevisionNumber; // boot loader revision number
|
||||
UINT16 BldrBuildNumber; // boot loader build number
|
||||
|
||||
GUID UniqueHardwareId; // unique hardware identifier
|
||||
|
||||
CHAR Description[128]; // device description
|
||||
CHAR Manufacturer[128]; // device manufacturer
|
||||
CHAR AliasName[128]; // device alias name
|
||||
} VCIDEVINFOEXA, *PVCIDEVINFOEXA;
|
||||
|
||||
|
||||
typedef struct _VCIDEVINFOEXW
|
||||
{
|
||||
VCIID VciObjectId; // unique VCI object identifier
|
||||
GUID DeviceClass; // device class identifier
|
||||
|
||||
UINT16 DriverMajorVersion; // driver major version number
|
||||
UINT16 DriverMinorVersion; // driver minor version number
|
||||
UINT16 DriverRevisionNumber; // driver revision number
|
||||
UINT16 DriverBuildNumber; // driver build number
|
||||
|
||||
UINT16 HardwareBranchNumber; // hardware branch version number
|
||||
UINT16 HardwareMajorVersion; // hardware major version number
|
||||
UINT16 HardwareMinorVersion; // hardware minor version number
|
||||
UINT16 HardwareBuildNumber; // hardware build number
|
||||
|
||||
UINT16 FpgaMajorVersion; // FPGA major version number
|
||||
UINT16 FpgaMinorVersion; // FPGA minor version number
|
||||
UINT16 FpgaRevisionNumber; // FPGA revision number
|
||||
UINT16 FpgaBuildNumber; // FPGA build number
|
||||
|
||||
UINT16 BldrMajorVersion; // boot loader major version number
|
||||
UINT16 BldrMinorVersion; // boot loader minor version number
|
||||
UINT16 BldrRevisionNumber; // boot loader revision number
|
||||
UINT16 BldrBuildNumber; // boot loader build number
|
||||
|
||||
GUID UniqueHardwareId; // unique hardware identifier
|
||||
|
||||
WCHAR Description[128]; // device description
|
||||
WCHAR Manufacturer[128]; // device manufacturer
|
||||
WCHAR AliasName[128]; // device alias name
|
||||
} VCIDEVINFOEXW, *PVCIDEVINFOEXW;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI bus controller types
|
||||
*
|
||||
* +-------+--------+
|
||||
* | 15..8 | 7 .. 0 |
|
||||
* +-------+--------+
|
||||
* Bit 15..8 : bus type (0 is reserved)
|
||||
* Bit 7..0 : controller type
|
||||
****************************************************************************/
|
||||
|
||||
#define VCI_BUS_RES 0 // reserved
|
||||
#define VCI_BUS_CAN 1 // CAN
|
||||
#define VCI_BUS_LIN 2 // LIN
|
||||
#define VCI_BUS_KLN 3 // K-Line
|
||||
#define VCI_BUS_FXR 4 // FlexRay
|
||||
|
||||
#define VCI_BUS_CTRL(Bus,Ctrl) (UINT16) ( ((Bus)<<8) | (Ctrl) )
|
||||
#define VCI_BUS_TYPE(BusCtrl) (UINT8) ( ((BusCtrl) >> 8) & 0x00FF )
|
||||
#define VCI_CTL_TYPE(BusCtrl) (UINT8) ( ((BusCtrl) >> 0) & 0x00FF )
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// CAN controller types
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// unknown CAN controller
|
||||
#define VCI_CAN_UNKNOWN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_UNKNOWN)
|
||||
|
||||
// Intel 82527
|
||||
#define VCI_CAN_82527 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_82527)
|
||||
|
||||
// Intel 82C200
|
||||
#define VCI_CAN_82C200 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_82C200)
|
||||
|
||||
// Intel 81C90
|
||||
#define VCI_CAN_81C90 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_81C90)
|
||||
|
||||
// Intel 81C92
|
||||
#define VCI_CAN_81C92 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_81C92)
|
||||
|
||||
// Philips SJA 1000
|
||||
#define VCI_CAN_SJA1000 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_SJA1000)
|
||||
|
||||
// Infineon 82C900 (TwinCAN)
|
||||
#define VCI_CAN_82C900 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_82C900)
|
||||
|
||||
// Motorola TOUCAN
|
||||
#define VCI_CAN_TOUCAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_TOUCAN)
|
||||
|
||||
// Freescale Star12 MSCAN
|
||||
#define VCI_CAN_MSCAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_MSCAN)
|
||||
|
||||
// Freescale FlexCAN
|
||||
#define VCI_CAN_FLEXCAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_FLEXCAN)
|
||||
|
||||
// IFI CAN Controller
|
||||
#define VCI_CAN_IFICAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_IFICAN)
|
||||
|
||||
// IFI CAN FD Controller
|
||||
#define VCI_CAN_IFICFD VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_IFICFD)
|
||||
|
||||
// Bosch C_CAN
|
||||
#define VCI_CAN_BCCAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_BCCAN)
|
||||
|
||||
// ST BX_CAN
|
||||
#define VCI_CAN_BXCAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_BXCAN)
|
||||
|
||||
// Bosch M_CAN version A
|
||||
#define VCI_CAN_BMCAN VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_BMCAN)
|
||||
|
||||
// IFI CAN FD Controller (new)
|
||||
#define VCI_CAN_IFICFD2 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_IFICFD2)
|
||||
|
||||
// Bosch M_CAN version B
|
||||
#define VCI_CAN_BMCAN2 VCI_BUS_CTRL(VCI_BUS_CAN, CAN_CTRL_BMCAN2)
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// LIN controller types
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// unknown LIN controller
|
||||
#define VCI_LIN_UNKNOWN VCI_BUS_CTRL(VCI_BUS_LIN, LIN_CTRL_UNKNOWN)
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// K-Line controller types
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// unknown K-Line controller
|
||||
#define VCI_KLN_UNKNOWN VCI_BUS_CTRL(VCI_BUS_KLN, KLN_CTRL_UNKNOWN)
|
||||
|
||||
// RS232 to K-Line converter
|
||||
#define VCI_KLN_RS232 VCI_BUS_CTRL(VCI_BUS_KLN, KLN_CTRL_RS232)
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// FlexRay controller types
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// generic FlexRay controller
|
||||
#define VCI_FXR_GENERIC VCI_BUS_CTRL(VCI_BUS_FXR, FXR_CTRL_GENERIC)
|
||||
|
||||
// Freescale MFR4200, MFR4300, MFR4310
|
||||
#define VCI_FXR_MFR4200 VCI_BUS_CTRL(VCI_BUS_FXR, FXR_CTRL_MFR4200)
|
||||
#define VCI_FXR_MFR4300 VCI_BUS_CTRL(VCI_BUS_FXR, FXR_CTRL_MFR4300)
|
||||
#define VCI_FXR_MFR4310 VCI_BUS_CTRL(VCI_BUS_FXR, FXR_CTRL_MFR4310)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI device capabilities
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _VCIDEVICECAPS
|
||||
{
|
||||
UINT16 BusCtrlCount; // number of supported bus controllers
|
||||
UINT16 BusCtrlTypes[32]; // array of supported bus controllers
|
||||
} VCIDEVICECAPS, *PVCIDEVICECAPS;
|
||||
|
||||
#define VCI_MAX_BUSCTRL 32 // maximum number of supported bus controllers
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI device hardware interface information
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// device interface socket information
|
||||
//
|
||||
typedef union _VCIDIFSINFO
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT32 Slot; // slot number
|
||||
} isa;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Slot; // slot number
|
||||
} mca;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Slot; // slot number
|
||||
} eisa;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Bus; // bus number
|
||||
UINT32 Slot; // slot number
|
||||
UINT32 Func; // function number
|
||||
} pci;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Slot; // slot number
|
||||
UINT32 Func; // function number
|
||||
} pcmcia;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Port; // serial port number
|
||||
} ser;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Port; // parallel port number
|
||||
} par;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT32 Port; // FireWire port number
|
||||
} fiwi;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT16 RootPort; // USB root hub port number
|
||||
UINT16 HubCount; // Number of external USB hubs. Zero indicates that
|
||||
// the device is connected directly to the root hub.
|
||||
UINT16 HubPorts[5]; // Array containing the port number on each external
|
||||
// hub (between the root hub and the device) through
|
||||
// which the USB device is connected.
|
||||
// The first element of the array indicates the port
|
||||
// on the hub that is connected directly to the root
|
||||
// hub. (Only Windows Vista and newer)
|
||||
} usb;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT64 AddrLo; // Low Part of IPv6 LAN Address
|
||||
UINT64 AddrHi; // High Part of IPv6 LAN Address
|
||||
UINT32 Port; // LAN Port Number
|
||||
} lan;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT64 AddrLo; // Low Part of IPv6 WLAN Address
|
||||
UINT64 AddrHi; // High Part of IPv6 WLAN Address
|
||||
UINT32 Port; // WLAN Port Number
|
||||
} wlan;
|
||||
|
||||
struct
|
||||
{
|
||||
UINT8 Data[32]; // unspecific socket info
|
||||
} unspec;
|
||||
|
||||
} VCIDIFSINFO, *PVCIDIFSINFO;
|
||||
|
||||
//
|
||||
// device interface informarion
|
||||
//
|
||||
typedef struct _VCIDEVIFINFOA
|
||||
{
|
||||
UINT32 InterfaceType; // interface type (see VCI_DEVIF_)
|
||||
VCIDIFSINFO SocketInfo; // socket information
|
||||
CHAR Location[256]; // additional location information
|
||||
} VCIDEVIFINFOA, *PVCIDEVIFINFOA;
|
||||
|
||||
typedef struct _VCIDEVIFINFOW
|
||||
{
|
||||
UINT32 InterfaceType; // interface type (see VCI_DEVIF_)
|
||||
VCIDIFSINFO SocketInfo; // socket information
|
||||
WCHAR Location[256]; // additional location information
|
||||
} VCIDEVIFINFOW, *PVCIDEVIFINFOW;
|
||||
|
||||
|
||||
//
|
||||
// VCI device interface types
|
||||
//
|
||||
#define VCI_DEVIF_INVALID 0xFFFFFFFF // invalid interface type
|
||||
|
||||
//--- PC specific interfaces ---------------------------------------------
|
||||
|
||||
#define VCI_DEVIF_SWI 0x00000000 // software interface
|
||||
// (e.g.: Mailslot, Pipe, etc.)
|
||||
#define VCI_DEVIF_INT 0x00000001 // internal bus interface
|
||||
#define VCI_DEVIF_ISA 0x00000002 // ISA bus interface
|
||||
#define VCI_DEVIF_MCA 0x00000003 // Micro Channel bus interface
|
||||
#define VCI_DEVIF_EISA 0x00000004 // extended ISA (EISA) bus interface
|
||||
#define VCI_DEVIF_PCMCIA 0x00000005 // PCMCI interface
|
||||
#define VCI_DEVIF_PCI 0x00000006 // PCI interface card
|
||||
#define VCI_DEVIF_PCIx 0x00000007 // extended PCI interface card
|
||||
#define VCI_DEVIF_PCIe 0x00000008 // PCI express interface card
|
||||
|
||||
//--- embedded interfaces ------------------------------------------------
|
||||
|
||||
#define VCI_DEVIF_GPIO 0x00010000 // GPIO interface
|
||||
#define VCI_DEVIF_SPI 0x00010001 // serial port interface
|
||||
#define VCI_DEVIF_I2C 0x00010002 // I²C interface
|
||||
#define VCI_DEVIF_PC104 0x00010003 // PC/104 bus interface
|
||||
#define VCI_DEVIF_PC104P 0x00010004 // PC/104-plus bus interface
|
||||
#define VCI_DEVIF_PCI104 0x00010005 // PCI/104 bus interface
|
||||
#define VCI_DEVIF_PCIe104 0x00010006 // PCIe/104 bus interface
|
||||
|
||||
//--- external interfaces ------------------------------------------------
|
||||
|
||||
#define VCI_DEVIF_SER 0x00020000 // serial port interface (COM)
|
||||
#define VCI_DEVIF_PAR 0x00020001 // IEEE-1284 (parallel port) interface
|
||||
#define VCI_DEVIF_FIWI 0x00020002 // IEEE-1394 (FireWire) interface
|
||||
#define VCI_DEVIF_USB 0x00020003 // Universal Serial Bus interface
|
||||
#define VCI_DEVIF_LAN 0x00020004 // local area network interface
|
||||
|
||||
//--- wireless interfaces ------------------------------------------------
|
||||
|
||||
#define VCI_DEVIF_IRDA 0x00030000 // infrared interface
|
||||
#define VCI_DEVIF_WLAN 0x00030001 // wireless local area interface
|
||||
#define VCI_DEVIF_BTH 0x00030002 // BlueTooth interface
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI device run-time status information
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct _VCIDEVRTINFO
|
||||
{
|
||||
//--- data provided by VCI system service
|
||||
|
||||
UINT32 DevRefCnt; // current value of the device reference counter
|
||||
UINT32 DevReqCnt; // current value of device request counter
|
||||
UINT32 DevResCnt; // current value of device response counter
|
||||
UINT32 DevStatus; // device status flags (see VCI_DEVRTI_STAT_)
|
||||
UINT32 CommLayer; // currently running communication layer
|
||||
// (see VCI_DEVRTI_COMML_)
|
||||
UINT32 CommRefs; // current value of the communication layer
|
||||
// reference counter
|
||||
|
||||
//--- data provided by hardware device driver
|
||||
|
||||
UINT8 PnpState; // device PnP status (see VCI_DEVRTI_PNP_)
|
||||
UINT8 PwrState; // current power state (see VCI_DEVRTI_POWER_)
|
||||
UINT16 _Rsvd_1;
|
||||
UINT32 FwStatus; // firmware status (see VCI_DEVRTI_FWST_)
|
||||
//tbd
|
||||
} VCIDEVRTINFO, *PVCIDEVRTINFO;
|
||||
|
||||
|
||||
//
|
||||
// device status flags
|
||||
//
|
||||
#define VCI_DEVRTI_STAT_LICEXP 0x00000001 // run-time of license expired
|
||||
#define VCI_DEVRTI_STAT_DISCON 0x80000000 // device driver disconnected
|
||||
|
||||
//
|
||||
// communication layer IDs
|
||||
//
|
||||
#define VCI_DEVRTI_COMML_INV 0x00000000 // invalid
|
||||
#define VCI_DEVRTI_COMML_DAL 0x004C4144 // 'DAL'
|
||||
#define VCI_DEVRTI_COMML_FLD 0x00444C46 // 'FLD'
|
||||
#define VCI_DEVRTI_COMML_CCL 0x004C4343 // 'CCL'
|
||||
#define VCI_DEVRTI_COMML_BAL 0x004C4142 // 'BAL'
|
||||
|
||||
|
||||
//
|
||||
// device Plug & Play status
|
||||
//
|
||||
#define VCI_DEVRTI_PNP_INVALID 0 // invalid state
|
||||
#define VCI_DEVRTI_PNP_NOTINIT 1 // not initialized
|
||||
#define VCI_DEVRTI_PNP_STARTED 2 // device started
|
||||
#define VCI_DEVRTI_PNP_STOPPED 3 // device stopped
|
||||
#define VCI_DEVRTI_PNP_REMOVED 4 // device removed
|
||||
#define VCI_DEVRTI_PNP_DELETED 5 // device deleted
|
||||
|
||||
//
|
||||
// device power status
|
||||
//
|
||||
#define VCI_DEVRTI_POWER_DX 0 // unknown or unspecified
|
||||
#define VCI_DEVRTI_POWER_D0 1 // device working state
|
||||
#define VCI_DEVRTI_POWER_D1 2 // device low power state < D0
|
||||
#define VCI_DEVRTI_POWER_D2 3 // device low power state < D1
|
||||
#define VCI_DEVRTI_POWER_D3 4 // device sleeping state
|
||||
|
||||
//
|
||||
// firmware status flags
|
||||
//
|
||||
#define VCI_DEVRTI_FWST_LOADED 0x00000001 // firmware loaded
|
||||
#define VCI_DEVRTI_FWST_HALTED 0x00000002 // firmware halted
|
||||
|
||||
|
||||
#include <poppack.h>
|
||||
#endif //_VCITYPE_H_
|
|
@ -0,0 +1,79 @@
|
|||
/*****************************************************************************
|
||||
HMS Technology Center Ravensburg GmbH
|
||||
******************************************************************************
|
||||
|
||||
File : VCIVER.H
|
||||
Summary : VCI version information.
|
||||
Date : 2018-07-30
|
||||
|
||||
Compiler: Microsoft Visual C
|
||||
|
||||
******************************************************************************
|
||||
all rights reserved
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _VCIVER_H_
|
||||
#define _VCIVER_H_
|
||||
|
||||
/*****************************************************************************
|
||||
* Macros
|
||||
****************************************************************************/
|
||||
|
||||
#define VCI_VERSION_ASTXT_(n) #n
|
||||
#define VCI_VERSION_ASTEXT(n) VCI_VERSION_ASTXT_(n)
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI version number
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// major VCI version
|
||||
//
|
||||
#define VCI_MAJOR_VERSION 4
|
||||
#define VCI_MAJOR_VERSION_STR VCI_VERSION_ASTEXT(VCI_MAJOR_VERSION)
|
||||
|
||||
//
|
||||
// minor VCI version
|
||||
//
|
||||
#define VCI_MINOR_VERSION 0
|
||||
#define VCI_MINOR_VERSION_STR VCI_VERSION_ASTEXT(VCI_MINOR_VERSION)
|
||||
|
||||
//
|
||||
// VCI revision number
|
||||
//
|
||||
#define VCI_REV_NUMBER 207
|
||||
#define VCI_REV_NUMBER_STR VCI_VERSION_ASTEXT(VCI_REV_NUMBER)
|
||||
|
||||
//
|
||||
// VCI build number
|
||||
//
|
||||
#define VCI_BUILD_NUMBER 0
|
||||
#define VCI_BUILD_NUMBER_STR VCI_VERSION_ASTEXT(VCI_BUILD_NUMBER)
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* VCI version information
|
||||
****************************************************************************/
|
||||
|
||||
#define VCI_VI_PRODUCT_VERS \
|
||||
VCI_MAJOR_VERSION, VCI_MINOR_VERSION, VCI_REV_NUMBER, VCI_BUILD_NUMBER
|
||||
|
||||
#define VCI_VI_PRODUCT_VERS_STR \
|
||||
VCI_VERSION_ASTEXT(VCI_VI_PRODUCT_VERS)
|
||||
|
||||
#define VCI_VI_COPYRIGHT_STR \
|
||||
"Copyright HMS Technology Center Ravensburg GmbH, all rights reserved"
|
||||
|
||||
#define VCI_VI_COMPANY_NAME_STR \
|
||||
"HMS Technology Center Ravensburg GmbH"
|
||||
|
||||
#define VCI_VI_PRODUCT_NAME_STR \
|
||||
"VCI " VCI_MAJOR_VERSION_STR
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define VCI_VI_SPECIALBUILD_STR "Debug"
|
||||
#else
|
||||
#define VCI_VI_SPECIALBUILD_STR ""
|
||||
#endif
|
||||
|
||||
#endif //_VCIVER_H_
|
|
@ -19,11 +19,11 @@
|
|||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="MainUnit"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="45"/>
|
||||
<CursorPos X="15" Y="48"/>
|
||||
<UsageCount Value="87"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="../LibOpenBLT/bindings/pascal/openblt.pas"/>
|
||||
|
@ -38,10 +38,12 @@
|
|||
<Filename Value="currentconfig.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="CurrentConfig"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="202"/>
|
||||
<CursorPos X="57" Y="251"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="115"/>
|
||||
<CursorPos X="28" Y="125"/>
|
||||
<UsageCount Value="87"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="configgroups.pas"/>
|
||||
|
@ -291,11 +293,15 @@
|
|||
<OtherDefines Count="1">
|
||||
<Define0 Value="UseCThreads"/>
|
||||
</OtherDefines>
|
||||
<JumpHistory Count="1">
|
||||
<JumpHistory Count="2" HistoryIndex="1">
|
||||
<Position1>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="294" Column="14" TopLine="291"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="48" Column="15" TopLine="45"/>
|
||||
</Position2>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
|
|
|
@ -32,6 +32,7 @@ object TransportXcpCanForm: TTransportXcpCanForm
|
|||
'Kvaser Leaf Light v2'
|
||||
'Lawicel CANUSB'
|
||||
'Vector XL Driver'
|
||||
'Ixxat VCI Driver'
|
||||
)
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
|
|
|
@ -220,7 +220,9 @@ begin
|
|||
else if FTransportXcpCanConfig.Device = 'lawicel_canusb' then
|
||||
CmbDevice.ItemIndex := 2
|
||||
else if FTransportXcpCanConfig.Device = 'vector_xldriver' then
|
||||
CmbDevice.ItemIndex := 3;
|
||||
CmbDevice.ItemIndex := 3
|
||||
else if FTransportXcpCanConfig.Device = 'ixxat_vcidriver' then
|
||||
CmbDevice.ItemIndex := 4;
|
||||
{$ENDIF}
|
||||
CmbChannel.ItemIndex := 0;
|
||||
if FTransportXcpCanConfig.Channel <= LongWord(CmbChannel.Items.Count) then
|
||||
|
@ -270,7 +272,9 @@ begin
|
|||
else if CmbDevice.ItemIndex = 2 then
|
||||
FTransportXcpCanConfig.Device := 'lawicel_canusb'
|
||||
else if CmbDevice.ItemIndex = 3 then
|
||||
FTransportXcpCanConfig.Device := 'vector_xldriver';
|
||||
FTransportXcpCanConfig.Device := 'vector_xldriver'
|
||||
else if CmbDevice.ItemIndex = 4 then
|
||||
FTransportXcpCanConfig.Device := 'ixxat_vcidriver';
|
||||
{$ENDIF}
|
||||
FTransportXcpCanConfig.Channel := CmbChannel.ItemIndex;
|
||||
case CmbBaudrate.ItemIndex of
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue