PCAN-basic API库文件


基于PCAN(ECAN)的API函数库,有说明文档,C#、C++、JAVA、Python、VB等语言例程,对于开发上位机有参考意义,本人硬件使用ECAN,基于该函数库,已成功开发CAN通讯上位机程序。亲测可用,非常有意义的资料。
资源截图
代码片段和文件信息
//  PCANBasic.cs
//
//  ~~~~~~~~~~~~
//
//  PCAN-Basic API
//
//  ~~~~~~~~~~~~
//
//  ------------------------------------------------------------------
//  Author : Keneth Wagner
// Last change: 13.11.2017 Wagner
//
//  Language: C# 1.0
//  ------------------------------------------------------------------
//
//  Copyright (C) 1999-2017  PEAK-System Technik GmbH Darmstadt
//  more Info at http://www.peak-system.com 
//
using System;
using System.Text;
using System.Runtime.InteropServices;

namespace Peak.Can.Basic
{    
    using TPCANHandle = System.UInt16;    
    using TPCANBitrateFD = System.String;
using TPCANTimestampFD = System.UInt64;

    #region Enumerations
    /// 
    /// Represents a PCAN status/error code
    /// 

    [Flags]
    public enum TPCANStatus : uint
    {
        /// 
        /// No error
        /// 

        PCAN_ERROR_OK           = 0x00000
        /// 
        /// Transmit buffer in CAN controller is full
        /// 

        PCAN_ERROR_XMTFULL      = 0x00001
        /// 
        /// CAN controller was read too late        
        /// 

        PCAN_ERROR_OVERRUN      = 0x00002  
        /// 
        /// Bus error: an error counter reached the ‘light‘ limit
        /// 

        PCAN_ERROR_BUSLIGHT     = 0x00004  
        /// 
        /// Bus error: an error counter reached the ‘heavy‘ limit
        /// 

        PCAN_ERROR_BUSHEAVY     = 0x00008  
        /// 
        /// Bus error: an error counter reached the ‘warning‘ limit
        /// 

        PCAN_ERROR_BUSWARNING   = PCAN_ERROR_BUSHEAVY
        /// 
        /// Bus error: the CAN controller is error passive
        /// 

        PCAN_ERROR_BUSPASSIVE   = 0x40000
        /// 
        /// Bus error: the CAN controller is in bus-off state
        /// 

        PCAN_ERROR_BUSOFF       = 0x00010  
        /// 
        /// Mask for all bus errors
        /// 

        PCAN_ERROR_ANYBUSERR = (PCAN_ERROR_BUSWARNING | PCAN_ERROR_BUSLIGHT | PCAN_ERROR_BUSHEAVY | PCAN_ERROR_BUSOFF | PCAN_ERROR_BUSPASSIVE)
        /// 
        /// Receive queue is empty
        /// 

        PCAN_ERROR_QRCVEMPTY    = 0x00020  
        /// 
        /// Receive queue was read too late
        /// 

        PCAN_ERROR_QOVERRUN     = 0x00040  
        /// 
        /// Transmit queue is full
        /// 

        PCAN_ERROR_QXMTFULL     = 0x00080  
        /// 
        /// Test of the CAN controller hardware registers failed (no hardware found)
        /// 

        PCAN_ERROR_REGTEST      = 0x00100
        /// 
        /// Driver not loaded
        /// 

        PCAN_ERROR_NODRIVER     = 0x00200
        /// 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-07 13:25  PCAN-Basic API
     文件     2526476  2017-11-20 09:46  PCAN-Basic APIPCAN-Parameter_Documentation.pdf
     文件      910897  2017-11-20 09:46  PCAN-Basic APIPCANBasic_deu.chm
     目录           0  2017-11-22 16:47  PCAN-Basic APISamples
     目录           0  2017-11-22 16:47  PCAN-Basic APISamplesDelphi
     文件        3766  2017-11-20 09:46  PCAN-Basic APISamplesDelphiPCANBasicExample.dproj
     文件       75975  2017-11-20 09:46  PCAN-Basic APISamplesDelphiUnit1.pas
     文件       34875  2017-11-20 09:46  PCAN-Basic APISamplesDelphiUnit1.dfm
     文件       56568  2017-11-20 09:46  PCAN-Basic APISamplesDelphiPCANBasic.pas
     文件         271  2017-11-20 09:46  PCAN-Basic APISamplesDelphiPCANBasicExample.dpr
     文件        6196  2017-11-20 09:46  PCAN-Basic APISamplesDelphiPCANBasicExample.res
     目录           0  2017-11-22 16:47  PCAN-Basic APISamplesC++_Builder
     文件       10385  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderPCANBasicClass.h
     文件       34813  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderUnit1.dfm
     文件       63491  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderUnit1.cpp
     文件        9527  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderUnit1.h
     文件       10864  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderPCANBasicExample.cbproj
     文件       30095  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderPCANBasic.h
     文件         860  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderPCANBasicExample.cpp
     文件        6164  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderPCANBasicExample.res
     文件        6057  2017-11-20 09:46  PCAN-Basic APISamplesC++_BuilderPCANBasicClass.cpp
     目录           0  2017-11-22 16:47  PCAN-Basic APISamplesC#
     文件         481  2017-11-20 09:46  PCAN-Basic APISamplesC#Program.cs
     文件        4973  2017-11-20 09:46  PCAN-Basic APISamplesC#PCANBasicExample.csproj
     文件       52056  2017-11-20 09:46  PCAN-Basic APISamplesC#PCANBasic.cs
     文件        6208  2017-11-20 09:46  PCAN-Basic APISamplesC#Form1.resx
     文件        1624  2017-11-20 09:46  PCAN-Basic APISamplesC#PCANBasicExample.sln
     目录           0  2017-11-22 16:47  PCAN-Basic APISamplesC#Properties
     文件        2860  2017-11-20 09:46  PCAN-Basic APISamplesC#PropertiesResources.Designer.cs
     文件        1489  2017-11-20 09:46  PCAN-Basic APISamplesC#PropertiesAssemblyInfo.cs
     文件        5612  2017-11-20 09:46  PCAN-Basic APISamplesC#PropertiesResources.resx
............此处省略272个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)