asbDio (asbDio.dll)
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace WagweiCSharpDIO_AWP_ASB
{
public class Wagwei_asbDio
{
//**************************************************************
//asbDioInitialize
[DllImport("asbDio.dll")]
public static extern int asbDioInitialize();
public const string asbDioInitializeRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-2 ASBDIO_RESOURCE_ERROR
//-3 ASBDIO_TIMEOUT_ERROR
//-5 ASBDIO_DRIVER_ERROR
//-7 ASBDIO_THREAD_ERROR
//-8 ASBDIO_NO_TARGET_BOARD
//-9 ASBDIO_NOT_SUPPORT_FPGA";
//asbDioFinalize
[DllImport("asbDio.dll")]
public static extern int asbDioFinalize();
public const string asbDioFinalizeRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-5 ASBDIO_DRIVER_ERROR
//-6 ASBDIO_EVENT_ERROR
//-7 ASBDIO_THREAD_ERROR";
//**************************************************************
//asbDioGetDeviceInfo
[DllImport("asbDio.dll")]
public static extern int asbDioGetDeviceInfo(out DEVICE_INFO pDevInfo);
public struct DEVICE_INFO
{
long FpgaVer;
long BoardRev;
long DriverVer;
long LibraryVer;
long BitMax;
}
public const string asbDioGetDeviceInfoRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-4 ASBDIO_INVALID_PARAMETER
//-5 ASBDIO_DRIVER_ERROR";
//**************************************************************
//asbDioRead
[DllImport("asbDio.dll")]
public static extern int asbDioRead(out uint pRdata);
//pRdata LPDWORD
public const string asbDioReadRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioWrite
[DllImport("asbDio.dll")]
public static extern int asbDioWrite(uint Wdata, uint Mask);
//Wdata DWORD
//Mask DWORD
//事例
//DWORD Wdata (0 << 2) | (1 << 1) | (1 << 0); //0,1为High;2为Low
//DWORD Mask (1 << 2) | (1 << 1) | <1 << 0); //0,1,2有效
public const string asbDioWriteRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioReadBack
[DllImport("asbDio.dll")]
public static extern int asbDioReadBack(out uint pRdata);
//pRdata LPDWORD
public const string asbDioReadBackRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//**************************************************************
//asbDioSetIntMask
[DllImport("asbDio.dll")]
public static extern int asbDioSetIntMask(uint SetMask);
//SetMask DWORD
public const string asbDioSetIntMaskRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioGetIntMask
[DllImport("asbDio.dll")]
public static extern int asbDioGetIntMask(out uint pGetMask);
//pGetMask LPWORD
public const string asbDioGetIntMaskRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioSetIntPolarity
[DllImport("asbDio.dll")]
public static extern int asbDioSetIntPolarity(uint SetPolarity);
//SetPolarity DWORD
public const string asbDioSetIntPolarityRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioGetIntPolarity
[DllImport("asbDio.dll")]
public static extern int asbDioGetIntPolarity(out uint pGetPolarity);
//pGetPolarity LPDWORD
public const string asbDioGetIntPolarityRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioRegistCallback
[DllImport("asbDio.dll")]
public static extern int asbDioRegistCallback(UserCallBack HookFunc);
public const string asbDioRegistCallbackRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST";
public delegate void UserCallBack(INT_BUFFER intBuffer);
public struct INT_BUFFER
{
ulong ulPin;
ulong ulPort;
ulong ulTime;
}
//**************************************************************
//asbDioReadOnBoardTimer
[DllImport("asbDio.dll")]
public static extern int asbDioReadOnBoardTimer(out uint pTimerCount);
//pTimerCount LPDWORD
public const string asbDioReadOnBoardTimerRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//**************************************************************
//asbDioSetDigitalFilter
[DllImport("asbDio.dll")]
public static extern int asbDioSetDigitalFilter(uint SetFilter);
//SetFilter DWORD
public const string asbDioSetDigitalFilterRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
//asbDioGetDigitalFilter
[DllImport("asbDio.dll")]
public static extern int asbDioGetDigitalFilter(out uint pGetFilter);
//pGetFilter LPDWORD
public const string asbDioGetDigitalFilterRtn = @"
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER";
// 0 ASBDIO_NO_ERROR
//-1 ASBDIO_INVALID_REQUEST
//-2 ASBDIO_RESOURCE_ERROR
//-3 ASBDIO_TIMEOUT_ERROR
//-4 ASBDIO_INVALID_PARAMETER
//-5 ASBDIO_DRIVER_ERROR
//-6 ASBDIO_EVENT_ERROR
//-7 ASBDIO_THREAD_ERROR
//-8 ASBDIO_NO_TARGET_BOARD
//-9 ASBDIO_NOT_SUPPORT_FPGA
}
}
asbDio (asbDio.dll)的更多相关文章
- dll文件32位64位检测工具以及Windows文件夹SysWow64的坑
自从操作系统升级到64位以后,就要不断的需要面对32位.64位的问题.相信有很多人并不是很清楚32位程序与64位程序的区别,以及Program Files (x86),Program Files的区别 ...
- C#创建dll类库
类库让我们的代码可复用,我们只需要在类库中声明变量一次,就能在接下来的过程中无数次地使用,而无需在每次使用前都要声明它.这样一来,就节省了我们的内存空间.而想要在类库添加什么类,还需取决于类库要实现哪 ...
- 关于Linux和Windows下部署mysql.data.dll的注册问题
mysql ado.net connector下载地址: http://dev.mysql.com/downloads/connector/net/ 选择版本: Generally Available ...
- Windows平台Go调用DLL的坑
最近的项目中,使用了GO来开发一些服务中转程序.业务比较简单,但是有一些业务需要复用原有C++开发的代码.而在WINDOWS,用CGO方式来集成C/C++代码并不是太方便.所以用DLL把C++的代码封 ...
- C#开发奇技淫巧三:把dll放在不同的目录让你的程序更整洁
系列文章 C#开发奇技淫巧一:调试windows系统服务 C#开发奇技淫巧二:根据dll文件加载C++或者Delphi插件 C#开发奇技淫巧三:把dll放在不同的目录让你的程序更整洁 程序目录的整理 ...
- .Net使用Newtonsoft.Json.dll(JSON.NET)对象序列化成json、反序列化json示例教程
JSON作为一种轻量级的数据交换格式,简单灵活,被很多系统用来数据交互,作为一名.NET开发人员,JSON.NET无疑是最好的序列化框架,支持XML和JSON序列化,高性能,免费开源,支持LINQ查询 ...
- 使用Newtonsoft.Json.dll(JSON.NET)动态解析JSON、.net 的json的序列化与反序列化(一)
在开发中,我非常喜欢动态语言和匿名对象带来的方便,JSON.NET具有动态序列化和反序列化任意JSON内容的能力,不必将它映射到具体的强类型对象,它可以处理不确定的类型(集合.字典.动态对象和匿名对象 ...
- ILMerge合并多个DLL
序言 如果你的项目要提供多个dll给别人用,那么不妨让你的dll合并为一个,让别人看起来简洁,引用起来不会过于繁琐. 本篇比较少,但也算是比较实用吧. 下载微软的辅助工具ILMerge Imerge下 ...
- VS2010中dll不可用问题
最近做项目的时候,深圳那边提供了一个算法.算法在那边跑的好的很,但是在我这边怎么跑都跑不起来,总是报错:说找不到dll. 1.第一种想法:找不到dll,是不是dll放的位置不对.找了一下目录,导入的路 ...
随机推荐
- windows10风格 springboot vue.js html 跨域 前后分离 activiti 整合项目框架源码
官网:www.fhadmin.org 此项目为Springboot工作流版本 windows 风格,浏览器访问操作使用,非桌面应用程序. 1.代码生成器: [正反双向](单表.主表.明细表.树形表,快 ...
- Bloom’S Taxonomy
引用:https://www.learning-theories.com/blooms-taxonomy-bloom.html Bloom's Taxonomy is a model that is ...
- Gin-Go学习笔记一:Hello World
Hello World 1> Gin是一个golang的微框架,封装比较优雅,API友好.具有快速灵活,容错方便等特点.Gin自身的net/http足够简单,性能也非常不错. 2> ...
- 隐马尔科夫模型(Hidden Markov Models) 系列之四
转自:http://blog.csdn.net/eaglex/article/details/6430389 前向算法(Forward Algorithm) 一.如果计算一个可观察序列的概率? 1 ...
- Python3报错:ModuleNotFoundError: No module named '_bz2'
系统信息 系统:CentOS Linux release 7.6.1810 (Core) python版本:python3.7 报错信息 from _bz2 import BZ2Compresso ...
- MySQL容器化详细教程
前言: 上篇文章介绍了Docker工具的安装及常用命令使用.本篇文章我们会介绍如何在Docker中运行MySQL实例,可能有的小伙伴会问:为什么要在Docker里运行MySQL呢?因为在Docker ...
- LDA-作为线性判别 降维 推导
LDA 降维原理 前面对 LDA 作为作为分类器 有详细推导, 其核心就是 贝叶斯公式, 已知全概率, 求(条件概率)最大先验概率, 类似的问题. 而 LDA 如果作为 降维 的原理是: a. 将带上 ...
- Linux内存含义
关于Linux的内存,首先要先知道各个部分的含义 1. 命令: free -m // Mb 显示 1,total:物理内存实际总量2,used:这块千万注意,这里可不是实际已经使用了的内存哦 ...
- 第一部分day2-for、while、数据类型(字符串、列表、元组)
数据类型 数据类型的初识 1.数字 整数 int (integer) 整型 (注:python3 不区分整型和长整型,统一称之为整型) 长整型 float(浮点型) complex(复数) 是由实数和 ...
- 系统管理员必须知道的PHP安全实践
Apache web 服务器提供了这种便利 :通过 HTTP 或 HTTPS 协议,访问文件和内容.配置不当的服务器端脚本语言会带来各种各样的问题.所以,使用 PHP 时要小心.以下是 25 个 PH ...