周立功CAN盒驱动C#调用方式

更新时间:2023-04-26 15:42:09 阅读: 评论:0


2023tmp文件是什么 年4月26日发(作者:阵列硬盘)

周⽴功CAN盒驱动C#调⽤⽅式

#region CAN接受和发送数据定义

[StructLayout(tial, CharSet = , Pack = 1)]

pub阿开头的成语 lic struct PVCI_CAN_OBJ

{

p大便黑色是怎么回事 ublic uint ID;

public uint TimeStamp;

public byte TimeFlag;

public byte SendType;

public byte RemoteFlag;

public byte ExternFlag;

public byte DataLen;

[MarshalAs(rray, SizeConst = 8)]

public byte[] data;

[MarshalAs(rray, SizeConst = 3)]

public byte[] Rerved;

}

#endregion

#region 其他CAN函数数据定义

public struct PVCI_ERR_INFO

{

public uint ErrCode;

[MarshalAs(rray, SizeConst = 3)]

public byte[] Passive_ErrData;

public byte ArLost_ErrData;

}

public struct _VCI_BOARD_INFO

{

p环保知识大全 ublic ushort hw_Version;锻炼臂力

个人工作计划小班 public ushort fw_Version;

public ushort dr_Version;

public ushort in_Version;

public ushort irq_Num;

public byte can_Num;

[MarshalAs(rray, SizeConst = 20)]

public byte[] str_Serial_Num;

[MarshalAs(rray, SizeConst = 40)]

public byte[] str_hw_Type;

[MarshalAs(rray, SizeConst = 4)]

public ushort[] Rerved;

}

#endregion

#region DLL连接

//调⽤接受设备动态连接库

[DllImport("", EntryPoint = "VCI_Receive", CharSet = , CallingConvention =

l)]

public static extern uint VCI_Receive(int DevType, int DevIndex, int CANI依阿华级战列舰 ndex, [Out] PVCI_CAN_OBJ[] pReceive, uint

Len, int WaitTime);

//调⽤报错动态连接库

[DllImport("", EntryPoint = "VCI_ReadErrInfo", CharSet = , CallingConvention =

l)]

public static extern int VCI_ReadErrInfo(int DevType, int DevIndex, int CANI灯祭 ndex, PVCI_ERR_INFO pErrInfo);

/*关闭设备连接库*/

[DllImport("", EntryPoint = "VCI_CloDevice", CharSet = , CallingConvention =

l)]

public static extern bool VCI_CloDevice(int DevType, int DevIndex);

/*CAN启动CAN连接库*/

幼儿园放假时间 [DllImport("", EntryPoint = "VCI_StartCAN", CharSet = , CallingConvention =

l)]

public static extern int VCI_StartCAN(int DevType, int DevIndex, int CANIndex);

/*CAN发送连接库*/

[DllImport("", EntryPoint = "VCI_Transmit", CharSet = , CallingConvention =

l)]

public static extern uint VCI_Transmit(int DevType, int DevIndex, int CANIndex, PVCI_CAN_OBJ[] pSend, uint Len);

#endregion


本文发布于:2023-04-26 15:42:09,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/515716.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:周立功can卡
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图